#[non_exhaustive]pub enum ImageSource {
Decoded(Arc<VideoFrame>),
Path(String),
EncodedBytes(Arc<[u8]>),
}Expand description
Bitmap source. Either an owned frame, a shared frame handle, or a path that the renderer resolves on first use.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Decoded(Arc<VideoFrame>)
Fully-decoded frame, Arc-shared so cloning is cheap.
Path(String)
Filesystem path — resolved lazily by the renderer.
EncodedBytes(Arc<[u8]>)
Raw bytes of an encoded image file (PNG/JPEG/etc).
Trait Implementations§
Source§impl Clone for ImageSource
impl Clone for ImageSource
Source§fn clone(&self) -> ImageSource
fn clone(&self) -> ImageSource
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ImageSource
impl RefUnwindSafe for ImageSource
impl Send for ImageSource
impl Sync for ImageSource
impl Unpin for ImageSource
impl UnsafeUnpin for ImageSource
impl UnwindSafe for ImageSource
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