Struct dvcompute::simulation::observable::ObservableBox

source ·
pub struct ObservableBox<T> { /* private fields */ }
Expand description

It represents the boxed Observable computation.

Trait Implementations§

source§

impl<T> Observable for ObservableBox<T>

§

type Message = T

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

fn subscribe<O>(self, observer: O) -> EventBox<DisposableBox>
where O: Observer<Message = Self::Message, Item = ()> + 'static,

Subscribe the observer.
source§

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

Convert into a boxed value.
source§

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,

Map the current computation using the specified transform.
source§

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,

Map the current computation using the specified transform computation.
source§

fn filter<F>(self, f: F) -> Filter<Self, F>
where Self: Sized, F: Fn(&Self::Message) -> bool + 'static, Self::Message: 'static,

Filter the messages.
source§

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,

Filter the messages within computation.
source§

fn merge<U>(self, other: U) -> Merge<Self, U>
where Self: Sized, Self::Message: 'static, U: Observable<Message = Self::Message>,

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

Auto Trait Implementations§

§

impl<T> Freeze for ObservableBox<T>

§

impl<T> !RefUnwindSafe for ObservableBox<T>

§

impl<T> !Send for ObservableBox<T>

§

impl<T> !Sync for ObservableBox<T>

§

impl<T> Unpin for ObservableBox<T>

§

impl<T> !UnwindSafe for ObservableBox<T>

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<M> IntoObservable for M
where M: Observable,

§

type Observable = M

The target computation.
§

type Message = <M as Observable>::Message

The type of messages about which the computation notifies.
source§

fn into_observable(self) -> <M as IntoObservable>::Observable

Convert to the Observable computation.
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.
source§

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

source§

fn vzip(self) -> V