Trait virtue::parse::FromAttribute

source ·
pub trait FromAttribute: Sized {
    // Required method
    fn parse(group: &Group) -> Result<Option<Self>>;
}
Expand description

Helper trait for AttributeAccess methods.

This can be implemented on your own type to make parsing easier.

Some functions that can make your life easier:

Required Methods§

source

fn parse(group: &Group) -> Result<Option<Self>>

Try to parse the given group into your own type. Return Ok(None) if the parsing failed or if the attribute was not this type.

Object Safety§

This trait is not object safe.

Implementors§