Trait attr::Attr [] [src]

pub trait Attr<Type: ?Sized> {
    type Output;
    fn name(&self) -> &str;
    fn get(&self, i: Type) -> Self::Output;
}

Direct access to an attribute of a type.

All attributes need to be named for debugging purposes.

Associated Types

The resulting value when accessing the attribute

Required Methods

The attributes name

Implementation of the retrieval

Implementors