pub trait Decodable: Sized {
type DecoderArray: DecoderArray<Decode = Self>;
// Required method
fn decode(
sticks: DynRootBranch<'_>,
options: &impl DecodeOptions,
) -> Result<Self, DecodeError>;
}Required Associated Types§
type DecoderArray: DecoderArray<Decode = Self>
Required Methods§
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
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 Decodable for bool
Available on crate feature decode only.
impl Decodable for bool
Available on crate feature
decode only.type DecoderArray = IntoIter<bool>
fn decode( sticks: DynRootBranch<'_>, _options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl Decodable for f32
Available on crate feature decode only.
impl Decodable for f32
Available on crate feature
decode only.type DecoderArray = IntoIter<f32>
fn decode( sticks: DynRootBranch<'_>, _options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl Decodable for f64
Available on crate feature decode only.
impl Decodable for f64
Available on crate feature
decode only.type DecoderArray = IntoIter<f64>
fn decode( sticks: DynRootBranch<'_>, _options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl Decodable for u8
Available on crate feature decode only.
impl Decodable for u8
Available on crate feature
decode only.type DecoderArray = IntoIter<u8>
fn decode( sticks: DynRootBranch<'_>, _options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl Decodable for u16
Available on crate feature decode only.
impl Decodable for u16
Available on crate feature
decode only.type DecoderArray = IntoIter<u16>
fn decode( sticks: DynRootBranch<'_>, _options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl Decodable for u32
Available on crate feature decode only.
impl Decodable for u32
Available on crate feature
decode only.type DecoderArray = IntoIter<u32>
fn decode( sticks: DynRootBranch<'_>, _options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl Decodable for u64
Available on crate feature decode only.
impl Decodable for u64
Available on crate feature
decode only.type DecoderArray = IntoIter<u64>
fn decode( sticks: DynRootBranch<'_>, _options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl Decodable for String
Available on crate feature decode only.
impl Decodable for String
Available on crate feature
decode only.type DecoderArray = IntoIter<String>
fn decode( sticks: DynRootBranch<'_>, _options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<K: Decodable + Hash + Eq + Send, V: Decodable + Send, S: Default + BuildHasher> Decodable for HashMap<K, V, S>where
DecodeError: From<<<K as Decodable>::DecoderArray as DecoderArray>::Error> + From<<<V as Decodable>::DecoderArray as DecoderArray>::Error>,
Available on crate feature decode only.
impl<K: Decodable + Hash + Eq + Send, V: Decodable + Send, S: Default + BuildHasher> Decodable for HashMap<K, V, S>where
DecodeError: From<<<K as Decodable>::DecoderArray as DecoderArray>::Error> + From<<<V as Decodable>::DecoderArray as DecoderArray>::Error>,
Available on crate feature
decode only.type DecoderArray = Option<HashMapArrayDecoder<<K as Decodable>::DecoderArray, <V as Decodable>::DecoderArray, S>>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T0: Decodable + Send, T1: Decodable + Send> Decodable for (T0, T1)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error>,
Available on crate feature decode only.
impl<T0: Decodable + Send, T1: Decodable + Send> Decodable for (T0, T1)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error>,
Available on crate feature
decode only.type DecoderArray = (<T0 as Decodable>::DecoderArray, <T1 as Decodable>::DecoderArray)
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T0: Decodable + Send, T1: Decodable + Send, T2: Decodable + Send> Decodable for (T0, T1, T2)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error> + From<<T2::DecoderArray as DecoderArray>::Error>,
Available on crate feature decode only.
impl<T0: Decodable + Send, T1: Decodable + Send, T2: Decodable + Send> Decodable for (T0, T1, T2)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error> + From<<T2::DecoderArray as DecoderArray>::Error>,
Available on crate feature
decode only.type DecoderArray = (<T0 as Decodable>::DecoderArray, <T1 as Decodable>::DecoderArray, <T2 as Decodable>::DecoderArray)
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T0: Decodable + Send, T1: Decodable + Send, T2: Decodable + Send, T3: Decodable + Send> Decodable for (T0, T1, T2, T3)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error> + From<<T2::DecoderArray as DecoderArray>::Error> + From<<T3::DecoderArray as DecoderArray>::Error>,
Available on crate feature decode only.
impl<T0: Decodable + Send, T1: Decodable + Send, T2: Decodable + Send, T3: Decodable + Send> Decodable for (T0, T1, T2, T3)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error> + From<<T2::DecoderArray as DecoderArray>::Error> + From<<T3::DecoderArray as DecoderArray>::Error>,
Available on crate feature
decode only.type DecoderArray = (<T0 as Decodable>::DecoderArray, <T1 as Decodable>::DecoderArray, <T2 as Decodable>::DecoderArray, <T3 as Decodable>::DecoderArray)
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T0: Decodable + Send, T1: Decodable + Send, T2: Decodable + Send, T3: Decodable + Send, T4: Decodable + Send> Decodable for (T0, T1, T2, T3, T4)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error> + From<<T2::DecoderArray as DecoderArray>::Error> + From<<T3::DecoderArray as DecoderArray>::Error> + From<<T4::DecoderArray as DecoderArray>::Error>,
Available on crate feature decode only.
impl<T0: Decodable + Send, T1: Decodable + Send, T2: Decodable + Send, T3: Decodable + Send, T4: Decodable + Send> Decodable for (T0, T1, T2, T3, T4)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error> + From<<T2::DecoderArray as DecoderArray>::Error> + From<<T3::DecoderArray as DecoderArray>::Error> + From<<T4::DecoderArray as DecoderArray>::Error>,
Available on crate feature
decode only.type DecoderArray = (<T0 as Decodable>::DecoderArray, <T1 as Decodable>::DecoderArray, <T2 as Decodable>::DecoderArray, <T3 as Decodable>::DecoderArray, <T4 as Decodable>::DecoderArray)
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T0: Decodable + Send, T1: Decodable + Send, T2: Decodable + Send, T3: Decodable + Send, T4: Decodable + Send, T5: Decodable + Send> Decodable for (T0, T1, T2, T3, T4, T5)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error> + From<<T2::DecoderArray as DecoderArray>::Error> + From<<T3::DecoderArray as DecoderArray>::Error> + From<<T4::DecoderArray as DecoderArray>::Error> + From<<T5::DecoderArray as DecoderArray>::Error>,
Available on crate feature decode only.
impl<T0: Decodable + Send, T1: Decodable + Send, T2: Decodable + Send, T3: Decodable + Send, T4: Decodable + Send, T5: Decodable + Send> Decodable for (T0, T1, T2, T3, T4, T5)where
DecodeError: From<<T0::DecoderArray as DecoderArray>::Error> + From<<T1::DecoderArray as DecoderArray>::Error> + From<<T2::DecoderArray as DecoderArray>::Error> + From<<T3::DecoderArray as DecoderArray>::Error> + From<<T4::DecoderArray as DecoderArray>::Error> + From<<T5::DecoderArray as DecoderArray>::Error>,
Available on crate feature
decode only.type DecoderArray = (<T0 as Decodable>::DecoderArray, <T1 as Decodable>::DecoderArray, <T2 as Decodable>::DecoderArray, <T3 as Decodable>::DecoderArray, <T4 as Decodable>::DecoderArray, <T5 as Decodable>::DecoderArray)
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 2]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 2]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 3]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 3]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 4]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 4]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 5]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 5]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 6]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 6]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 7]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 7]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 8]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 8]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 9]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 9]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 10]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 10]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 11]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 11]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 12]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 12]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 13]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 13]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 14]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 14]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 15]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 15]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 16]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 16]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 17]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 17]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 18]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 18]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 19]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 19]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 20]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 20]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 32]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 32]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 64]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 64]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 128]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 128]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 256]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 256]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable + Sized> Decodable for [T; 512]
Available on crate feature decode only.
impl<T: Decodable + Sized> Decodable for [T; 512]
Available on crate feature
decode only.type DecoderArray = ArrayDecoder<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable> Decodable for Option<T>
Available on crate feature decode only.
impl<T: Decodable> Decodable for Option<T>
Available on crate feature
decode only.type DecoderArray = Option<NullableDecoder<<T as Decodable>::DecoderArray>>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable> Decodable for Box<T>
Available on crate feature decode only.
impl<T: Decodable> Decodable for Box<T>
Available on crate feature
decode only.type DecoderArray = BoxDecoderArray<<T as Decodable>::DecoderArray>
fn decode( sticks: DynRootBranch<'_>, options: &impl DecodeOptions, ) -> Result<Self, DecodeError>
Source§impl<T: Decodable> Decodable for Vec<T>
Available on crate feature decode only.
impl<T: Decodable> Decodable for Vec<T>
Available on crate feature
decode only.