musli_core

Trait Encode

Source
pub trait Encode<M> {
    // Required method
    fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
       where E: Encoder<Mode = M>;
}
Expand description

Trait governing how types are encoded.

This is typically implemented automatically using the Encode derive.

§Examples

use musli::Encode;

#[derive(Encode)]
struct MyType {
    data: [u8; 128],
}

Implementing manually:

use musli::{Encode, Encoder};

struct MyType {
    data: [u8; 128],
}

impl<M> Encode<M> for MyType {
    fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
    where
        E: Encoder<Mode = M>,
    {
        encoder.encode_array(&self.data)
    }
}

Required Methods§

Source

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Encode the given output.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Encode<Binary> for Ipv4Addr

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl Encode<Binary> for Ipv6Addr

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = Binary>,

Source§

impl Encode<Binary> for SocketAddrV4

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = Binary>,

Source§

impl Encode<Binary> for SocketAddrV6

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = Binary>,

Source§

impl Encode<Text> for Ipv4Addr

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl Encode<Text> for Ipv6Addr

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = Text>,

Source§

impl Encode<Text> for SocketAddrV4

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = Text>,

Source§

impl Encode<Text> for SocketAddrV6

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = Text>,

Source§

impl<'de, M, K, V> Encode<M> for BTreeMap<K, V>
where K: Encode<M>, V: Encode<M>,

Source§

fn encode<E>(&self, _cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<'de, M, K, V, S> Encode<M> for HashMap<K, V, S>
where K: Encode<M>, V: Encode<M>, S: BuildHasher + Default,

Source§

fn encode<E>(&self, _cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for Cow<'_, str>

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for Cow<'_, CStr>

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for IpAddr
where IpAddrTag: Encode<M>, Ipv4Addr: Encode<M>, Ipv6Addr: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for SocketAddr
where SocketAddrTag: Encode<M>, SocketAddrV4: Encode<M>, SocketAddrV6: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for bool

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for char

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for f32

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for f64

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for i8

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for i16

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for i32

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for i64

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for i128

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for isize

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for str

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for u8

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for u16

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for u32

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for u64

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for u128

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for ()

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for usize

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for CString

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for String

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for CStr

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for RangeFull

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for OsStr
where PlatformTag: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for OsString
where PlatformTag: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for Path
where PlatformTag: Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for PathBuf
where PlatformTag: Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M> Encode<M> for NonZeroI8

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroI16

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroI32

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroI64

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroI128

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroIsize

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroU8

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroU16

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroU32

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroU64

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroU128

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M> Encode<M> for NonZeroUsize

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<M, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T0: Encode<M>, T1: Encode<M>, T2: Encode<M>, T3: Encode<M>, T4: Encode<M>, T5: Encode<M>, T6: Encode<M>, T7: Encode<M>, T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T1: Encode<M>, T2: Encode<M>, T3: Encode<M>, T4: Encode<M>, T5: Encode<M>, T6: Encode<M>, T7: Encode<M>, T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T2: Encode<M>, T3: Encode<M>, T4: Encode<M>, T5: Encode<M>, T6: Encode<M>, T7: Encode<M>, T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T3: Encode<M>, T4: Encode<M>, T5: Encode<M>, T6: Encode<M>, T7: Encode<M>, T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T4: Encode<M>, T5: Encode<M>, T6: Encode<M>, T7: Encode<M>, T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T5: Encode<M>, T6: Encode<M>, T7: Encode<M>, T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T6: Encode<M>, T7: Encode<M>, T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T7, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T7: Encode<M>, T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T8, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T8, T9, T10, T11, T12, T13, T14, T15)
where T8: Encode<M>, T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T9, T10, T11, T12, T13, T14, T15> Encode<M> for (T9, T10, T11, T12, T13, T14, T15)
where T9: Encode<M>, T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T10, T11, T12, T13, T14, T15> Encode<M> for (T10, T11, T12, T13, T14, T15)
where T10: Encode<M>, T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T11, T12, T13, T14, T15> Encode<M> for (T11, T12, T13, T14, T15)
where T11: Encode<M>, T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T12, T13, T14, T15> Encode<M> for (T12, T13, T14, T15)
where T12: Encode<M>, T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T13, T14, T15> Encode<M> for (T13, T14, T15)
where T13: Encode<M>, T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T14, T15> Encode<M> for (T14, T15)
where T14: Encode<M>, T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T15> Encode<M> for (T15,)
where T15: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for [T]
where T: Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for Box<T>
where T: ?Sized + Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for BinaryHeap<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for BTreeSet<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for VecDeque<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for Rc<T>
where T: ?Sized + Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for Arc<T>
where T: ?Sized + Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for Vec<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for Range<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for RangeFrom<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for RangeInclusive<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for RangeTo<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T> Encode<M> for RangeToInclusive<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T, S> Encode<M> for HashSet<T, S>
where T: Encode<M>, S: BuildHasher + Default,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<M, T, const N: usize> Encode<M> for [T; N]
where T: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<T, M> Encode<M> for Option<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<T, M> Encode<M> for &T
where T: ?Sized + Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<T, M> Encode<M> for &mut T
where T: ?Sized + Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<T, M> Encode<M> for PhantomData<T>

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder,

Source§

impl<T, M> Encode<M> for Wrapping<T>
where T: Encode<M>,

Source§

fn encode<E>(&self, cx: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Source§

impl<T, U, M> Encode<M> for Result<T, U>
where T: Encode<M>, U: Encode<M>, ResultTag: Encode<M>,

Source§

fn encode<E>(&self, _: &E::Cx, encoder: E) -> Result<E::Ok, E::Error>
where E: Encoder<Mode = M>,

Implementors§