eva_common::value

Enum Value

Source
pub enum Value {
Show 19 variants Bool(bool), U8(u8), U16(u16), U32(u32), U64(u64), I8(i8), I16(i16), I32(i32), I64(i64), F32(f32), F64(f64), Char(char), String(String), Unit, Option(Option<Box<Value>>), Newtype(Box<Value>), Seq(Vec<Value>), Map(BTreeMap<Value, Value>), Bytes(Vec<u8>),
}

Variants§

§

Bool(bool)

§

U8(u8)

§

U16(u16)

§

U32(u32)

§

U64(u64)

§

I8(i8)

§

I16(i16)

§

I32(i32)

§

I64(i64)

§

F32(f32)

§

F64(f64)

§

Char(char)

§

String(String)

§

Unit

§

Option(Option<Box<Value>>)

§

Newtype(Box<Value>)

§

Seq(Vec<Value>)

§

Map(BTreeMap<Value, Value>)

§

Bytes(Vec<u8>)

Implementations§

Source§

impl Value

Source

pub fn jp_lookup<'a>(&'a self, path: &str) -> EResult<Option<&'a Value>>

Source

pub fn jp_insert(&mut self, path: &str, value: Value) -> EResult<()>

Source

pub fn into_seq_flatten(self) -> Value

Source

pub fn into_seq_reshaped(self, dimensions: &[usize]) -> Value

Source

pub fn get_by_index(&self, idx: &Index) -> Option<&Value>

Source

pub fn rounded(self, precision: Option<u32>) -> EResult<Value>

Rounds value to digits after comma, if the value is float

Source

pub fn to_no_bytes(self) -> Value

Source

pub fn as_timestamp(&self) -> EResult<f64>

Tries to convert Value to f64 timestamp

Valid options are:

number - timestamp as-is time frame as N<S|T|H|D|W>, e.g. 5T for 5 minutes: now - time frame other string - tries to parse the string into date/time

Source

pub fn as_future_timestamp(&self) -> EResult<f64>

Same as as_timestamp() but time frames are added to now

Source

pub fn to_alphanumeric_string(self) -> EResult<String>

Source

pub fn to_string_or_pack(self) -> EResult<String>

Source

pub fn unpack(self) -> EResult<Self>

Source

pub fn deserialize_into<'de, T: Deserialize<'de>>( self, ) -> Result<T, DeserializerError>

Source

pub fn is_empty(&self) -> bool

Source

pub fn is_unit(&self) -> bool

Source

pub fn is_numeric_type(&self) -> bool

Source

pub fn is_numeric(&self) -> bool

Source

pub fn is_seq(&self) -> bool

Source

pub fn is_map(&self) -> bool

Source

pub async fn extend(self, timeout: Duration, base: &Path) -> EResult<Value>

Trait Implementations§

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<'r> Decode<'r, Postgres> for Value

Source§

fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>

Decode a new value of this type using a raw value from the database.
Source§

impl<'r> Decode<'r, Sqlite> for Value

Source§

fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>

Decode a new value of this type using a raw value from the database.
Source§

impl Default for Value

Source§

fn default() -> Value

Returns the “default value” for a type. Read more
Source§

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

Source§

fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'de> Deserializer<'de> for Value

Source§

type Error = DeserializerError

The error type that can be returned if some error occurs during deserialization.
Source§

fn deserialize_any<V: Visitor<'de>>( self, visitor: V, ) -> Result<V::Value, Self::Error>

Require the Deserializer to figure out how to drive the visitor based on what data type is in the input. Read more
Source§

fn deserialize_option<V: Visitor<'de>>( self, visitor: V, ) -> Result<V::Value, Self::Error>

Hint that the Deserialize type is expecting an optional value. Read more
Source§

fn deserialize_enum<V: Visitor<'de>>( self, name: &'static str, variants: &'static [&'static str], visitor: V, ) -> Result<V::Value, Self::Error>

Hint that the Deserialize type is expecting an enum value with a particular name and possible variants.
Source§

fn deserialize_newtype_struct<V: Visitor<'de>>( self, name: &'static str, visitor: V, ) -> Result<V::Value, Self::Error>

Hint that the Deserialize type is expecting a newtype struct with a particular name.
Source§

fn deserialize_bool<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a bool value.
Source§

fn deserialize_u8<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a u8 value.
Source§

fn deserialize_u16<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a u16 value.
Source§

