Trait HashedTypeMethods

Source
pub trait HashedTypeMethods {
    // Provided methods
    fn type_hash_native<REF>() -> u128
       where Self: HashedTypeDef<REF> { ... }
    fn type_hash_le<REF>() -> u128
       where Self: HashedTypeDef<REF> { ... }
    fn type_hash_be<REF>() -> u128
       where Self: HashedTypeDef<REF> { ... }
    fn type_uuid<REF>() -> Uuid
       where Self: HashedTypeDef<REF> { ... }
    fn type_uuid_hyphenated<REF>() -> String
       where Self: HashedTypeDef<REF> { ... }
    fn self_type_hash_native<REF>(&self) -> u128
       where Self: HashedTypeDef<REF> { ... }
    fn self_type_hash_le<REF>(&self) -> u128
       where Self: HashedTypeDef<REF> { ... }
    fn self_type_hash_be<REF>(&self) -> u128
       where Self: HashedTypeDef<REF> { ... }
    fn self_type_uuid<REF>(&self) -> Uuid
       where Self: HashedTypeDef<REF> { ... }
    fn self_type_uuid_hyphenated<REF>(&self) -> String
       where Self: HashedTypeDef<REF> { ... }
}
Expand description

Methods for getting type hash under different forms

  • This trait is implemented for all objects, but method calls require the object to implement the HashedTypeDef<REF> trait
  • In normal use, the type to be evaluated must implement the HashedTypeDef<REF> trait for one and only one REF parameter, and typically the default Ref=() parameter
  • A multiple implementation will require the use of turbofish when calling the methods

Provided Methods§

Source

fn type_hash_native<REF>() -> u128
where Self: HashedTypeDef<REF>,

return native type hash

Source

fn type_hash_le<REF>() -> u128
where Self: HashedTypeDef<REF>,

return little endianess type hash

Source

fn type_hash_be<REF>() -> u128
where Self: HashedTypeDef<REF>,

return big endianess type hash

Source

fn type_uuid<REF>() -> Uuid
where Self: HashedTypeDef<REF>,

return uuid derived from type hash

Source

fn type_uuid_hyphenated<REF>() -> String
where Self: HashedTypeDef<REF>,

return uuid hyphenated string

Source

fn self_type_hash_native<REF>(&self) -> u128
where Self: HashedTypeDef<REF>,

return native type hash from instance

Source

fn self_type_hash_le<REF>(&self) -> u128
where Self: HashedTypeDef<REF>,

return little endianess type hash from instance

Source

fn self_type_hash_be<REF>(&self) -> u128
where Self: HashedTypeDef<REF>,

return big endianess type hash from instance

Source

fn self_type_uuid<REF>(&self) -> Uuid
where Self: HashedTypeDef<REF>,

return type hash-derived uuid from instance

Source

fn self_type_uuid_hyphenated<REF>(&self) -> String
where Self: HashedTypeDef<REF>,

return uuid hyphenated string from instance

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.

Implementors§