Skip to main content

ItemArgumentParseable

Trait ItemArgumentParseable 

Source
pub trait ItemArgumentParseable: Sized {
    // Required method
    fn from_args<'s>(
        args: &mut ArgumentStream<'s>,
    ) -> Result<Self, ArgumentError>;
}
Expand description

An (individual) argument that can be parsed from 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§

Source

fn from_args<'s>(args: &mut ArgumentStream<'s>) -> Result<Self, ArgumentError>

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.

Implementations on Foreign Types§

Source§

impl<T: ItemArgumentParseable> ItemArgumentParseable for Arc<T>

Source§

fn from_args<'s>(args: &mut ArgumentStream<'s>) -> Result<Self, ArgumentError>

Implementors§