pub struct DriverCommunicationClient<T> { /* private fields */ }Implementations§
Source§impl<T> DriverCommunicationClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> DriverCommunicationClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DriverCommunicationClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub async fn request_driver_state(
&mut self,
request: impl IntoRequest<Query>,
) -> Result<Response<Ack>, Status>
pub async fn request_driver_state( &mut self, request: impl IntoRequest<Query>, ) -> Result<Response<Ack>, Status>
Data Sharing the remote relay sends a RequestDriverState request to its driver with a query defining the data it wants to receive
Sourcepub async fn subscribe_event(
&mut self,
request: impl IntoRequest<EventSubscription>,
) -> Result<Response<Ack>, Status>
pub async fn subscribe_event( &mut self, request: impl IntoRequest<EventSubscription>, ) -> Result<Response<Ack>, Status>
Events Subscription the src-relay uses this endpoint to forward the event subscription request from dest-relay to driver
Sourcepub async fn request_signed_event_subscription_query(
&mut self,
request: impl IntoRequest<EventSubscription>,
) -> Result<Response<Query>, Status>
pub async fn request_signed_event_subscription_query( &mut self, request: impl IntoRequest<EventSubscription>, ) -> Result<Response<Query>, Status>
Recommended to have TLS mode on for this unsafe endpoint Relay uses this to get Query.requestor_signature and Query.certificate required for event subscription
Sourcepub async fn write_external_state(
&mut self,
request: impl IntoRequest<WriteExternalStateMessage>,
) -> Result<Response<Ack>, Status>
pub async fn write_external_state( &mut self, request: impl IntoRequest<WriteExternalStateMessage>, ) -> Result<Response<Ack>, Status>
Events Publication the dest-relay calls the dest-driver on this end point to write the remote network state to the local ledger
Trait Implementations§
Source§impl<T: Clone> Clone for DriverCommunicationClient<T>
impl<T: Clone> Clone for DriverCommunicationClient<T>
Source§fn clone(&self) -> DriverCommunicationClient<T>
fn clone(&self) -> DriverCommunicationClient<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for DriverCommunicationClient<T>
impl<T> RefUnwindSafe for DriverCommunicationClient<T>where
T: RefUnwindSafe,
impl<T> Send for DriverCommunicationClient<T>where
T: Send,
impl<T> Sync for DriverCommunicationClient<T>where
T: Sync,
impl<T> Unpin for DriverCommunicationClient<T>where
T: Unpin,
impl<T> UnwindSafe for DriverCommunicationClient<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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