Skip to main content

FootnoteNode

Struct FootnoteNode 

Source
pub struct FootnoteNode {
    pub id: String,
    pub name: Option<String>,
    pub role: Option<String>,
    pub marker: Option<String>,
    pub spans: Vec<TextSpan>,
    pub style: Option<String>,
    pub fill: Option<PropertyValue>,
    pub font_family: Option<PropertyValue>,
    pub font_size: Option<PropertyValue>,
    pub source_span: Option<Span>,
    pub unknown_props: BTreeMap<String, UnknownProperty>,
}
Expand description

A footnote node — page-level book-interior furniture that auto-numbers and renders in a reserved zone at the bottom of the page.

A footnote is NOT positioned by the author: it has NO x/y/w/h. At compile time every footnote that is a DIRECT child of a Page is collected in source order, auto-numbered 1..N (a footnote that declares an explicit marker uses that string instead of a number but still occupies a slot), and rendered stacked above the page’s bottom margin with a separator rule. A TextSpan that carries a matching footnote_ref gets the footnote’s marker emitted inline as a superscript after its text.

KDL: footnote id="fn.1" { span "See also Chapter 4." }. The content is a list of TextSpans (the same span model as a text node), so it inherits the text shaping/wrap path verbatim.

Fields§

§id: String§name: Option<String>§role: Option<String>§marker: Option<String>

Explicit marker override. When Some(s), the footnote renders s as its marker (both inline and in the zone) instead of its auto-number; the footnote still occupies a numbering slot. None → use the auto-number.

§spans: Vec<TextSpan>

The footnote’s content spans (same model as a text node’s spans).

§style: Option<String>§fill: Option<PropertyValue>

Fill for the footnote content + the separator rule. None → a sensible muted default for the rule and opaque black for the text.

§font_family: Option<PropertyValue>§font_size: Option<PropertyValue>§source_span: Option<Span>

Source declaration span, when available.

§unknown_props: BTreeMap<String, UnknownProperty>

Unknown properties preserved for forward-compat.

Trait Implementations§

Source§

impl Clone for FootnoteNode

Source§

fn clone(&self) -> FootnoteNode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FootnoteNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FootnoteNode

Source§

fn eq(&self, other: &FootnoteNode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FootnoteNode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.