pub struct CitedKeys { /* private fields */ }Expand description
The value of the table of cited keys (KEYS). It contains every citation
key that the document cites, once, in order of first citation, that is, in
the order in which the citation keys first appear in the document.
Each citation key is stored with the span of its first citation: the span
of the \cite or \R node whose citation chunk (Chunk) first contains
the citation key. The stages of the citations feature report the
diagnostics about a citation key at this span, for instance
NoEntry for a citation key without a citation entry.
Implementations§
Source§impl CitedKeys
impl CitedKeys
Sourcepub fn of<'c, 't: 'c>(
chunks: impl IntoIterator<Item = (&'c FlmSpan, &'c Chunk<'t>)>,
) -> CitedKeys
pub fn of<'c, 't: 'c>( chunks: impl IntoIterator<Item = (&'c FlmSpan, &'c Chunk<'t>)>, ) -> CitedKeys
Returns the cited keys of the citation chunks chunks. Each item of
chunks is a citation chunk with the span of the \cite or \R node
from which it was read, and the items must be in document order. The
result contains each citation key once, with the span of the first
citation chunk that contains it.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &FlmSpan)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &FlmSpan)>
Returns every citation key with the span of its first citation, in order of first citation.
Sourcepub fn first_citation(&self, key: &str) -> Option<&FlmSpan>
pub fn first_citation(&self, key: &str) -> Option<&FlmSpan>
Returns the span of the first citation of key, or None if the table
does not contain key.
Trait Implementations§
impl Eq for CitedKeys
Source§impl SingletonTable for CitedKeys
impl SingletonTable for CitedKeys
impl StructuralPartialEq for CitedKeys
Source§impl Table for CitedKeys
impl Table for CitedKeys
Source§fn absorb(&mut self, piece: CitedKeys)
fn absorb(&mut self, piece: CitedKeys)
Appends the citation keys of piece that this table does not contain
yet, in their order and with their spans.
Source§fn project(&self, _cx: &dyn ProjectCx) -> SerialValue
fn project(&self, _cx: &dyn ProjectCx) -> SerialValue
Serializes the table as the list of the citation keys, in order of first citation.
Source§fn piece_class(&self) -> PieceClass
fn piece_class(&self) -> PieceClass
Auto Trait Implementations§
impl Forget for CitedKeys
impl Freeze for CitedKeys
impl Move for CitedKeys
impl RefUnwindSafe for CitedKeys
impl Send for CitedKeys
impl Sync for CitedKeys
impl Unpin for CitedKeys
impl UnsafeUnpin for CitedKeys
impl UnwindSafe for CitedKeys
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