Trait Event

Source
pub trait Event {
    type Item;

    // Provided methods
    fn into_process(self) -> EventIntoProcess<Self>
       where Self: Sized { ... }
    fn into_composite(self) -> EventIntoComposite<Self>
       where Self: Sized { ... }
    fn and_then<U, F>(self, f: F) -> AndThen<Self, U, F>
       where Self: Sized,
             U: Event,
             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: Event { ... }
    fn ap<U, B>(self, other: U) -> Ap<Self, U, B>
       where Self: Sized,
             Self::Item: FnOnce(U::Item) -> B,
             U: Event { ... }
    fn run_in_start_time(self) -> RunInStartTime<Self>
       where Self: Sized { ... }
    fn run_in_start_time_by(
        self,
        including_current_events: bool,
    ) -> RunInStartTime<Self>
       where Self: Sized { ... }
    fn run_in_stop_time(self) -> RunInStopTime<Self>
       where Self: Sized { ... }
    fn run_in_stop_time_by(
        self,
        including_current_events: bool,
    ) -> RunInStopTime<Self>
       where Self: Sized { ... }
    fn into_boxed(self) -> EventBox<Self::Item>
       where Self: Sized + Clone + 'static { ... }
}
Expand description

The computation synchronized with the event queue.

Required Associated Types§

Source

type Item

The type of the item that is returned in the current modeling time.

Provided Methods§

Source

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

Convert to the Process computation.

Source

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

Convert to the Composite computation.

Source

fn and_then<U, F>(self, f: F) -> AndThen<Self, U, F>
where Self: Sized, U: Event, 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: Event,

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

The function application.

Source

fn run_in_start_time(self) -> RunInStartTime<Self>
where Self: Sized,

Run the computation in the start time.

Source

fn run_in_start_time_by( self, including_current_events: bool, ) -> RunInStartTime<Self>
where Self: Sized,

Run the computation in the start time by processing the current events or not.

Source

fn run_in_stop_time(self) -> RunInStopTime<Self>
where Self: Sized,

Run the computation in the stop time.

Source

fn run_in_stop_time_by( self, including_current_events: bool, ) -> RunInStopTime<Self>
where Self: Sized,

Run the computation in the stop time by processing the current events or not.

Source

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

Convert into a boxed value.

Implementors§

Source§

impl Event for NewInIntegTimes

Source§

impl Event for NewInStartTime

Source§

impl Event for NewInStopTime

Source§

impl Event for NewSourceInIntegTimes

Source§

impl Event for NewSourceInStartTime

Source§

impl Event for NewSourceInStopTime

Source§

impl Event for CancelById

Source§

impl Event for Interrupt

Source§

impl Event for InterruptionTime

Source§

impl Event for IsInterrupted

Source§

impl Event for IsPassivated

Source§

impl Event for Reactivate

Source§

impl Event for ReactivateImmediately

Source§

impl Event for ReactivateManyImmediately

Source§

impl Event for Enqueue

Source§

impl Event for EnqueueIO

Source§

impl Event for EnqueueIOWithPriority

Source§

impl Event for EnqueueWithPriority

Source§

impl Event for EventRepr

Source§

impl Event for Priority

Source§

impl Event for Time

Source§

impl<D> Event for DisposableEvent<D>
where D: Disposable,

Source§

impl<F> Event for EnqueueIOWithIntegTimes<F>
where F: Fn() -> EventBox<()> + Clone + 'static,

Source§

impl<F> Event for EnqueueWithIntegTimes<F>
where F: Fn() -> EventBox<()> + Clone + 'static,

Source§

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

Source§

type Item = <M as Event>::Item

Source§

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

Source§

type Item = T

Source§

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

Source§

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

Source§

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

Source§

impl<M> Event for Run_<M>
where M: Composite,

Source§

type Item = <M as Composite>::Item

Source§

impl<M> Event for ParameterIntoEvent<M>
where M: Parameter,

Source§

type Item = <M as Parameter>::Item

Source§

impl<M> Event for dvcompute_branch::simulation::process::Run<M>
where M: Process<Item = ()>,

Source§

type Item = <M as Process>::Item

Source§

impl<M> Event for SimulationIntoEvent<M>
where M: Simulation,

Source§

impl<M> Event for Trace<M>
where M: Event,

Source§

type Item = <M as Event>::Item

Source§

impl<M> Event for Yield<M>
where M: Event<Item = ()> + Clone + 'static,

Source§

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

Source§

type Item = B

Source§

impl<M, D> Event for dvcompute_branch::simulation::composite::Run<M, D>
where M: Composite, D: Disposable + Clone + 'static,

Source§

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

Source§

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

Source§

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

Source§

type Item = B

Source§

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

Source§

type Item = <U as Event>::Item

Source§

impl<M: 'static> Event for Trigger<M>

Source§

impl<M: Event> Event for BranchEvent<M>

Source§

type Item = <M as Event>::Item

Source§

impl<M: Event> Event for FutureEvent<M>

Source§

type Item = <M as Event>::Item

Source§

impl<S> Event for NewResource<S>
where S: QueueStrategy,

Source§

impl<S> Event for dvcompute_branch::simulation::resource::stats::ReleaseWithinEvent<S>
where S: QueueStrategy,

Source§

impl<S> Event for dvcompute_branch::simulation::resource::stats::TryRequestWithinEvent<S>
where S: QueueStrategy,

Source§

impl<S> Event for dvcompute_branch::simulation::resource::ReleaseWithinEvent<S>
where S: QueueStrategy,

Source§

impl<S> Event for dvcompute_branch::simulation::resource::TryRequestWithinEvent<S>
where S: QueueStrategy,

Source§

impl<SI, SM, SO, T> Event for dvcompute_branch::simulation::queue::stats::NewQueue<SI, SM, SO, T>
where SI: QueueStrategy + 'static, SM: QueueStrategy, SO: QueueStrategy + 'static, T: Clone + 'static,

Source§

type Item = Queue<SI, SM, SO, T>

Source§

impl<SI, SM, SO, T> Event for dvcompute_branch::simulation::queue::NewQueue<SI, SM, SO, T>
where SI: QueueStrategy + 'static, SM: QueueStrategy, SO: QueueStrategy + 'static, T: Clone + 'static,

Source§

type Item = Queue<SI, SM, SO, T>

Source§

impl<SM, SO, T> Event for dvcompute_branch::simulation::queue::unbounded::stats::NewQueue<SM, SO, T>
where SM: QueueStrategy, SO: QueueStrategy + 'static, T: Clone + 'static,

Source§

type Item = Queue<SM, SO, T>

Source§

impl<SM, SO, T> Event for dvcompute_branch::simulation::queue::unbounded::NewQueue<SM, SO, T>
where SM: QueueStrategy, SO: QueueStrategy + 'static, T: Clone + 'static,

Source§

type Item = Queue<SM, SO, T>

Source§

impl<T> Event for EventBox<T>

Source§

type Item = T

Source§

impl<T> Event for Return<T>

Source§

type Item = T

Source§

impl<T, F> Event for Modify<T, F>
where F: FnOnce(&T) -> T, T: Clone + 'static,

Source§

impl<T: Clone + 'static> Event for Read<T>

Source§

type Item = T

Source§

impl<T: Clone + 'static> Event for Swap<T>

Source§

type Item = T

Source§

impl<T: Clone + 'static> Event for Write<T>