pub trait ReadView<T: Clone> {
    // Required methods
    fn subscribe<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = UnboundedReceiver<T>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cloned<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = T> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

read only view of SubscribableRwLock

Required Methods§

Source

fn subscribe<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = UnboundedReceiver<T>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

subscribe to state changes. Receive the updated state upon state change

Source

fn cloned<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = T> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

async clone the internal state and return it

Implementors§