pub struct Citation {
pub reference: String,
pub locator: Option<String>,
pub locator_type: Option<LocatorType>,
pub prefix: Option<String>,
pub suffix: Option<String>,
pub suppress_author: bool,
}Expand description
An inline citation reference.
Fields§
§reference: StringReference to bibliography entry ID.
locator: Option<String>Page or location within the reference.
locator_type: Option<LocatorType>Locator type (page, chapter, section, etc.).
prefix: Option<String>Text before the citation (e.g., “see”).
suffix: Option<String>Text after the citation (e.g., “for details”).
Suppress author name in citation.
Implementations§
Source§impl Citation
impl Citation
Sourcepub fn with_locator(
self,
locator: impl Into<String>,
locator_type: LocatorType,
) -> Self
pub fn with_locator( self, locator: impl Into<String>, locator_type: LocatorType, ) -> Self
Set locator with type.
Sourcepub fn with_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_prefix(self, prefix: impl Into<String>) -> Self
Set prefix text.
Sourcepub fn with_suffix(self, suffix: impl Into<String>) -> Self
pub fn with_suffix(self, suffix: impl Into<String>) -> Self
Set suffix text.
Suppress author name.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Citation
impl<'de> Deserialize<'de> for Citation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Citation
impl StructuralPartialEq for Citation
Auto Trait Implementations§
impl Freeze for Citation
impl RefUnwindSafe for Citation
impl Send for Citation
impl Sync for Citation
impl Unpin for Citation
impl UnsafeUnpin for Citation
impl UnwindSafe for Citation
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.