pub trait Whenable<D: 'static> {
    // Required method
    fn when(
        &self,
        assert_fn: Box<dyn Fn(&D) -> bool>
    ) -> LocalBoxFuture<'static, Result<(), DroppedError>>;
}
Expand description

Abstraction over ObservableField::when and ObservableField::when_eq implementations for custom types.

Required Methods§

source

fn when( &self, assert_fn: Box<dyn Fn(&D) -> bool> ) -> LocalBoxFuture<'static, Result<(), DroppedError>>

This function will be called on ObservableField::when.

Should return [LocalBoxFuture] to which will be sent () when provided assert_fn returns true.

Implementations on Foreign Types§

source§

impl<D: 'static> Whenable<D> for RefCell<Vec<UniversalSubscriber<D>>>

source§

fn when( &self, assert_fn: Box<dyn Fn(&D) -> bool> ) -> LocalBoxFuture<'static, Result<(), DroppedError>>

Implementors§