Skip to main content

ScalarImpl

Enum ScalarImpl 

Source
pub enum ScalarImpl {
Show 21 variants Int16(i16), Int32(i32), Int64(i64), Int256(Int256), Float32(OrderedFloat<f32>), Float64(OrderedFloat<f64>), Utf8(Box<str>), Bool(bool), Decimal(Decimal), Interval(Interval), Date(Date), Time(Time), Timestamp(Timestamp), Timestamptz(Timestamptz), Jsonb(JsonbVal), Serial(Serial), Struct(StructValue), List(ListValue), Map(MapValue), Vector(VectorInner<Box<[OrderedFloat<f32>]>>), Bytea(Box<[u8]>),
}
Expand description

ScalarImpl embeds all possible scalars in the evaluation framework.

Note: ScalarImpl doesn’t contain all information of its DataType, so sometimes they need to be used together. e.g., for Struct, we don’t have the field names in the value.

See for_all_variants for the definition.

Variants§

§

Int16(i16)

§

Int32(i32)

§

Int64(i64)

§

Int256(Int256)

§

Float32(OrderedFloat<f32>)

§

Float64(OrderedFloat<f64>)

§

Utf8(Box<str>)

§

Bool(bool)

§

Decimal(Decimal)

§

Interval(Interval)

§

Date(Date)

§

Time(Time)

§

Timestamp(Timestamp)

§

Timestamptz(Timestamptz)

§

Jsonb(JsonbVal)

§

Serial(Serial)

§

Struct(StructValue)

§

List(ListValue)

§

Map(MapValue)

§

Vector(VectorInner<Box<[OrderedFloat<f32>]>>)

§

Bytea(Box<[u8]>)

Implementations§

Source§

impl ScalarImpl

Source

pub fn get_ident(&self) -> &'static str

Source§

impl ScalarImpl

Source

pub fn successor(&self) -> Option<ScalarImpl>

Returns the successor of the current value if it exists.

See also Successor.

The function may return None when:

  1. The current value is the maximum value of the type.
  2. The successor value of the type is not well-defined.
Source§

impl ScalarImpl

Source

pub fn as_int16(&self) -> &i16

§Panics

If the scalar is not of the expected type.

Source

pub fn into_int16(self) -> i16

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_int32(&self) -> &i32

§Panics

If the scalar is not of the expected type.

Source

pub fn into_int32(self) -> i32

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_int64(&self) -> &i64

§Panics

If the scalar is not of the expected type.

Source

pub fn into_int64(self) -> i64

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_int256(&self) -> &Int256

§Panics

If the scalar is not of the expected type.

Source

pub fn into_int256(self) -> Int256

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

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

§Panics

If the scalar is not of the expected type.

Source

pub fn into_float32(self) -> OrderedFloat<f32>

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

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

§Panics

If the scalar is not of the expected type.

Source

pub fn into_float64(self) -> OrderedFloat<f64>

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_utf8(&self) -> &Box<str>

§Panics

If the scalar is not of the expected type.

Source

pub fn into_utf8(self) -> Box<str>

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_bool(&self) -> &bool

§Panics

If the scalar is not of the expected type.

Source

pub fn into_bool(self) -> bool

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_decimal(&self) -> &Decimal

§Panics

If the scalar is not of the expected type.

Source

pub fn into_decimal(self) -> Decimal

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_interval(&self) -> &Interval

§Panics

If the scalar is not of the expected type.

Source

pub fn into_interval(self) -> Interval

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_date(&self) -> &Date

§Panics

If the scalar is not of the expected type.

Source

pub fn into_date(self) -> Date

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_time(&self) -> &Time

§Panics

If the scalar is not of the expected type.

Source

pub fn into_time(self) -> Time

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_timestamp(&self) -> &Timestamp

§Panics

If the scalar is not of the expected type.

Source

pub fn into_timestamp(self) -> Timestamp

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_timestamptz(&self) -> &Timestamptz

§Panics

If the scalar is not of the expected type.

Source

pub fn into_timestamptz(self) -> Timestamptz

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_jsonb(&self) -> &JsonbVal

§Panics

If the scalar is not of the expected type.

Source

