[][src]Struct zvariant::SerializeValue

pub struct SerializeValue<'a, T: Type + Serialize>(pub &'a T);

A wrapper to serialize T: Type + Serialize as a value.

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 _ = to_bytes(ctxt, &SerializeValue(&[0, 1, 2])).unwrap();

Trait Implementations

impl<'a, T: Type + Serialize> Serialize for SerializeValue<'a, T>[src]

impl<'a, T: Type + Serialize> Type for SerializeValue<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for SerializeValue<'a, T> where
    T: RefUnwindSafe
[src]

impl<'a, T> Send for SerializeValue<'a, T> where
    T: Sync
[src]

impl<'a, T> Sync for SerializeValue<'a, T> where
    T: Sync
[src]

impl<'a, T> Unpin for SerializeValue<'a, T>[src]

impl<'a, T> UnwindSafe for SerializeValue<'a, T> where
    T: RefUnwindSafe
[src]

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.