pub trait ItemValueParseable: Sized {
// Required method
fn from_unparsed(item: UnparsedItem<'_>) -> Result<Self, ErrorProblem>;
}
Available on crate feature
parse2
only.Expand description
An item (value) that can appear in a netdoc
This is the type T
of a field item: T
in a netdoc type.
An implementation is provided for tuples of ItemArgumentParseable
,
which parses each argument in turn,
ignores additional arguments,
and rejects any Object.
Typically derived with
#[derive_deftly(ItemValueParseable)]
.
Signature items are special, and implement SignatureItemParseable
instead.
Required Methods§
Sourcefn from_unparsed(item: UnparsedItem<'_>) -> Result<Self, ErrorProblem>
fn from_unparsed(item: UnparsedItem<'_>) -> Result<Self, ErrorProblem>
Parse the item’s value
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.