Skip to main content

trait_impl

Attribute Macro trait_impl 

Source
#[trait_impl]
Expand description

Attribute macro for registering a trait implementation with Sassi::all_impl::<dyn Trait>().

Apply it to a concrete trait impl:

#[sassi::trait_impl]
impl Nameable for User {
    fn name(&self) -> &str { &self.name }
}