Struct zvariant::DeserializeValue[][src]

pub struct DeserializeValue<'de, T: Type + Deserialize<'de>>(pub T, _);

A wrapper to deserialize a value to T: Type + Deserialize.

When the type of a value is well-known, you may avoid the cost and complexity of wrapping to a generic Value and instead use this wrapper.

let decoded: DeserializeValue<[u8; 3]> = from_slice(&encoded, ctxt).unwrap();

Trait Implementations

impl<'de, T: Type + Deserialize<'de>> Deserialize<'de> for DeserializeValue<'de, T>[src]

impl<'de, T: Type + Deserialize<'de>> Type for DeserializeValue<'de, T>[src]

Auto Trait Implementations

impl<'de, T> RefUnwindSafe for DeserializeValue<'de, T> where
    T: RefUnwindSafe

impl<'de, T> Send for DeserializeValue<'de, T> where
    T: Send + Sync

impl<'de, T> Sync for DeserializeValue<'de, T> where
    T: Sync

impl<'de, T> Unpin for DeserializeValue<'de, T> where
    T: Unpin

impl<'de, T> UnwindSafe for DeserializeValue<'de, T> where
    T: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

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.