pub trait AttributeIdent: Sized {
    type IDENTS: AsRef<[&'static str]>;

    const IDENTS: Self::IDENTS;

    // Provided method
    fn is_ident(path: &Path) -> bool { ... }
}
Expand description

Helper trait providing the path for an attribute.

Automatically derived with Attribute, if #[attribute(ident = "some_ident")] is provided.

Required Associated Types§

source

type IDENTS: AsRef<[&'static str]>

Type used for Self::ALIASES, e.g. [&'static str; 5]

Required Associated Constants§

source

const IDENTS: Self::IDENTS

List of idents

Provided Methods§

source

fn is_ident(path: &Path) -> bool

Tests if Attribute matches one of the idents

Implementors§