Skip to main content

WrapperTypeEncode

Trait WrapperTypeEncode 

Source
pub trait WrapperTypeEncode: Deref { }
Expand description

A marker trait for types that wrap other encodable type.

Such types should not carry any additional information that would require to be encoded, because the encoding is assumed to be the same as the wrapped type.

The wrapped type that is referred to is the Deref::Target.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl WrapperTypeEncode for String

Source§

impl<T: ?Sized> WrapperTypeEncode for &T

Source§

impl<T: ?Sized> WrapperTypeEncode for &mut T

Source§

impl<T: ?Sized> WrapperTypeEncode for Arc<T>

Source§

impl<T: ?Sized> WrapperTypeEncode for Box<T>

Source§

impl<T: ?Sized> WrapperTypeEncode for Rc<T>

Source§

impl<T: ToOwned + ?Sized> WrapperTypeEncode for Cow<'_, T>

Source§

impl<T> WrapperTypeEncode for Vec<T>

Implementors§

Source§

impl<T: EncodeLike<U>, U: Encode> WrapperTypeEncode for Ref<'_, T, U>