World

Struct World 

Source
pub struct World {
    pub storage: Option<Storage>,
    pub two_timer_parse_result: Option<String>,
    pub parse_result: Option<Result<Vec<NaiveDate>>>,
    pub result_vec_mealrecord: Option<Result<Vec<MealRecord>>>,
    pub result_option_mealrecord: Option<Result<Option<MealRecord>>>,
    pub result_mealrecord: Option<Result<MealRecord>>,
}
Expand description

World for cucumber tests

Fields§

§storage: Option<Storage>§two_timer_parse_result: Option<String>§parse_result: Option<Result<Vec<NaiveDate>>>§result_vec_mealrecord: Option<Result<Vec<MealRecord>>>§result_option_mealrecord: Option<Result<Option<MealRecord>>>§result_mealrecord: Option<Result<MealRecord>>

Trait Implementations§

Source§

impl Debug for World

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for World

Source§

fn default() -> World

Returns the “default value” for a type. Read more
Source§

impl World for World

Source§

type Error = Error

Error of creating a new World instance.
Source§

async fn new() -> Result<Self, Self::Error>

Creates a new World instance.
Source§

fn collection() -> Collection<Self>
where Self: Debug + WorldInventory,

Returns runner for tests with auto-wired steps marked by given, when and then attributes.
Source§

fn cucumber<I>() -> Cucumber<Self, Basic, I, Basic<Self>, Summarize<Normalize<Self, Basic>>>
where I: AsRef<Path>, Self: Debug + WorldInventory,

Returns default Cucumber with all the auto-wired Steps.
Source§

fn run<I>(input: I) -> impl Future<Output = ()>
where I: AsRef<Path>, Self: Debug + WorldInventory,

Source§

fn filter_run<I, F>(input: I, filter: F) -> impl Future<Output = ()>
where Self: Debug + WorldInventory, I: AsRef<Path>, F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool + 'static,

Runs Cucumber with Scenarios filter. Read more
Source§

impl WorldInventory for World

Source§

type Given = CucumberGivenWorld

Struct submitted in a given macro.
Source§

type When = CucumberWhenWorld

Struct submitted in a when macro.
Source§

type Then = CucumberThenWorld

Struct submitted in a then macro.

Auto Trait Implementations§

§

impl Freeze for World

§

impl !RefUnwindSafe for World

§

impl Send for World

§

impl !Sync for World

§

impl Unpin for World

§

impl !UnwindSafe for World

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<W> IntoWorldResult for W
where W: World,

Source§

type World = W

World type itself.
Source§

type Error = Infallible

Error returned by this World constructor. Read more
Source§

fn into_world_result(self) -> Result<W, <W as IntoWorldResult>::Error>

Passes Result<World, Self::Error> as is, or wraps the plain World in a Result<World, Infallible>. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Ext for T

Source§

fn assert_normalized(self) -> AssertNormalized<T>

Asserts this Writer being Normalized. Read more
Source§

fn normalized<W>(self) -> Normalize<W, T>

Wraps this Writer into a Normalized version. Read more
Source§

fn summarized(self) -> Summarize<T>

Wraps this Writer to print a summary at the end of an output. Read more
Source§

fn fail_on_skipped(self) -> FailOnSkipped<T>

Wraps this Writer to fail on Skipped Steps if their Scenario isn’t marked with @allow.skipped tag. Read more
Source§

fn fail_on_skipped_with<F>(self, f: F) -> FailOnSkipped<T, F>
where F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,

Wraps this Writer to fail on Skipped Steps if the given with predicate returns true. Read more
Source§

fn repeat_skipped<W>(self) -> Repeat<W, T>

Wraps this Writer to re-output Skipped Steps at the end of an output.
Source§

fn repeat_failed<W>(self) -> Repeat<W, T>

Wraps this Writer to re-output Failed Steps or Parser errors at the end of an output.
Source§

fn repeat_if<W, F>(self, filter: F) -> Repeat<W, T, F>
where F: Fn(&Result<Event<Cucumber<W>>, Error>) -> bool,

Wraps this Writer to re-output filtered events at the end of an output.
Source§

fn tee<W, Wr>(self, other: Wr) -> Tee<T, Wr>
where Wr: Writer<W>,

Attaches the provided other Writer to the current one for passing events to both of them simultaneously.
Source§

fn discard_arbitrary_writes(self) -> Arbitrary<T>

Wraps this Writer into a discard::Arbitrary one, providing a no-op ArbitraryWriter implementation. Read more
Source§

fn discard_stats_writes(self) -> Stats<T>

Wraps this Writer into a discard::Stats one, providing a no-op StatsWriter implementation returning only 0. Read more