pub trait IntoEncodableValues {
type Values<'this>: EncodableValues
where Self: 'this;
// Required methods
fn into_encodable_values(&self) -> Self::Values<'_>;
fn num_encodable_values(&self) -> usize;
}Expand description
This can be implemented for anything that can be encoded in multiple steps into a set of values
via scale_encode::EncodeAsType. The common use case is to encode a tuple of multiple types,
step by step, into bytes. As well as tuples up to size 12, Implementations also exist for Vecs
and arrays.
Required Associated Types§
Sourcetype Values<'this>: EncodableValues
where
Self: 'this
type Values<'this>: EncodableValues where Self: 'this
An implementation of EncodableValues that can be used to iterate through the values.
Required Methods§
Sourcefn into_encodable_values(&self) -> Self::Values<'_>
fn into_encodable_values(&self) -> Self::Values<'_>
Return an implementation of EncodableValues for this type.
Sourcefn num_encodable_values(&self) -> usize
fn num_encodable_values(&self) -> usize
The number of values that can be encoded from this type.
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.