pub trait TokenSeq<'a>: Token<'a> {
const IS_TUPLE: bool = false;
// Required methods
fn encode_sequence(&self, enc: &mut Encoder);
fn decode_sequence(dec: &mut Decoder<'a>) -> Result<Self>;
}
Expand description
A token composed of a sequence of other tokens.
This functions is an extension trait for Token
, and is only
implemented by FixedSeqToken
, DynSeqToken
, PackedSeqToken
, and
tuples of Token
s (including WordToken
).
Provided Associated Constants§
Required Methods§
Sourcefn encode_sequence(&self, enc: &mut Encoder)
fn encode_sequence(&self, enc: &mut Encoder)
ABI-encode the token sequence into the encoder.
Sourcefn decode_sequence(dec: &mut Decoder<'a>) -> Result<Self>
fn decode_sequence(dec: &mut Decoder<'a>) -> Result<Self>
ABI-decode the token sequence from the encoder.
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.