#[non_exhaustive]pub struct Image {
pub title: Title,
pub source: Source,
pub metadata: BlockMetadata,
pub location: Location,
}Expand description
An Image represents an image block in a document.
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.title: Title§source: Source§metadata: BlockMetadata§location: LocationImplementations§
Source§impl Image
impl Image
Sourcepub fn new(source: Source, location: Location) -> Self
pub fn new(source: Source, location: Location) -> Self
Create a new image with the given source and location.
Sourcepub fn with_title(self, title: Title) -> Self
pub fn with_title(self, title: Title) -> Self
Set the title.
Sourcepub fn with_metadata(self, metadata: BlockMetadata) -> Self
pub fn with_metadata(self, metadata: BlockMetadata) -> Self
Set the metadata.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Image
impl<'de> Deserialize<'de> for Image
Source§fn deserialize<D>(deserializer: D) -> Result<Image, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Image, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Image
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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