#[non_exhaustive]pub struct Image<'a> {
pub title: Title<'a>,
pub source: Source<'a>,
pub metadata: BlockMetadata<'a>,
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<'a>§source: Source<'a>§metadata: BlockMetadata<'a>§location: LocationImplementations§
Source§impl<'a> Image<'a>
impl<'a> Image<'a>
Sourcepub fn new(source: Source<'a>, location: Location) -> Self
pub fn new(source: Source<'a>, location: Location) -> Self
Create a new image with the given source and location.
Sourcepub fn with_title(self, title: Title<'a>) -> Self
pub fn with_title(self, title: Title<'a>) -> Self
Set the title.
Sourcepub fn with_metadata(self, metadata: BlockMetadata<'a>) -> Self
pub fn with_metadata(self, metadata: BlockMetadata<'a>) -> Self
Set the metadata.
Trait Implementations§
impl<'a> StructuralPartialEq for Image<'a>
Auto Trait Implementations§
impl<'a> Freeze for Image<'a>
impl<'a> RefUnwindSafe for Image<'a>
impl<'a> Send for Image<'a>
impl<'a> Sync for Image<'a>
impl<'a> Unpin for Image<'a>
impl<'a> UnsafeUnpin for Image<'a>
impl<'a> UnwindSafe for Image<'a>
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