pub trait Decode: Sized {
// Required method
fn decode<'a, I: Iterator<Item = &'a SExprItem>>(
items: &mut Peekable<I>,
) -> Result<Self>;
}Required Methods§
Sourcefn decode<'a, I: Iterator<Item = &'a SExprItem>>(
items: &mut Peekable<I>,
) -> Result<Self>
fn decode<'a, I: Iterator<Item = &'a SExprItem>>( items: &mut Peekable<I>, ) -> Result<Self>
Consumes zero or more S-expression items from the iterator to construct Self.
§Errors
Will return an error if the S-expression cannot be represented by Self. To avoid this case,
use can_decode to check if the item can be decoded first.
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.