Trait Associated

Source
pub trait Associated {
    type AssociatedType;

    // Required method
    fn get_associated(&self) -> &'static Self::AssociatedType;
}
Expand description

See associated-derive for deriving this trait automatically.

Required Associated Types§

Source

type AssociatedType

The type of the constants associated with this enum.

If derived with associated-derive, this will be whatever Type is assigned to in #[associated]

Required Methods§

Source

fn get_associated(&self) -> &'static Self::AssociatedType

Returns a static lifetime reference to the constant associated with this variant.

If derived with associated-derive, this will be the argument to #[assoc] or #[assoc_const]

Implementors§