TraitDefinition
std::meta::trait_def
contains methods on the built-in TraitDefinition
type. This type
represents trait definitions such as trait Foo { .. }
at the top-level of a program.
Methods
as_trait_constraint
as_trait_constraint
comptime fn as_trait_constraint(_self: Self) -> TraitConstraint {}
Converts this trait into a trait constraint. If there are any generics on this trait, they will be kept as-is without instantiating or replacing them.
Trait Implementations
impl Eq for TraitDefinition
impl Hash for TraitDefinition