pub enum AlgebraicValue {
Show 18 variants Sum(SumValue), Product(ProductValue), Array(ArrayValue), Map(MapValue), Bool(bool), I8(i8), U8(u8), I16(i16), U16(u16), I32(i32), U32(u32), I64(i64), U64(u64), I128(i128), U128(u128), F32(F32), F64(F64), String(String),
}
Expand description

A value in SATS typed at some AlgebraicType.

Values are type erased, so they do not store their type. This is important mainly for space efficiency, including network latency and bandwidth.

These are only values and not expressions. That is, they are canonical and cannot be simplified further by some evaluation. So forms like 42 + 24 are not represented in an AlgebraicValue.

Variants§

§

Sum(SumValue)

A structural sum value.

Given a sum type { N_0(T_0), N_1(T_1), ..., N_n(T_n) } where N_i denotes a variant name and where T_i denotes the type the variant stores, a sum value makes a specific choice as to the variant. So for example, we might chose N_1(T_1) and represent this choice with (1, v) where v is a value of type T_1.

§

Product(ProductValue)

A structural product value.

Given a product type { N_0: T_0, N_1: T_1, ..., N_n: T_n } where N_i denotes a field / element name and where T_i denotes the type the field stores, a product value stores a value v_i of type T_i for each field N_i.

§

Array(ArrayValue)

A homogeneous array of AlgebraicValues. The array has the type [AlgebraicType::Array(elem_ty)].

The contained values are stored packed in a representation appropriate for their type. See ArrayValue for details on the representation.

§

Map(MapValue)

An ordered map value of key: AlgebraicValues mapped to value: AlgebraicValues. Each key must be of the same AlgebraicType as all the others and the same applies to each value. A map as a whole has the type [AlgebraicType::Map(key_ty, val_ty)].

Maps are implemented internally as [BTreeMap<AlgebraicValue, AlgebraicValue>]. This implies that key/values are ordered first by key and then value as if they were a sorted slice [(key, value)]. This order is observable as maps are exposed both directly and indirectly via Ord for AlgebraicValue. The latter lets us observe that e.g., { a: 42 } < { b: 42 }. However, we cannot observe any difference between { a: 0, b: 0 } and { b: 0, a: 0 }, as the natural order is used as opposed to insertion order. Where insertion order is relevant, a AlgebraicValue::Array with (key, value) pairs can be used instead.

We box the MapValue to reduce size and because we assume that map values will be uncommon.

§

Bool(bool)

A bool value of type AlgebraicType::Bool.

§

I8(i8)

An i8 value of type AlgebraicType::I8.

§

U8(u8)

A u8 value of type AlgebraicType::U8.

§

I16(i16)

An i16 value of type AlgebraicType::I16.

§

U16(u16)

A u16 value of type AlgebraicType::U16.

§

I32(i32)

An i32 value of type AlgebraicType::I32.

§

U32(u32)

A u32 value of type AlgebraicType::U32.

§

I64(i64)

An i64 value of type AlgebraicType::I64.

§

U64(u64)

A u64 value of type AlgebraicType::U64.

§

I128(i128)

An i128 value of type AlgebraicType::I128.

We box these up as they allow us to shrink AlgebraicValue.

§

U128(u128)

A u128 value of type AlgebraicType::U128.

We box these up as they allow us to shrink AlgebraicValue.

§

F32(F32)

A totally ordered F32 value of type AlgebraicType::F32.

All floating point values defined in IEEE-754 are supported. However, unlike the primitive f32, a total order is established.

§

F64(F64)

A totally ordered F64 value of type AlgebraicType::F64.

All floating point values defined in IEEE-754 are supported. However, unlike the primitive f64, a total order is established.

§

String(String)

A UTF-8 string value of type AlgebraicType::String.

Uses Rust’s standard representation of strings.

Implementations§

source§

impl AlgebraicValue

source

pub fn is_sum(&self) -> bool

Returns true if this is a AlgebraicValue::Sum, otherwise false

source

pub fn as_sum_mut(&mut self) -> Option<&mut SumValue>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Sum, otherwise None

source

pub fn as_sum(&self) -> Option<&SumValue>

Optionally returns references to the inner fields if this is a AlgebraicValue::Sum, otherwise None

source

