pub enum VectorError {
InvalidCanvas {
width: f64,
height: f64,
dpi: f64,
},
Font(TextError),
Image(EncodeError),
NonFinite(&'static str),
Unsupported(&'static str),
StreamedImage,
Tex(TexError),
UnwrittenObject(usize),
StreamOpen,
OutOfMemory(OutOfMemory),
}Expand description
Why a vector document could not be produced.
Variants§
InvalidCanvas
The page size or resolution is not positive and finite.
Fields
Font(TextError)
A font could not be read.
Image(EncodeError)
An image could not be encoded.
NonFinite(&'static str)
A number the format cannot represent (PDF has no NaN or infinity).
Unsupported(&'static str)
Something the format cannot hold.
StreamedImage
A PGF picture written to no file has an image, which can only be
written beside the picture’s file (matplotlib’s ValueError).
Tex(TexError)
TeX text could not be typeset or its fonts embedded.
UnwrittenObject(usize)
A PDF object was reserved but never written before the cross-reference table.
StreamOpen
A PDF stream was begun while another is open (matplotlib’s
assertion in beginStream).
OutOfMemory(OutOfMemory)
The memory for the document cannot be allocated.
Trait Implementations§
Source§impl Debug for VectorError
impl Debug for VectorError
Source§impl Display for VectorError
impl Display for VectorError
Source§impl Error for VectorError
impl Error for VectorError
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<EncodeError> for VectorError
impl From<EncodeError> for VectorError
Source§fn from(err: EncodeError) -> Self
fn from(err: EncodeError) -> Self
Converts to this type from the input type.
Source§impl From<OutOfMemory> for VectorError
impl From<OutOfMemory> for VectorError
Source§fn from(err: OutOfMemory) -> Self
fn from(err: OutOfMemory) -> Self
Converts to this type from the input type.
Source§impl From<TexError> for VectorError
impl From<TexError> for VectorError
Auto Trait Implementations§
impl Forget for VectorError
impl Freeze for VectorError
impl Move for VectorError
impl RefUnwindSafe for VectorError
impl Send for VectorError
impl Sync for VectorError
impl Unpin for VectorError
impl UnsafeUnpin for VectorError
impl UnwindSafe for VectorError
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
Mutably borrows from an owned value. Read more