pub struct HttpBatchTransport { /* private fields */ }Expand description
HTTP Batch transport collects messages and sends them as a single HTTP request
Implementations§
Source§impl HttpBatchTransport
impl HttpBatchTransport
pub fn new(endpoint: String) -> Self
Sourcepub async fn execute(&mut self) -> Result<(), TransportError>
pub async fn execute(&mut self) -> Result<(), TransportError>
Execute the batch - send all queued messages and receive responses This is a placeholder implementation that will need an actual HTTP client
pub fn endpoint(&self) -> &str
pub fn pending_outgoing(&self) -> usize
pub fn pending_incoming(&self) -> usize
Trait Implementations§
Source§impl RpcTransport for HttpBatchTransport
impl RpcTransport for HttpBatchTransport
fn send<'life0, 'async_trait>(
&'life0 mut self,
msg: Message,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Message>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for HttpBatchTransport
impl RefUnwindSafe for HttpBatchTransport
impl Send for HttpBatchTransport
impl Sync for HttpBatchTransport
impl Unpin for HttpBatchTransport
impl UnwindSafe for HttpBatchTransport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more