Skip to main content

OrdStr

Trait OrdStr 

Source
pub trait OrdStr: EqStr + for<'a> PartialOrd<&'a str> {
    // Required method
    fn cmp(&self, other: &str) -> Ordering;
}
Expand description

Trait for types that form a total ordering together with str.

This trait may implemented by a type that is comparable to str such that the values of that type and str can be placed in a single total ordering. It is equivalent in all respects to std::cmp::Ord excepting that it indicates that the type implementing it joins together in a total ordering with str.

Required Methods§

Source

fn cmp(&self, other: &str) -> Ordering

Returns an Ordering between self and other.

Implementations on Foreign Types§

Source§

impl OrdStr for &str

Source§

fn cmp(&self, other: &str) -> Ordering

Implementors§

Source§

impl OrdStr for bufjson::lexical::pipe::Literal

Available on crate feature pipe only.
Source§

impl OrdStr for bufjson::lexical::read::Literal

Available on crate feature read only.