pub struct Section {
pub name: Option<String>,
pub section_type: SectionType,
pub value: Option<String>,
pub links: Option<Vec<Link>>,
pub citations: Option<Vec<Citation>>,
pub has_parts: Option<Vec<Section>>,
pub table_references: Option<Vec<TableReference>>,
}Expand description
Section with structured content.
Articles are organized into sections. Each section can contain paragraphs, links, citations, and nested subsections. Sections form a tree structure with the article root.
§Example
ⓘ
Section {
name: Some("Personal life".to_string()),
section_type: SectionType::Section,
value: None,
has_parts: Some(vec![
Section { name: Some("Relationships".to_string()), ... },
Section { type: Paragraph, value: Some("Baker's first marriage...".to_string()), ... },
]),
}Fields§
§name: Option<String>Section name (from header h2-h6)
section_type: SectionTypeSection type
value: Option<String>Content value (plain text)
links: Option<Vec<Link>>Links within section
citations: Option<Vec<Citation>>Citations within section
has_parts: Option<Vec<Section>>Nested sections
table_references: Option<Vec<TableReference>>Table references (tables live at article root)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Section
impl<'de> Deserialize<'de> for Section
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
impl StructuralPartialEq for Section
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnsafeUnpin for Section
impl UnwindSafe for Section
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