pub struct Parent<'a> {
pub joiner: &'a dyn CompiledWithinJoiner,
pub ancestors: &'a [Ancestor],
}Expand description
What a number is numbered within: the within-joiner that writes the ancestors’ numbers, and the ancestors with their values.
The ancestors are the whole chain, outermost first:
flm.headings.section before flm.headings.subsection before
flm.headings.subsubsection. A caller must keep this order, because it
says which counters each ancestor may itself be written within: the
ancestors of ancestors[i] are ancestors[..i]. A within-joiner that
refers to a counter which is not before it in the chain fails with
FormatError::UnknownAncestor. Every step of the writing therefore has
strictly fewer counters before it than the step before, so a chain of n
ancestors takes at most n steps, regardless of what a caller passes.
Fields§
§joiner: &'a dyn CompiledWithinJoinerThe within-joiner that writes the ancestors’ numbers before the point’s own. It usually refers only to the counter immediately above, which is written with its own ancestors.
ancestors: &'a [Ancestor]The ancestors, as the numbering feature recorded them: the whole chain, outermost first.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Parent<'a>
impl<'a> !UnwindSafe for Parent<'a>
impl<'a> Forget for Parent<'a>
impl<'a> Freeze for Parent<'a>
impl<'a> Move for Parent<'a>
impl<'a> Send for Parent<'a>
impl<'a> Sync for Parent<'a>
impl<'a> Unpin for Parent<'a>
impl<'a> UnsafeUnpin for Parent<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more