Skip to main content

IndexValue

Enum IndexValue 

Source
pub enum IndexValue<'a> {
Show 26 variants Absent, Nat8(u8), Nat16(u16), Nat32(u32), Nat64(u64), Nat128(u128), U256(U256), Ulid(Ulid), Date(Date), Duration(Duration), Decimal(Decimal), Timestamp(Timestamp), Account(Account), Subaccount(Subaccount), Float64(Float64), Float32(Float32), Int8(i8), Int16(i16), Int32(i32), Int64(i64), Int128(i128), Principal(Principal), Bool(bool), Text(&'a str), Blob(&'a [u8]), UnitEnum { definition: &'static TypeSchema, ordinal: u8, },
}
Expand description

One exact ordered scalar operand for index prefixes and fluent comparisons. Operand types must match declared fields; integers are never implicitly widened, narrowed or coerced across signedness. This is a bounded scalar boundary, not a general expression/value representation.

Variants§

§

Absent

An absent optional component, ordered before present values.

§

Nat8(u8)

Exact u8 component.

§

Nat16(u16)

Exact u16 component.

§

Nat32(u32)

Exact u32 component.

§

Nat64(u64)

Exact u64 component.

§

Nat128(u128)

Exact u128 component.

§

U256(U256)

Exact unsigned 256-bit component, without narrower-integer coercion.

§

Ulid(Ulid)

Exact ULID identity, without integer or text coercion.

§

Date(Date)

Exact bounded calendar date; no integer or text coercion.

§

Duration(Duration)

Exact millisecond duration; no integer coercion.

§

Decimal(Decimal)

Exact decimal; the declared field scale must represent it without rounding.

§

Timestamp(Timestamp)

Exact millisecond timestamp; no integer coercion.

§

Account(Account)

Exact account identity; no coercion from another key type.

§

Subaccount(Subaccount)

Exact subaccount identity; no coercion from another key type.

§

Float64(Float64)

Finite canonical 64-bit float; no cross-width or integer coercion.

§

Float32(Float32)

Finite canonical 32-bit float; no cross-width or integer coercion.

§

Int8(i8)

Exact i8 component.

§

Int16(i16)

Exact i16 component.

§

Int32(i32)

Exact i32 component.

§

Int64(i64)

Exact i64 component.

§

Int128(i128)

Exact i128 component.

§

Principal(Principal)

Canonical identity, ordered by length then significant bytes.

§

Bool(bool)

False sorts before true; no numeric coercion.

§

Text(&'a str)

Exact UTF-8 bytes, without case folding or normalization.

§

Blob(&'a [u8])

Exact raw bytes in lexicographic order; shorter byte prefixes sort first.

§

UnitEnum

Unit enum in canonical variant-name order, bound to its complete definition.

Fields

§definition: &'static TypeSchema

Declared enum identity and alternatives.

§ordinal: u8

Zero-based ordinal in canonical variant-name order.

Trait Implementations§

Source§

impl<'a> Clone for IndexValue<'a>

Source§

fn clone(&self) -> Self

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<'a> Copy for IndexValue<'a>

Source§

impl<'a> Debug for IndexValue<'a>

Source§

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

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

impl<'a> Eq for IndexValue<'a>

Source§

impl<'a> From<&'a String> for IndexValue<'a>

Source§

fn from(value: &'a String) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<u8>> for IndexValue<'a>

Source§

fn from(value: &'a Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<&'a [u8; N]> for IndexValue<'a>

Source§

fn from(value: &'a [u8; N]) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(value: &'a [u8]) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(value: &'a str) -> Self

Converts to this type from the input type.
Source§

impl From<Account> for IndexValue<'_>

Source§

fn from(value: Account) -> Self

Converts to this type from the input type.
Source§

impl From<Date> for IndexValue<'_>

Source§

fn from(value: Date) -> Self

Converts to this type from the input type.
Source§

impl From<Decimal> for IndexValue<'_>

Source§

fn from(value: Decimal) -> Self

Converts to this type from the input type.
Source§

impl From<Duration> for IndexValue<'_>

Source§

fn from(value: Duration) -> Self

Converts to this type from the input type.
Source§

impl From<Float32> for IndexValue<'_>

Source§

fn from(value: Float32) -> Self

Converts to this type from the input type.
Source§

impl From<Float64> for IndexValue<'_>

Source§

fn from(value: Float64) -> Self

Converts to this type from the input type.
Source§

impl<'a, T: Into<IndexValue<'a>>> From<Option<T>> for IndexValue<'a>

Source§

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

Converts to this type from the input type.
Source§

impl From<Principal> for IndexValue<'_>

Source§

fn from(value: Principal) -> Self

Converts to this type from the input type.
Source§

impl From<Timestamp> for IndexValue<'_>

Source§

fn from(value: Timestamp) -> Self

Converts to this type from the input type.
Source§

impl From<U256> for IndexValue<'_>

Source§

fn from(value: U256) -> Self

Converts to this type from the input type.
Source§

impl From<Ulid> for IndexValue<'_>

Source§

fn from(value: Ulid) -> Self

Converts to this type from the input type.
Source§

impl From<[u8; 32]> for IndexValue<'_>

Source§

fn from(value: Subaccount) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for IndexValue<'_>

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for IndexValue<'_>

Source§

fn from(value: i8) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for IndexValue<'_>

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for IndexValue<'_>

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for IndexValue<'_>

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for IndexValue<'_>

Source§

fn from(value: i128) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for IndexValue<'_>

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for IndexValue<'_>

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for IndexValue<'_>

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for IndexValue<'_>

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u128> for IndexValue<'_>

Source§

fn from(value: u128) -> Self

Converts to this type from the input type.
Source§

impl<'a> PartialEq for IndexValue<'a>

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for IndexValue<'a>

Auto Trait Implementations§

§

impl<'a> Forget for IndexValue<'a>

§

impl<'a> Freeze for IndexValue<'a>

§

impl<'a> Move for IndexValue<'a>

§

impl<'a> RefUnwindSafe for IndexValue<'a>

§

impl<'a> Send for IndexValue<'a>

§

impl<'a> Sync for IndexValue<'a>

§

impl<'a> Unpin for IndexValue<'a>

§

impl<'a> UnsafeUnpin for IndexValue<'a>

§

impl<'a> UnwindSafe for IndexValue<'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> 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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

Source§

type Output = T

Should always be Self
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.