pub trait FromVarargs: Sized {
    fn read<'a>(args: &mut Varargs<'a>) -> Result<Self, Vec<ArgumentError<'a>>>;
}
Expand description

Trait for structures that can be parsed from Varargs.

This trait can be derived for structure types where each type implements FromVariant. The order of fields matter for this purpose:

#[derive(FromVarargs)]
struct MyArgs {
    foo: i32,
    bar: String,
    #[opt] baz: Option<Ref<Node>>,
}

Required Methods§

source

fn read<'a>(args: &mut Varargs<'a>) -> Result<Self, Vec<ArgumentError<'a>>>

Implementors§