pub struct Section {
pub id: NodeId,
pub source: Option<String>,
pub title: Option<String>,
pub attributes: Attributes,
pub blocks: Vec<Block>,
pub position: Option<SourcePos>,
pub span: Option<SourceSpan>,
}Expand description
A chapter or file: the unit of markdown input and of source attribution for diagnostics.
Fields§
§id: NodeIdEngine-assigned identity, for diagnostics; never serialized.
source: Option<String>File the frontend read (e.g. chapter-01.md).
title: Option<String>Section title supplied outside the body (frontmatter
title:); implies heading level 1.
attributes: AttributesThe classes and id a sheet names the section by: from a chapter file’s frontmatter, or set by a host beside the source, where no byte of the source moves.
blocks: Vec<Block>The section’s blocks, in reading order.
position: Option<SourcePos>Where the frontend read this from.
span: Option<SourceSpan>The bytes of that source it was read from.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.