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.