Struct Suite

Source
pub struct Suite<T> {
    pub name: String,
    pub only: bool,
    pub cb: Box<dyn Fn(&mut SuiteContext<T>)>,
    pub context: SuiteContext<T>,
    pub duration_type: DurationType,
    pub suite_duration: u128,
    pub total_duration: u128,
    pub depth: u32,
    pub reporter: Reporter,
    pub start_time: String,
    pub end_time: String,
    pub ignore_errors: bool,
}

Fields§

§name: String§only: bool§cb: Box<dyn Fn(&mut SuiteContext<T>)>§context: SuiteContext<T>§duration_type: DurationType§suite_duration: u128§total_duration: u128§depth: u32§reporter: Reporter§start_time: String§end_time: String§ignore_errors: bool

Implementations§

Source§

impl<T> Suite<T>

Source

pub fn new<N, H>(name: N, cb: H) -> Suite<T>
where N: Into<String> + Display, H: Fn(&mut SuiteContext<T>) + 'static,

Source

pub fn run(&mut self) -> LabResult

Source

pub fn spec(self) -> Self

Source

pub fn min(self) -> Self

Source

pub fn dot(self) -> Self

Source

pub fn list(self) -> Self

Source

pub fn tap(self) -> Self

Source

pub fn rust(self) -> Self

Source

pub fn json(self) -> Self

Source

pub fn json_pretty(self) -> Self

Source

pub fn nano(self) -> Self

Source

pub fn micro(self) -> Self

Source

pub fn milis(self) -> Self

Source

pub fn sec(self) -> Self

Source

pub fn ignore_errors(self) -> Self

Source

pub fn state(self, state: T) -> Self

Auto Trait Implementations§

§

impl<T> Freeze for Suite<T>

§

impl<T> !RefUnwindSafe for Suite<T>

§

impl<T> !Send for Suite<T>

§

impl<T> !Sync for Suite<T>

§

impl<T> Unpin for Suite<T>

§

impl<T> !UnwindSafe for Suite<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.