pub trait CborArrayDecoder {
// Required methods
fn size(&self) -> Option<usize>;
fn deserialize_element<T>(
&mut self,
) -> Result<Option<T>, CborSerializationError>
where T: CborDeserialize;
}Expand description
Decoder of CBOR array
Required Methods§
Sourcefn size(&self) -> Option<usize>
fn size(&self) -> Option<usize>
Number of elements in the array being decoded (total number of elements,
not remaining). Returns None if the array has indefinite length.
Sourcefn deserialize_element<T>(
&mut self,
) -> Result<Option<T>, CborSerializationError>where
T: CborDeserialize,
fn deserialize_element<T>(
&mut self,
) -> Result<Option<T>, CborSerializationError>where
T: CborDeserialize,
Deserialize an array element. Returns None if all
elements in the array has been deserialized.
The total number of elements that can be deserialized is equal
to Self::size.
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.