Trait biblatex::ChunksExt

source ·
pub trait ChunksExt {
    // Required methods
    fn parse<T: Type>(&self) -> Result<T, TypeError>;
    fn format_sentence(&self) -> String;
    fn format_verbatim(&self) -> String;
    fn span(&self) -> Range<usize> ;
    fn to_biblatex_string(&self, is_verbatim: bool) -> String;
}
Expand description

Additional methods for chunk slices.

Required Methods§

source

fn parse<T: Type>(&self) -> Result<T, TypeError>

Parse the chunks into a type.

source

fn format_sentence(&self) -> String

Format the chunks in sentence case.

source

fn format_verbatim(&self) -> String

Format the chunks verbatim.

source

fn span(&self) -> Range<usize>

Output a span for all chunks in the collection.

source

fn to_biblatex_string(&self, is_verbatim: bool) -> String

Serialize the chunks into a BibLaTeX string.

There is no difference for BibTeX and BibLaTeX here, so there is only one function applicable to both.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ChunksExt for [Spanned<Chunk>]

Implementors§