ObjectSetMethods

Trait ObjectSetMethods 

Source
pub trait ObjectSetMethods: Copy + Sized {
    type Each: Sized;
    type Field: Sized;

    // Required method
    fn resolve_option(
        self,
        found: Option<Self::Each>,
    ) -> Result<Self::Field, EP>;

    // Provided methods
    fn check_label(self, label: &str) -> Result<(), EP>
       where Self::Each: ItemObjectParseable { ... }
    fn check_object_parseable(self)
       where Self::Each: ItemObjectParseable { ... }
}
Available on crate feature parse2 only.
Expand description

Method for handling some multiplicity of Objects

For use by macros.

See ObjectSetSelector and the module-level docs.

Required Associated Types§

Source

type Each: Sized

The value for each Item.

Source

type Field: Sized

The output type: the type of the field in the Item struct.

Required Methods§

Source

fn resolve_option(self, found: Option<Self::Each>) -> Result<Self::Field, EP>

Parse zero or more argument(s) into Self::Field.

Provided Methods§

Source

fn check_label(self, label: &str) -> Result<(), EP>

If the contained type is ItemObjectParseable, call its check_label

Source

fn check_object_parseable(self)

Check that the contained type can be parsed as an object

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.

Implementors§