#[non_exhaustive]pub struct DescriptionListItem {
pub anchors: Vec<Anchor>,
pub term: Vec<InlineNode>,
pub delimiter: String,
pub principal_text: Vec<InlineNode>,
pub description: Vec<Block>,
pub location: Location,
}Expand description
An item in a description list (term + description).
§Structure
term:: principal text <- term, delimiter, principal_text
description <- description (blocks)§Note on Field Names
descriptionis singular (notdescriptions) - it holds the block content following the termprincipal_textis inline content immediately after the delimiter on the same line
fn has_description(item: &DescriptionListItem) -> bool {
!item.description.is_empty() // Note: singular 'description'
}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.anchors: Vec<Anchor>Optional anchors (IDs) attached to this item.
term: Vec<InlineNode>The term being defined (inline content before the delimiter).
delimiter: StringThe delimiter used (::, :::, ::::, or ;;).
principal_text: Vec<InlineNode>Inline content immediately after the delimiter on the same line.
description: Vec<Block>Block content providing the description (singular, not plural).
location: LocationTrait Implementations§
Source§impl Clone for DescriptionListItem
impl Clone for DescriptionListItem
Source§fn clone(&self) -> DescriptionListItem
fn clone(&self) -> DescriptionListItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DescriptionListItem
impl Debug for DescriptionListItem
Source§impl<'de> Deserialize<'de> for DescriptionListItem
impl<'de> Deserialize<'de> for DescriptionListItem
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 PartialEq for DescriptionListItem
impl PartialEq for DescriptionListItem
Source§impl Serialize for DescriptionListItem
impl Serialize for DescriptionListItem
impl StructuralPartialEq for DescriptionListItem
Auto Trait Implementations§
impl Freeze for DescriptionListItem
impl RefUnwindSafe for DescriptionListItem
impl Send for DescriptionListItem
impl Sync for DescriptionListItem
impl Unpin for DescriptionListItem
impl UnwindSafe for DescriptionListItem
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