pub struct Client { /* private fields */ }
Implementations§
Trait Implementations§
source§impl AppSender for Client
impl AppSender for Client
source§fn send_app_request<'life0, 'async_trait>(
&'life0 self,
node_ids: Set,
request_id: u32,
request: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_app_request<'life0, 'async_trait>( &'life0 self, node_ids: Set, request_id: u32, request: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Send an application-level request. A nil return value guarantees that for each nodeID in [nodeIDs], the VM corresponding to this AppSender eventually receives either:
- An AppResponse from nodeID with ID [requestID]
- An AppRequestFailed from nodeID with ID [requestID] Exactly one of the above messages will eventually be received per nodeID. A non-nil error should be considered fatal.
source§fn send_app_response<'life0, 'async_trait>(
&'life0 self,
node_id: Id,
request_id: u32,
response: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_app_response<'life0, 'async_trait>( &'life0 self, node_id: Id, request_id: u32, response: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Send an application-level response to a request. This response must be in response to an AppRequest that the VM corresponding to this AppSender received from [nodeID] with ID [requestID]. A non-nil error should be considered fatal.
source§fn send_app_gossip<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_app_gossip<'life0, 'async_trait>( &'life0 self, msg: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Gossip an application-level message. A non-nil error should be considered fatal.
source§fn send_app_gossip_specific<'life0, 'async_trait>(
&'life0 self,
node_ids: Set,
msg: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_app_gossip_specific<'life0, 'async_trait>( &'life0 self, node_ids: Set, msg: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Gossip an application-level message to a list of nodeIds.
fn send_cross_chain_app_request<'life0, 'async_trait>( &'life0 self, chain_id: Id, request_id: u32, app_request_bytes: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn send_cross_chain_app_response<'life0, 'async_trait>( &'life0 self, chain_id: Id, request_id: u32, app_response_bytes: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request