pub trait ItemValueParseable: Sized {
// Required method
fn from_unparsed(item: UnparsedItem<'_>) -> Result<Self, ErrorProblem>;
}Expand description
An item (value) that can be parsed 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.