Skip to main content

DirectRender

Trait DirectRender 

Source
pub trait DirectRender {
    // Required method
    fn render(&self, out: &mut String);
}
Expand description

Renders a command’s successful value as the text it writes to standard output.

A domain type renders itself by implementing this. A value that renders nothing writes nothing.

Required Methods§

Source

fn render(&self, out: &mut String)

Appends this value’s text to out, without a trailing newline.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl DirectRender for &str

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for ()

Source§

fn render(&self, _: &mut String)

Source§

impl DirectRender for OsString

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for PathBuf

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for String

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for bool

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for char

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for f32

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for f64

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for i8

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for i16

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for i32

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for i64

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for i128

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for isize

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for u8

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for u16

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for u32

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for u64

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for u128

Source§

fn render(&self, out: &mut String)

Source§

impl DirectRender for usize

Source§

fn render(&self, out: &mut String)

Source§

impl<Value: DirectRender> DirectRender for Option<Value>

Renders nothing when absent.

Source§

fn render(&self, out: &mut String)

Source§

impl<Value: DirectRender> DirectRender for Vec<Value>

Renders one value per line.

Source§

fn render(&self, out: &mut String)

Implementors§