Skip to main content

CompactFormatter

Struct CompactFormatter 

Source
pub struct CompactFormatter {}
Expand description

A formatter which outputs with no excess whitespace and does not check for valid BibTeX.

Implementations§

Source§

impl CompactFormatter

Source

pub fn validate(self) -> ValidatingFormatter<CompactFormatter>

Return a formatter with the same output, except that also validates the generated BibTeX.

Trait Implementations§

Source§

impl Formatter for CompactFormatter

Source§

fn write_entry_separator<W>(&mut self, _writer: &mut W) -> Result<()>
where W: ?Sized + Write,

The separator between consecutive entries.
Source§

fn write_entry_key_end<W>(&mut self, _writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the terminator for an entry key, often ,\n.
Source§

fn write_field_start<W>(&mut self, writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the start of a field, such as indentation .
Source§

fn write_field_separator<W>(&mut self, writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write a field separator, such as =.
Source§

fn write_token_separator<W>(&mut self, writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write a token separator, such as #.
Source§

fn write_field_end<W>(&mut self, _writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the terminator for a field, often ,\n.
Source§

fn write_bibliography_end<W>(&mut self, _writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the terminator for the bibliography, such as a newline.
Source§

fn write_regular_entry_type<W>( &mut self, writer: &mut W, entry_type: &str, ) -> Result<()>
where W: ?Sized + Write,

Write the entry type, including the @ symbol.
Source§

fn write_macro_entry_type<W>(&mut self, writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the macro entry type, including the @ symbol.
Source§

fn write_comment_entry_type<W>(&mut self, writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the comment entry type, including the @ symbol.
Source§

fn write_preamble_entry_type<W>(&mut self, writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the preamble entry type, including the @ symbol.
Source§

fn write_body_start<W>(&mut self, writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the body start character, typically {.
Source§

fn write_entry_key<W>(&mut self, writer: &mut W, key: &str) -> Result<()>
where W: ?Sized + Write,

Write an entry key.
Source§

fn write_field_key<W>(&mut self, writer: &mut W, key: &str) -> Result<()>
where W: ?Sized + Write,

Write a field key.
Source§

fn write_bracketed_token<W>( &mut self, writer: &mut W, token: &str, ) -> Result<()>
where W: ?Sized + Write,

Write a bracketed token {text}.
Source§

fn write_variable_token<W>( &mut self, writer: &mut W, variable: &str, ) -> Result<()>
where W: ?Sized + Write,

Write a variable token text.
Source§

fn write_body_end<W>(&mut self, writer: &mut W) -> Result<()>
where W: ?Sized + Write,

Write the terminator for the body, often }.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.