pub fn into_jsonb(self) -> JsonbVal

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_serial(&self) -> &Serial

§Panics

If the scalar is not of the expected type.

Source

pub fn into_serial(self) -> Serial

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_struct(&self) -> &StructValue

§Panics

If the scalar is not of the expected type.

Source

pub fn into_struct(self) -> StructValue

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_list(&self) -> &ListValue

§Panics

If the scalar is not of the expected type.

Source

pub fn into_list(self) -> ListValue

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_map(&self) -> &MapValue

§Panics

If the scalar is not of the expected type.

Source

pub fn into_map(self) -> MapValue

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_vector(&self) -> &VectorInner<Box<[OrderedFloat<f32>]>>

§Panics

If the scalar is not of the expected type.

Source

pub fn into_vector(self) -> VectorInner<Box<[OrderedFloat<f32>]>>

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn as_bytea(&self) -> &Box<[u8]>

§Panics

If the scalar is not of the expected type.

Source

pub fn into_bytea(self) -> Box<[u8]>

§Panics

If the scalar is not of the expected type.

Source§

impl ScalarImpl

Source

pub fn from_binary( bytes: &Bytes, data_type: &DataType, ) -> Result<ScalarImpl, Box<dyn Error + Send + Sync>>

Creates a scalar from pgwire “BINARY” format.

The counterpart of to_binary::ToBinary.

Source

pub fn from_text( s: &str, data_type: &DataType, ) -> Result<ScalarImpl, Box<dyn Error + Send + Sync>>

Creates a scalar from pgwire “TEXT” format.

The counterpart of ToText.

Source

pub fn from_text_for_test( s: &str, data_type: &DataType, ) -> Result<ScalarImpl, Box<dyn Error + Send + Sync>>

Source§

impl ScalarImpl

Source§

impl ScalarImpl

Source

pub fn serialize(&self, ser: &mut Serializer<impl BufMut>) -> Result<(), Error>

Serialize the scalar into the memcomparable format.

Source

pub fn deserialize( ty: &DataType, de: &mut Deserializer<impl Buf>, ) -> Result<ScalarImpl, Error>

Deserialize the scalar from the memcomparable format.

Source

pub fn as_integral(&self) -> i64

Trait Implementations§

Source§

impl !PartialOrd for ScalarImpl

Source§

impl Clone for ScalarImpl

Source§

fn clone(&self) -> ScalarImpl

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScalarImpl

Source§

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

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

impl DefaultOrd for ScalarImpl

Source§

impl DefaultPartialOrd for ScalarImpl

Source§

impl Eq for ScalarImpl

Source§

impl EstimateSize for ScalarImpl

Source§

fn estimated_heap_size(&self) -> usize

The estimated heap size of the current struct in bytes.
Source§

fn estimated_size(&self) -> usize
where Self: Sized,

The estimated total size of the current struct in bytes, including the estimated_heap_size and the size of Self.
Source§

impl<'a> From<&'a ScalarImpl> for ScalarRefImpl<'a>

Source§

