pub struct Link {
pub destination: String,
pub title: Option<String>,
pub children: Vec<Inline>,
}Expand description
Re‑usable structure for links and images (destination + children).
Fields§
§destination: StringDestination URL (absolute or relative) or email address.
title: Option<String>Optional title (for links and images).
children: Vec<Inline>Inline content (text, code, etc.) inside the link or image.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Link
impl<'de> Deserialize<'de> for Link
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 Link
impl<T: Default> WithData<T> for Link
Source§type WithDataType = Link<T>
type WithDataType = Link<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 Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnwindSafe for Link
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