Struct laboratory::SuiteContext[][src]

pub struct SuiteContext<T> {
Show fields pub state: Rc<RefCell<HashMap<&'static str, T>>>, pub after_all_hook: Option<Rc<dyn Fn(&mut HashMap<&'static str, T>) + 'static>>, pub after_each_hook: Option<Rc<dyn Fn(&mut HashMap<&'static str, T>) + 'static>>, pub before_all_hook: Option<Rc<dyn Fn(&mut HashMap<&'static str, T>) + 'static>>, pub before_each_hook: Option<Rc<dyn Fn(&mut HashMap<&'static str, T>) + 'static>>, pub specs: Vec<Spec<T>>, pub suites: Vec<Suite<T>>, pub retries_: Option<u32>, pub skip_: bool, pub slow_: Option<u128>, pub passed: u32, pub failed: u32, pub ignored: u32, pub fail: bool,
}

Fields

state: Rc<RefCell<HashMap<&'static str, T>>>after_all_hook: Option<Rc<dyn Fn(&mut HashMap<&'static str, T>) + 'static>>after_each_hook: Option<Rc<dyn Fn(&mut HashMap<&'static str, T>) + 'static>>before_all_hook: Option<Rc<dyn Fn(&mut HashMap<&'static str, T>) + 'static>>before_each_hook: Option<Rc<dyn Fn(&mut HashMap<&'static str, T>) + 'static>>specs: Vec<Spec<T>>suites: Vec<Suite<T>>retries_: Option<u32>skip_: boolslow_: Option<u128>passed: u32failed: u32ignored: u32fail: bool

Implementations

impl<T> SuiteContext<T>[src]

pub fn new() -> SuiteContext<T>[src]

pub fn before_all<H: Fn(&mut HashMap<&'static str, T>) + 'static>(
    &mut self,
    hook: H
) -> &mut Self
[src]

pub fn before_each<H: Fn(&mut HashMap<&'static str, T>) + 'static>(
    &mut self,
    hook: H
) -> &mut Self
[src]

pub fn after_all<H: Fn(&mut HashMap<&'static str, T>) + 'static>(
    &mut self,
    hook: H
) -> &mut Self
[src]

pub fn after_each<H: Fn(&mut HashMap<&'static str, T>) + 'static>(
    &mut self,
    hook: H
) -> &mut Self
[src]

pub fn it<S, H>(&mut self, name: S, hook: H) -> &mut Self where
    S: Into<String> + Display,
    H: Fn(&mut SpecContext<T>) -> Result<(), String> + 'static, 
[src]

pub fn it_skip<S, H>(&mut self, name: S, hook: H) -> &mut Self where
    S: Into<String> + Display,
    H: Fn(&mut SpecContext<T>) -> Result<(), String> + 'static, 
[src]

pub fn it_only<S, H>(&mut self, name: S, hook: H) -> &mut Self where
    S: Into<String> + Display,
    H: Fn(&mut SpecContext<T>) -> Result<(), String> + 'static, 
[src]

pub fn spec<H>(&mut self, cb: H) -> &mut Self where
    H: Fn(&mut SpecOptions<T>), 
[src]

pub fn describe<S, H>(&mut self, name: S, cb: H) -> &mut Self where
    S: Into<String> + Display,
    H: Fn(&mut SuiteContext<T>) + 'static, 
[src]

pub fn describe_skip<S, H>(&mut self, name: S, cb: H) -> &mut Self where
    S: Into<String> + Display,
    H: Fn(&mut SuiteContext<T>) + 'static, 
[src]

pub fn describe_only<S, H>(&mut self, name: S, cb: H) -> &mut Self where
    S: Into<String> + Display,
    H: Fn(&mut SuiteContext<T>) + 'static, 
[src]

pub fn describe_import(&mut self, suite: Suite<T>) -> &mut Self[src]

pub fn describe_import_skip(&mut self, suite: Suite<T>) -> &mut Self[src]

pub fn describe_import_only(&mut self, suite: Suite<T>) -> &mut Self[src]

pub fn skip(&mut self) -> &mut Self[src]

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

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

Auto Trait Implementations

impl<T> !RefUnwindSafe for SuiteContext<T>

impl<T> !Send for SuiteContext<T>

impl<T> !Sync for SuiteContext<T>

impl<T> Unpin for SuiteContext<T>

impl<T> !UnwindSafe for SuiteContext<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.