pub struct SuiteContext<T> {Show 14 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§
Source§impl<T> SuiteContext<T>
impl<T> SuiteContext<T>
pub fn new() -> SuiteContext<T>
pub fn before_all<H: Fn(&mut HashMap<&'static str, T>) + 'static>( &mut self, hook: H, ) -> &mut Self
pub fn before_each<H: Fn(&mut HashMap<&'static str, T>) + 'static>( &mut self, hook: H, ) -> &mut Self
pub fn after_all<H: Fn(&mut HashMap<&'static str, T>) + 'static>( &mut self, hook: H, ) -> &mut Self
pub fn after_each<H: Fn(&mut HashMap<&'static str, T>) + 'static>( &mut self, hook: H, ) -> &mut Self
pub fn it<S, H>(&mut self, name: S, hook: H) -> &mut Self
pub fn it_skip<S, H>(&mut self, name: S, hook: H) -> &mut Self
pub fn it_only<S, H>(&mut self, name: S, hook: H) -> &mut Self
pub fn spec<H>(&mut self, cb: H) -> &mut Selfwhere
H: Fn(&mut SpecOptions<T>),
pub fn describe<S, H>(&mut self, name: S, cb: H) -> &mut Self
pub fn describe_skip<S, H>(&mut self, name: S, cb: H) -> &mut Self
pub fn describe_only<S, H>(&mut self, name: S, cb: H) -> &mut Self
pub fn describe_import(&mut self, suite: Suite<T>) -> &mut Self
pub fn describe_import_skip(&mut self, suite: Suite<T>) -> &mut Self
pub fn describe_import_only(&mut self, suite: Suite<T>) -> &mut Self
pub fn skip(&mut self) -> &mut Self
pub fn retries(&mut self, count: u32) -> &mut Self
pub fn slow(&mut self, count: u128) -> &mut Self
Auto Trait Implementations§
impl<T> Freeze for SuiteContext<T>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more