Parameter

Trait Parameter 

Source
pub trait Parameter {
    type Item;

    // Provided methods
    fn into_simulation(self) -> ParameterIntoSimulation<Self>
       where Self: Sized { ... }
    fn into_event(self) -> ParameterIntoEvent<Self>
       where Self: Sized { ... }
    fn into_process(self) -> ParameterIntoProcess<Self>
       where Self: Sized { ... }
    fn into_composite(self) -> ParameterIntoComposite<Self>
       where Self: Sized { ... }
    fn and_then<U, F>(self, f: F) -> AndThen<Self, U, F>
       where Self: Sized,
             U: Parameter,
             F: FnOnce(Self::Item) -> U { ... }
    fn map<B, F>(self, f: F) -> Map<Self, B, F>
       where Self: Sized,
             F: FnOnce(Self::Item) -> B { ... }
    fn zip<U>(self, other: U) -> Zip<Self, U>
       where Self: Sized,
             U: Parameter { ... }
    fn ap<U, B>(self, other: U) -> Ap<Self, U, B>
       where Self: Sized,
             Self::Item: FnOnce(U::Item) -> B,
             U: Parameter { ... }
    fn into_boxed(self) -> ParameterBox<Self::Item>
       where Self: Sized + 'static { ... }
}
Expand description

The computation to define external parameters.

Required Associated Types§

Source

type Item

The type of the item that is returned by the parameter.

Provided Methods§

Source

fn into_simulation(self) -> ParameterIntoSimulation<Self>
where Self: Sized,

Convert into the Simulation computation.

Source

fn into_event(self) -> ParameterIntoEvent<Self>
where Self: Sized,

Convert into the Event computation.

Source

fn into_process(self) -> ParameterIntoProcess<Self>
where Self: Sized,

Convert to the Process computation.

Source

fn into_composite(self) -> ParameterIntoComposite<Self>
where Self: Sized,

Convert into the Composite computation.

Source

fn and_then<U, F>(self, f: F) -> AndThen<Self, U, F>
where Self: Sized, U: Parameter, F: FnOnce(Self::Item) -> U,

Bind the current computation with its continuation within the resulting computation.

Source

fn map<B, F>(self, f: F) -> Map<Self, B, F>
where Self: Sized, F: FnOnce(Self::Item) -> B,

Map the current computation using the specified transform.

Source

fn zip<U>(self, other: U) -> Zip<Self, U>
where Self: Sized, U: Parameter,

Zip the current computation with another one within the resulting computation.

Source

fn ap<U, B>(self, other: U) -> Ap<Self, U, B>
where Self: Sized, Self::Item: FnOnce(U::Item) -> B, U: Parameter,

The function application.

Source

fn into_boxed(self) -> ParameterBox<Self::Item>
where Self: Sized + 'static,

Convert into a boxed value.

Implementors§

Source§

impl Parameter for SimulationIndex

Source§

impl<F, M> Parameter for Delay<F, M>
where F: FnOnce() -> M, M: Parameter,

Source§

type Item = <M as Parameter>::Item

Source§

impl<F, T> Parameter for Cons<F, T>
where F: FnOnce(&Run<'_>) -> Result<T>,

Source§

type Item = T

Source§

impl<I, M> Parameter for Sequence<I, M>
where I: Iterator<Item = M>, M: Parameter,

Source§

type Item = Vec<<M as Parameter>::Item>

Source§

impl<I, M> Parameter for Sequence_<I, M>
where I: Iterator<Item = M>, M: Parameter,

Source§

impl<M, B, F> Parameter for Map<M, B, F>
where M: Parameter, F: FnOnce(M::Item) -> B,

Source§

type Item = B

Source§

impl<M, U> Parameter for Zip<M, U>
where M: Parameter, U: Parameter,

Source§

type Item = (<M as Parameter>::Item, <U as Parameter>::Item)

Source§

impl<M, U, B> Parameter for Ap<M, U, B>
where M: Parameter, U: Parameter, M::Item: FnOnce(U::Item) -> B,

Source§

type Item = B

Source§

impl<M, U, F> Parameter for AndThen<M, U, F>
where M: Parameter, U: Parameter, F: FnOnce(M::Item) -> U,

Source§

type Item = <U as Parameter>::Item

Source§

impl<T> Parameter for Panic<T>

Source§

type Item = T

Source§

impl<T> Parameter for ParameterBox<T>

Source§

type Item = T

Source§

impl<T> Parameter for Return<T>

Source§

type Item = T