Enum json_api::query::sort::Direction
[−]
[src]
pub enum Direction {
Asc,
Desc,
}Variants
AscDesc
Methods
impl Direction[src]
fn is_asc(&self) -> bool[src]
Returns true if the direction is Asc.
Example
let direction = Direction::Desc; assert_eq!(direction.is_asc(), false); let direction = Direction::Asc; assert_eq!(direction.is_asc(), true);
fn is_desc(&self) -> bool[src]
Returns true if the direction is Desc.
Example
let direction = Direction::Asc; assert_eq!(direction.is_desc(), false); let direction = Direction::Desc; assert_eq!(direction.is_desc(), true);
fn reverse(&self) -> Self[src]
Returns a cloned inverse of self.
Example
let asc = Direction::Asc; let desc = Direction::Desc; assert_eq!(asc.reverse(), desc); assert_eq!(desc.reverse(), asc);
Trait Implementations
impl Clone for Direction[src]
fn clone(&self) -> Direction[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Copy for Direction[src]
impl Debug for Direction[src]
impl Eq for Direction[src]
impl Hash for Direction[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for Direction[src]
fn eq(&self, __arg_0: &Direction) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.