Struct Delay

Source
pub struct Delay<F, M> { /* private fields */ }
Expand description

Allows delaying the Observable computation by the specified function.

Trait Implementations§

Source§

impl<F: Clone, M: Clone> Clone for Delay<F, M>

Source§

fn clone(&self) -> Delay<F, M>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F, M> Observable for Delay<F, M>
where F: FnOnce() -> M + 'static, M: Observable + 'static,

Source§

type Message = <M as Observable>::Message

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 = ()> + Clone + 'static,

Subscribe the observer.
Source§

fn map<B, F>(self, f: F) -> Map<Self, B, F>
where Self: Sized, F: Fn(&Self::Message) -> B + Clone + 'static, Self::Message: Clone + '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 + Clone + 'static, U: Event<Item = B>, Self::Message: Clone + '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 + Clone + 'static, Self::Message: Clone + 'static,

Filter the messages.
Source§

fn filterc<U, F>(self, f: F) -> FilterC<Self, U, F>
where Self: Sized, F: Fn(&Self::Message) -> U + Clone + 'static, U: Event<Item = bool>, Self::Message: Clone + 'static,

Filter the messages within computation.
Source§

fn hold(self, dt: f64) -> Hold<Self>
where Self: Sized, Self::Message: Clone + 'static,

Hold the receiving of messages for the specified time interval.
Source§

fn holdc<U, F>(self, f: F) -> HoldC<Self, U, F>
where Self: Sized, Self::Message: Clone + 'static, F: Fn() -> U + Clone + 'static, U: Event<Item = f64>,

Hold the receiving of messages for intervals calculated within Event computation.
Source§

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

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

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

Convert into a boxed value.

Auto Trait Implementations§

§

impl<F, M> Freeze for Delay<F, M>
where F: Freeze,

§

impl<F, M> RefUnwindSafe for Delay<F, M>

§

impl<F, M> Send for Delay<F, M>
where F: Send, M: Send,

§

impl<F, M> Sync for Delay<F, M>
where F: Sync, M: Sync,

§

impl<F, M> Unpin for Delay<F, M>
where F: Unpin, M: Unpin,

§

impl<F, M> UnwindSafe for Delay<F, M>
where F: UnwindSafe, M: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

type Observable = M

The target computation.
Source§

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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