Enum vg::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.
Rgb(ImgRef<'a, RGB8>)
Rgb 8 image source
Rgba(ImgRef<'a, RGBA8>)
Rgba 8 image source
Gray(ImgRef<'a, GRAY8>)
Gray 8 image source
Implementations
sourceimpl ImageSource<'_>
impl ImageSource<'_>
sourcepub fn format(&self) -> PixelFormat
pub fn format(&self) -> PixelFormat
Source format
Trait Implementations
sourceimpl<'a> Clone for ImageSource<'a>
impl<'a> Clone for ImageSource<'a>
sourcefn clone(&self) -> ImageSource<'a>
fn clone(&self) -> ImageSource<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for ImageSource<'a>
impl<'a> Debug for ImageSource<'a>
sourceimpl<'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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more