pub trait DeepObservable {
    fn observe_deep<F>(&mut self, f: F) -> Subscription<Events>
    where
        F: Fn(&Transaction, &Events) + 'static
; fn unobserve_deep(&mut self, subscription_id: SubscriptionId); }
Expand description

Trait implemented by all Y-types, allowing for observing events which are emitted by nested types.

Required Methods

Subscribe a callback f for all events emitted by this and nested collaborative types. Callback is accepting transaction which triggered that event and event itself, wrapped within an Event structure.

This method returns a subscription, which will automatically unsubscribe current callback when dropped.

Unobserves callback identified by subscription_id (which can be obtained by consuming Subscription using into cast).

Implementors