Skip to main content

ToBuffer

Trait ToBuffer 

Source
pub trait ToBuffer {
    // Required method
    fn to_buffer(self) -> Result<Buffer, BufferError>;
}

Required Methods§

Source

fn to_buffer(self) -> Result<Buffer, BufferError>

Creates a new Buffer containing the byte representation of self.

§Errors

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: AsRef<[u8]>> ToBuffer for T