Skip to main content

BraidNetwork

Trait BraidNetwork 

Source
pub trait BraidNetwork:
    Send
    + Sync
    + 'static {
    // Required methods
    fn fetch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
        req: BraidRequest,
    ) -> Pin<Box<dyn Future<Output = Result<BraidResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn subscribe<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
        req: BraidRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Receiver<Result<Update>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Abstraction for network operations.

Required Methods§

Source

fn fetch<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, req: BraidRequest, ) -> Pin<Box<dyn Future<Output = Result<BraidResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Perform a standard Braid-HTTP request.

Source

fn subscribe<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, req: BraidRequest, ) -> Pin<Box<dyn Future<Output = Result<Receiver<Result<Update>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Subscribe to a Braid-HTTP 209 stream.

Implementors§