Decode

Trait Decode 

Source
pub trait Decode<'de, M, A>: Sized
where A: Allocator,
{ const IS_BITWISE_DECODE: bool = false; // Required method fn decode<D>(decoder: D) -> Result<Self, D::Error> where D: Decoder<'de, Mode = M, Allocator = A>; }
Expand description

Trait governing how types are decoded.

This is typically implemented automatically using the Decode derive.

§Examples

use musli::Decode;

#[derive(Decode)]
struct MyType {
    data: [u32; 8],
}

Implementing manually:

use musli::{Allocator, Decode, Decoder};

struct MyType {
    data: [u32; 8],
}

impl<'de, M, A> Decode<'de, M, A> for MyType
where
    A: Allocator,
{
    #[inline]
    fn decode<D>(decoder: D) -> Result<Self, D::Error>
    where
        D: Decoder<'de>,
    {
        Ok(Self {
            data: decoder.decode()?,
        })
    }
}

Provided Associated Constants§

Source

const IS_BITWISE_DECODE: bool = false

Whether the type is packed. Packed types can be bitwise copied if the representation of the serialization format is identical to the memory layout of the type.

Note that setting this to true has safety implications, since it implies that assuming the type is correctly aligned it can be validly bitwise copied when encoded. Setting it to false is always safe.

This being set to true also implies that the type is Copy, and must not have a Drop implementation.

Required Methods§

Source

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Decode the current value.

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<'de, A> Decode<'de, Binary, A> for Ipv4Addr
where A: Allocator,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, A> Decode<'de, Binary, A> for Ipv6Addr
where A: Allocator,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, A> Decode<'de, Binary, A> for SocketAddrV4
where A: Allocator,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = Binary>,

Source§

impl<'de, A> Decode<'de, Binary, A> for SocketAddrV6
where A: Allocator,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = Binary>,

Source§

impl<'de, A> Decode<'de, Text, A> for Ipv4Addr
where A: Allocator,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, A> Decode<'de, Text, A> for Ipv6Addr
where A: Allocator,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, A> Decode<'de, Text, A> for SocketAddrV4
where A: Allocator,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, A> Decode<'de, Text, A> for SocketAddrV6
where A: Allocator,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, K, V, A, M> Decode<'de, M, A> for BTreeMap<K, V>
where A: Allocator, K: Decode<'de, M, A> + Ord, V: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, K, V, A, M, S> Decode<'de, M, A> for HashMap<K, V, S>
where A: Allocator, K: Decode<'de, M, A> + Eq + Hash, V: Decode<'de, M, A>, S: BuildHasher + Default,

Available on crate features alloc and std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for &'de str
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for &'de CStr
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for &'de [u8]
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Cow<'de, str>
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Cow<'de, CStr>
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for IpAddr
where A: Allocator, IpAddrTag: Decode<'de, M, A>, Ipv4Addr: Decode<'de, M, A>, Ipv6Addr: Decode<'de, M, A>,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for SocketAddr
where A: Allocator, SocketAddrTag: Decode<'de, M, A>, SocketAddrV4: Decode<'de, M, A>, SocketAddrV6: Decode<'de, M, A>,

Available on crate feature std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for bool
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for char
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for f32
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for f64
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for i8
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for i16
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for i32
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for i64
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for i128
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for isize
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for u8
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for u16
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for u32
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for u64
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for u128
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for ()
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for usize
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Box<str>
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Box<CStr>
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Box<OsStr>
where A: Allocator, PlatformTag: Decode<'de, M, A>,

Available on crate feature std and (Unix or Windows) and crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Box<Path>
where A: Allocator, PlatformTag: Decode<'de, M, A>,

Available on crate feature std and (Unix or Windows) and crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for CString
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Rc<str>
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Rc<CStr>
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Rc<OsStr>
where A: Allocator, PlatformTag: Decode<'de, M, A>,

Available on crate feature std and (Unix or Windows) and crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Rc<Path>
where A: Allocator, PlatformTag: Decode<'de, M, A>,

Available on crate feature std and (Unix or Windows) and crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for String
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Arc<str>
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Arc<CStr>
where A: Allocator,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Arc<OsStr>
where A: Allocator, PlatformTag: Decode<'de, M, A>,

Available on crate feature std and (Unix or Windows) and crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for Arc<Path>
where A: Allocator, PlatformTag: Decode<'de, M, A>,

Available on crate feature std and (Unix or Windows) and crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for RangeFull
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicBool
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicI8
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicI16
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicI32
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicI64
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicIsize
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicU8
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicU16
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicU32
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicU64
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for AtomicUsize
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A> Decode<'de, M, A> for OsString
where A: Allocator, PlatformTag: Decode<'de, M, A>,

Available on crate feature std and (Unix or Windows) and crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for PathBuf
where A: Allocator, PlatformTag: Decode<'de, M, A>,

Available on crate feature std and (Unix or Windows) and crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroI8
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroI16
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroI32
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroI64
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroI128
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroIsize
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroU8
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroU16
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroU32
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroU64
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroU128
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

impl<'de, M, A> Decode<'de, M, A> for NonZeroUsize
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Allocator = A>,

Source§

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

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

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

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

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

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where A: Allocator, T3: Decode<'de, M, A>, T4: Decode<'de, M, A>, T5: Decode<'de, M, A>, T6: Decode<'de, M, A>, T7: Decode<'de, M, A>, T8: Decode<'de, M, A>, T9: Decode<'de, M, A>, T10: Decode<'de, M, A>, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where A: Allocator, T4: Decode<'de, M, A>, T5: Decode<'de, M, A>, T6: Decode<'de, M, A>, T7: Decode<'de, M, A>, T8: Decode<'de, M, A>, T9: Decode<'de, M, A>, T10: Decode<'de, M, A>, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where A: Allocator, T5: Decode<'de, M, A>, T6: Decode<'de, M, A>, T7: Decode<'de, M, A>, T8: Decode<'de, M, A>, T9: Decode<'de, M, A>, T10: Decode<'de, M, A>, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where A: Allocator, T6: Decode<'de, M, A>, T7: Decode<'de, M, A>, T8: Decode<'de, M, A>, T9: Decode<'de, M, A>, T10: Decode<'de, M, A>, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T7, T8, T9, T10, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T7, T8, T9, T10, T11, T12, T13, T14, T15)
where A: Allocator, T7: Decode<'de, M, A>, T8: Decode<'de, M, A>, T9: Decode<'de, M, A>, T10: Decode<'de, M, A>, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T8, T9, T10, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T8, T9, T10, T11, T12, T13, T14, T15)
where A: Allocator, T8: Decode<'de, M, A>, T9: Decode<'de, M, A>, T10: Decode<'de, M, A>, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T9, T10, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T9, T10, T11, T12, T13, T14, T15)
where A: Allocator, T9: Decode<'de, M, A>, T10: Decode<'de, M, A>, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T10, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T10, T11, T12, T13, T14, T15)
where A: Allocator, T10: Decode<'de, M, A>, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T11, T12, T13, T14, T15> Decode<'de, M, A> for (T11, T12, T13, T14, T15)
where A: Allocator, T11: Decode<'de, M, A>, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T12, T13, T14, T15> Decode<'de, M, A> for (T12, T13, T14, T15)
where A: Allocator, T12: Decode<'de, M, A>, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T13, T14, T15> Decode<'de, M, A> for (T13, T14, T15)
where A: Allocator, T13: Decode<'de, M, A>, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T14, T15> Decode<'de, M, A> for (T14, T15)
where A: Allocator, T14: Decode<'de, M, A>, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T15> Decode<'de, M, A> for (T15,)
where A: Allocator, T15: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Option<T>
where A: Allocator, T: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Box<[T]>
where A: Allocator, T: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Box<T>
where A: Allocator, T: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for BinaryHeap<T>
where A: Allocator, T: Decode<'de, M, A> + Ord,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for BTreeSet<T>
where A: Allocator, T: Decode<'de, M, A> + Ord,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for VecDeque<T>
where A: Allocator, T: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Rc<[T]>
where A: Allocator, T: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Rc<T>
where A: Allocator, T: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Arc<[T]>
where A: Allocator, T: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Arc<T>
where A: Allocator, T: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Vec<T>
where A: Allocator, T: Decode<'de, M, A>,

