Struct serde_with::ser::SerializeAsWrap[][src]

pub struct SerializeAsWrap<'a, T: ?Sized, U: ?Sized> { /* fields omitted */ }

Helper type to implement SerializeAs for container-like types.

Implementations

impl<'a, T, U> SerializeAsWrap<'a, T, U> where
    T: ?Sized,
    U: ?Sized
[src]

pub fn new(value: &'a T) -> Self[src]

Create new instance with provided value.

Trait Implementations

impl<'a, T: Debug + ?Sized, U: Debug + ?Sized> Debug for SerializeAsWrap<'a, T, U>[src]

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

Formats the value using the given formatter. Read more

impl<'a, T, U> From<&'a T> for SerializeAsWrap<'a, T, U> where
    T: ?Sized,
    U: ?Sized,
    U: SerializeAs<T>, 
[src]

fn from(value: &'a T) -> Self[src]

Performs the conversion.

impl<'a, T, U> Serialize for SerializeAsWrap<'a, T, U> where
    T: ?Sized,
    U: ?Sized,
    U: SerializeAs<T>, 
[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl<'a, T: ?Sized, U: ?Sized> RefUnwindSafe for SerializeAsWrap<'a, T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

impl<'a, T: ?Sized, U: ?Sized> Send for SerializeAsWrap<'a, T, U> where
    T: Sync,
    U: Send

impl<'a, T: ?Sized, U: ?Sized> Sync for SerializeAsWrap<'a, T, U> where
    T: Sync,
    U: Sync

impl<'a, T: ?Sized, U: ?Sized> Unpin for SerializeAsWrap<'a, T, U> where
    U: Unpin

impl<'a, T: ?Sized, U: ?Sized> UnwindSafe for SerializeAsWrap<'a, T, U> where
    T: RefUnwindSafe,
    U: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.