pub struct ImageMetadata {
pub format: ImageFormat,
pub kind: ImageKind,
pub mime_type: Option<&'static str>,
pub extension: Option<&'static str>,
pub size: Option<ImageSize>,
}Expand description
Small image metadata bundle for callers that already know or discovered a format.
Fields§
§format: ImageFormat§kind: ImageKind§mime_type: Option<&'static str>§extension: Option<&'static str>§size: Option<ImageSize>Implementations§
Source§impl ImageMetadata
impl ImageMetadata
Sourcepub fn new(format: ImageFormat) -> Self
pub fn new(format: ImageFormat) -> Self
Builds metadata from a detected format without embedded size information.
Sourcepub fn with_size(format: ImageFormat, size: Option<ImageSize>) -> Self
pub fn with_size(format: ImageFormat, size: Option<ImageSize>) -> Self
Builds metadata from a detected format and optional size information.
Trait Implementations§
Source§impl Clone for ImageMetadata
impl Clone for ImageMetadata
Source§fn clone(&self) -> ImageMetadata
fn clone(&self) -> ImageMetadata
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 ImageMetadata
impl Debug for ImageMetadata
Source§impl PartialEq for ImageMetadata
impl PartialEq for ImageMetadata
Source§fn eq(&self, other: &ImageMetadata) -> bool
fn eq(&self, other: &ImageMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ImageMetadata
impl Eq for ImageMetadata
impl StructuralPartialEq for ImageMetadata
Auto Trait Implementations§
impl Freeze for ImageMetadata
impl RefUnwindSafe for ImageMetadata
impl Send for ImageMetadata
impl Sync for ImageMetadata
impl Unpin for ImageMetadata
impl UnsafeUnpin for ImageMetadata
impl UnwindSafe for ImageMetadata
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