Skip to main content

BinaryType

Trait BinaryType 

Source
pub trait BinaryType: Sized {
    // Required methods
    fn with_capacity(capacity: usize) -> Self;
    fn extend_from_slice(&mut self, other: &[u8]);

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

Trait implemented on types that can be used as binary types in thrift. These types copy data from the Thrift buffer.

Required Methods§

Source

fn with_capacity(capacity: usize) -> Self

Source

fn extend_from_slice(&mut self, other: &[u8])

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".

Implementations on Foreign Types§

Source§

impl BinaryType for Vec<u8>

Source§

fn with_capacity(capacity: usize) -> Self

Source§

fn extend_from_slice(&mut self, other: &[u8])

Source§

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

Implementors§