pub trait IdentifierRef: PartialEq<Identifier> {
// Required method
fn hash_as_identifier<H: Hasher>(&self, state: &mut H);
}Expand description
Trait that indicates that a type can be used as a reference to an identifier. Contains a special hash method that includes the descriminator for the identifier variant, which means that it hashes to the same value as the equivalent identifier.
Required Methods§
Sourcefn hash_as_identifier<H: Hasher>(&self, state: &mut H)
fn hash_as_identifier<H: Hasher>(&self, state: &mut H)
Hash the value as if it was in an identifier. This must result in the same hash as the equivalent identifier.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.