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§
Required Methods§
Provided Methods§
Sourcefn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
If the contained type is ItemObjectParseable
, call its check_label
Sourcefn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
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.