Enum Value

Source
#[repr(u32)]
pub enum Value {
Show 19 variants U32(u32), V32(u32), I32(i32), Z32(i32), U64(u64), V64(u64), I64(i64), Z64(i64), F32(f32), F64(f64), Decimal(Decimal), DateTime(DateTime<Utc>), Duration(Duration), Bool(bool), Null = 16_384, String(ArcStr), Bytes(PBytes), Error(ArcStr), Array(ValArray),
}

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

Source

pub fn to_string_naked(&self) -> String

Source

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

Source

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

Source

pub fn fmt_ext( &self, f: &mut Formatter<'_>, esc: &Escape, types: bool, ) -> Result

Source§

impl Value

Source

pub fn approx_eq(&self, v: &Self) -> bool

Source

pub fn discriminant(&self) -> u32

Source

pub fn is_copy(&self) -> bool

Source

pub fn cast(self, typ: Typ) -> Option<Value>

Whatever value is attempt to turn it into the type specified

Source

pub fn cast_to<T: FromValue + Sized>(self) -> Result<T>

cast value directly to any type implementing FromValue

Source

pub fn get_as<T: FromValue + Sized>(self) -> Option<T>

Source

pub fn err<T: Error>(e: T) -> Value

Source

pub fn number(&self) -> bool

return true if the value is some kind of number, otherwise false.

Source

pub fn flatten(self) -> impl Iterator<Item = Value>

return an iterator that will perform a depth first traversal of the specified value. All array elements will be flattened into non array values.

Trait Implementations§

Source§

impl Add for Value

Source§

type Output = Value

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self

Performs the + operation. Read more
Source§

impl Clone for Value

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

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

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

impl<'de> Deserialize<'de> for Value

Source§

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 Display for Value

Source§

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

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

impl Div for Value

Source§

type Output = Value

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self

Performs the / operation. Read more
Source§

impl<T: Into<Value> + Copy> From<&T> for Value

Source§

fn from(v: &T) -> Value

Converts to this type from the input type.
Source§

impl From<&'static str> for Value

Source§

fn from(v: &'static str) -> Value

Converts to this type from the input type.
Source§

impl<const S: usize, T: Into<Value>> From<[T; S]> for Value

Source§

fn from(v: [T; S]) -> Self

Converts to this type from the input type.
Source§

impl<T: Into<Value>, U: Into<Value>> From<(T, U)> for Value

Source§

fn from((t, u): (T, U)) -> Value

Converts to this type from the input type.
Source§

impl<T: Into<Value>, U: Into<Value>, V: Into<Value>> From<(T, U, V)> for Value

Source§

fn from((t, u, v): (T, U, V)) -> Value

Converts to this type from the input type.
Source§

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

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Converts to this type from the input type.
Source§

impl From<ArcStr> for Value

Source§

fn from(v: ArcStr) -> Value

Converts to this type from the input type.
Source§

impl<K: Into<Value>, V: Into<Value>> From<BTreeMap<K, V>> for Value

Source§

fn from(v: BTreeMap<K, V>) -> Self

Converts to this type from the input type.
Source§

impl<K: Into<Value>> From<BTreeSet<K>> for Value

Source§

fn from(s: BTreeSet<K>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<BitFlags<T>> for Value
where T: BitFlag, <T as RawBitFlags>::Numeric: Into<Value>,

Source§

fn from(v: BitFlags<T>) -> Self

Converts to this type from the input type.
Source§

impl From<Bytes> for Value

Source§

fn from(v: Bytes) -> Value

Converts to this type from the input type.
Source§

impl From<CompactString> for Value

Source§

fn from(v: CompactString) -> Value

Converts to this type from the input type.
Source§

impl From<DateTime<Utc>> for Value

Source§

fn from(v: DateTime<Utc>) -> Value

Converts to this type from the input type.
Source§

impl From<Decimal> for Value

Source§

fn from(value: Decimal) -> Self

Converts to this type from the input type.
Source§

impl From<Duration> for Value

Source§

fn from(v: Duration) -> 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

Source§

fn from(h: HashMap<K, V, S>) -> Value

Converts to this type from the input type.
Source§

impl<K: Into<Value>, S: BuildHasher + Default> From<HashSet<K, S>> for Value

Source§

fn from(h: HashSet<K, S>) -> Value

Converts to this type from the input type.
Source§

impl<K: Into<Value>, V: Into<Value>, S: BuildHasher + Default> From<IndexMap<K, V, S>> for Value

Source§

fn from(h: IndexMap<K, V, S>) -> Value

Converts to this type from the input type.
Source§

impl<K: Into<Value>, S: BuildHasher + Default> From<IndexSet<K, S>> for Value

Source§

fn from(h: IndexSet<K, S>) -> Value

Converts to this type from the input type.
Source§

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

Source§

fn from(o: Option<T>) -> Value

Converts to this type from the input type.
Source§

impl From<Path> for Value

Source§

fn from(v: Path) -> Value

Converts to this type from the input type.
Source§

impl<T: Into<Value> + Clone + Send + Sync> From<Pooled<Vec<T>>> for Value

Source§

fn from(v: Pooled<Vec<T>>) -> Value

Converts to this type from the input type.
Source§

impl<const S: usize, T: Into<Value>> From<SmallVec<[T; S]>> for Value

Source§

fn from(v: SmallVec<[T; S]>) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Value

Source§

fn from(v: String) -> Value

Converts to this type from the input type.
Source§

impl From<Uuid> for Value

Source§

fn from(id: Uuid) -> Self

Converts to this type from the input type.
Source§

impl From<ValArray> for Value

Source§

fn from(v: ValArray) -> Value

Converts to this type from the input type.
Source§

impl<T: Into<Value>> From<Vec<T>> for Value

Source§

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

Converts to this type from the input type.
Source§

impl From<bool> for Value

Source§

fn from(v: bool) -> Value

Converts to this type from the input type.
Source§

impl From<f32> for Value

Source§

fn from(v: f32) -> Value

Converts to this type from the input type.
Source§

impl From<f64> for Value

Source§

fn from(v: f64) -> Value

Converts to this type from the input type.
Source§

impl From<i16> for Value

Source§

fn from(v: i16) -> Value

Converts to this type from the input type.
Source§

impl From<i32> for Value

Source§

fn from(v: i32) -> Value

Converts to this type from the input type.
Source§

impl From<i64> for Value

Source§

fn from(v: i64) -> Value

Converts to this type from the input type.
Source§

impl From<i8> for Value

Source§

fn from(v: i8) -> Value

Converts to this type from the input type.
Source§

impl From<u16> for Value

Source§

fn from(v: u16) -> Value

Converts to this type from the input type.
Source§

impl From<u32> for Value

Source§

fn from(v: u32) -> Value

Converts to this type from the input type.
Source§

impl From<u64> for Value

Source§

fn from(v: u64) -> Value

Converts to this type from the input type.
Source§

impl From<u8> for Value

Source§

fn from(v: u8) -> Value

Converts to this type from the input type.
Source§

impl From<usize> for Value

Source§

fn from(v: usize) -> Value

Converts to this type from the input type.
Source§

impl FromIterator<Value> for ValArray

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromStr for Value

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl FromValue for Value

Source§

fn from_value(v: Value) -> Result<Self>

attempt to cast v to the type of self using any reasonable means
Source§

fn get(v: Value) -> Option<Self>

extract the type of self from v if the type of v is equivelent to the type of self, otherwise return None.
Source§

impl Hash for Value

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 Mul for Value

Source§

type Output = Value

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
Source§

impl Not for Value

Source§

type Output = Value

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self

Performs the unary ! operation. Read more
Source§

impl Ord for Value

Source§

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

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

impl Pack for Value

Source§

fn encoded_len(&self) -> usize

Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), PackError>

Source§

fn decode(buf: &mut impl Buf) -> Result<Self, PackError>

Source§

fn const_encoded_len() -> Option<usize>

Source§

fn decode_into(&mut self, buf: &mut impl Buf) -> Result<(), PackError>
where Self: Sized,

Source§

impl PartialEq for Value

Source§

fn eq(&self, rhs: &Value) -> 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 PartialOrd for Value

Source§

fn partial_cmp(&self, other: &Self) -> 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 Rem for Value

Source§

type Output = Value

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl Serialize for Value

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Sub for Value

Source§

type Output = Value

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self

Performs the - operation. Read more
Source§

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

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, 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

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

Source§

type Output = T

Should always be Self
Source§

impl<T> ToCompactString for T
where T: Display,

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> ToString for T
where T: Display + ?Sized,

Source§

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>,

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,