pub trait ToBuffer {
// Required method
fn to_buffer(self) -> Result<Buffer, BufferError>;
}Required Methods§
Sourcefn to_buffer(self) -> Result<Buffer, BufferError>
fn to_buffer(self) -> Result<Buffer, BufferError>
Creates a new Buffer containing the byte representation of self.
§Errors
- Returns
BufferErrorif the allocation fails.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".