Struct laboratory::SpecContext[][src]

pub struct SpecContext<T> {
    pub state: Rc<RefCell<HashMap<&'static str, T>>>,
    pub retries_: Option<u32>,
    pub slow_: Option<u128>,
    pub speed_result: Speed,
    pub attempts: u32,
}

Fields

state: Rc<RefCell<HashMap<&'static str, T>>>retries_: Option<u32>slow_: Option<u128>speed_result: Speedattempts: u32

Implementations

impl<T> SpecContext<T>[src]

pub fn new(state: Rc<RefCell<HashMap<&'static str, T>>>) -> SpecContext<T>[src]

pub fn retries(&mut self, count: u32) -> &mut Self[src]

pub fn slow(&mut self, count: u128) -> &mut Self[src]

pub fn get_retries(&self) -> Option<&u32>[src]

pub fn get_slow(&self) -> Option<&u128>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for SpecContext<T>

impl<T> !Send for SpecContext<T>

impl<T> !Sync for SpecContext<T>

impl<T> Unpin for SpecContext<T>

impl<T> !UnwindSafe for SpecContext<T>

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.