pub struct Segment { /* private fields */ }Expand description
A segment: a small tree of FLM content that is one stretch of a written number, together with the link mark of the value it links to.
A segment’s content is a synthesized value, content computed by the
library instead of parsed from a document (synthesized
values). It is made of
the counter style’s texts, parsed when the counter style was compiled, and
the characters of the numbers. A lowering rule shows it with
Lowerer::splice, which brings
it up to date first (value
catch-up), so the content
may hold a text style or a reference.
The link mark is the position, among the values the caller passed in,
of the value the segment links to: 0 for the only value of format(),
and the position in the caller’s list for
format_many, regardless of how the values were
sorted and grouped. A segment with no link mark is shown without a link:
the texts between two numbers have none. These functions do not depend on
reference points; the caller turns a position into a link target (the
counter table does so in NumberSegment).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Segment
impl !UnwindSafe for Segment
impl Forget for Segment
impl Freeze for Segment
impl Move for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segmentwhere
*const ArcInner<NodeTree<Flm>> is !null: UnsafeUnpin,
PhantomData<ArcInner<NodeTree<Flm>>>: UnsafeUnpin,
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> 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