Enum mz_repr::scalar::Datum

source ·
pub enum Datum<'a> {
Show 30 variants False, True, Int16(i16), Int32(i32), Int64(i64), UInt8(u8), UInt16(u16), UInt32(u32), UInt64(u64), Float32(OrderedFloat<f32>), Float64(OrderedFloat<f64>), Date(Date), Time(NaiveTime), Timestamp(CheckedTimestamp<NaiveDateTime>), TimestampTz(CheckedTimestamp<DateTime<Utc>>), Interval(Interval), Bytes(&'a [u8]), String(&'a str), Array(Array<'a>), List(DatumList<'a>), Map(DatumMap<'a>), Numeric(OrderedDecimal<Numeric>), JsonNull, Uuid(Uuid), MzTimestamp(Timestamp), Range(Range<DatumNested<'a>>), MzAclItem(MzAclItem), AclItem(AclItem), Dummy, Null,
}
Expand description

A single value.

§Notes

§Equality

Datum must always derive Eq to enforce equality with repr::Row.

§Datum-containing types

Because Rust disallows recursive enums, complex types which need to contain other Datums instead store bytes representing that data in other structs, usually prefixed with Datum (e.g. DatumList). These types perform a form of ad-hoc deserialization of their inner bytes to Datums via crate::row::read_datum.

To create a new instance of a Datum-referencing Datum, you need to store the inner Datum’s bytes in a row (so you can in turn borrow those bytes in the outer Datum). The idiom we’ve devised for this is a series of functions on repr::row::RowPacker prefixed with push_.

Variants§

§

False

The false boolean value.

§

True

The true boolean value.

§

Int16(i16)

A 16-bit signed integer.

§

Int32(i32)

A 32-bit signed integer.

§

Int64(i64)

A 64-bit signed integer.

§

UInt8(u8)

An 8-bit unsigned integer.

§

UInt16(u16)

An 16-bit unsigned integer.

§

UInt32(u32)

A 32-bit unsigned integer.

§

UInt64(u64)

A 64-bit unsigned integer.

§

Float32(OrderedFloat<f32>)

A 32-bit floating point number.

§

Float64(OrderedFloat<f64>)

A 64-bit floating point number.

§

Date(Date)

A date.

§

Time(NaiveTime)

A time.

§

Timestamp(CheckedTimestamp<NaiveDateTime>)

A date and time, without a timezone. Note that this is not crate::Timestamp! That’s in Datum::MzTimestamp.

§

TimestampTz(CheckedTimestamp<DateTime<Utc>>)

A date and time, with a timezone.

§

Interval(Interval)

A span of time.

§

