Trait json_ld_syntax::Print

source ·
pub trait Print {
    // Required method
    fn fmt_with(
        &self,
        f: &mut Formatter<'_>,
        options: &Options,
        indent: usize
    ) -> Result<(), Error>;

    // Provided methods
    fn pretty_print(&self) -> Printed<'_, Self> { ... }
    fn compact_print(&self) -> Printed<'_, Self> { ... }
    fn inline_print(&self) -> Printed<'_, Self> { ... }
    fn print_with(&self, options: Options) -> Printed<'_, Self> { ... }
}
Expand description

Print methods.

Required Methods§

source

fn fmt_with( &self, f: &mut Formatter<'_>, options: &Options, indent: usize ) -> Result<(), Error>

Provided Methods§

source

fn pretty_print(&self) -> Printed<'_, Self>

Print the value with Options::pretty options.

source

fn compact_print(&self) -> Printed<'_, Self>

Print the value with Options::compact options.

source

fn inline_print(&self) -> Printed<'_, Self>

Print the value with Options::inline options.

source

fn print_with(&self, options: Options) -> Printed<'_, Self>

Print the value with the given options.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Print for bool

source§

fn fmt_with( &self, f: &mut Formatter<'_>, _options: &Options, _indent: usize ) -> Result<(), Error>

source§

impl Print for NumberBuf<SmallVec<[u8; 16]>>

source§

fn fmt_with( &self, f: &mut Formatter<'_>, _options: &Options, _indent: usize ) -> Result<(), Error>

source§

impl Print for SmallString<[u8; 16]>

source§

fn fmt_with( &self, f: &mut Formatter<'_>, _options: &Options, _indent: usize ) -> Result<(), Error>

source§

impl<'a, T> Print for &'a T
where T: Print + ?Sized,

source§

fn fmt_with( &self, f: &mut Formatter<'_>, options: &Options, indent: usize ) -> Result<(), Error>

source§

impl<T> Print for Stripped<T>
where T: Print,

source§

fn fmt_with( &self, f: &mut Formatter<'_>, options: &Options, indent: usize ) -> Result<(), Error>

source§

impl<T, M> Print for Meta<T, M>
where T: Print,

source§

fn fmt_with( &self, f: &mut Formatter<'_>, options: &Options, indent: usize ) -> Result<(), Error>

Implementors§