pub fn into_sum(self) -> Result<SumValue, Self>

Returns the inner fields if this is a AlgebraicValue::Sum, otherwise returns back the enum in the Err case of the result

source

pub fn is_product(&self) -> bool

Returns true if this is a AlgebraicValue::Product, otherwise false

source

pub fn as_product_mut(&mut self) -> Option<&mut ProductValue>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Product, otherwise None

source

pub fn as_product(&self) -> Option<&ProductValue>

Optionally returns references to the inner fields if this is a AlgebraicValue::Product, otherwise None

source

pub fn into_product(self) -> Result<ProductValue, Self>

Returns the inner fields if this is a AlgebraicValue::Product, otherwise returns back the enum in the Err case of the result

source

pub fn is_array(&self) -> bool

Returns true if this is a AlgebraicValue::Array, otherwise false

source

pub fn as_array_mut(&mut self) -> Option<&mut ArrayValue>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Array, otherwise None

source

pub fn as_array(&self) -> Option<&ArrayValue>

Optionally returns references to the inner fields if this is a AlgebraicValue::Array, otherwise None

source

pub fn into_array(self) -> Result<ArrayValue, Self>

Returns the inner fields if this is a AlgebraicValue::Array, otherwise returns back the enum in the Err case of the result

source

pub fn is_map(&self) -> bool

Returns true if this is a AlgebraicValue::Map, otherwise false

source

pub fn as_map_mut(&mut self) -> Option<&mut MapValue>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Map, otherwise None

source

pub fn as_map(&self) -> Option<&MapValue>

Optionally returns references to the inner fields if this is a AlgebraicValue::Map, otherwise None

source

pub fn into_map(self) -> Result<MapValue, Self>

Returns the inner fields if this is a AlgebraicValue::Map, otherwise returns back the enum in the Err case of the result

source

pub fn is_bool(&self) -> bool

Returns true if this is a AlgebraicValue::Bool, otherwise false

source

pub fn as_bool_mut(&mut self) -> Option<&mut bool>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Bool, otherwise None

source

pub fn as_bool(&self) -> Option<&bool>

Optionally returns references to the inner fields if this is a AlgebraicValue::Bool, otherwise None

source

pub fn into_bool(self) -> Result<bool, Self>

Returns the inner fields if this is a AlgebraicValue::Bool, otherwise returns back the enum in the Err case of the result

source

pub fn is_i8(&self) -> bool

Returns true if this is a AlgebraicValue::I8, otherwise false

source

pub fn as_i8_mut(&mut self) -> Option<&mut i8>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I8, otherwise None

source

pub fn as_i8(&self) -> Option<&i8>

Optionally returns references to the inner fields if this is a AlgebraicValue::I8, otherwise None

source

pub fn into_i8(self) -> Result<i8, Self>

Returns the inner fields if this is a AlgebraicValue::I8, otherwise returns back the enum in the Err case of the result

source

pub fn is_u8(&self) -> bool

Returns true if this is a AlgebraicValue::U8, otherwise false

source

pub fn as_u8_mut(&mut self) -> Option<&mut u8>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U8, otherwise None

source

pub fn as_u8(&self) -> Option<&u8>

Optionally returns references to the inner fields if this is a AlgebraicValue::U8, otherwise None

source

pub fn into_u8(self) -> Result<u8, Self>

Returns the inner fields if this is a AlgebraicValue::U8, otherwise returns back the enum in the Err case of the result

source

pub fn is_i16(&self) -> bool

Returns true if this is a AlgebraicValue::I16, otherwise false

source

pub fn as_i16_mut(&mut self) -> Option<&mut i16>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I16, otherwise None

source

pub fn as_i16(&self) -> Option<&i16>

Optionally returns references to the inner fields if this is a AlgebraicValue::I16, otherwise None

source

pub fn into_i16(self) -> Result<i16, Self>

Returns the inner fields if this is a AlgebraicValue::I16, otherwise returns back the enum in the Err case of the result

source

pub fn is_u16(&self) -> bool

Returns true if this is a AlgebraicValue::U16, otherwise false

source

pub fn as_u16_mut(&mut self) -> Option<&mut u16>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U16, otherwise None

source

pub fn as_u16(&self) -> Option<&u16>