Available on crate feature alloc only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for PhantomData<T>
where A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = true

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for Range<T>
where A: Allocator, T: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for RangeFrom<T>
where A: Allocator, T: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for RangeInclusive<T>
where A: Allocator, T: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for RangeTo<T>
where A: Allocator, T: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T> Decode<'de, M, A> for RangeToInclusive<T>
where A: Allocator, T: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T, S> Decode<'de, M, A> for HashSet<T, S>
where A: Allocator, T: Decode<'de, M, A> + Eq + Hash, S: BuildHasher + Default,

Available on crate features alloc and std only.
Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, A, T, U> Decode<'de, M, A> for Result<T, U>
where A: Allocator, T: Decode<'de, M, A>, U: Decode<'de, M, A>, ResultTag: Decode<'de, M, A>,

Source§

const IS_BITWISE_DECODE: bool = false

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, T, A> Decode<'de, M, A> for Saturating<T>
where T: Decode<'de, M, A>, A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = T::IS_BITWISE_DECODE

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, T, A> Decode<'de, M, A> for Wrapping<T>
where T: Decode<'de, M, A>, A: Allocator,

Source§

const IS_BITWISE_DECODE: bool = T::IS_BITWISE_DECODE

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Source§

impl<'de, M, T, A, const N: usize> Decode<'de, M, A> for [T; N]
where T: Decode<'de, M, A>, A: Allocator,

Source§

const IS_BITWISE_DECODE: bool

Source§

fn decode<D>(decoder: D) -> Result<Self, D::Error>
where D: Decoder<'de, Mode = M, Allocator = A>,

Implementors§

Source§

impl<'de, M, A> Decode<'de, M, A> for musli_core::alloc::String<A>
where A: Allocator,

Decode implementation for a Müsli-allocated String.

§Examples

use musli::alloc::String;
use musli::{Allocator, Decode};

#[derive(Decode)]
struct Struct<A> where A: Allocator {
    field: String<A>
}
Source§

impl<'de, M, A, T> Decode<'de, M, A> for musli_core::alloc::Vec<T, A>
where A: Allocator, T: Decode<'de, M, A>,