pub trait ItemArgumentParseable: Sized {
// Required method
fn from_args<'s>(
args: &mut ArgumentStream<'s>,
field: &'static str,
) -> Result<Self, ErrorProblem>;
}
Available on crate feature
parse2
only.Expand description
An (individual) argument that can appear in a netdoc
An implementations is provided for T: FromStr
,
which expects a single argument and passes it to FromStr
.
For netdoc arguments whose specified syntax spans multiple space-separated words, use a manual implementation or a wrapper type.
Required Methods§
Sourcefn from_args<'s>(
args: &mut ArgumentStream<'s>,
field: &'static str,
) -> Result<Self, ErrorProblem>
fn from_args<'s>( args: &mut ArgumentStream<'s>, field: &'static str, ) -> Result<Self, ErrorProblem>
Parse the argument
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.