Trait dvcompute::simulation::observable::Observable[][src]

pub trait Observable {
    type Message;
    fn subscribe<O>(self, observer: O) -> EventBox<DisposableBox>
    where
        O: Observer<Message = Self::Message, Item = ()> + 'static
; fn map<B, F>(self, f: F) -> Map<Self, B, F>
    where
        Self: Sized,
        F: Fn(&Self::Message) -> B + 'static,
        Self::Message: 'static,
        B: 'static
, { ... }
fn mapc<U, B, F>(self, f: F) -> MapC<Self, U, B, F>
    where
        Self: Sized,
        F: Fn(&Self::Message) -> U + 'static,
        U: Event<Item = B>,
        Self::Message: 'static,
        B: 'static
, { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
    where
        Self: Sized,
        F: Fn(&Self::Message) -> bool + 'static,
        Self::Message: 'static
, { ... }
fn filterc<U, F>(self, f: F) -> FilterC<Self, U, F>
    where
        Self: Sized,
        F: Fn(&Self::Message) -> U + 'static,
        U: Event<Item = bool>,
        Self::Message: 'static
, { ... }
fn delay(self, dt: f64) -> Delay<Self>
    where
        Self: Sized,
        Self::Message: Clone + 'static
, { ... }
fn delayc<U, F>(self, f: F) -> DelayC<Self, U, F>
    where
        Self: Sized,
        Self::Message: Clone + 'static,
        F: Fn() -> U + 'static,
        U: Event<Item = f64>
, { ... }
fn merge<U>(self, other: U) -> Merge<Self, U>
    where
        Self: Sized,
        Self::Message: 'static,
        U: Observable<Message = Self::Message>
, { ... }
fn into_boxed(self) -> ObservableBox<Self::Message>
    where
        Self: Sized + 'static
, { ... } }
Expand description

The computation that allows notifying about the events.

Associated Types

The type of messages to notify in the current modeling time.

Required methods

Subscribe the observer.

Provided methods

Map the current computation using the specified transform.

Map the current computation using the specified transform computation.

Filter the messages.

Filter the messages within computation.

Delay the receiving of messages.

Delay the receiving of messages by intervals calculated within Event computation.

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

Convert into a boxed value.

Implementors