#[non_exhaustive]pub enum MultiValuesRef<'a> {
Show 26 variants
Unset(DataType),
Bool(&'a [bool]),
Char(&'a [char]),
Int8(&'a [i8]),
Int16(&'a [i16]),
Int32(&'a [i32]),
Int64(&'a [i64]),
Int128(&'a [i128]),
UInt8(&'a [u8]),
UInt16(&'a [u16]),
UInt32(&'a [u32]),
UInt64(&'a [u64]),
UInt128(&'a [u128]),
Float32(&'a [f32]),
Float64(&'a [f64]),
BigInteger(&'a [BigInt]),
BigDecimal(&'a [BigDecimal]),
String(&'a [String]),
Date(&'a [NaiveDate]),
Time(&'a [NaiveTime]),
DateTime(&'a [NaiveDateTime]),
Instant(&'a [DateTime<Utc>]),
Duration(&'a [Duration]),
Url(&'a [Url]),
StringMap(&'a [HashMap<String, String>]),
Json(&'a [Value]),
}Expand description
Borrowed semantic view preserving source types without owning payloads.
The lifetime is that of the source storage; copying this view does not clone strings, maps, JSON, or other rich payloads.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unset(DataType)
Unset storage retaining its declared type.
Bool(&'a [bool])
Boolean value list
Char(&'a [char])
Character value list
Int8(&'a [i8])
8-bit signed integer list
Int16(&'a [i16])
16-bit signed integer list
Int32(&'a [i32])
32-bit signed integer list
Int64(&'a [i64])
64-bit signed integer list
Int128(&'a [i128])
128-bit signed integer list
UInt8(&'a [u8])
8-bit unsigned integer list
UInt16(&'a [u16])
16-bit unsigned integer list
UInt32(&'a [u32])
32-bit unsigned integer list
UInt64(&'a [u64])
64-bit unsigned integer list
UInt128(&'a [u128])
128-bit unsigned integer list
Float32(&'a [f32])
32-bit floating-point number list
Float64(&'a [f64])
64-bit floating-point number list
BigInteger(&'a [BigInt])
Arbitrary-precision integer list
BigDecimal(&'a [BigDecimal])
Arbitrary-precision decimal list
Tuple Fields
0: &'a [BigDecimal]Borrowed or copied source payload.
String(&'a [String])
String value list
Date(&'a [NaiveDate])
Calendar date list
Time(&'a [NaiveTime])
Time-of-day list
DateTime(&'a [NaiveDateTime])
Date-and-time list
Tuple Fields
0: &'a [NaiveDateTime]Borrowed or copied source payload.
Instant(&'a [DateTime<Utc>])
UTC instant list
Duration(&'a [Duration])
Duration list
Url(&'a [Url])
URL list
StringMap(&'a [HashMap<String, String>])
String-map list
Json(&'a [Value])
JSON value list
Implementations§
Source§impl<'a> MultiValuesRef<'a>
impl<'a> MultiValuesRef<'a>
Sourcepub fn data_type(self) -> DataType
pub fn data_type(self) -> DataType
Returns the element type, including for unset or empty storage.
§Returns
The declared runtime element type.
Sourcepub fn len(self) -> usize
pub fn len(self) -> usize
Returns the number of stored elements; unset storage has length zero.
§Returns
The number of concrete elements, or zero for unset storage.
Sourcepub fn is_empty(self) -> bool
pub fn is_empty(self) -> bool
Reports whether no concrete elements are available.
§Returns
true for unset or empty storage; otherwise false.
Sourcepub fn get(self, index: usize) -> Option<ValueRef<'a>>
pub fn get(self, index: usize) -> Option<ValueRef<'a>>
Borrows the indexed element, returning None for unset or out-of-range reads.
Numeric and boolean payloads are copied. Text and rich payloads retain the original storage lifetime and are never cloned.
§Parameters
index- Zero-based element position to borrow.
§Returns
Some with the indexed element, or None when storage is unset
or index is out of bounds.
Trait Implementations§
Source§impl<'a> Clone for MultiValuesRef<'a>
impl<'a> Clone for MultiValuesRef<'a>
Source§fn clone(&self) -> MultiValuesRef<'a>
fn clone(&self) -> MultiValuesRef<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more