[][src]Struct doublecount::ActionOrder

pub struct ActionOrder<A>(pub Rc<A>);

A way to sort Actions by their date, and then by the priority of their ActionType.

Example

use doublecount::{ActionTypeValue, ActionOrder};
use std::rc::Rc;

let mut actions: Vec<Rc<ActionTypeValue>> = Vec::new();

// let's pretend we created and added
// some actions to the actions vector

// sort the actions using this order
actions.sort_by_key(|a| ActionOrder(a.clone()));

Trait Implementations

impl<A> Eq for ActionOrder<A> where
    A: ActionTypeValueEnum
[src]

impl<A> Ord for ActionOrder<A> where
    A: ActionTypeValueEnum
[src]

impl<A> PartialEq<ActionOrder<A>> for ActionOrder<A> where
    A: ActionTypeValueEnum
[src]

impl<A> PartialOrd<ActionOrder<A>> for ActionOrder<A> where
    A: ActionTypeValueEnum
[src]

Auto Trait Implementations

impl<A> !RefUnwindSafe for ActionOrder<A>

impl<A> !Send for ActionOrder<A>

impl<A> !Sync for ActionOrder<A>

impl<A> Unpin for ActionOrder<A>

impl<A> UnwindSafe for ActionOrder<A> where
    A: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.