pub trait Backend: Send + Sync {
// Required method
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<ResponseRecord, ShadowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The async surface the shadower drives. Implement once per transport.
Required Methods§
Sourcefn call<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<ResponseRecord, ShadowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<ResponseRecord, ShadowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Issue a call. The input is opaque so this trait works for HTTP bodies,
gRPC bytes, raw JSON, MessagePack — anything that fits in a &[u8].