Trait any_key::AnyOrd [] [src]

pub trait AnyOrd: Any {
    fn debug(&self, f: &mut Formatter) -> Result;
fn eq(&self, other: &AnyOrd) -> bool;
fn cmp(&self, other: &AnyOrd) -> Ordering; }

Object-safe trait for dynamically typed totally ordered keys.

All Ord + 'static types automatically implement this trait.

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

Required Methods

Methods

impl AnyOrd

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 AnyOrd

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 AnyOrd
[src]

Formats the value using the given formatter.

impl PartialEq for AnyOrd
[src]

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

This method tests for !=.

impl Eq for AnyOrd
[src]

impl PartialOrd for AnyOrd
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for AnyOrd
[src]

This method returns an Ordering between self and other. Read more

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the maximum of two values. Read more

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the minimum of two values. Read more

Implementors