Bytes(&'a [u8])

A sequence of untyped bytes.

§

String(&'a str)

A sequence of Unicode codepoints encoded as UTF-8.

§

Array(Array<'a>)

Unlike Datum::List, arrays are like tensors and are not permitted to be ragged.

§

List(DatumList<'a>)

A sequence of Datums.

Unlike Datum::Array, lists are permitted to be ragged.

§

Map(DatumMap<'a>)

A mapping from string keys to Datums.

§

Numeric(OrderedDecimal<Numeric>)

An exact decimal number, possibly with a fractional component, with up to 39 digits of precision.

§

JsonNull

An unknown value within a JSON-typed Datum.

This variant is distinct from Datum::Null as a null datum is distinct from a non-null datum that contains the JSON value null.

§

Uuid(Uuid)

A universally unique identifier.

§

MzTimestamp(Timestamp)

§

Range(Range<DatumNested<'a>>)

A range of values, e.g. [-1, 1).

§

MzAclItem(MzAclItem)

A list of privileges granted to a user, that uses RoleIds for role references.

§

AclItem(AclItem)

A list of privileges granted to a user that uses Oids for role references. This type is used primarily for compatibility with PostgreSQL.

§

Dummy

A placeholder value.

Dummy values are never meant to be observed. Many operations on Datum panic if called on this variant.

Dummies are useful as placeholders in e.g. a Vec<Datum>, where it is known that a certain element of the vector is never observed and therefore needn’t be computed, but where some Datum must still be provided to maintain the shape of the vector. While any valid datum could be used for this purpose, having a dedicated variant makes it obvious when these optimizations have gone awry. If we used e.g. Datum::Null, an unexpected Datum::Null could indicate any number of problems: bad user data, bad function metadata, or a bad optimization.

§

Null

An unknown value.

Implementations§

source§

impl<'a> Datum<'a>

source

pub fn is_null(&self) -> bool

Reports whether this datum is null (i.e., is Datum::Null).

source

pub fn unwrap_bool(&self) -> bool

Unwraps the boolean value within this datum.

§Panics

Panics if the datum is not Datum::False or Datum::True.

source

pub fn unwrap_int16(&self) -> i16

Unwraps the 16-bit integer value within this datum.

§Panics

Panics if the datum is not Datum::Int16.

source

pub fn unwrap_int32(&self) -> i32

Unwraps the 32-bit integer value within this datum.

§Panics

Panics if the datum is not Datum::Int32.

source

pub fn unwrap_int64(&self) -> i64

Unwraps the 64-bit integer value within this datum.

§Panics

Panics if the datum is not Datum::Int64.

source

pub fn unwrap_uint8(&self) -> u8

Unwraps the 8-bit unsigned integer value within this datum.

§Panics

Panics if the datum is not Datum::UInt8.

source

pub fn unwrap_uint16(&self) -> u16

Unwraps the 16-bit unsigned integer value within this datum.

§Panics

Panics if the datum is not Datum::UInt16.

source

pub fn unwrap_uint32(&self) -> u32

Unwraps the 32-bit unsigned integer value within this datum.

§Panics

Panics if the datum is not Datum::UInt32.

source

pub fn unwrap_uint64(&self) -> u64

Unwraps the 64-bit unsigned integer value within this datum.

§Panics

Panics if the datum is not Datum::UInt64.

source

pub fn unwrap_ordered_float32(&self) -> OrderedFloat<f32>

source

pub fn unwrap_ordered_float64(&self) -> OrderedFloat<f64>

source

pub fn unwrap_float32(&self) -> f32

Unwraps the 32-bit floating-point value within this datum.

§Panics

Panics if the datum is not Datum::Float32.

source

pub fn unwrap_float64(&self) -> f64

Unwraps the 64-bit floating-point value within this datum.

§Panics

Panics if the datum is not Datum::Float64.

source

pub fn unwrap_date(&self) -> Date

Unwraps the date value within this datum.

§Panics

Panics if the datum is not Datum::Date.

source

pub fn unwrap_time(&self) -> NaiveTime

Unwraps the time vaqlue within this datum.

§Panics

Panics if the datum is not Datum::Time.

source

pub fn unwrap_timestamp(&self) -> CheckedTimestamp<NaiveDateTime>

Unwraps the timestamp value within this datum.

§Panics

Panics if the datum is not Datum::Timestamp.

source

pub fn unwrap_timestamptz(&self) -> CheckedTimestamp<DateTime<Utc>>

Unwraps the timestamptz value within this datum.

§Panics

Panics if the datum is not Datum::TimestampTz.

source

pub fn unwrap_interval(&self) -> Interval

Unwraps the interval value within this datum.

§Panics

Panics if the datum is not Datum::Interval.

source

pub fn unwrap_str(&self) -> &'a str

Unwraps the string value within this datum.

§Panics

Panics if the datum is not Datum::String.

source

pub fn unwrap_bytes(&self) -> &'a [u8]

Unwraps the bytes value within this datum.

§Panics

Panics if the datum is not Datum::Bytes.

source

pub fn unwrap_uuid(&self) -> Uuid

Unwraps the uuid value within this datum.

§Panics

Panics if the datum is not Datum::Uuid.

source

pub fn unwrap_array(&self) -> Array<'a>

Unwraps the array value within this datum.

§Panics

Panics if the datum is not Datum::Array.

source

pub fn unwrap_list(&self) -> DatumList<'a>

Unwraps the list value within this datum.

§Panics

Panics if the datum is not Datum::List.

source

pub fn unwrap_map(&self) -> DatumMap<'a>

Unwraps the map value within this datum.

§Panics

Panics if the datum is not Datum::Map.

source

pub fn unwrap_numeric(&self) -> OrderedDecimal<Numeric>

Unwraps the numeric value within this datum.

§Panics

Panics if the datum is not Datum::Numeric.

source

pub fn unwrap_mz_timestamp(&self) -> Timestamp

Unwraps the mz_repr::Timestamp value within this datum.

§Panics

Panics if the datum is not Datum::MzTimestamp.

source

pub fn unwrap_range(&self) -> Range<Datum<'a>>

Unwraps the range value within this datum.

Note that the return type is a range generic over Datum, which is convenient to work with. However, the type stored in the datum is generic over DatumNested, which is necessary to avoid needless boxing of the inner Datum.

§Panics

Panics if the datum is not Datum::Range.

source

pub fn unwrap_mz_acl_item(&self) -> MzAclItem

Unwraps the mz_acl_item value within this datum.

§Panics

Panics if the datum is not Datum::MzAclItem.

source

pub fn unwrap_acl_item(&self) -> AclItem

Unwraps the acl_item value within this datum.

§Panics

Panics if the datum is not Datum::AclItem.

source

pub fn is_instance_of(self, column_type: &ColumnType) -> bool

Reports whether this datum is an instance of the specified column type.

source§

impl Datum<'_>

source

pub fn empty_array() -> Datum<'static>

source

pub fn empty_list() -> Datum<'static>

source

pub fn empty_map() -> Datum<'static>

Trait Implementations§

source§

impl<'a> Clone for Datum<'a>

source§

fn clone(&self) -> Datum<'a>

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<'a, E> DatumType<'a, E> for Datum<'a>

source§

fn nullable() -> bool

Whether this Rust type can represent NULL values
source§

fn fallible() -> bool

Whether this Rust type can represent errors
source§

fn try_from_result( res: Result<Datum<'a>, E>, ) -> Result<Self, Result<Datum<'a>, E>>

Try to convert a Result whose Ok variant is a Datum into this native Rust type (Self). If it fails the error variant will contain the original result.
source§

fn into_result(self, _temp_storage: &'a RowArena) -> Result<Datum<'a>, E>

Convert this Rust type into a Result containing a Datum, or an error
source§

impl<'a> Debug for Datum<'a>

source§

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

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

impl Display for Datum<'_>

source§

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

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

impl<'a> From<&'a [u8]> for Datum<'a>

source§

fn from(b: &'a [u8]) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'__enum_kinds1, 'a> From<&'__enum_kinds1 Datum<'a>> for DatumKind

source§

fn from(_value: &'__enum_kinds1 Datum<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a PropDatum> for Datum<'a>

source§

fn from(pd: &'a PropDatum) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for Datum<'a>

source§

fn from(s: &'a str) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<CheckedTimestamp<DateTime<Utc>>> for Datum<'a>

source§

fn from(dt: CheckedTimestamp<DateTime<Utc>>) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<CheckedTimestamp<NaiveDateTime>> for Datum<'a>

source§

fn from(dt: CheckedTimestamp<NaiveDateTime>) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<Date> for Datum<'a>

source§

fn from(d: Date) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'__enum_kinds1, 'a> From<Datum<'a>> for DatumKind

source§

fn from(value: Datum<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Datum<'a>> for ProtoDatum

source§

fn from(x: Datum<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Decimal<NUMERIC_DATUM_WIDTH_USIZE>> for Datum<'a>

source§

fn from(n: Numeric) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<Interval> for Datum<'a>

source§

fn from(other: Interval) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<MzAclItem> for Datum<'a>

source§

fn from(mz_acl_item: MzAclItem) -> Self

Converts to this type from the input type.
source§

impl<'a> From<NaiveTime> for Datum<'a>

source§

fn from(t: NaiveTime) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a, T> From<Option<T>> for Datum<'a>
where Datum<'a>: From<T>,

source§

fn from(o: Option<T>) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<OrderedDecimal<Decimal<NUMERIC_DATUM_WIDTH_USIZE>>> for Datum<'a>

source§

fn from(n: OrderedDecimal<Numeric>) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<OrderedFloat<f32>> for Datum<'a>

source§

fn from(f: OrderedFloat<f32>) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<OrderedFloat<f64>> for Datum<'a>

source§

fn from(f: OrderedFloat<f64>) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<TimeDelta> for Datum<'a>

source§

fn from(duration: Duration) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<Timestamp> for Datum<'a>

source§

fn from(ts: Timestamp) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<Uuid> for Datum<'a>

source§

fn from(uuid: Uuid) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<bool> for Datum<'a>

source§

fn from(b: bool) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<f32> for Datum<'a>

source§

fn from(f: f32) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<f64> for Datum<'a>

source§

fn from(f: f64) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<i128> for Datum<'a>

source§

fn from(d: i128) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<i16> for Datum<'a>

source§

fn from(i: i16) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<i32> for Datum<'a>

source§

fn from(i: i32) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<i64> for Datum<'a>

source§

fn from(i: i64) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<u128> for Datum<'a>

source§

fn from(d: u128) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<u16> for Datum<'a>

source§

fn from(u: u16) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<u32> for Datum<'a>

source§

fn from(u: u32) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<u64> for Datum<'a>

source§

fn from(u: u64) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> From<u8> for Datum<'a>

source§

fn from(u: u8) -> Datum<'a>

Converts to this type from the input type.
source§

impl<'a> Hash for Datum<'a>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a> Ord for Datum<'a>

source§

fn cmp(&self, other: &Datum<'a>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<'a> PartialEq for Datum<'a>

source§

fn eq(&self, other: &Datum<'a>) -> bool

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

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

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

impl<'a> PartialOrd for Datum<'a>

source§

fn partial_cmp(&self, other: &Datum<'a>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl TryFrom<Datum<'_>> for CheckedTimestamp<DateTime<Utc>>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for CheckedTimestamp<NaiveDateTime>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Date

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for DateTime<Utc>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Interval

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for NaiveDateTime

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for NaiveTime

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<Interval>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<NaiveTime>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<OrderedDecimal<Numeric>>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<OrderedFloat<f32>>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<OrderedFloat<f64>>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<Timestamp>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<bool>

§

type Error = ()

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

fn try_from(datum: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<f32>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<f64>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<i16>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<i32>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<i64>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<u16>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<u32>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Option<u64>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for OrderedDecimal<Numeric>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for OrderedFloat<f32>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for OrderedFloat<f64>

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for Timestamp

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for bool

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for f32

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for f64

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for i16

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for i32

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for i64

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for u16

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for u32

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Datum<'_>> for u64

§

type Error = ()

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

fn try_from(from: Datum<'_>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryInto<Datum<'a>> for DateTime<Utc>

§

type Error = TimestampError

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

fn try_into(self) -> Result<Datum<'a>, Self::Error>

Performs the conversion.
source§

impl<'a> TryInto<Datum<'a>> for NaiveDateTime

§

type Error = TimestampError

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

fn try_into(self) -> Result<Datum<'a>, Self::Error>

Performs the conversion.
source§

impl<'a> Copy for Datum<'a>

source§

impl<'a> Eq for Datum<'a>

source§

impl<'a> StructuralPartialEq for Datum<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Datum<'a>

§

impl<'a> RefUnwindSafe for Datum<'a>

§

impl<'a> Send for Datum<'a>

§

impl<'a> Sync for Datum<'a>

§

impl<'a> Unpin for Datum<'a>

§

impl<'a> UnwindSafe for Datum<'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, U> CastInto<U> for T
where U: CastFrom<T>,

source§

fn cast_into(self) -> U

Performs the cast.
source§

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

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Hashable for T
where T: Hash,

§

type Output = u64

The type of the output value.
source§

fn hashed(&self) -> u64

A well-distributed integer derived from the data.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T, U> OverrideFrom<Option<&T>> for U
where U: OverrideFrom<T>,

source§

fn override_from(self, layer: &Option<&T>) -> U

Override the configuration represented by Self with values from the given layer.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> PreferredContainer for T
where T: Ord + Clone + 'static,

§

type Container = Vec<T>

The preferred container for the type.
source§

impl<T> ProgressEventTimestamp for T
where T: Data + Debug + Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Upcasts this ProgressEventTimestamp to Any. Read more
source§

fn type_name(&self) -> &'static str

Returns the name of the concrete type of this object. Read more
source§

impl<P, R> ProtoType<R> for P
where R: RustType<P>,

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

source§

impl<T> Data for T
where T: Clone + 'static,

source§

impl<T> Data for T
where T: Data + Ord + Debug,

source§

impl<T> Sequence for T
where T: Eq + Hash,