Optionally returns references to the inner fields if this is a AlgebraicValue::U16, otherwise None

source

pub fn into_u16(self) -> Result<u16, Self>

Returns the inner fields if this is a AlgebraicValue::U16, otherwise returns back the enum in the Err case of the result

source

pub fn is_i32(&self) -> bool

Returns true if this is a AlgebraicValue::I32, otherwise false

source

pub fn as_i32_mut(&mut self) -> Option<&mut i32>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I32, otherwise None

source

pub fn as_i32(&self) -> Option<&i32>

Optionally returns references to the inner fields if this is a AlgebraicValue::I32, otherwise None

source

pub fn into_i32(self) -> Result<i32, Self>

Returns the inner fields if this is a AlgebraicValue::I32, otherwise returns back the enum in the Err case of the result

source

pub fn is_u32(&self) -> bool

Returns true if this is a AlgebraicValue::U32, otherwise false

source

pub fn as_u32_mut(&mut self) -> Option<&mut u32>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U32, otherwise None

source

pub fn as_u32(&self) -> Option<&u32>

Optionally returns references to the inner fields if this is a AlgebraicValue::U32, otherwise None

source

pub fn into_u32(self) -> Result<u32, Self>

Returns the inner fields if this is a AlgebraicValue::U32, otherwise returns back the enum in the Err case of the result

source

pub fn is_i64(&self) -> bool

Returns true if this is a AlgebraicValue::I64, otherwise false

source

pub fn as_i64_mut(&mut self) -> Option<&mut i64>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I64, otherwise None

source

pub fn as_i64(&self) -> Option<&i64>

Optionally returns references to the inner fields if this is a AlgebraicValue::I64, otherwise None

source

pub fn into_i64(self) -> Result<i64, Self>

Returns the inner fields if this is a AlgebraicValue::I64, otherwise returns back the enum in the Err case of the result

source

pub fn is_u64(&self) -> bool

Returns true if this is a AlgebraicValue::U64, otherwise false

source

pub fn as_u64_mut(&mut self) -> Option<&mut u64>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U64, otherwise None

source

pub fn as_u64(&self) -> Option<&u64>

Optionally returns references to the inner fields if this is a AlgebraicValue::U64, otherwise None

source

pub fn into_u64(self) -> Result<u64, Self>

Returns the inner fields if this is a AlgebraicValue::U64, otherwise returns back the enum in the Err case of the result

source

pub fn is_i128(&self) -> bool

Returns true if this is a AlgebraicValue::I128, otherwise false

source

pub fn as_i128_mut(&mut self) -> Option<&mut i128>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I128, otherwise None

source

pub fn as_i128(&self) -> Option<&i128>

Optionally returns references to the inner fields if this is a AlgebraicValue::I128, otherwise None

source

pub fn into_i128(self) -> Result<i128, Self>

Returns the inner fields if this is a AlgebraicValue::I128, otherwise returns back the enum in the Err case of the result

source

pub fn is_u128(&self) -> bool

Returns true if this is a AlgebraicValue::U128, otherwise false

source

pub fn as_u128_mut(&mut self) -> Option<&mut u128>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U128, otherwise None

source

pub fn as_u128(&self) -> Option<&u128>

Optionally returns references to the inner fields if this is a AlgebraicValue::U128, otherwise None

source

pub fn into_u128(self) -> Result<u128, Self>

Returns the inner fields if this is a AlgebraicValue::U128, otherwise returns back the enum in the Err case of the result

source

pub fn is_f32(&self) -> bool

Returns true if this is a AlgebraicValue::F32, otherwise false

source

pub fn as_f32_mut(&mut self) -> Option<&mut F32>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::F32, otherwise None

source

pub fn as_f32(&self) -> Option<&F32>

Optionally returns references to the inner fields if this is a AlgebraicValue::F32, otherwise None

source

pub fn into_f32(self) -> Result<F32, Self>

Returns the inner fields if this is a AlgebraicValue::F32, otherwise returns back the enum in the Err case of the result

source

pub fn is_f64(&self) -> bool

Returns true if this is a AlgebraicValue::F64, otherwise false

source

pub fn as_f64_mut(&mut self) -> Option<&mut F64>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::F64, otherwise None

source

pub fn as_f64(&self) -> Option<&F64>

