Enum netidx_netproto::value::Value[][src]

pub enum Value {
Show 20 variants U32(u32), V32(u32), I32(i32), Z32(i32), U64(u64), V64(u64), I64(i64), Z64(i64), F32(f32), F64(f64), DateTime(DateTime<Utc>), Duration(Duration), String(Chars), Bytes(Bytes), True, False, Null, Ok, Error(Chars), Array(Arc<[Value]>),
}

Variants

U32(u32)

Tuple Fields

0: u32

full 4 byte u32

V32(u32)

Tuple Fields

0: u32

LEB128 varint, 1 - 5 bytes depending on value

I32(i32)

Tuple Fields

0: i32

full 4 byte i32

Z32(i32)

Tuple Fields

0: i32

LEB128 varint zigzag encoded, 1 - 5 bytes depending on abs(value)

U64(u64)

Tuple Fields

0: u64

full 8 byte u64

V64(u64)

Tuple Fields

0: u64

LEB128 varint, 1 - 10 bytes depending on value

I64(i64)

Tuple Fields

0: i64

full 8 byte i64

Z64(i64)

Tuple Fields

0: i64

LEB128 varint zigzag encoded, 1 - 10 bytes depending on abs(value)

F32(f32)

Tuple Fields

0: f32

4 byte ieee754 single precision float

F64(f64)

Tuple Fields

0: f64

8 byte ieee754 double precision float

DateTime(DateTime<Utc>)

Tuple Fields

UTC timestamp

Duration(Duration)

Tuple Fields

Duration

String(Chars)

Tuple Fields

0: Chars

unicode string, zero copy decode

Bytes(Bytes)

Tuple Fields

0: Bytes

byte array, zero copy decode

True

boolean true

False

boolean false

Null

Empty value

Ok

An explicit ok

Error(Chars)

Tuple Fields

0: Chars

An explicit error

Array(Arc<[Value]>)

Tuple Fields

An array of values

Implementations

Whatever value is attempt to turn it into the type specified

cast value directly to any type implementing FromValue

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

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

The resulting type after applying the + operator.

Performs the + operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The associated error which can be returned from parsing.

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

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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

Serialize this value into the given Serde serializer. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.