aztec-nr - std

Primitive type TraitDefinition

A compile-time type which represents a trait definition such as trait Foo { .. }.

A TraitDefinition is passed as the first argument to a macro attribute on top of a trait:

#[attr]
trait Foo {}

comptime fn attr(trait_definition: TraitDefinition) {
    println(trait_definition); // outputs "Foo"
}

Implementations

impl TraitDefinition

pub comptime fn as_trait_constraint(_self: Self) -> TraitConstraint

Trait implementations

impl Eq for TraitDefinition

pub comptime fn eq(self, other: Self) -> bool

impl Hash for TraitDefinition

pub comptime fn hash<H>(self, state: &mut H)
where H: Hasher