pub struct CitedWorks { /* private fields */ }Expand description
The value of the table of cited works (CITATIONS). It contains every
citation key that the document cites, in order of first citation, each
with the cited work (CitedWork) that it refers to. Citation keys with
the same identity refer to the same work (see CitedWork::identity). The
function number_works creates this value.
The table is keyed by the text of the citation keys
(work), not by nodes. Therefore a citation that is
copied, for instance with the title of a heading that a reference displays,
expands to the same numbers as the original citation.
Implementations§
Source§impl CitedWorks
impl CitedWorks
Sourcepub fn work(&self, key: &str) -> Option<&CitedWork>
pub fn work(&self, key: &str) -> Option<&CitedWork>
Returns the work that the citation key key refers to, or None if the
table does not contain key. This is the case for a citation key that
is cited only outside the trees of the document (see
Uncollected).
Sourcepub fn works(&self) -> impl Iterator<Item = (&str, &CitedWork)>
pub fn works(&self) -> impl Iterator<Item = (&str, &CitedWork)>
Returns every cited work once, in the order of the numbers, with the citation key under which it was first cited.
Sourcepub fn keys(&self) -> impl Iterator<Item = (&str, &CitedWork)>
pub fn keys(&self) -> impl Iterator<Item = (&str, &CitedWork)>
Returns every cited key with its work, in order of first citation.
Trait Implementations§
Source§impl Clone for CitedWorks
impl Clone for CitedWorks
Source§impl Debug for CitedWorks
impl Debug for CitedWorks
Source§impl Default for CitedWorks
impl Default for CitedWorks
impl Eq for CitedWorks
Source§impl PartialEq for CitedWorks
impl PartialEq for CitedWorks
Source§impl SingletonTable for CitedWorks
impl SingletonTable for CitedWorks
impl StructuralPartialEq for CitedWorks
Source§impl Table for CitedWorks
impl Table for CitedWorks
Source§fn absorb(&mut self, piece: CitedWorks)
fn absorb(&mut self, piece: CitedWorks)
Records the citation keys of piece that this table does not contain
yet, in their order, each with the identity of its work. The works are
numbered in the same way as by number_works.
Source§fn project(&self, _cx: &dyn ProjectCx) -> SerialValue
fn project(&self, _cx: &dyn ProjectCx) -> SerialValue
Serializes the table as a list with one map for each citation key, in
order of first citation. Each map has the keys key, number, id
(the identifier of the work) and identity.
Source§fn piece_class(&self) -> PieceClass
fn piece_class(&self) -> PieceClass
Auto Trait Implementations§
impl Forget for CitedWorks
impl Freeze for CitedWorks
impl Move for CitedWorks
impl RefUnwindSafe for CitedWorks
impl Send for CitedWorks
impl Sync for CitedWorks
impl Unpin for CitedWorks
impl UnsafeUnpin for CitedWorks
impl UnwindSafe for CitedWorks
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