Struct thrift_codec::data::Struct
source · pub struct Struct { /* private fields */ }
Expand description
Structure.
Examples
use thrift_codec::data::{Struct, Field};
let a = Struct::new(vec![Field::new(1, "foo"), Field::new(2, "bar")]);
let b = Struct::from(("foo", "bar"));
assert_eq!(a, b);
Implementations§
Trait Implementations§
source§impl BinaryDecode for Struct
impl BinaryDecode for Struct
source§impl BinaryEncode for Struct
impl BinaryEncode for Struct
source§impl CompactDecode for Struct
impl CompactDecode for Struct
source§impl CompactEncode for Struct
impl CompactEncode for Struct
source§impl<A, B, C, D> From<(A, B, C, D)> for Struct
impl<A, B, C, D> From<(A, B, C, D)> for Struct
source§fn from(fields: (A, B, C, D)) -> Self
fn from(fields: (A, B, C, D)) -> Self
Converts to this type from the input type.
source§impl<A, B, C, D, E> From<(A, B, C, D, E)> for Struct
impl<A, B, C, D, E> From<(A, B, C, D, E)> for Struct
source§fn from(fields: (A, B, C, D, E)) -> Self
fn from(fields: (A, B, C, D, E)) -> Self
Converts to this type from the input type.
source§impl PartialEq for Struct
impl PartialEq for Struct
impl StructuralPartialEq for Struct
Auto Trait Implementations§
impl RefUnwindSafe for Struct
impl Send for Struct
impl Sync for Struct
impl Unpin for Struct
impl UnwindSafe for Struct
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more