[][src]Trait salvo::http::BodyWriter

pub trait BodyWriter: Send {
    fn write_body(&mut self, res: &mut dyn Write) -> Result<()>;
}

A trait which writes the body of an HTTP response.

Required methods

fn write_body(&mut self, res: &mut dyn Write) -> Result<()>

Writes the body to the provided Write.

Loading content...

Implementations on Foreign Types

impl BodyWriter for String[src]

impl<'a> BodyWriter for &'a str[src]

impl BodyWriter for Vec<u8>[src]

impl<'a> BodyWriter for &'a [u8][src]

impl BodyWriter for File[src]

impl BodyWriter for Box<dyn Read + Send>[src]

Loading content...

Implementors

Loading content...