#[non_exhaustive]pub struct ImageInfo {
pub height: Option<UInt>,
pub width: Option<UInt>,
pub mimetype: Option<String>,
pub size: Option<UInt>,
pub thumbnail_info: Option<Box<ThumbnailInfo>>,
pub thumbnail_source: Option<MediaSource>,
pub blurhash: Option<String>,
pub thumbhash: Option<Base64>,
pub is_animated: Option<bool>,
}Expand description
Metadata about an image.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.height: Option<UInt>The height of the image in pixels.
width: Option<UInt>The width of the image in pixels.
mimetype: Option<String>The MIME type of the image, e.g. “image/png.”
size: Option<UInt>The file size of the image in bytes.
thumbnail_info: Option<Box<ThumbnailInfo>>Metadata about the image referred to in thumbnail_source.
thumbnail_source: Option<MediaSource>The source of the thumbnail of the image.
blurhash: Option<String>§thumbhash: Option<Base64>§is_animated: Option<bool>If this flag is true, the original image SHOULD be assumed to be animated. If this flag
is false, the original image SHOULD be assumed to NOT be animated.
If a sending client is unable to determine whether an image is animated, it SHOULD leave the flag unset.
Receiving clients MAY use this flag to optimize whether to download the original image rather than a thumbnail if it is animated, but they SHOULD NOT trust this flag.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ImageInfo
impl<'de> Deserialize<'de> for ImageInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ImageInfo
impl RefUnwindSafe for ImageInfo
impl Send for ImageInfo
impl Sync for ImageInfo
impl Unpin for ImageInfo
impl UnsafeUnpin for ImageInfo
impl UnwindSafe for ImageInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more