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§
fn with_capacity(capacity: usize) -> Self
fn extend_from_slice(&mut self, other: &[u8])
Provided Methods§
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.