pub enum Value<'a> {
}
Expand description
A generic container, in the form of an enum that holds exactly one value of any of the other types.
Note that this type corresponds to the VARIANT
data type defined by the D-Bus specification
and as such, its encoding is not the same as that of the enclosed value.
Examples
use std::convert::TryFrom;
use zvariant::{from_slice, to_bytes, EncodingContext, Value};
// Create a Value from an i16
let v = Value::new(i16::max_value());
// Encode it
let ctxt = EncodingContext::<byteorder::LE>::new_dbus(0);
let encoding = to_bytes(ctxt, &v).unwrap();
// Decode it back
let v: Value = from_slice(&encoding, ctxt).unwrap();
// Check everything is as expected
assert_eq!(i16::try_from(&v).unwrap(), i16::max_value());
Now let’s try a more complicated example:
use std::convert::TryFrom;
use zvariant::{from_slice, to_bytes, EncodingContext};
use zvariant::{Structure, Value, Str};
// Create a Value from a tuple this time
let v = Value::new((i16::max_value(), "hello", true));
// Same drill as previous example
let ctxt = EncodingContext::<byteorder::LE>::new_dbus(0);
let encoding = to_bytes(ctxt, &v).unwrap();
let v: Value = from_slice(&encoding, ctxt).unwrap();
// Check everything is as expected
let s = Structure::try_from(v).unwrap();
assert_eq!(
<(i16, Str, bool)>::try_from(s).unwrap(),
(i16::max_value(), Str::from("hello"), true),
);
Variants
U8(u8)
Bool(bool)
I16(i16)
U16(u16)
I32(i32)
U32(u32)
I64(i64)
U64(u64)
F64(f64)
Str(Str<'a>)
Signature(Signature<'a>)
ObjectPath(ObjectPath<'a>)
Value(Box<Value<'a>>)
Array(Array<'a>)
Dict(Dict<'a, 'a>)
Structure(Structure<'a>)
Maybe(Maybe<'a>)
Fd(Fd)
Implementations
sourceimpl<'a> Value<'a>
impl<'a> Value<'a>
sourcepub fn new<T>(value: T) -> Self where
T: Into<Self> + DynamicType,
pub fn new<T>(value: T) -> Self where
T: Into<Self> + DynamicType,
sourcepub fn value_signature(&self) -> Signature<'_>
pub fn value_signature(&self) -> Signature<'_>
Get the signature of the enclosed value.
sourcepub fn downcast<T: ?Sized>(self) -> Option<T> where
T: TryFrom<Value<'a>>,
pub fn downcast<T: ?Sized>(self) -> Option<T> where
T: TryFrom<Value<'a>>,
Try to get the underlying type T
.
Note that TryFrom<Value>
is implemented for various types, and it’s usually best to use
that instead. However, in generic code where you also want to unwrap Value::Value
,
you should use this function (because TryFrom<Value>
can not be implemented for Value
itself as From<Value>
is implicitly implemented for Value
).
Examples
use std::convert::TryFrom;
use zvariant::{Result, Value};
fn value_vec_to_type_vec<'a, T>(values: Vec<Value<'a>>) -> Result<Vec<T>>
where
T: TryFrom<Value<'a>>,
{
let mut res = vec![];
for value in values.into_iter() {
res.push(value.downcast().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));
sourcepub fn downcast_ref<T>(&'a self) -> Option<&'a T> where
T: ?Sized,
&'a T: TryFrom<&'a Value<'a>>,
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
sourceimpl<'de: 'a, 'a> Deserialize<'de> for Value<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Value<'a>
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a> From<&'_ Value<'a>> for OwnedValue
impl<'a> From<&'_ Value<'a>> for OwnedValue
sourceimpl<'a> From<&'a ObjectPath<'a>> for Value<'a>
impl<'a> From<&'a ObjectPath<'a>> for Value<'a>
sourcefn from(v: &'a ObjectPath<'a>) -> Self
fn from(v: &'a ObjectPath<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'o> From<&'o OwnedValue> for Value<'o>
impl<'o> From<&'o OwnedValue> for Value<'o>
sourcefn from(v: &'o OwnedValue) -> Value<'o>
fn from(v: &'o OwnedValue) -> Value<'o>
Converts to this type from the input type.
sourceimpl<'a, 'k, 'v, K, V, H> From<HashMap<K, V, H>> for Value<'a> where
'k: 'a,
'v: 'a,
K: Type + Into<Value<'k>> + Hash + Eq,
V: Type + Into<Value<'v>>,
H: BuildHasher + Default,
impl<'a, 'k, 'v, K, V, H> From<HashMap<K, V, H>> for Value<'a> where
'k: 'a,
'v: 'a,
K: Type + Into<Value<'k>> + Hash + Eq,
V: Type + Into<Value<'v>>,
H: BuildHasher + Default,
sourceimpl<'a> From<ObjectPath<'a>> for Value<'a>
impl<'a> From<ObjectPath<'a>> for Value<'a>
sourcefn from(v: ObjectPath<'a>) -> Self
fn from(v: ObjectPath<'a>) -> Self
Converts to this type from the input type.
sourceimpl From<OwnedObjectPath> for Value<'static>
impl From<OwnedObjectPath> for Value<'static>
sourcefn from(o: OwnedObjectPath) -> Self
fn from(o: OwnedObjectPath) -> Self
Converts to this type from the input type.
sourceimpl From<OwnedSignature> for Value<'static>
impl From<OwnedSignature> for Value<'static>
sourcefn from(o: OwnedSignature) -> Self
fn from(o: OwnedSignature) -> Self
Converts to this type from the input type.
sourceimpl From<OwnedValue> for Value<'static>
impl From<OwnedValue> for Value<'static>
sourcefn from(v: OwnedValue) -> Value<'static>
fn from(v: OwnedValue) -> Value<'static>
Converts to this type from the input type.
sourceimpl<'a> From<Value<'a>> for OwnedValue
impl<'a> From<Value<'a>> for OwnedValue
sourceimpl<'a> TryFrom<&'a Value<'a>> for &'a ObjectPath<'a>
impl<'a> TryFrom<&'a Value<'a>> for &'a ObjectPath<'a>
sourceimpl<'a> TryFrom<&'a Value<'a>> for ObjectPath<'a>
impl<'a> TryFrom<&'a Value<'a>> for ObjectPath<'a>
sourceimpl TryFrom<Value<'_>> for OwnedObjectPath
impl TryFrom<Value<'_>> for OwnedObjectPath
sourceimpl TryFrom<Value<'_>> for OwnedSignature
impl TryFrom<Value<'_>> for OwnedSignature
sourceimpl<'a, E, T0> TryFrom<Value<'a>> for (T0,) where
T0: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0> TryFrom<Value<'a>> for (T0,) where
T0: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1> TryFrom<Value<'a>> for (T0, T1) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1> TryFrom<Value<'a>> for (T0, T1) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
T12: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
T12: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
T12: TryFrom<Value<'a>, Error = E>,
T13: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
T12: TryFrom<Value<'a>, Error = E>,
T13: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
T12: TryFrom<Value<'a>, Error = E>,
T13: TryFrom<Value<'a>, Error = E>,
T14: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
T12: TryFrom<Value<'a>, Error = E>,
T13: TryFrom<Value<'a>, Error = E>,
T14: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
T12: TryFrom<Value<'a>, Error = E>,
T13: TryFrom<Value<'a>, Error = E>,
T14: TryFrom<Value<'a>, Error = E>,
T15: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
T10: TryFrom<Value<'a>, Error = E>,
T11: TryFrom<Value<'a>, Error = E>,
T12: TryFrom<Value<'a>, Error = E>,
T13: TryFrom<Value<'a>, Error = E>,
T14: TryFrom<Value<'a>, Error = E>,
T15: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2> TryFrom<Value<'a>> for (T0, T1, T2) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2> TryFrom<Value<'a>> for (T0, T1, T2) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a> TryFrom<Value<'a>> for ObjectPath<'a>
impl<'a> TryFrom<Value<'a>> for ObjectPath<'a>
sourceimpl<'a, E, T0, T1, T2, T3> TryFrom<Value<'a>> for (T0, T1, T2, T3) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3> TryFrom<Value<'a>> for (T0, T1, T2, T3) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, F> TryFrom<Value<'a>> for BitFlags<F> where
F: BitFlag,
F::Numeric: TryFrom<Value<'a>, Error = Error>,
impl<'a, F> TryFrom<Value<'a>> for BitFlags<F> where
F: BitFlag,
F::Numeric: TryFrom<Value<'a>, Error = Error>,
sourceimpl<'a, K, V, H> TryFrom<Value<'a>> for HashMap<K, V, H> where
K: Basic + TryFrom<Value<'a>> + Hash + Eq,
V: TryFrom<Value<'a>>,
H: BuildHasher + Default,
K::Error: Into<Error>,
V::Error: Into<Error>,
impl<'a, K, V, H> TryFrom<Value<'a>> for HashMap<K, V, H> where
K: Basic + TryFrom<Value<'a>> + Hash + Eq,
V: TryFrom<Value<'a>>,
H: BuildHasher + Default,
K::Error: Into<Error>,
V::Error: Into<Error>,
sourceimpl<'a, E, T0, T1, T2, T3, T4> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
sourceimpl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a, E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TryFrom<Value<'a>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) where
T0: TryFrom<Value<'a>, Error = E>,
T1: TryFrom<Value<'a>, Error = E>,
T2: TryFrom<Value<'a>, Error = E>,
T3: TryFrom<Value<'a>, Error = E>,
T4: TryFrom<Value<'a>, Error = E>,
T5: TryFrom<Value<'a>, Error = E>,
T6: TryFrom<Value<'a>, Error = E>,
T7: TryFrom<Value<'a>, Error = E>,
T8: TryFrom<Value<'a>, Error = E>,
T9: TryFrom<Value<'a>, Error = E>,
Error: From<E>,
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more