pub struct ListRef<'a> {
array: &'a ArrayImpl,
start: u32,
end: u32,
}
Expand description
A slice of an array
Fields§
§array: &'a ArrayImpl
§start: u32
§end: u32
Implementations§
source§impl<'a> ListRef<'a>
impl<'a> ListRef<'a>
sourcepub fn iter(
self,
) -> impl DoubleEndedIterator + ExactSizeIterator<Item = DatumRef<'a>> + 'a
pub fn iter( self, ) -> impl DoubleEndedIterator + ExactSizeIterator<Item = DatumRef<'a>> + 'a
Iterates over the elements of the list.
sourcepub fn get(self, index: usize) -> Option<DatumRef<'a>>
pub fn get(self, index: usize) -> Option<DatumRef<'a>>
Get the element at the given index. Returns None
if the index is out of bounds.
pub fn memcmp_serialize( self, serializer: &mut Serializer<impl BufMut>, ) -> Result<()>
pub fn hash_scalar_inner<H: Hasher>(self, state: &mut H)
sourcepub fn estimate_serialize_size_inner(self) -> usize
pub fn estimate_serialize_size_inner(self) -> usize
estimate the serialized size with value encoding
pub fn to_owned(self) -> ListValue
sourcepub fn as_i64_slice(&self) -> Option<&[i64]>
pub fn as_i64_slice(&self) -> Option<&[i64]>
Returns a slice if the list is of type int64[]
.
Trait Implementations§
source§impl From<ListRef<'_>> for ScalarImpl
impl From<ListRef<'_>> for ScalarImpl
source§impl<'scalar> From<ListRef<'scalar>> for ScalarRefImpl<'scalar>
impl<'scalar> From<ListRef<'scalar>> for ScalarRefImpl<'scalar>
source§impl Ord for ListRef<'_>
impl Ord for ListRef<'_>
source§impl PartialOrd for ListRef<'_>
impl PartialOrd for ListRef<'_>
source§impl Row for ListRef<'_>
impl Row for ListRef<'_>
source§unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>
unsafe fn datum_at_unchecked(&self, index: usize) -> DatumRef<'_>
source§fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>
fn iter(&self) -> impl Iterator<Item = DatumRef<'_>>
Returns an iterator over the datums in the row, in
DatumRef
form.source§fn into_owned_row(self) -> OwnedRow
fn into_owned_row(self) -> OwnedRow
Consumes
self
and converts it into an OwnedRow
.source§fn value_serialize_into(&self, buf: impl BufMut)
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> ⓘ
fn value_serialize(&self) -> Vec<u8> ⓘ
Serializes the row with value encoding and returns the bytes.
source§fn value_serialize_bytes(&self) -> Bytes
fn value_serialize_bytes(&self) -> Bytes
Serializes the row with value encoding and returns the bytes.
fn value_estimate_size(&self) -> usize
source§fn memcmp_serialize_into(&self, serde: &OrderedRowSerde, buf: impl BufMut)
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> ⓘ
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)
fn hash_datums_into<H: Hasher>(&self, state: &mut H)
Hash the datums of this row into the given hasher. Read more
source§fn hash<H: BuildHasher>(&self, hash_builder: H) -> HashCode<H>
fn hash<H: BuildHasher>(&self, hash_builder: H) -> HashCode<H>
Returns the hash code of the row.
source§impl<'a> ScalarRef<'a> for ListRef<'a>
impl<'a> ScalarRef<'a> for ListRef<'a>
Implement Scalar
for ListValue
.
source§type ScalarType = ListValue
type ScalarType = ListValue
ScalarType
is the owned type of current ScalarRef
.source§fn to_owned_scalar(&self) -> ListValue
fn to_owned_scalar(&self) -> ListValue
Convert
ScalarRef
to an owned scalar.source§fn hash_scalar<H: Hasher>(&self, state: &mut H)
fn hash_scalar<H: Hasher>(&self, state: &mut H)
A wrapped hash function to get the hash value for this scaler.
source§impl SelfAsScalarRef for ListRef<'_>
impl SelfAsScalarRef for ListRef<'_>
fn as_scalar_ref(&self) -> Self
source§impl ToBinary for ListRef<'_>
impl ToBinary for ListRef<'_>
fn to_binary_with_type(&self, ty: &DataType) -> Result<Bytes, ToBinaryError>
source§impl ToText for ListRef<'_>
impl ToText for ListRef<'_>
source§fn write<W: Write>(&self, f: &mut W) -> Result
fn write<W: Write>(&self, f: &mut W) -> Result
Write the text to the writer regardless of its data type Read more
source§fn write_with_type<W: Write>(&self, ty: &DataType, f: &mut W) -> Result
fn write_with_type<W: Write>(&self, ty: &DataType, f: &mut W) -> Result
Write the text to the writer according to its data type
source§fn to_text_with_type(&self, ty: &DataType) -> String
fn to_text_with_type(&self, ty: &DataType) -> String
Convert to text according to its data type
source§impl<'scalar> TryFrom<ScalarRefImpl<'scalar>> for ListRef<'scalar>
impl<'scalar> TryFrom<ScalarRefImpl<'scalar>> for ListRef<'scalar>
source§type Error = ArrayError
type Error = ArrayError
The type returned in the event of a conversion error.
source§fn try_from(val: ScalarRefImpl<'scalar>) -> ArrayResult<Self>
fn try_from(val: ScalarRefImpl<'scalar>) -> ArrayResult<Self>
Performs the conversion.
impl<'a> Copy for ListRef<'a>
impl Eq for ListRef<'_>
Auto Trait Implementations§
impl<'a> Freeze for ListRef<'a>
impl<'a> RefUnwindSafe for ListRef<'a>
impl<'a> Send for ListRef<'a>
impl<'a> Sync for ListRef<'a>
impl<'a> Unpin for ListRef<'a>
impl<'a> UnwindSafe for ListRef<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<R> DefaultOrd for Rwhere
R: Row,
impl<R> DefaultOrd for Rwhere
R: Row,
fn default_cmp(&self, other: &R) -> Ordering
source§impl<R> DefaultPartialOrd for Rwhere
R: Row,
impl<R> DefaultPartialOrd for Rwhere
R: Row,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level
.source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
.source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
with metric_level
set to
MetricLevel::Debug
and relabel_num
set to 1.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R> RowExt for Rwhere
R: Row,
impl<R> RowExt for Rwhere
R: Row,
source§fn chain<R: Row>(self, other: R) -> Chain<Self, R>where
Self: Sized,
fn chain<R: Row>(self, other: R) -> Chain<Self, R>where
Self: Sized,
Adapter for chaining two rows together.
source§fn project(self, indices: &[usize]) -> Project<'_, Self>where
Self: Sized,
fn project(self, indices: &[usize]) -> Project<'_, Self>where
Self: Sized,
Adapter for projecting a row onto a subset of its columns with the given
indices
. Read moresource§fn slice(self, range: impl RangeBounds<usize>) -> Slice<Self>where
Self: Sized,
fn slice(self, range: impl RangeBounds<usize>) -> Slice<Self>where
Self: Sized,
Adapter for slicing a row with the given
range
. Read morefn display(&self) -> impl Display + '_
fn is_null_at(&self, index: usize) -> bool
source§impl<T> ToOwnedDatum for Twhere
T: Into<ScalarImpl>,
impl<T> ToOwnedDatum for Twhere
T: Into<ScalarImpl>,
source§fn to_owned_datum(self) -> Option<ScalarImpl>
fn to_owned_datum(self) -> Option<ScalarImpl>
Convert the datum to an owned
Datum
.