pub enum Error {
Parse(ParseError),
Font(FontError),
Unsupported {
what: String,
},
Malformed {
what: String,
},
InvalidOption {
what: String,
},
}Expand description
Crate-level error.
Unsupported input is never rendered. Error::Parse wraps tokenizer/parser
failures; Error::Font wraps face/glyph failures; Error::Unsupported
is a construct or feature out of scope; Error::Malformed is a bad value
that parsed as the wrong shape; Error::InvalidOption is a render option
out of range.
Variants§
Parse(ParseError)
Tokenizer or parser rejected the input.
Font(FontError)
Font bytes or a requested glyph could not be used.
Unsupported
A feature listed as out of scope, or not yet implemented.
Callers must treat this as failure. The renderer does not invent output.
Malformed
Syntactically invalid value (for example a color spec with the wrong
number of components). Distinct from Self::Unsupported.
InvalidOption
A render option is out of range (for example PNG DPI of 0 or above 2400).
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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