Struct compare::Natural
[−]
[src]
pub struct Natural<T: Ord + ?Sized>(_);
A comparator that delegates to Ord.
Examples
use compare::{Compare, natural}; use std::cmp::Ordering::{Less, Equal, Greater}; let a = &1; let b = &2; let cmp = natural(); assert_eq!(cmp.compare(a, b), Less); assert_eq!(cmp.compare(b, a), Greater); assert_eq!(cmp.compare(a, a), Equal);