risingwave_common::row

Trait Row

source
pub trait Row:
    Sized
    + Debug
    + PartialEq
    + Eq {
Show 16 methods // Required methods fn datum_at(&self, index: usize) -> DatumRef<'_>; unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>; fn len(&self) -> usize; fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>; // Provided methods fn is_empty(&self) -> bool { ... } fn to_owned_row(&self) -> OwnedRow { ... } fn into_owned_row(self) -> OwnedRow { ... } fn value_serialize_into(&self, buf: impl BufMut) { ... } fn value_serialize(&self) -> Vec<u8> { ... } fn value_serialize_bytes(&self) -> Bytes { ... } fn value_estimate_size(&self) -> usize { ... } fn memcmp_serialize_into(&self, serde: &OrderedRowSerde, buf: impl BufMut) { ... } fn memcmp_serialize(&self, serde: &OrderedRowSerde) -> Vec<u8> { ... } fn hash_datums_into<H: Hasher>(&self, state: &mut H) { ... } fn hash<H: BuildHasher>(&self, hash_builder: H) -> HashCode<H> { ... } fn eq(this: &Self, other: impl Row) -> bool { ... }
}
Expand description

The trait for abstracting over a Row-like type.

Required Methods§

source

fn datum_at(&self, index: usize) -> DatumRef<'_>

Returns the DatumRef at the given index.

source

unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>

Returns the DatumRef at the given index without bounds checking.

§Safety

Calling this method with an out-of-bounds index is undefined behavior.

source

fn len(&self) -> usize

Returns the number of datum in the row.

source

fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>

Returns an iterator over the datums in the row, in DatumRef form.

Provided Methods§

source

fn is_empty(&self) -> bool

Returns true if the row contains no datum.

source

fn to_owned_row(&self) -> OwnedRow

Converts the row into an OwnedRow.

Prefer into_owned_row if the row is already owned.

source

fn into_owned_row(self) -> OwnedRow

Consumes self and converts it into an OwnedRow.

source

fn value_serialize_into(&self, buf: impl BufMut)

Serializes the row with value encoding, into the given buf.

source

fn value_serialize(&self) -> Vec<u8>

Serializes the row with value encoding and returns the bytes.

source

fn value_serialize_bytes(&self) -> Bytes

Serializes the row with value encoding and returns the bytes.

source

fn value_estimate_size(&self) -> usize

source

fn memcmp_serialize_into(&self, serde: &OrderedRowSerde, buf: impl BufMut)

Serializes the row with memcomparable encoding, into the given buf. As each datum may have different order type, a serde should be provided.

source

fn memcmp_serialize(&self, serde: &OrderedRowSerde) -> Vec<u8>

Serializes the row with memcomparable encoding and return the bytes. As each datum may have different order type, a serde should be provided.

source

fn hash_datums_into<H: Hasher>(&self, state: &mut H)

Hash the datums of this row into the given hasher.

Implementors should delegate std::hash::Hash::hash to this method.

source

fn hash<H: BuildHasher>(&self, hash_builder: H) -> HashCode<H>

Returns the hash code of the row.

source

fn eq(this: &Self, other: impl Row) -> bool

Determines whether the datums of this row are equal to those of another.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<D: ToDatumRef> Row for &[D]

source§

fn datum_at(&self, index: usize) -> DatumRef<'_>

source§

unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>

source§

fn len(&self) -> usize

source§

fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>

source§

impl<D: ToDatumRef, const N: usize> Row for [D; N]

source§

fn datum_at(&self, index: usize) -> DatumRef<'_>

source§

unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>

source§

fn len(&self) -> usize

source§

fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>

source§

impl<R1: Row, R2: Row> Row for Either<R1, R2>

Implements Row for an either::Either of two different types of rows.

source§

fn datum_at(&self, index: usize) -> DatumRef<'_>

source§

unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>

source§

fn len(&self) -> usize

source§

fn is_empty(&self) -> bool

source§

fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>

source§

fn to_owned_row(&self) -> OwnedRow

source§

fn into_owned_row(self) -> OwnedRow

source§

fn value_serialize_into(&self, buf: impl BufMut)

source§

fn value_serialize(&self) -> Vec<u8>

source§

fn value_serialize_bytes(&self) -> Bytes

source§

fn memcmp_serialize_into(&self, serde: &OrderedRowSerde, buf: impl BufMut)

