Trait FormatWriter

Source
pub trait FormatWriter: Sized {
    // Required methods
    fn fmt_token(&mut self, args: Arguments<'_>) -> Result;
    fn begin_block(&mut self) -> Result;
    fn end_block(&mut self) -> Result;
    fn fmt_comment(&mut self, args: Arguments<'_>) -> Result;
    fn newline(&mut self) -> Result;
}
Expand description

Determines how a zonefile is formatted

Required Methods§

Source

fn fmt_token(&mut self, args: Arguments<'_>) -> Result

Push a token to the zonefile

Source

fn begin_block(&mut self) -> Result

Start a block of grouped tokens

This might push '(' to the zonefile, but may be ignored by the PresentationWriter.

Source

fn end_block(&mut self) -> Result

End a block of grouped tokens

This might push '(' to the zonefile, but may be ignored by the PresentationWriter.

Source

fn fmt_comment(&mut self, args: Arguments<'_>) -> Result

Write a comment

This may be ignored.

Source

fn newline(&mut self) -> Result

End the current record and start a new line

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§