Enum aldrin_core::Value

source ·
pub enum Value {
Show 43 variants None, Some(Box<Value>), Bool(bool), U8(u8), I8(i8), U16(u16), I16(i16), U32(u32), I32(i32), U64(u64), I64(i64), F32(f32), F64(f64), String(String), Uuid(Uuid), ObjectId(ObjectId), ServiceId(ServiceId), Vec(Vec<Value>), Bytes(Vec<u8>), U8Map(HashMap<u8, Value>), I8Map(HashMap<i8, Value>), U16Map(HashMap<u16, Value>), I16Map(HashMap<i16, Value>), U32Map(HashMap<u32, Value>), I32Map(HashMap<i32, Value>), U64Map(HashMap<u64, Value>), I64Map(HashMap<i64, Value>), StringMap(HashMap<String, Value>), UuidMap(HashMap<Uuid, Value>), U8Set(HashSet<u8>), I8Set(HashSet<i8>), U16Set(HashSet<u16>), I16Set(HashSet<i16>), U32Set(HashSet<u32>), I32Set(HashSet<i32>), U64Set(HashSet<u64>), I64Set(HashSet<i64>), StringSet(HashSet<String>), UuidSet(HashSet<Uuid>), Struct(Struct), Enum(Box<Enum>), Sender(ChannelCookie), Receiver(ChannelCookie),
}

Variants§

§

None

§

Some(Box<Value>)

§

Bool(bool)

§

U8(u8)

§

I8(i8)

§

U16(u16)

§

I16(i16)

§

U32(u32)

§

I32(i32)

§

U64(u64)

§

I64(i64)

§

F32(f32)

§

F64(f64)

§

String(String)

§

Uuid(Uuid)

§

ObjectId(ObjectId)

§

ServiceId(ServiceId)

§

Vec(Vec<Value>)

§

Bytes(Vec<u8>)

§

U8Map(HashMap<u8, Value>)

§

I8Map(HashMap<i8, Value>)

§

U16Map(HashMap<u16, Value>)

§

I16Map(HashMap<i16, Value>)

§

U32Map(HashMap<u32, Value>)

§

I32Map(HashMap<i32, Value>)

§

U64Map(HashMap<u64, Value>)

§

I64Map(HashMap<i64, Value>)

§

StringMap(HashMap<String, Value>)

§

UuidMap(HashMap<Uuid, Value>)

§

U8Set(HashSet<u8>)

§

I8Set(HashSet<i8>)

§

U16Set(HashSet<u16>)

§

I16Set(HashSet<i16>)

§

U32Set(HashSet<u32>)

§

I32Set(HashSet<i32>)

§

U64Set(HashSet<u64>)

§

I64Set(HashSet<i64>)

§

StringSet(HashSet<String>)

§

UuidSet(HashSet<Uuid>)

§

Struct(Struct)

§

Enum(Box<Enum>)

§

Sender(ChannelCookie)

§

Receiver(ChannelCookie)

Implementations§

source§

impl Value

source

pub fn is_none(&self) -> bool

source

pub fn kind(&self) -> ValueKind

Trait Implementations§

source§

impl<'arbitrary> Arbitrary<'arbitrary> for Value

source§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
source§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
source§

impl Clone for Value

source§

fn clone(&self) -> Value

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 Value

source§

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

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

impl Deserialize for Value

source§

fn deserialize( deserializer: Deserializer<'_, '_> ) -> Result<Self, DeserializeError>

source§

impl PartialEq for Value

source§

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

source§

fn serialize(&self, serializer: Serializer<'_>) -> Result<(), SerializeError>

source§

impl StructuralPartialEq 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> 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> 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.