pub struct Image {
pub destination: String,
pub title: Option<String>,
pub alt: String,
}Expand description
Re‑usable structure for links and images (destination + children).
Fields§
§destination: StringImage URL (absolute or relative).
title: Option<String>Optional title.
alt: StringAlternative text.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Image
impl<'de> Deserialize<'de> for Image
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
Source§impl<T: Default> WithData<T> for Image
impl<T: Default> WithData<T> for Image
Source§type WithDataType = Image<T>
type WithDataType = Image<T>
The type with user data attached
Source§fn with_data(self, data: T) -> Self::WithDataType
fn with_data(self, data: T) -> Self::WithDataType
Add user data to this AST node
Source§fn with_default_data(self) -> Self::WithDataTypewhere
T: Default,
fn with_default_data(self) -> Self::WithDataTypewhere
T: Default,
Add default user data to this AST node
impl Eq for Image
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