fn deserialize_u32<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a u32 value.
Source§

fn deserialize_u64<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a u64 value.
Source§

fn deserialize_i8<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i8 value.
Source§

fn deserialize_i16<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i16 value.
Source§

fn deserialize_i32<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i32 value.
Source§

fn deserialize_i64<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i64 value.
Source§

fn deserialize_f32<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a f32 value.
Source§

fn deserialize_f64<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a f64 value.
Source§

fn deserialize_char<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a char value.
Source§

fn deserialize_str<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a string value and does not benefit from taking ownership of buffered data owned by the Deserializer. Read more
Source§

fn deserialize_string<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a string value and would benefit from taking ownership of buffered data owned by the Deserializer. Read more
Source§

fn deserialize_unit<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a unit value.
Source§

fn deserialize_seq<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a sequence of values.
Source§

fn deserialize_bytes<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a byte array and does not benefit from taking ownership of buffered data owned by the Deserializer. Read more
Source§

fn deserialize_byte_buf<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a byte array and would benefit from taking ownership of buffered data owned by the Deserializer. Read more
Source§

fn deserialize_map<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a map of key-value pairs.
Source§

fn deserialize_unit_struct<V>( self, name: &'static str, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a unit struct with a particular name.
Source§

fn deserialize_tuple_struct<V>( self, name: &'static str, len: usize, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a tuple struct with a particular name and number of fields.
Source§

fn deserialize_struct<V>( self, name: &'static str, fields: &'static [&'static str], visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a struct with a particular name and fields.
Source§

fn deserialize_tuple<V>( self, len: usize, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a sequence of values and knows how many values there are without looking at the serialized data.
Source§

fn deserialize_ignored_any<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type needs to deserialize a value whose type doesn’t matter because it is ignored. Read more
Source§

fn deserialize_identifier<V>( self, visitor: V, ) -> Result<V::Value, <Self as Deserializer<'de>>::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting the name of a struct field or the discriminant of an enum variant.
Source§

fn deserialize_i128<V>( self, visitor: V, ) -> Result<<V as Visitor<'de>>::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i128 value. Read more
Source§

fn deserialize_u128<V>( self, visitor: V, ) -> Result<<V as Visitor<'de>>::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an u128 value. Read more
Source§

fn is_human_readable(&self) -> bool

Determine whether Deserialize implementations should expect to deserialize their human-readable form. 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 Encode<'_, Postgres> for Value

Source§

fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull

Writes the value of self into buf without moving self. Read more
Source§

fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
where Self: Sized,

Writes the value of self into buf in the expected format for the database.
Source§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Source§

fn size_hint(&self) -> usize

Source§

impl Encode<'_, Sqlite> for Value

Source§

fn encode_by_ref(&self, buf: &mut Vec<SqliteArgumentValue<'_>>) -> IsNull

Writes the value of self into buf without moving self. Read more
Source§

fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
where Self: Sized,

Writes the value of self into buf in the expected format for the database.
Source§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Source§

fn size_hint(&self) -> usize

Source§

impl From<&OID> for Value

Source§

fn from(oid: &OID) -> Value

Converts to this type from the input type.
Source§

impl From<&String> for Value

Source§

fn from(s: &String) -> Value

Converts to this type from the input type.
Source§

impl From<&str> for Value

Source§

fn from(s: &str) -> Value

Converts to this type from the input type.
Source§

impl From<BTreeMap<Value, Value>> for Value

Source§

fn from(v: BTreeMap<Value, Value>) -> Value

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 From<HashSet<IpNetwork>> for Value

Source§

fn from(v: HashSet<IpNetwork>) -> Value

Converts to this type from the input type.
Source§

impl<S: BuildHasher> From<HashSet<OID, S>> for Value

Source§

fn from(v: HashSet<OID, S>) -> Value

Converts to this type from the input type.
Source§

impl From<HashSet<Value>> for Value

Source§

fn from(v: HashSet<Value>) -> Value

Converts to this type from the input type.
Source§

impl From<ItemKind> for Value

Source§

fn from(src: ItemKind) -> Value

Converts to this type from the input type.
Source§

impl From<OID> for Value

Source§

fn from(oid: OID) -> Value

Converts to this type from the input type.
Source§

impl From<OIDMaskList> for Value

Source§

fn from(v: OIDMaskList) -> Value

Converts to this type from the input type.
Source§

impl From<Option<Duration>> for Value

Source§

fn from(v: Option<Duration>) -> Value

Converts to this type from the input type.
Source§

impl From<Option<String>> for Value

Source§

fn from(v: Option<String>) -> Value

Converts to this type from the input type.
Source§

impl From<Option<f64>> for Value

Source§

fn from(v: Option<f64>) -> Value

Converts to this type from the input type.
Source§

impl From<PathMaskList> for Value

Source§

fn from(v: PathMaskList) -> Value

Converts to this type from the input type.
Source§

impl From<String> for Value

Source§

fn from(src: String) -> Value

Converts to this type from the input type.
Source§

impl From<Time> for Value

Source§

fn from(t: Time) -> Value

Converts to this type from the input type.
Source§

impl From<Vec<String>> for Value

Source§

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

Converts to this type from the input type.
Source§

impl From<Vec<Value>> for Value

Source§

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

Converts to this type from the input type.
Source§

impl From<bool> for Value

Source§

fn from(src: bool) -> Value

Converts to this type from the input type.
Source§

impl From<f32> for Value

Source§

fn from(src: f32) -> Value

Converts to this type from the input type.
Source§

impl From<f64> for Value

Source§

fn from(src: f64) -> Value

Converts to this type from the input type.
Source§

impl From<i16> for Value

Source§

fn from(src: i16) -> Value

Converts to this type from the input type.
Source§

impl From<i32> for Value

Source§

fn from(src: i32) -> Value

Converts to this type from the input type.
Source§

impl From<i64> for Value

Source§

fn from(src: i64) -> Value

Converts to this type from the input type.
Source§

impl From<i8> for Value

Source§

fn from(src: i8) -> Value

Converts to this type from the input type.
Source§

impl From<u16> for Value

Source§

fn from(src: u16) -> Value

Converts to this type from the input type.
Source§

impl From<u32> for Value

Source§

fn from(src: u32) -> Value

Converts to this type from the input type.
Source§

impl From<u64> for Value

Source§

fn from(src: u64) -> Value

Converts to this type from the input type.
Source§

impl From<u8> for Value

Source§

fn from(src: u8) -> Value

Converts to this type from the input type.
Source§

impl FromStr for Value

Source§

type Err = Infallible

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

Source§

fn hash<H>(&self, hasher: &mut H)
where H: Hasher,

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 IntoDeserializer<'_, DeserializerError> for Value

Source§

type Deserializer = Value

The type of the deserializer being converted into.
Source§

fn into_deserializer(self) -> Value

Convert this value into a deserializer.
Source§

impl Ord for Value

Source§

fn cmp(&self, rhs: &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 PartialEq for Value

Source§

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

Source§

fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>

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

impl<'a> TryFrom<&'a Value> for &'a str

Source§

type Error = Error

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

fn try_from(v: &'a Value) -> EResult<&'a str>

Performs the conversion.
Source§

impl TryFrom<&Value> for IEID

Source§

type Error = Error

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

fn try_from(v: &Value) -> EResult<Self>

Performs the conversion.
Source§

impl TryFrom<&Value> for ItemKind

Source§

type Error = Error

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

fn try_from(value: &Value) -> Result<ItemKind, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&Value> for OID

Source§

type Error = Error

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

fn try_from(value: &Value) -> Result<OID, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&Value> for String

Source§

type Error = Error

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

fn try_from(v: &Value) -> EResult<String>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Value> for Vec<&'a str>

Source§

type Error = Error

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

fn try_from(value: &'a Value) -> EResult<Vec<&'a str>>

Performs the conversion.
Source§

impl TryFrom<&Value> for Vec<ItemKind>

Source§

type Error = Error

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

fn try_from(value: &Value) -> Result<Vec<ItemKind>, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&Value> for Vec<String>

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<Vec<String>>

Performs the conversion.
Source§

impl TryFrom<&Value> for f32

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<f32>

Performs the conversion.
Source§

impl TryFrom<&Value> for f64

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<f64>

Performs the conversion.
Source§

impl TryFrom<&Value> for i16

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<i16>

Performs the conversion.
Source§

impl TryFrom<&Value> for i32

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<i32>

Performs the conversion.
Source§

impl TryFrom<&Value> for i64

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<i64>

Performs the conversion.
Source§

impl TryFrom<&Value> for i8

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<i8>

Performs the conversion.
Source§

impl TryFrom<&Value> for u16

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<u16>

Performs the conversion.
Source§

impl TryFrom<&Value> for u32

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<u32>

Performs the conversion.
Source§

impl TryFrom<&Value> for u64

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<u64>

Performs the conversion.
Source§

impl TryFrom<&Value> for u8

Source§

type Error = Error

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

fn try_from(value: &Value) -> EResult<u8>

Performs the conversion.
Source§

impl TryFrom<Value> for Duration

Source§

type Error = Error

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

fn try_from(v: Value) -> EResult<Duration>

Performs the conversion.
Source§

impl<S: BuildHasher + Default> TryFrom<Value> for HashSet<IpNetwork, S>

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<HashSet<IpNetwork, S>>

Performs the conversion.
Source§

impl<S: BuildHasher + Default> TryFrom<Value> for HashSet<OID, S>

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<HashSet<OID, S>>

Performs the conversion.
Source§

impl<S: BuildHasher + Default> TryFrom<Value> for HashSet<Value, S>

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<HashSet<Value, S>>

Performs the conversion.
Source§

impl TryFrom<Value> for ItemKind

Source§

type Error = Error

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

fn try_from(value: Value) -> Result<ItemKind, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for OID

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<OID>

Performs the conversion.
Source§

impl TryFrom<Value> for OIDMaskList

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<OIDMaskList>

Performs the conversion.
Source§

impl TryFrom<Value> for Option<Duration>

Source§

type Error = Error

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

fn try_from(v: Value) -> EResult<Option<Duration>>

Performs the conversion.
Source§

impl TryFrom<Value> for Option<String>

Source§

type Error = Error

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

fn try_from(v: Value) -> EResult<Option<String>>

Performs the conversion.
Source§

impl TryFrom<Value> for PathMaskList

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<PathMaskList>

Performs the conversion.
Source§

impl TryFrom<Value> for String

Source§

type Error = Error

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

fn try_from(v: Value) -> EResult<String>

Performs the conversion.
Source§

impl TryFrom<Value> for Value

Source§

type Error = Error

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

fn try_from(v: Value) -> EResult<Self>

Performs the conversion.
Source§

impl TryFrom<Value> for Value

Source§

type Error = Error

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

fn try_from(v: Value) -> EResult<Self>

Performs the conversion.
Source§

impl TryFrom<Value> for Vec<ItemKind>

Source§

type Error = Error

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

fn try_from(value: Value) -> Result<Vec<ItemKind>, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Vec<String>

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<Vec<String>>

Performs the conversion.
Source§

impl TryFrom<Value> for Vec<Value>

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<Vec<Value>>

Performs the conversion.
Source§

impl TryFrom<Value> for bool

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<bool>

Performs the conversion.
Source§

impl TryFrom<Value> for f32

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<f32>

Performs the conversion.
Source§

impl TryFrom<Value> for f64

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<f64>

Performs the conversion.
Source§

impl TryFrom<Value> for i16

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<i16>

Performs the conversion.
Source§

impl TryFrom<Value> for i32

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<i32>

Performs the conversion.
Source§

impl TryFrom<Value> for i64

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<i64>

Performs the conversion.
Source§

impl TryFrom<Value> for i8

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<i8>

Performs the conversion.
Source§

impl TryFrom<Value> for u16

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<u16>

Performs the conversion.
Source§

impl TryFrom<Value> for u32

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<u32>

Performs the conversion.
Source§

impl TryFrom<Value> for u64

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<u64>

Performs the conversion.
Source§

impl TryFrom<Value> for u8

Source§

type Error = Error

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

fn try_from(value: Value) -> EResult<u8>

Performs the conversion.
Source§

impl Type<Postgres> for Value

Source§

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
Source§

fn compatible(ty: &<DB as Database>::TypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
Source§

impl Type<Sqlite> for Value

Source§

fn type_info() -> SqliteTypeInfo

Returns the canonical SQL type for this Rust type. Read more
Source§

fn compatible(ty: &SqliteTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. 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> CallHasher for T
where T: Hash + ?Sized,

Source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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<T> CustomError for T
where T: Display + Debug + Send + Sync + 'static,

Source§

fn as_any(&self) -> &(dyn Any + Send + Sync + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + Send + Sync + 'static)

Source§

fn as_box_any(self: Box<T>) -> Box<dyn Any + Send + Sync>

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<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> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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> 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Client for T
where T: Ord + Eq + Clone,

Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T