CopyFromBuf

Trait CopyFromBuf 

Source
pub trait CopyFromBuf: Sized {
    // Required method
    fn copy_from_buf<B: BufExt>(buffer: &mut B, len: usize) -> Self;

    // Provided method
    fn from_vec(vec: Vec<u8>) -> Self { ... }
}
Expand description

Trait for copying from the Thrift buffer. Special implementations may do this without actually copying.

Required Methods§

Source

fn copy_from_buf<B: BufExt>(buffer: &mut B, len: usize) -> Self

Provided Methods§

Source

fn from_vec(vec: Vec<u8>) -> Self

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.

Implementors§