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_: bool
slow_: Option<u128>
passed: u32
failed: u32
ignored: u32
fail: bool
Implementations
impl<T> SuiteContext<T>
[src]
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]
&mut self,
hook: H
) -> &mut Self
pub fn before_each<H: Fn(&mut HashMap<&'static str, T>) + 'static>(
&mut self,
hook: H
) -> &mut Self
[src]
&mut self,
hook: H
) -> &mut Self
pub fn after_all<H: Fn(&mut HashMap<&'static str, T>) + 'static>(
&mut self,
hook: H
) -> &mut Self
[src]
&mut self,
hook: H
) -> &mut Self
pub fn after_each<H: Fn(&mut HashMap<&'static str, T>) + 'static>(
&mut self,
hook: H
) -> &mut Self
[src]
&mut self,
hook: H
) -> &mut Self
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]
S: Into<String> + Display,
H: Fn(&mut SpecContext<T>) -> Result<(), String> + 'static,
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]
S: Into<String> + Display,
H: Fn(&mut SpecContext<T>) -> Result<(), String> + 'static,
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]
S: Into<String> + Display,
H: Fn(&mut SpecContext<T>) -> Result<(), String> + 'static,
pub fn spec<H>(&mut self, cb: H) -> &mut Self where
H: Fn(&mut SpecOptions<T>),
[src]
H: Fn(&mut SpecOptions<T>),
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]
S: Into<String> + Display,
H: Fn(&mut SuiteContext<T>) + 'static,
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]
S: Into<String> + Display,
H: Fn(&mut SuiteContext<T>) + 'static,
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]
S: Into<String> + Display,
H: Fn(&mut SuiteContext<T>) + 'static,
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> !RefUnwindSafe for SuiteContext<T>
impl<T> !Send for SuiteContext<T>
impl<T> !Send for SuiteContext<T>
impl<T> !Sync for SuiteContext<T>
impl<T> !Sync for SuiteContext<T>
impl<T> Unpin for SuiteContext<T>
impl<T> Unpin for SuiteContext<T>
impl<T> !UnwindSafe for SuiteContext<T>
impl<T> !UnwindSafe for SuiteContext<T>