#[repr(u32)]pub enum Value {
}
Variants§
U32(u32)
full 4 byte u32
V32(u32)
LEB128 varint, 1 - 5 bytes depending on value
I32(i32)
full 4 byte i32
Z32(i32)
LEB128 varint zigzag encoded, 1 - 5 bytes depending on abs(value)
U64(u64)
full 8 byte u64
V64(u64)
LEB128 varint, 1 - 10 bytes depending on value
I64(i64)
full 8 byte i64
Z64(i64)
LEB128 varint zigzag encoded, 1 - 10 bytes depending on abs(value)
F32(f32)
4 byte ieee754 single precision float
F64(f64)
8 byte ieee754 double precision float
Decimal(Decimal)
fixed point decimal type
DateTime(DateTime<Utc>)
UTC timestamp
Duration(Duration)
Duration
Bool(bool)
boolean true
Null = 16_384
Empty value
String(ArcStr)
unicode string
Bytes(PBytes)
byte array
Error(ArcStr)
An explicit error
Array(ValArray)
An array of values
Implementations§
Source§impl Value
impl Value
pub fn approx_eq(&self, v: &Self) -> bool
pub fn discriminant(&self) -> u32
pub fn is_copy(&self) -> bool
Sourcepub fn cast(self, typ: Typ) -> Option<Value>
pub fn cast(self, typ: Typ) -> Option<Value>
Whatever value is attempt to turn it into the type specified
Sourcepub fn cast_to<T: FromValue + Sized>(self) -> Result<T>
pub fn cast_to<T: FromValue + Sized>(self) -> Result<T>
cast value directly to any type implementing FromValue
pub fn get_as<T: FromValue + Sized>(self) -> Option<T>
pub fn err<T: Error>(e: T) -> Value
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>> From<(T, U, V, W)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>> From<(T, U, V, W)> for Value
Source§fn from((t, u, v, w): (T, U, V, W)) -> Value
fn from((t, u, v, w): (T, U, V, W)) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>> From<(T, U, V, W, X)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>> From<(T, U, V, W, X)> for Value
Source§fn from((t, u, v, w, x): (T, U, V, W, X)) -> Value
fn from((t, u, v, w, x): (T, U, V, W, X)) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>> From<(T, U, V, W, X, Y)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>> From<(T, U, V, W, X, Y)> for Value
Source§fn from((t, u, v, w, x, y): (T, U, V, W, X, Y)) -> Value
fn from((t, u, v, w, x, y): (T, U, V, W, X, Y)) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>> From<(T, U, V, W, X, Y, Z)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>> From<(T, U, V, W, X, Y, Z)> for Value
Source§fn from((t, u, v, w, x, y, z): (T, U, V, W, X, Y, Z)) -> Value
fn from((t, u, v, w, x, y, z): (T, U, V, W, X, Y, Z)) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>> From<(T, U, V, W, X, Y, Z, A)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>> From<(T, U, V, W, X, Y, Z, A)> for Value
Source§fn from((t, u, v, w, x, y, z, a): (T, U, V, W, X, Y, Z, A)) -> Value
fn from((t, u, v, w, x, y, z, a): (T, U, V, W, X, Y, Z, A)) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B)> for Value
Source§fn from((t, u, v, w, x, y, z, a, b): (T, U, V, W, X, Y, Z, A, B)) -> Value
fn from((t, u, v, w, x, y, z, a, b): (T, U, V, W, X, Y, Z, A, B)) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C)> for Value
Source§fn from((t, u, v, w, x, y, z, a, b, c): (T, U, V, W, X, Y, Z, A, B, C)) -> Value
fn from((t, u, v, w, x, y, z, a, b, c): (T, U, V, W, X, Y, Z, A, B, C)) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d): (T, U, V, W, X, Y, Z, A, B, C, D),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d): (T, U, V, W, X, Y, Z, A, B, C, D), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e): (T, U, V, W, X, Y, Z, A, B, C, D, E),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e): (T, U, V, W, X, Y, Z, A, B, C, D, E), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e, f): (T, U, V, W, X, Y, Z, A, B, C, D, E, F),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e, f): (T, U, V, W, X, Y, Z, A, B, C, D, E, F), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e, f, g): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e, f, g): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e, f, g, h): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e, f, g, h): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i, j): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i, j): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i, j, k): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i, j, k): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>, L: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>, L: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i, j, k, l): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i, j, k, l): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L), ) -> Value
Converts to this type from the input type.
Source§impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>, L: Into<Value>, M: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L, M)> for Value
impl<T: Into<Value>, U: Into<Value>, V: Into<Value>, W: Into<Value>, X: Into<Value>, Y: Into<Value>, Z: Into<Value>, A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>, L: Into<Value>, M: Into<Value>> From<(T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L, M)> for Value
Source§fn from(
(t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i, j, k, l, m): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L, M),
) -> Value
fn from( (t, u, v, w, x, y, z, a, b, c, d, e, f, g, h, i, j, k, l, m): (T, U, V, W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L, M), ) -> Value
Converts to this type from the input type.
Source§impl From<CompactString> for Value
impl From<CompactString> for Value
Source§fn from(v: CompactString) -> Value
fn from(v: CompactString) -> Value
Converts to this type from the input type.
Source§impl<K: Into<Value>, V: Into<Value>, S: BuildHasher + Default> From<HashMap<K, V, S>> for Value
impl<K: Into<Value>, V: Into<Value>, S: BuildHasher + Default> From<HashMap<K, V, S>> for Value
Source§impl<K: Into<Value>, V: Into<Value>, S: BuildHasher + Default> From<IndexMap<K, V, S>> for Value
impl<K: Into<Value>, V: Into<Value>, S: BuildHasher + Default> From<IndexMap<K, V, S>> for Value
Source§impl FromIterator<Value> for ValArray
impl FromIterator<Value> for ValArray
Source§impl Ord for Value
impl Ord for Value
Source§impl Pack for Value
impl Pack for Value
fn encoded_len(&self) -> usize
fn encode(&self, buf: &mut impl BufMut) -> Result<(), PackError>
fn decode(buf: &mut impl Buf) -> Result<Self, PackError>
fn const_encoded_len() -> Option<usize>
fn decode_into(&mut self, buf: &mut impl Buf) -> Result<(), PackError>where
Self: Sized,
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl Eq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more