pub trait AttributePositional: AttributeBase {
// Required method
fn parse_positional(
input: ParseStream<'_>,
) -> Result<Option<SpannedValue<Self::Partial>>>;
}Expand description
Values that can be parsed positionally, i.e., without a name, e.g.
"literal", a + b, true.
When deriving FromAttr this behavior is enabled via putting
#[attr(positional)] on the field.
The trait is implemented for each AttributeValue that implements the
marker trait PositionalValue.
Required Methods§
Sourcefn parse_positional(
input: ParseStream<'_>,
) -> Result<Option<SpannedValue<Self::Partial>>>
fn parse_positional( input: ParseStream<'_>, ) -> Result<Option<SpannedValue<Self::Partial>>>
Parses Self, positionally.
Note: This needs to stop parsing at the end of the value, before a
possible following , and further arguments.
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.