Trait medea_reactive::Whenable[][src]

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

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

Required methods

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

This function will be called on ObservableField::when.

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

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

Loading content...