Skip to main content

CanHaveAttributes

Trait CanHaveAttributes 

Source
pub trait CanHaveAttributes: Sized {
    // Required method
    fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>;
}
Expand description

A writable that can have attributes attached to it

Required Methods§

Source

fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>

Adds attributes to this writable

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Abi, Body> CanHaveAttributes for ExternBlock<Abi, Body>

Source§

impl<Mods, Name, Args, Return, Where, Body> CanHaveAttributes for FunctionDef<Mods, Name, Args, Return, Where, Body>

Source§

impl<Mods, Name, Elements> CanHaveAttributes for StructDef<Mods, Name, Elements>

Source§

impl<Mods, Name, Entries> CanHaveAttributes for EnumDef<Mods, Name, Entries>

Source§

impl<Mods, Name, TypeVars, SuperTraits, Body> CanHaveAttributes for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>

Source§

impl<Mods, Name, Value> CanHaveAttributes for DeclareField<Mods, Name, Value>

Source§

impl<Mods, TypeVars, Recv, Where, Body> CanHaveAttributes for Impl<Mods, TypeVars, Recv, Where, Body>

Source§

impl<Mods, TypeVars, Trait, Recv, Where, Body> CanHaveAttributes for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>

Source§

impl<Name, Type> CanHaveAttributes for FunctionParam<Name, Type>