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
pub 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.
location
location
pub comptime fn location(self) -> Location {}
Returns the source Location where this trait is defined.
This can be passed to std::meta::error or std::meta::warn to attach a diagnostic to the trait.
Trait Implementations
impl Eq for TraitDefinition
impl Hash for TraitDefinition