pub trait BroadcastChannel: Clone {
    type Resource: Resource;

    fn subscribe(&self) -> Result<Self::Resource, AnyError>;
    fn unsubscribe(&self, resource: &Self::Resource) -> Result<(), AnyError>;
    fn send<'life0, 'life1, 'async_trait>(
        &'life0 self,
        resource: &'life1 Self::Resource,
        name: String,
        data: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<(), AnyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn recv<'life0, 'life1, 'async_trait>(
        &'life0 self,
        resource: &'life1 Self::Resource
    ) -> Pin<Box<dyn Future<Output = Result<Option<Message>, AnyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Required Associated Types

Required Methods

Implementors