pub struct ImageRef {
pub locator: Locator,
pub media_type: ImageType,
pub width: u32,
pub height: u32,
}Expand description
One picture, as everything except the wire refers to it.
The same value stands in a crate::ContentBlock::Image block and in
a tool result’s attachments, because they are the same four facts. A
second definition of them would be a second authority: adding a field
would then have to be remembered twice.
width and height are pixel counts, so they are integers; a
display that wants a ratio computes it where the drawing happens.
Fields§
§locator: LocatorA cas: locator. The bytes are fetched from the content store by
whoever is about to send them, and never travel in the ledger.
media_type: ImageType§width: u32§height: u32Trait Implementations§
Source§impl<'de> Deserialize<'de> for ImageRef
impl<'de> Deserialize<'de> for ImageRef
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 ImageRef
impl StructuralPartialEq for ImageRef
Auto Trait Implementations§
impl Freeze for ImageRef
impl RefUnwindSafe for ImageRef
impl Send for ImageRef
impl Sync for ImageRef
impl Unpin for ImageRef
impl UnsafeUnpin for ImageRef
impl UnwindSafe for ImageRef
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