Enum thrift_codec::data::Elements
source · pub enum Elements {
Bool(Vec<bool>),
I8(Vec<i8>),
I16(Vec<i16>),
I32(Vec<i32>),
I64(Vec<i64>),
Double(Vec<f64>),
Binary(Vec<Vec<u8>>),
Struct(Vec<Struct>),
Map(Vec<Map>),
Set(Vec<Set>),
List(Vec<List>),
Uuid(Vec<Uuid>),
}
Expand description
A sequence of the values of a data kind.
Variants§
Bool(Vec<bool>)
I8(Vec<i8>)
I16(Vec<i16>)
I32(Vec<i32>)
I64(Vec<i64>)
Double(Vec<f64>)
Binary(Vec<Vec<u8>>)
Struct(Vec<Struct>)
Map(Vec<Map>)
Set(Vec<Set>)
List(Vec<List>)
Uuid(Vec<Uuid>)
Implementations§
source§impl Elements
impl Elements
sourcepub fn new(kind: DataKind) -> Self
pub fn new(kind: DataKind) -> Self
Makes an empty sequence which can have the elements belonging to kind
.
sourcepub fn get(&self, index: usize) -> Option<DataRef<'_>>
pub fn get(&self, index: usize) -> Option<DataRef<'_>>
Returns the element placed at the specified index.
sourcepub fn iter(&self) -> ElementIter<'_> ⓘ
pub fn iter(&self) -> ElementIter<'_> ⓘ
Returns an iterator over the elements of this sequence.
Trait Implementations§
source§impl PartialEq for Elements
impl PartialEq for Elements
impl StructuralPartialEq for Elements
Auto Trait Implementations§
impl RefUnwindSafe for Elements
impl Send for Elements
impl Sync for Elements
impl Unpin for Elements
impl UnwindSafe for Elements
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