pub struct Link<T = ()> {
pub destination: String,
pub title: Option<String>,
pub children: Vec<Inline<T>>,
pub user_data: T,
}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<T>>Inline content (text, code, etc.) inside the link or image.
user_data: TUser-defined data associated with this link
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Link<T>where
T: Deserialize<'de> + Default,
impl<'de, T> Deserialize<'de> for Link<T>where
T: Deserialize<'de> + Default,
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> StripData<T> for Link<T>
impl<T> StripData<T> for Link<T>
Source§type StrippedType = Link
type StrippedType = Link
The type without user data
Source§fn strip_data(self) -> Self::StrippedType
fn strip_data(self) -> Self::StrippedType
Remove user data from this AST node
impl<T> StructuralPartialEq for Link<T>
Auto Trait Implementations§
impl<T> Freeze for Link<T>where
T: Freeze,
impl<T> RefUnwindSafe for Link<T>where
T: RefUnwindSafe,
impl<T> Send for Link<T>where
T: Send,
impl<T> Sync for Link<T>where
T: Sync,
impl<T> Unpin for Link<T>where
T: Unpin,
impl<T> UnwindSafe for Link<T>where
T: UnwindSafe,
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