pub struct ImageDimensions {
pub width: u32,
pub height: u32,
}Expand description
Image dimensions in pixels.
Binding-safe replacement for (u32, u32) tuples, which degrade to
Vec<Vec<String>> when sanitized for cross-language binding generation.
Used by both crate::metadata::ImageMetadata and
[crate::inline_images::InlineImage].
Fields§
§width: u32Width in pixels.
height: u32Height in pixels.
Trait Implementations§
Source§impl Clone for ImageDimensions
impl Clone for ImageDimensions
Source§fn clone(&self) -> ImageDimensions
fn clone(&self) -> ImageDimensions
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 moreimpl Copy for ImageDimensions
Source§impl Debug for ImageDimensions
impl Debug for ImageDimensions
Source§impl<'de> Deserialize<'de> for ImageDimensions
impl<'de> Deserialize<'de> for ImageDimensions
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
impl Eq for ImageDimensions
Source§impl PartialEq for ImageDimensions
impl PartialEq for ImageDimensions
Source§fn eq(&self, other: &ImageDimensions) -> bool
fn eq(&self, other: &ImageDimensions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ImageDimensions
impl Serialize for ImageDimensions
impl StructuralPartialEq for ImageDimensions
Auto Trait Implementations§
impl Freeze for ImageDimensions
impl RefUnwindSafe for ImageDimensions
impl Send for ImageDimensions
impl Sync for ImageDimensions
impl Unpin for ImageDimensions
impl UnsafeUnpin for ImageDimensions
impl UnwindSafe for ImageDimensions
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.