pub trait ESExprVarArgCodec<'a>:
ESExprEncodedEq
+ Sized
+ 'a {
type Element: ESExprCodec<'a> + 'a;
// Required methods
fn encode_vararg_element(&'a self, args: &mut Vec<ESExpr<'a>>);
fn decode_vararg_element(
args: &mut VecDeque<ESExpr<'a>>,
constructor_name: &str,
start_index: &mut usize,
) -> Result<Self, DecodeError>;
}Expand description
A field codec for variable arguments.
Required Associated Types§
Sourcetype Element: ESExprCodec<'a> + 'a
type Element: ESExprCodec<'a> + 'a
The element type.
Required Methods§
Sourcefn encode_vararg_element(&'a self, args: &mut Vec<ESExpr<'a>>)
fn encode_vararg_element(&'a self, args: &mut Vec<ESExpr<'a>>)
Encode variable arguments
Sourcefn decode_vararg_element(
args: &mut VecDeque<ESExpr<'a>>,
constructor_name: &str,
start_index: &mut usize,
) -> Result<Self, DecodeError>
fn decode_vararg_element( args: &mut VecDeque<ESExpr<'a>>, constructor_name: &str, start_index: &mut usize, ) -> Result<Self, DecodeError>
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.