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

source

pub fn new(kind: DataKind) -> Self

Makes an empty sequence which can have the elements belonging to kind.

source

pub fn get(&self, index: usize) -> Option<DataRef<'_>>

Returns the element placed at the specified index.

source

pub fn len(&self) -> usize

Returns the element count of this sequence.

source

pub fn is_empty(&self) -> bool

Returns true if this sequence has no elements.

source

pub fn iter(&self) -> ElementIter<'_>

Returns an iterator over the elements of this sequence.

source

pub fn kind(&self) -> DataKind

Returns the kind of the elements in this sequence.

Trait Implementations§

source§

impl Clone for Elements

source§

fn clone(&self) -> Elements

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Elements

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Vec<List>> for Elements

source§

fn from(f: Vec<List>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Map>> for Elements

source§

fn from(f: Vec<Map>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Set>> for Elements

source§

fn from(f: Vec<Set>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Struct>> for Elements

source§

fn from(f: Vec<Struct>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Uuid>> for Elements

source§

fn from(f: Vec<Uuid>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Vec<u8>>> for Elements

source§

fn from(f: Vec<Vec<u8>>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<bool>> for Elements

source§

fn from(f: Vec<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<f64>> for Elements

source§

fn from(f: Vec<f64>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<i16>> for Elements

source§

fn from(f: Vec<i16>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<i32>> for Elements

source§

fn from(f: Vec<i32>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<i64>> for Elements

source§

fn from(f: Vec<i64>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<i8>> for Elements

source§

fn from(f: Vec<i8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Elements

source§

fn eq(&self, other: &Elements) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Elements

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.