pub struct ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO> { /* private fields */ }
Expand description

Builder for Scenario.

Implementations§

source§

impl<SCENARIODEFINITION, AGENT, SCENARIO> ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO>

source

pub fn defined_as<VALUE: Into<Option<SCENARIODEFINITION>>>( self, value: VALUE ) -> Self

The scenario definition for this scenario, for example yearly budget.

source

pub fn has_beginning<VALUE: Into<Option<DateTime<Utc>>>>( self, value: VALUE ) -> Self

The planned or actual beginning of a flow or process.

source

pub fn has_end<VALUE: Into<Option<DateTime<Utc>>>>(self, value: VALUE) -> Self

The planned or actual end of a flow or process.

source

pub fn in_scope_of<VALUE: Into<Vec<AGENT>>>(self, value: VALUE) -> Self

In the context of an agent, a grouping generally used for accounting, reporting.

source

pub fn name<VALUE: Into<String>>(self, value: VALUE) -> Self

An informal or formal textual identifier for an object. Does not imply uniqueness.

source

pub fn note<VALUE: Into<Option<String>>>(self, value: VALUE) -> Self

source

pub fn refinement_of<VALUE: Into<Option<SCENARIO>>>(self, value: VALUE) -> Self

This scenario or plan refines another scenario, often as time moves closer or for more detail.

source

pub fn build( self ) -> Result<Scenario<SCENARIODEFINITION, AGENT, SCENARIO>, ScenarioBuilderError>

Builds a new Scenario.

§Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl<SCENARIODEFINITION, AGENT, SCENARIO> Default for ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO>

source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<SCENARIODEFINITION, AGENT, SCENARIO> Freeze for ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO>
where SCENARIO: Freeze, SCENARIODEFINITION: Freeze,

§

impl<SCENARIODEFINITION, AGENT, SCENARIO> RefUnwindSafe for ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO>
where AGENT: RefUnwindSafe, SCENARIO: RefUnwindSafe, SCENARIODEFINITION: RefUnwindSafe,

§

impl<SCENARIODEFINITION, AGENT, SCENARIO> Send for ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO>
where AGENT: Send, SCENARIO: Send, SCENARIODEFINITION: Send,

§

impl<SCENARIODEFINITION, AGENT, SCENARIO> Sync for ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO>
where AGENT: Sync, SCENARIO: Sync, SCENARIODEFINITION: Sync,

§

impl<SCENARIODEFINITION, AGENT, SCENARIO> Unpin for ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO>
where AGENT: Unpin, SCENARIO: Unpin, SCENARIODEFINITION: Unpin,

§

impl<SCENARIODEFINITION, AGENT, SCENARIO> UnwindSafe for ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO>
where AGENT: UnwindSafe, SCENARIO: UnwindSafe, SCENARIODEFINITION: UnwindSafe,

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>,

§

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>,

§

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.