source§

fn memcmp_serialize(&self, serde: &OrderedRowSerde) -> Vec<u8>

source§

fn hash_datums_into<H: Hasher>(&self, state: &mut H)

source§

fn hash<H: BuildHasher>(&self, hash_builder: H) -> HashCode<H>

source§

fn eq(this: &Self, other: impl Row) -> bool

source§

impl<R: Row + Clone> Row for Cow<'_, R>

source§

fn datum_at(&self, index: usize) -> DatumRef<'_>

source§

unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>

source§

fn len(&self) -> usize

source§

fn is_empty(&self) -> bool

source§

fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>

source§

fn to_owned_row(&self) -> OwnedRow

source§

fn value_serialize_into(&self, buf: impl BufMut)

source§

fn value_serialize(&self) -> Vec<u8>

source§

fn memcmp_serialize_into(&self, serde: &OrderedRowSerde, buf: impl BufMut)

source§

fn memcmp_serialize(&self, serde: &OrderedRowSerde) -> Vec<u8>

source§

fn hash<H: BuildHasher>(&self, hash_builder: H) -> HashCode<H>

source§

fn hash_datums_into<H: Hasher>(&self, state: &mut H)

source§

fn eq(this: &Self, other: impl Row) -> bool

source§

fn into_owned_row(self) -> OwnedRow

source§

impl<R: Row> Row for Option<R>

Implements Row for an optional row.

source§

fn datum_at(&self, index: usize) -> DatumRef<'_>

source§

unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>

source§

fn len(&self) -> usize

source§

fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>

source§

fn to_owned_row(&self) -> OwnedRow

source§

fn into_owned_row(self) -> OwnedRow

source§

fn value_serialize_into(&self, buf: impl BufMut)

source§

fn memcmp_serialize_into(&self, serde: &OrderedRowSerde, buf: impl BufMut)

source§

impl<R: Row> Row for &R

source§

fn datum_at(&self, index: usize) -> DatumRef<'_>

source§

unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>

source§

fn len(&self) -> usize

source§

fn is_empty(&self) -> bool

source§

fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>

source§

fn to_owned_row(&self) -> OwnedRow

source§

fn value_serialize_into(&self, buf: impl BufMut)

source§

fn value_serialize(&self) -> Vec<u8>

source§

fn memcmp_serialize_into(&self, serde: &OrderedRowSerde, buf: impl BufMut)

source§

fn memcmp_serialize(&self, serde: &OrderedRowSerde) -> Vec<u8>

source§

fn hash<H: BuildHasher>(&self, hash_builder: H) -> HashCode<H>

source§

fn hash_datums_into<H: Hasher>(&self, state: &mut H)

source§

fn eq(this: &Self, other: impl Row) -> bool

source§

impl<R: Row> Row for Box<R>

source§

fn datum_at(&self, index: usize) -> DatumRef<'_>

source§

unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>

source§

fn len(&self) -> usize

source§

fn is_empty(&self) -> bool

source§

fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>

source§

fn to_owned_row(&self) -> OwnedRow

source§

fn value_serialize_into(&self, buf: impl BufMut)

source§

fn value_serialize(&self) -> Vec<u8>

source§

fn memcmp_serialize_into(&self, serde: &OrderedRowSerde, buf: impl BufMut)

source§

fn memcmp_serialize(&self, serde: &OrderedRowSerde) -> Vec<u8>

source§

fn hash<H: BuildHasher>(&self, hash_builder: H) -> HashCode<H>

source§

fn hash_datums_into<H: Hasher>(&self, state: &mut H)

source§

fn eq(this: &Self, other: impl Row) -> bool

source§

fn into_owned_row(self) -> OwnedRow

Implementors§

source§

impl Row for RowRef<'_>

source§

impl Row for ListRef<'_>

source§

impl Row for Empty

source§

impl Row for OwnedRow

source§

impl<'i, R: Row> Row for Project<'i, R>

source§

impl<D: ToDatumRef + Default, const N: usize> Row for ArrayVec<[D; N]>

source§

impl<D: ToDatumRef> Row for Once<D>

source§

impl<D: ToDatumRef> Row for RepeatN<D>

source§

impl<R1: Row, R2: Row> Row for Chain<R1, R2>

source§

impl<R: Row> Row for DefaultOrdered<R>

source§

impl<R: Row> Row for Slice<R>