Enum femtovg::ImageSource
source · #[non_exhaustive]pub enum ImageSource<'a> {
Rgb(ImgRef<'a, RGB8>),
Rgba(ImgRef<'a, RGBA8>),
Gray(ImgRef<'a, GRAY8>),
}
Expand description
Image source
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.
Implementations§
source§impl ImageSource<'_>
impl ImageSource<'_>
sourcepub fn format(&self) -> PixelFormat
pub fn format(&self) -> PixelFormat
Source format
sourcepub fn dimensions(&self) -> Size
pub fn dimensions(&self) -> Size
Source dimensions
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 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<'a> Debug for ImageSource<'a>
impl<'a> Debug for ImageSource<'a>
source§impl<'a> TryFrom<&'a DynamicImage> for ImageSource<'a>
impl<'a> TryFrom<&'a DynamicImage> for ImageSource<'a>
impl<'a> Copy for ImageSource<'a>
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> 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