DatumTupleRef

Enum DatumTupleRef 

Source
pub enum DatumTupleRef<'a> {
    Empty,
    Tuple(&'a Tuple),
    Dynamic(&'a dyn RefTupleView<'a, Value>),
    CoercedValue(usize, &'a Value),
    SingleKey(Cow<'a, str>, &'a Value),
    Bindings(&'a HashMap<Cow<'a, str>, &'a Value>),
}

Variants§

§

Empty

A Tuple with no bindings

§

Tuple(&'a Tuple)

Holds a reference to a Tuple

§

Dynamic(&'a dyn RefTupleView<'a, Value>)

Holds a reference to a RefTupleView

§

CoercedValue(usize, &'a Value)

Holds a reference to a value which is not a tuple, but has been coerced (e.g., for 9: {'_1': 9})

§

SingleKey(Cow<'a, str>, &'a Value)

A reference to a value stored under a single key

§

Bindings(&'a HashMap<Cow<'a, str>, &'a Value>)

A reference to a value stored under a single key

Trait Implementations§

Source§

impl<'a> Debug for DatumTupleRef<'a>

Source§

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

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

impl<'a> IntoIterator for &'a DatumTupleRef<'a>

Source§

type Item = RefFieldView<'a, Value>

The type of the elements being iterated over.
Source§

type IntoIter = DatumTupleRefIterator<'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> RefTupleView<'a, Value> for DatumTupleRef<'a>

Source§

fn get_val(&self, k: &BindingsName<'_>) -> Option<Cow<'a, Value>>

Source§

fn tuple_fields_iter( &'a self, ) -> Box<dyn Iterator<Item = RefFieldView<'a, Value>> + 'a>

Source§

impl TupleDatum for DatumTupleRef<'_>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Auto Trait Implementations§

§

impl<'a> Freeze for DatumTupleRef<'a>

§

impl<'a> !RefUnwindSafe for DatumTupleRef<'a>

§

impl<'a> !Send for DatumTupleRef<'a>

§

impl<'a> !Sync for DatumTupleRef<'a>

§

impl<'a> Unpin for DatumTupleRef<'a>

§

impl<'a> !UnwindSafe for DatumTupleRef<'a>

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, Loc> ToLocated<Loc> for T
where Loc: Display,

Source§

fn to_located<IntoLoc>(self, location: IntoLoc) -> Located<Self, Loc>
where IntoLoc: Into<Location<Loc>>,

Create a Located from its inner value.
Source§

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

Source§

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>,

Source§

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.