pub struct ParentSetDecl {
pub name: Name,
pub counters: Vec<Name>,
}Expand description
A parent set: a named list of counters, any one of which may be the parent
of a counter numbered within the set with Within::parent_set.
A feature that owns a family of counters contributes a parent set to the
service slot PARENT_SETS_SLOT, so that another feature, or a document’s
numbering options, can number a counter within whichever of these counters
was advanced most recently without listing them. The headings feature
contributes flm.headings.levels, the counters of its heading kinds from
the outermost level in.
The set’s name is dotted and owned by the feature that contributes the
set, as a counter style’s name is. A name beginning with
RESERVED_PREFIX fails the registry build, and so does a set that holds
a counter no feature declares.
§Examples
use flm_core::stdlib::features::numbering::ParentSetDecl;
let levels = ParentSetDecl::new("example.levels", ["example.chapter", "example.section"]);
assert_eq!(levels.counters.len(), 2);Fields§
§name: NameThe set’s dotted name, such as flm.headings.levels.
counters: Vec<Name>The counters of the set, in the order the contributing feature gives them.
Implementations§
Source§impl ParentSetDecl
impl ParentSetDecl
Sourcepub fn new(
name: impl Into<Name>,
counters: impl IntoIterator<Item = impl Into<Name>>,
) -> ParentSetDecl
pub fn new( name: impl Into<Name>, counters: impl IntoIterator<Item = impl Into<Name>>, ) -> ParentSetDecl
Returns the parent set name, which holds counters.
Trait Implementations§
Source§impl Clone for ParentSetDecl
impl Clone for ParentSetDecl
Source§impl Debug for ParentSetDecl
impl Debug for ParentSetDecl
impl Eq for ParentSetDecl
Source§impl Hash for ParentSetDecl
impl Hash for ParentSetDecl
Source§impl PartialEq for ParentSetDecl
impl PartialEq for ParentSetDecl
impl StructuralPartialEq for ParentSetDecl
Auto Trait Implementations§
impl Forget for ParentSetDecl
impl Freeze for ParentSetDecl
impl Move for ParentSetDecl
impl RefUnwindSafe for ParentSetDecl
impl Send for ParentSetDecl
impl Sync for ParentSetDecl
impl Unpin for ParentSetDecl
impl UnsafeUnpin for ParentSetDeclwhere
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Name>: UnsafeUnpin,
impl UnwindSafe for ParentSetDecl
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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