[][src]Struct doublecount::ActionOrder

pub struct ActionOrder(pub Rc<dyn Action>);

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

Example

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

let mut actions: Vec<Rc<dyn Action>> = 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 Eq for ActionOrder[src]

impl Ord for ActionOrder[src]

impl PartialEq<ActionOrder> for ActionOrder[src]

impl PartialOrd<ActionOrder> for ActionOrder[src]

Auto Trait Implementations

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.