Render

Trait Render 

Source
pub trait Render {
    type Error;

    // Required method
    fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>;

    // Provided method
    fn render(&self) -> Result<String, Self::Error> { ... }
}

Required Associated Types§

Required Methods§

Source

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Provided Methods§

Source

fn render(&self) -> Result<String, Self::Error>

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.

Implementations on Foreign Types§

Source§

impl Render for f32

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl Render for f64

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl Render for i32

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl Render for i64

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl Render for isize

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl Render for u32

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl Render for u64

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl Render for ()

Source§

impl Render for usize

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl Render for String

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl<'a> Render for &'a str

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl<'a> Render for Cow<'a, str>

Source§

type Error = Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Source§

impl<'a, R: Render> Render for &'a R

Source§

type Error = <R as Render>::Error

Source§

fn render_into<W: Write>(&self, w: &mut W) -> Result<(), Self::Error>

Implementors§