fn from(scalar: &'a ScalarImpl) -> ScalarRefImpl<'a>

Converts to this type from the input type.
Source§

impl From<&String> for ScalarImpl

Source§

fn from(s: &String) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<&[u8]> for ScalarImpl

Source§

fn from(s: &[u8]) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<&str> for ScalarImpl

Source§

fn from(s: &str) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Box<[u8]>> for ScalarImpl

Source§

fn from(val: Box<[u8]>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Box<str>> for ScalarImpl

Source§

fn from(val: Box<str>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Bytes> for ScalarImpl

Source§

fn from(v: Bytes) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Date> for ScalarImpl

Source§

fn from(val: Date) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Decimal> for ScalarImpl

Source§

fn from(val: Decimal) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Int256> for ScalarImpl

Source§

fn from(val: Int256) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Interval> for ScalarImpl

Source§

fn from(val: Interval) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<JsonbRef<'_>> for ScalarImpl

Source§

fn from(jsonb: JsonbRef<'_>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<JsonbVal> for ScalarImpl

Source§

fn from(val: JsonbVal) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<ListRef<'_>> for ScalarImpl

Source§

fn from(list: ListRef<'_>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<ListValue> for ScalarImpl

Source§

fn from(val: ListValue) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<MapValue> for ScalarImpl

Source§

fn from(val: MapValue) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<OrderedFloat<f32>> for ScalarImpl

Source§

fn from(val: OrderedFloat<f32>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<OrderedFloat<f64>> for ScalarImpl

Source§

fn from(val: OrderedFloat<f64>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<ScalarRefImpl<'_>> for ScalarImpl

Source§

fn from(scalar_ref: ScalarRefImpl<'_>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Serial> for ScalarImpl

Source§

fn from(val: Serial) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<String> for ScalarImpl

Source§

fn from(s: String) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<StructValue> for ScalarImpl

Source§

fn from(val: StructValue) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Time> for ScalarImpl

Source§

fn from(val: Time) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Timestamp> for ScalarImpl

Source§

fn from(val: Timestamp) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Timestamptz> for ScalarImpl

Source§

fn from(val: Timestamptz) -> ScalarImpl

Converts to this type from the input type.
Source§

impl<const N: usize> From<TypedId<N, u32>> for ScalarImpl

Source§

fn from(value: TypedId<N, u32>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl<const N: usize> From<TypedId<N, u64>> for ScalarImpl

Source§

fn from(value: TypedId<N, u64>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl<T> From<Vec<Option<T>>> for ScalarImpl

Source§

fn from(v: Vec<Option<T>>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Vec<String>> for ScalarImpl

Source§

fn from(v: Vec<String>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl<T> From<Vec<T>> for ScalarImpl

Source§

fn from(v: Vec<T>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for ScalarImpl

Source§

fn from(v: Vec<u8>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<VectorInner<Box<[OrderedFloat<f32>]>>> for ScalarImpl

Source§

fn from(val: VectorInner<Box<[OrderedFloat<f32>]>>) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<bool> for ScalarImpl

Source§

fn from(val: bool) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<char> for ScalarImpl

Source§

fn from(c: char) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<f32> for ScalarImpl

Source§

fn from(f: f32) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<f64> for ScalarImpl

Source§

fn from(f: f64) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<i16> for ScalarImpl

Source§

fn from(val: i16) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<i32> for ScalarImpl

Source§

fn from(val: i32) -> ScalarImpl

Converts to this type from the input type.
Source§

impl From<i64> for ScalarImpl

Source§

fn from(val: i64) -> ScalarImpl

Converts to this type from the input type.
Source§

impl<'a> FromSql<'a> for ScalarImpl

Source§

fn from_sql( ty: &Type, raw: &'a [u8], ) -> Result<ScalarImpl, Box<dyn Error + Send + Sync>>

Creates a new value of this type from a buffer of data of the specified Postgres Type in its binary format. Read more
Source§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be created from the specified Postgres Type.
§

fn from_sql_null(ty: &Type) -> Result<Self, Box<dyn Error + Send + Sync>>

Creates a new value of this type from a NULL SQL value. Read more
§

fn from_sql_nullable( ty: &Type, raw: Option<&'a [u8]>, ) -> Result<Self, Box<dyn Error + Send + Sync>>

A convenience function that delegates to from_sql and from_sql_null depending on the value of raw.
Source§

impl Hash for ScalarImpl

Source§

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

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 PartialEq for ScalarImpl

Source§

fn eq(&self, other: &ScalarImpl) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for ScalarImpl

Source§

impl ToSql for ScalarImpl

Source§

fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Send + Sync>>

An adaptor method used internally by Rust-Postgres. Read more
Source§

fn to_sql( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts the value of self into the binary format of the specified Postgres Type, appending it to out. Read more
Source§

fn accepts(_ty: &Type) -> bool

Determines if a value of this type can be converted to the specified Postgres Type.
§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format
Source§

impl TryFrom<ScalarImpl> for Box<str>

Source§

type Error = ArrayError

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

fn try_from(val: ScalarImpl) -> Result<Box<str>, ArrayError>

Performs the conversion.
Source§

impl TryFrom<ScalarImpl> for bool

Source§

type Error = ArrayError

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

fn try_from(val: ScalarImpl) -> Result<bool, ArrayError>

Performs the conversion.
Source§

impl TryFrom<ScalarImpl> for Box<[u8]>

Source§

type Error = ArrayError

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

fn try_from(val: ScalarImpl) -> Result<Box<[u8]>, ArrayError>

Performs the conversion.
Source§

impl TryFrom<ScalarImpl> for String

Source§

type Error = ArrayError

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

fn try_from(val: ScalarImpl) -> Result<String, ArrayError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

§

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

§

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

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>, U: Sized,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
§

impl<T> AsAny for T
where T: Any,

§

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

§

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

§

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

Gets the type name of self
§

impl<T> AsAny for T
where T: Any + Send + Sync,

§

fn any_ref(&self) -> &(dyn Any + Send + Sync + 'static)

Obtains a dyn Any reference to the object: Read more
§

fn as_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Obtains an Arc<dyn Any> reference to the object: Read more
§

fn into_any(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts the object to Box<dyn Any>: Read more
§

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

Convenient wrapper for std::any::type_name, since Any does not provide it and Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).
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
§

impl<T> BorrowToSql for T
where T: ToSql,

§

fn borrow_to_sql(&self) -> &dyn ToSql

Returns a reference to self as a ToSql trait object.
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

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

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> Downcast for T
where T: AsAny + ?Sized,

§

fn is<T>(&self) -> bool
where T: AsAny,

Returns true if the boxed type is the same as T. Read more
§

fn downcast_ref<T>(&self) -> Option<&T>
where T: AsAny,

Forward to the method defined on the type Any.
§

fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: AsAny,

Forward to the method defined on the type Any.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

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

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

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

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

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

§

impl<T> DynEq for T
where T: Eq + Any,

§

fn dyn_eq(&self, other: &(dyn Any + 'static)) -> bool

§

impl<T> DynHash for T
where T: Hash + Any,

§

fn dyn_hash(&self, state: &mut dyn Hasher)

§

impl<T> DynPartialEq for T
where T: PartialEq + AsAny,

§

fn dyn_eq(&self, other: &(dyn Any + 'static)) -> bool

§

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

§

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

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

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

§

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.
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn from_ref(input: &T) -> T

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

impl<T> FromSqlOwned for T
where T: for<'a> FromSql<'a>,

§

impl<T> FutureExt for T

§

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

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

fn with_current_context(self) -> WithContext<Self>

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

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

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

impl<T> IntoResult<T> for T

§

type Err = Infallible

§

fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>

§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<K> Key for K
where K: Eq + Hash,

§

impl<T> Key for T
where T: Send + Sync + 'static + Hash + Eq,

§

impl<T> Key for T
where T: Hash + Eq + Debug + Send + Sync + 'static,

§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
Source§

impl<T> LruKey for T
where T: Eq + Send + Hash,

Source§

impl<T> LruValue for T
where T: Send + Sync,

§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<M> MetricVecRelabelExt for M

Source§

fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>

Source§

fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>

Source§

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> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SameOrElseExt for T
where T: Eq,

Source§

fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T

Check if self and other are equal, if so, return self, otherwise return the result of f().
§

impl<T> Scope for T

§

fn with<F, R>(self, f: F) -> R
where Self: Sized, F: FnOnce(Self) -> R,

Scoped with ownership.
§

fn with_ref<F, R>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Scoped with reference.
§

fn with_mut<F, R>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Scoped with mutable reference.
Source§

impl<T> SerTo<T> for T

§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

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

Source§

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> ToOwnedDatum for T
where T: Into<ScalarImpl>,

Source§

fn to_owned_datum(self) -> Option<ScalarImpl>

Convert the datum to an owned Datum.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
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.
§

impl<KernelType, ArrowType> TryIntoArrow<ArrowType> for KernelType
where ArrowType: TryFromKernel<KernelType>,

§

fn try_into_arrow(self) -> Result<ArrowType, ArrowError>

§

impl<KernelType, ArrowType> TryIntoKernel<KernelType> for ArrowType
where KernelType: TryFromArrow<ArrowType>,

§

fn try_into_kernel(self) -> Result<KernelType, ArrowError>

§

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

§

fn vzip(self) -> V

§

impl<T> Value for T
where T: Send + Sync + 'static,

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
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