Trait any_key::AnyHash [] [src]

pub trait AnyHash: Any {
    fn debug(&self, f: &mut Formatter) -> Result;
fn eq(&self, other: &AnyHash) -> bool;
fn hash(&self, hasher: &mut Hasher); }

Object-safe trait for dynamically typed hashable keys.

All Eq + Hash + 'static types automatically implement this trait.

On nightly, if the inner value implements Debug, then Debug for AnyHash will use that implementation. Otherwise, it will only show a generic message.

Required Methods

Methods

impl AnyHash

Returns true if the boxed type is the same as T

Returns some reference to the boxed value if it is of type T, or None if it isn't.

Returns a reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

Returns some mutable reference to the boxed value if it is of type T, or None if it isn't.

Returns a mutable reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

impl AnyHash

Returns the boxed value if it is of type T, or Err(Self) if it isn't.

Returns the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

Trait Implementations

impl Debug for AnyHash
[src]

[src]

Formats the value using the given formatter.

impl Debug for AnyHash + Send
[src]

[src]

Formats the value using the given formatter.

impl Debug for AnyHash + Send + Sync
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for AnyHash
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq for AnyHash + Send
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq for AnyHash + Send + Sync
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for AnyHash
[src]

impl Eq for AnyHash + Send
[src]

impl Eq for AnyHash + Send + Sync
[src]

impl Hash for AnyHash
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Hash for AnyHash + Send
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Hash for AnyHash + Send + Sync
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Implementors