pub trait IntoDecodableValues: Sized {
type Values: DecodableValues<Target = Self>;
// Required methods
fn into_decodable_values() -> Self::Values;
fn num_decodable_values() -> Option<usize>;
}Expand description
This can be implemented for any type that can be decoded into in multiple steps via
scale_decode::DecodeAsType. The common use case is to decode some sets of bytes into a
tuple of multiple types, step by step. As well as tuples up to size 12, Implementations also exist
and arrays.
Required Associated Types§
Sourcetype Values: DecodableValues<Target = Self>
type Values: DecodableValues<Target = Self>
The decoder we’ll use to iteratively decode bytes.
Required Methods§
Sourcefn into_decodable_values() -> Self::Values
fn into_decodable_values() -> Self::Values
Construct a type that is ready to decode values and return the target type.
Sourcefn num_decodable_values() -> Option<usize>
fn num_decodable_values() -> Option<usize>
The exact number of values that should be provided to
DecodableValues::decode_next_value() before
DecodableValues::decoded_target() can be called. If this
returns None then it indicates that any number of values
can be decoded into Self.
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.