Optionally returns references to the inner fields if this is a AlgebraicValue::F64, otherwise None

source

pub fn into_f64(self) -> Result<F64, Self>

Returns the inner fields if this is a AlgebraicValue::F64, otherwise returns back the enum in the Err case of the result

source

pub fn is_string(&self) -> bool

Returns true if this is a AlgebraicValue::String, otherwise false

source

pub fn as_string_mut(&mut self) -> Option<&mut String>

Optionally returns mutable references to the inner fields if this is a AlgebraicValue::String, otherwise None

source

pub fn as_string(&self) -> Option<&String>

Optionally returns references to the inner fields if this is a AlgebraicValue::String, otherwise None

source

pub fn into_string(self) -> Result<String, Self>

Returns the inner fields if this is a AlgebraicValue::String, otherwise returns back the enum in the Err case of the result

source§

impl AlgebraicValue

source

pub fn as_bytes(&self) -> Option<&[u8]>

Interpret the value as a byte slice or None if it isn’t a byte slice.

source

pub fn unit() -> Self

The canonical unit value defined as the nullary product value ().

The type of UNIT is ().

source

pub const fn Bytes(v: Vec<u8>) -> Self

Returns an AlgebraicValue representing v: Vec<u8>.

source

pub fn into_bytes(self) -> Result<Vec<u8>, Self>

Converts self into a byte string, if applicable.

source

pub fn OptionSome(v: Self) -> Self

Returns an AlgebraicValue for some: v.

The some variant is assigned the tag 0.

source

pub fn OptionNone() -> Self

Returns an AlgebraicValue for none.

The none variant is assigned the tag 1.

source

pub fn sum(tag: u8, value: Self) -> Self

Returns an AlgebraicValue representing a sum value with tag and value.

source

pub const fn product(elements: Vec<Self>) -> Self

Returns an AlgebraicValue representing a product value with the given elements.

source

pub fn map(map: MapValue) -> Self

Returns an AlgebraicValue representing a map value defined by the given map.

source

pub fn type_of(&self) -> AlgebraicType

Infer the AlgebraicType of an AlgebraicValue.

source

pub fn is_numeric_zero(&self) -> bool

Returns whether this value represents a numeric zero.

Can only be true where the type is numeric.

source

pub fn from_sequence_value(ty: &AlgebraicType, sequence_value: i128) -> Self

Converts sequence_value to an appropriate AlgebraicValue based on ty. Truncates the sequence_value to fit ty.

Panics if ty is not an integer type.

source§

impl AlgebraicValue

source

pub fn decode<'a>( ty: &<Self as Value>::Type, bytes: &mut impl BufReader<'a> ) -> Result<Self, DecodeError>

Decode a value from bytes typed at ty.

source

pub fn decode_smallvec<'a>( ty: &<Self as Value>::Type, bytes: &mut impl BufReader<'a> ) -> Result<SmallVec<[Self; 1]>, DecodeError>

Decode a vector of values from bytes with each value typed at ty.

source

pub fn encode(&self, bytes: &mut impl BufWriter)

Trait Implementations§

source§

impl Clone for AlgebraicValue

source§

fn clone(&self) -> AlgebraicValue

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 Debug for AlgebraicValue

source§

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

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

impl From<&[u8]> for AlgebraicValue

source§

