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§
Sourcefn 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 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.