Struct zvariant::OwnedValue

source ·
pub struct OwnedValue(/* private fields */);
Expand description

Owned Value

Implementations§

source§

impl OwnedValue

source

pub fn try_clone(&self) -> Result<Self, Error>

Attempt to clone the value.

Methods from Deref<Target = Value<'static>>§

source

pub fn try_to_owned(&self) -> Result<OwnedValue>

Try to create an owned version of self.

§Errors

This method can currently only fail on Unix platforms for Value::Fd variant. This happens when the current process exceeds the maximum number of open file descriptors.

source

pub fn value_signature(&self) -> Signature<'_>

Get the signature of the enclosed value.

source

pub fn try_clone(&self) -> Result<Self>

Try to clone the value.

§Errors

This method can currently only fail on Unix platforms for Value::Fd variant containing an Fd::Owned variant. This happens when the current process exceeds the maximum number of open file descriptors.

source

pub fn downcast_ref<T>(&'a self) -> Result<T, Error>
where T: ?Sized + TryFrom<&'a Value<'a>>, <T as TryFrom<&'a Value<'a>>>::Error: Into<Error>,

Try to get the underlying type T.

Same as downcast except it doesn’t consume self and hence requires T: TryFrom<&Value<_>>.

§Examples
use zvariant::{Error, Result, Value};

fn value_vec_to_type_vec<'a, T>(values: &'a Vec<Value<'a>>) -> Result<Vec<&'a T>>
where
    &'a T: TryFrom<&'a Value<'a>>,
    <&'a T as TryFrom<&'a Value<'a>>>::Error: Into<Error>,
{
    let mut res = vec![];
    for value in values.into_iter() {
        res.push(value.downcast_ref()?);
    }

    Ok(res)
}

// Let's try u32 values first
let v = vec![Value::U32(42), Value::U32(43)];
let v = value_vec_to_type_vec::<u32>(&v).unwrap();
assert_eq!(*v[0], 42);
assert_eq!(*v[1], 43);

// Now try Value values
let v = vec![Value::new(Value::U32(42)), Value::new(Value::U32(43))];
let v = value_vec_to_type_vec::<Value>(&v).unwrap();
assert_eq!(*v[0], Value::U32(42));
assert_eq!(*v[1], Value::U32(43));

Trait Implementations§

source§

impl Debug for OwnedValue

source§

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

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

impl Deref for OwnedValue

§

type Target = Value<'static>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'de> Deserialize<'de> for OwnedValue

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<K, V, H> From<HashMap<K, V, H>> for OwnedValue
where K: Type + Into<Value<'static>> + Hash + Eq, V: Type + Into<Value<'static>>, H: BuildHasher + Default,

source§

fn from(value: HashMap<K, V, H>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<ObjectPath<'a>> for OwnedValue

source§

fn from(v: ObjectPath<'a>) -> Self

Converts to this type from the input type.
source§

impl<V> From<Optional<V>> for OwnedValue
where V: Into<Value<'static>> + NoneValue<NoneType = V>,

source§

fn from(v: Optional<V>) -> OwnedValue

Converts to this type from the input type.
source§

impl From<OwnedValue> for Value<'_>

source§

fn from(v: OwnedValue) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Signature<'a>> for OwnedValue

source§

fn from(v: Signature<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Str<'a>> for OwnedValue

source§

fn from(v: Str<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<bool> for OwnedValue

source§

fn from(v: bool) -> Self

Converts to this type from the input type.
source§

impl<'a> From<f64> for OwnedValue

source§

fn from(v: f64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i16> for OwnedValue

source§

fn from(v: i16) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i32> for OwnedValue

source§

fn from(v: i32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i64> for OwnedValue

source§

fn from(v: i64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u16> for OwnedValue

source§

fn from(v: u16) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u32> for OwnedValue

source§

fn from(v: u32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u64> for OwnedValue

source§

fn from(v: u64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u8> for OwnedValue

source§

fn from(v: u8) -> Self

Converts to this type from the input type.
source§

impl PartialEq for OwnedValue

source§

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

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<'a> TryFrom<&'a OwnedValue> for &'a Array<'a>

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for &'a Dict<'a, 'a>

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for &'a Fd<'a>

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for &'a Maybe<'a>

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for &'a ObjectPath<'a>

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for &'a Signature<'a>

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for &'a Str<'a>

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for &'a Structure<'a>

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

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

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'o> TryFrom<&'o OwnedValue> for Value<'o>

§

type Error = Error

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

fn try_from(v: &'o OwnedValue) -> Result<Value<'o>>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for bool

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for f64

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for i16

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for i32

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for i64

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for u16

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for u32

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for u64

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&'a OwnedValue> for u8

§

type Error = Error

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

fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

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

§

type Error = Error

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

fn try_from(v: &Value<'a>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<Array<'a>> for OwnedValue

§

type Error = Error

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

fn try_from(v: Array<'a>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<Dict<'a, 'a>> for OwnedValue

§

type Error = Error

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

fn try_from(v: Dict<'a, 'a>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<Fd<'a>> for OwnedValue

§

type Error = Error

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

fn try_from(v: Fd<'a>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<Maybe<'a>> for OwnedValue

§

type Error = Error

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

fn try_from(v: Maybe<'a>) -> Result<Self>

Performs the conversion.
source§

impl<E, T0> TryFrom<OwnedValue> for (T0,)
where T0: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1> TryFrom<OwnedValue> for (T0, T1)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2> TryFrom<OwnedValue> for (T0, T1, T2)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3> TryFrom<OwnedValue> for (T0, T1, T2, T3)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, T8: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, T8: TryFrom<Value<'static>, Error = E>, T9: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, T8: TryFrom<Value<'static>, Error = E>, T9: TryFrom<Value<'static>, Error = E>, T10: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, T8: TryFrom<Value<'static>, Error = E>, T9: TryFrom<Value<'static>, Error = E>, T10: TryFrom<Value<'static>, Error = E>, T11: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, T8: TryFrom<Value<'static>, Error = E>, T9: TryFrom<Value<'static>, Error = E>, T10: TryFrom<Value<'static>, Error = E>, T11: TryFrom<Value<'static>, Error = E>, T12: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, T8: TryFrom<Value<'static>, Error = E>, T9: TryFrom<Value<'static>, Error = E>, T10: TryFrom<Value<'static>, Error = E>, T11: TryFrom<Value<'static>, Error = E>, T12: TryFrom<Value<'static>, Error = E>, T13: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, T8: TryFrom<Value<'static>, Error = E>, T9: TryFrom<Value<'static>, Error = E>, T10: TryFrom<Value<'static>, Error = E>, T11: TryFrom<Value<'static>, Error = E>, T12: TryFrom<Value<'static>, Error = E>, T13: TryFrom<Value<'static>, Error = E>, T14: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> TryFrom<OwnedValue> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T0: TryFrom<Value<'static>, Error = E>, T1: TryFrom<Value<'static>, Error = E>, T2: TryFrom<Value<'static>, Error = E>, T3: TryFrom<Value<'static>, Error = E>, T4: TryFrom<Value<'static>, Error = E>, T5: TryFrom<Value<'static>, Error = E>, T6: TryFrom<Value<'static>, Error = E>, T7: TryFrom<Value<'static>, Error = E>, T8: TryFrom<Value<'static>, Error = E>, T9: TryFrom<Value<'static>, Error = E>, T10: TryFrom<Value<'static>, Error = E>, T11: TryFrom<Value<'static>, Error = E>, T12: TryFrom<Value<'static>, Error = E>, T13: TryFrom<Value<'static>, Error = E>, T14: TryFrom<Value<'static>, Error = E>, T15: TryFrom<Value<'static>, Error = E>, Error: From<E>,

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for Array<'static>

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a, F> TryFrom<OwnedValue> for BitFlags<F>
where F: BitFlag, F::Numeric: TryFrom<Value<'a>, Error = Error>,

§

type Error = Error

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

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

Performs the conversion.
source§

impl TryFrom<OwnedValue> for Dict<'static, 'static>

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for Fd<'static>

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'k, 'v, K, V, H> TryFrom<OwnedValue> for HashMap<K, V, H>
where K: Basic + TryFrom<Value<'k>> + Hash + Eq, V: TryFrom<Value<'v>>, H: BuildHasher + Default, K::Error: Into<Error>, V::Error: Into<Error>,

§

type Error = Error

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

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

Performs the conversion.
source§

impl TryFrom<OwnedValue> for Maybe<'static>

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for ObjectPath<'static>

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a, T> TryFrom<OwnedValue> for Optional<T>
where T: TryFrom<Value<'a>> + NoneValue + PartialEq<<T as NoneValue>::NoneType>, T::Error: Into<Error>,

§

type Error = Error

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

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

Performs the conversion.
source§

impl TryFrom<OwnedValue> for OwnedObjectPath

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for OwnedSignature

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for Signature<'static>

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for Str<'static>

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for String

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for Structure<'static>

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a, T> TryFrom<OwnedValue> for Vec<T>
where T: TryFrom<Value<'a>>, T::Error: Into<Error>,

§

type Error = Error

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

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

Performs the conversion.
source§

impl TryFrom<OwnedValue> for bool

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for f64

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for i16

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for i32

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for i64

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for u16

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for u32

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for u64

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<OwnedValue> for u8

§

type Error = Error

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

fn try_from(v: OwnedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<Structure<'a>> for OwnedValue

§

type Error = Error

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

fn try_from(v: Structure<'a>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<Value<'a>> for OwnedValue

§

type Error = Error

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

fn try_from(v: Value<'a>) -> Result<Self>

Performs the conversion.
source§

impl Type for OwnedValue

source§

fn signature() -> Signature<'static>

Get the signature for the implementing type. Read more
source§

impl StructuralPartialEq for OwnedValue

Auto Trait Implementations§

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<'de, T> DynamicDeserialize<'de> for T
where T: Type + Deserialize<'de> + ?Sized,

§

type Deserializer = PhantomData<T>

A DeserializeSeed implementation for this type.
source§

fn deserializer_for_signature<S>( signature: S, ) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
where S: TryInto<Signature<'de>>, <S as TryInto<Signature<'de>>>::Error: Into<Error>,

Get a deserializer compatible with this signature.
source§

impl<T> DynamicType for T
where T: Type + ?Sized,

source§

fn dynamic_signature(&self) -> Signature<'_>

Get the signature for the implementing type. 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, 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.
source§

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