pub enum ImageSource<'a> {
Path(Cow<'a, str>),
Bytes(Arc<[u8]>),
Entry {
container: Cow<'a, str>,
name: Cow<'a, str>,
},
}Expand description
A handle to an image; never pixels.
Decoding a 4000x3000 PNG only to print [image: diagram] is exactly the kind of waste
this project cannot afford, so resolution is deferred until we know whether the
backend can display graphics at all.
Variants§
Path(Cow<'a, str>)
Bytes(Arc<[u8]>)
Entry
An entry inside a container (the ZIP of a DOCX/EPUB, a PDF object).
Trait Implementations§
Source§impl<'a> Clone for ImageSource<'a>
impl<'a> Clone for ImageSource<'a>
Source§fn clone(&self) -> ImageSource<'a>
fn clone(&self) -> ImageSource<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ImageSource<'_>
impl Debug for ImageSource<'_>
Auto Trait Implementations§
impl<'a> Freeze for ImageSource<'a>
impl<'a> RefUnwindSafe for ImageSource<'a>
impl<'a> Send for ImageSource<'a>
impl<'a> Sync for ImageSource<'a>
impl<'a> Unpin for ImageSource<'a>
impl<'a> UnsafeUnpin for ImageSource<'a>
impl<'a> UnwindSafe for ImageSource<'a>
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