Enum zng_ext_font::FontLoadingError
source · pub enum FontLoadingError {
UnknownFormat,
NoSuchFontInCollection,
Parse(FaceParsingError),
NoFilesystem,
Io(Arc<Error>),
}
Expand description
Reasons why a loader might fail to load a font.
Variants§
UnknownFormat
The data was of a format the loader didn’t recognize.
NoSuchFontInCollection
Attempted to load an invalid index in a TrueType or OpenType font collection.
For example, if a .ttc
file has 2 fonts in it, and you ask for the 5th one, you’ll get
this error.
Parse(FaceParsingError)
Attempted to load a malformed or corrupted font.
NoFilesystem
Attempted to load a font from the filesystem, but there is no filesystem (e.g. in WebAssembly).
Io(Arc<Error>)
A disk or similar I/O error occurred while attempting to load the font.
Trait Implementations§
source§impl Clone for FontLoadingError
impl Clone for FontLoadingError
source§fn clone(&self) -> FontLoadingError
fn clone(&self) -> FontLoadingError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FontLoadingError
impl Debug for FontLoadingError
source§impl Display for FontLoadingError
impl Display for FontLoadingError
source§impl Error for FontLoadingError
impl Error for FontLoadingError
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Error> for FontLoadingError
impl From<Error> for FontLoadingError
source§fn from(error: Error) -> FontLoadingError
fn from(error: Error) -> FontLoadingError
Converts to this type from the input type.
source§impl From<FontLoadingError> for FontLoadingError
impl From<FontLoadingError> for FontLoadingError
source§impl PartialEq for FontLoadingError
impl PartialEq for FontLoadingError
Auto Trait Implementations§
impl Freeze for FontLoadingError
impl !RefUnwindSafe for FontLoadingError
impl Send for FontLoadingError
impl Sync for FontLoadingError
impl Unpin for FontLoadingError
impl !UnwindSafe for FontLoadingError
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self
equals other
.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more