pub struct Cite {
pub key: &'static str,
pub locator: Option<&'static str>,
}Expand description
A use of a reference, optionally pointing at a specific rule, figure or section
(for example Cite::new("list2017").at("Rule 5")).
Fields§
§key: &'static strCitation key.
locator: Option<&'static str>Location inside the work (“Rule 5”, “Fig. 2”, “SC 1.4.11”).
Implementations§
Source§impl Cite
impl Cite
Sourcepub const fn at(self, locator: &'static str) -> Self
pub const fn at(self, locator: &'static str) -> Self
The same citation pointing at a specific location.
Sourcepub fn citation(self) -> &'static Citation
pub fn citation(self) -> &'static Citation
The referenced work.
§Panics
If the key is unknown; every key used in the code base is checked by a unit test.
Trait Implementations§
impl Copy for Cite
impl Eq for Cite
impl StructuralPartialEq for Cite
Auto Trait Implementations§
impl Freeze for Cite
impl RefUnwindSafe for Cite
impl Send for Cite
impl Sync for Cite
impl Unpin for Cite
impl UnsafeUnpin for Cite
impl UnwindSafe for Cite
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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