fn from(x: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<&AlgebraicValue> for ProductValue

source§

fn from(x: &AlgebraicValue) -> Self

Converts to this type from the input type.
source§

impl From<&str> for AlgebraicValue

source§

fn from(x: &str) -> Self

Converts to this type from the input type.
source§

impl From<AlgebraicValue> for FieldExpr

source§

fn from(original: AlgebraicValue) -> FieldExpr

Converts to this type from the input type.
source§

impl From<AlgebraicValue> for ProductValue

source§

fn from(x: AlgebraicValue) -> Self

Converts to this type from the input type.
source§

impl From<AlgebraicValue> for ValueDeserializer

source§

fn from(original: AlgebraicValue) -> ValueDeserializer

Converts to this type from the input type.
source§

impl From<ArrayValue> for AlgebraicValue

source§

fn from(original: ArrayValue) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<BTreeMap<AlgebraicValue, AlgebraicValue>> for AlgebraicValue

source§

fn from(original: MapValue) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<ColId> for AlgebraicValue

source§

fn from(value: ColId) -> Self

Converts to this type from the input type.
source§

impl From<ConstrainedFloat<f32, UnitConstraint<f32>>> for AlgebraicValue

source§

fn from(original: F32) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<ConstrainedFloat<f64, UnitConstraint<f64>>> for AlgebraicValue

source§

fn from(original: F64) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<ConstraintId> for AlgebraicValue

source§

fn from(value: ConstraintId) -> Self

Converts to this type from the input type.
source§

impl From<IndexId> for AlgebraicValue

source§

fn from(value: IndexId) -> Self

Converts to this type from the input type.
source§

impl<T: Into<AlgebraicValue>> From<Option<T>> for AlgebraicValue

source§

fn from(value: Option<T>) -> Self

Converts to this type from the input type.
source§

impl From<ProductValue> for AlgebraicValue

source§

fn from(original: ProductValue) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<SequenceId> for AlgebraicValue

source§

fn from(value: SequenceId) -> Self

Converts to this type from the input type.
source§

impl From<String> for AlgebraicValue

source§

fn from(original: String) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<SumValue> for AlgebraicValue

source§

fn from(original: SumValue) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<TableId> for AlgebraicValue

source§

fn from(value: TableId) -> Self

Converts to this type from the input type.
source§

impl From<bool> for AlgebraicValue

source§

fn from(original: bool) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<f32> for AlgebraicValue

source§

fn from(x: f32) -> Self

Converts to this type from the input type.
source§

impl From<f64> for AlgebraicValue

source§

fn from(x: f64) -> Self

Converts to this type from the input type.
source§

impl From<i128> for AlgebraicValue

source§

fn from(original: i128) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<i16> for AlgebraicValue

source§

fn from(original: i16) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<i32> for AlgebraicValue

source§

fn from(original: i32) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<i64> for AlgebraicValue

source§

fn from(original: i64) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<i8> for AlgebraicValue

source§

fn from(original: i8) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<u128> for AlgebraicValue

source§

fn from(original: u128) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<u16> for AlgebraicValue

source§

fn from(original: u16) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<u32> for AlgebraicValue

source§

fn from(original: u32) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<u64> for AlgebraicValue

source§

fn from(original: u64) -> AlgebraicValue

Converts to this type from the input type.
source§

impl From<u8> for AlgebraicValue

source§

fn from(original: u8) -> AlgebraicValue

Converts to this type from the input type.
source§

impl FromIterator<AlgebraicValue> for ProductValue

source§

fn from_iter<T: IntoIterator<Item = AlgebraicValue>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for AlgebraicValue

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 Ord for AlgebraicValue

source§

fn cmp(&self, other: &AlgebraicValue) -> 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 PartialEq for AlgebraicValue

source§

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

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

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

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

impl PartialOrd for AlgebraicValue

source§

fn partial_cmp(&self, other: &AlgebraicValue) -> 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

This method 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

This method 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

This method 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

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

impl RangeBounds<AlgebraicValue> for AlgebraicValue

source§

fn start_bound(&self) -> Bound<&AlgebraicValue>

Start index bound. Read more
source§

fn end_bound(&self) -> Bound<&AlgebraicValue>

End index bound. Read more
1.35.0 · source§

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
source§

impl Serialize for AlgebraicValue

source§

fn serialize<S: Serializer>(&self, ser: S) -> Result<S::Ok, S::Error>

Serialize self in the data format of S using the provided serializer.
source§

impl ToDataKey for AlgebraicValue

source§

impl Value for AlgebraicValue

§

type Type = AlgebraicType

The type of this value.
source§

impl Eq for AlgebraicValue

source§

impl StructuralPartialEq for AlgebraicValue

Auto Trait Implementations§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

§

type Output = T

Should always be Self
source§

impl<T> Satn for T
where T: Serialize + ?Sized,

source§

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

Formats the value using the SATN data format into the formatter f.
source§

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

Formats the value using the postgres SATN data format into the formatter f.
source§

fn to_satn(&self) -> String

Formats the value using the SATN data format into the returned String.
source§

fn to_satn_pretty(&self) -> String

Pretty prints the value using the SATN data format into the returned String.
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, 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<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