pub struct CommandCompletionServiceClient<T> { /* private fields */ }Expand description
Allows clients to observe the status of their submissions. Commands may be submitted via the Command Submission Service. The on-ledger effects of their submissions are disclosed by the Update Service.
Commands may fail in 2 distinct manners:
- Failure communicated synchronously in the gRPC error of the submission.
- Failure communicated asynchronously in a Completion, see
completion.proto.
Note that not only successfully submitted commands MAY produce a completion event. For example, the participant MAY choose to produce a completion event for a rejection of a duplicate command.
Clients that do not receive a successful completion about their submission MUST NOT assume that it was successful. Clients SHOULD subscribe to the CompletionStream before starting to submit commands to prevent race conditions.
Implementations§
Source§impl<T> CommandCompletionServiceClient<T>where
T: GrpcService<Body>,
<T as GrpcService<Body>>::Error: Into<Box<dyn Error + Sync + Send>>,
<T as GrpcService<Body>>::ResponseBody: Body<Data = Bytes> + Send + 'static,
<<T as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Sync + Send>> + Send,
impl<T> CommandCompletionServiceClient<T>where
T: GrpcService<Body>,
<T as GrpcService<Body>>::Error: Into<Box<dyn Error + Sync + Send>>,
<T as GrpcService<Body>>::ResponseBody: Body<Data = Bytes> + Send + 'static,
<<T as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Sync + Send>> + Send,
pub fn new(inner: T) -> CommandCompletionServiceClient<T>
pub fn with_origin(inner: T, origin: Uri) -> CommandCompletionServiceClient<T>
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CommandCompletionServiceClient<InterceptedService<T, F>>where
F: Interceptor,
<T as GrpcService<Body>>::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>> + Send + Sync,
Sourcepub fn send_compressed(
self,
encoding: CompressionEncoding,
) -> CommandCompletionServiceClient<T>
pub fn send_compressed( self, encoding: CompressionEncoding, ) -> CommandCompletionServiceClient<T>
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,
) -> CommandCompletionServiceClient<T>
pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> CommandCompletionServiceClient<T>
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(
self,
limit: usize,
) -> CommandCompletionServiceClient<T>
pub fn max_decoding_message_size( self, limit: usize, ) -> CommandCompletionServiceClient<T>
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(
self,
limit: usize,
) -> CommandCompletionServiceClient<T>
pub fn max_encoding_message_size( self, limit: usize, ) -> CommandCompletionServiceClient<T>
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn completion_stream(
&mut self,
request: impl IntoRequest<CompletionStreamRequest>,
) -> Result<Response<Streaming<CompletionStreamResponse>>, Status>
pub async fn completion_stream( &mut self, request: impl IntoRequest<CompletionStreamRequest>, ) -> Result<Response<Streaming<CompletionStreamResponse>>, Status>
Deprecated: please use GetCompletions instead.
Subscribe to command completion events.
Sourcepub async fn get_completions(
&mut self,
request: impl IntoRequest<GetCompletionsRequest>,
) -> Result<Response<Streaming<CompletionStreamResponse>>, Status>
pub async fn get_completions( &mut self, request: impl IntoRequest<GetCompletionsRequest>, ) -> Result<Response<Streaming<CompletionStreamResponse>>, Status>
Subscribe to command completion events.
This streaming endpoint provides more flexibility in filtering than the predecessor CompletionStream.
Trait Implementations§
Source§impl<T> Clone for CommandCompletionServiceClient<T>where
T: Clone,
impl<T> Clone for CommandCompletionServiceClient<T>where
T: Clone,
Source§fn clone(&self) -> CommandCompletionServiceClient<T>
fn clone(&self) -> CommandCompletionServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for CommandCompletionServiceClient<T>
impl<T> RefUnwindSafe for CommandCompletionServiceClient<T>where
Grpc<T>: RefUnwindSafe,
impl<T> Send for CommandCompletionServiceClient<T>
impl<T> Sync for CommandCompletionServiceClient<T>
impl<T> Unpin for CommandCompletionServiceClient<T>
impl<T> UnsafeUnpin for CommandCompletionServiceClient<T>where
Grpc<T>: UnsafeUnpin,
impl<T> UnwindSafe for CommandCompletionServiceClient<T>where
Grpc<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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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>
T in a tonic::RequestSource§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>
T in a tonic::Request