Trait biblatex::Type

source ·
pub trait Type: Sized {
    // Required methods
    fn from_chunks(chunks: ChunksRef<'_>) -> Result<Self, TypeError>;
    fn to_chunks(&self) -> Chunks;
}
Expand description

Convert Bib(La)TeX data types from and to chunk slices.

Required Methods§

source

fn from_chunks(chunks: ChunksRef<'_>) -> Result<Self, TypeError>

Parse the type from chunks.

source

fn to_chunks(&self) -> Chunks

Serialize the type into chunks.

This produces chunks with detached spans that must not be used to index the source file. Also see Spanned for more information.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Type for i64

source§

impl Type for String

source§

impl Type for Vec<String>

source§

fn from_chunks(chunks: ChunksRef<'_>) -> Result<Self, TypeError>

Splits the chunks at commas.

source§

fn to_chunks(&self) -> Chunks

source§

impl Type for Vec<Range<u32>>

source§

fn from_chunks(chunks: ChunksRef<'_>) -> Result<Self, TypeError>

Splits the ranges at commas.

source§

fn to_chunks(&self) -> Chunks

source§

impl Type for Vec<Person>

source§

impl Type for Vec<Chunks>

source§

fn from_chunks(chunks: ChunksRef<'_>) -> Result<Self, TypeError>

Splits the chunks at "and"s.

source§

fn to_chunks(&self) -> Chunks

source§

impl Type for Range<u32>

Implementors§