zvariant

Struct OwnedValue

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

Owned Value

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

source

pub fn to_owned(&self) -> OwnedValue

Create an owned version of self.

Ideally, we should implement std::borrow::ToOwned trait for Value, but that’s implemented generically for us through impl<T: Clone> ToOwned for T and it’s not what we need/want.

source

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

Get the signature of the enclosed value.

source

pub fn downcast_ref<T>(&'a self) -> Option<&'a T>
where T: ?Sized, &'a T: TryFrom<&'a Value<'a>>,

Try to get a reference to the underlying type T.

Same as downcast except it doesn’t consume self and get a reference to the underlying value.

§Examples
use std::convert::TryFrom;
use zvariant::{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>>,
{
    let mut res = vec![];
    for value in values.into_iter() {
        res.push(value.downcast_ref().unwrap());
    }

    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 Clone for OwnedValue

source§

fn clone(&self) -> OwnedValue

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 OwnedValue

source§

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

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

impl Deref for OwnedValue

source§

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<'o> From<&'o OwnedValue> for Value<'o>

source§

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

Converts to this type from the input type.
source§

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

source§

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

Converts to this type from the input type.
source§

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

source§

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

Converts to this type from the input type.
source§

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

source§

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

Converts to this type from the input type.
source§

impl<'a> From<Fd> for OwnedValue

source§

fn from(v: Fd) -> Self

Converts to this type from the input type.
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 From<OwnedValue> for Value<'static>

source§

fn from(v: OwnedValue) -> Value<'static>

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<Structure<'a>> for OwnedValue

source§

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

Converts to this type from the input type.
source§

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

source§

fn from(v: Value<'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

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

source§

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>

source§

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>

source§

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>

source§

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>

source§

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>

source§

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

source§

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 Fd

source§

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 bool

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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<E, T0> TryFrom<OwnedValue> for (T0,)
where T0: TryFrom<Value<'static>, Error = E>, Error: From<E>,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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>

source§

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

source§

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>

source§

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

source§

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

source§

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 ObjectPath<'static>

source§

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 OwnedObjectPath

source§

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

source§

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>

source§

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>

source§

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

source§

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>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<'de, T> DynamicDeserialize<'de> for T
where T: Type + Deserialize<'de> + ?Sized,

source§

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