pub struct QueryServiceClient<T> { /* private fields */ }
Available on crate feature
rpc
only.Implementations§
Source§impl<T> QueryServiceClient<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> QueryServiceClient<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,
) -> QueryServiceClient<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 fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn key_value(
&mut self,
request: impl IntoRequest<KeyValueRequest>,
) -> Result<Response<KeyValueResponse>, Status>
pub async fn key_value( &mut self, request: impl IntoRequest<KeyValueRequest>, ) -> Result<Response<KeyValueResponse>, Status>
General-purpose key-value state query API, that can be used to query arbitrary keys in the JMT storage.
Sourcepub async fn non_verifiable_key_value(
&mut self,
request: impl IntoRequest<NonVerifiableKeyValueRequest>,
) -> Result<Response<NonVerifiableKeyValueResponse>, Status>
pub async fn non_verifiable_key_value( &mut self, request: impl IntoRequest<NonVerifiableKeyValueRequest>, ) -> Result<Response<NonVerifiableKeyValueResponse>, Status>
General-purpose key-value state query API, that can be used to query arbitrary keys in the non-verifiable storage.
Sourcepub async fn prefix_value(
&mut self,
request: impl IntoRequest<PrefixValueRequest>,
) -> Result<Response<Streaming<PrefixValueResponse>>, Status>
pub async fn prefix_value( &mut self, request: impl IntoRequest<PrefixValueRequest>, ) -> Result<Response<Streaming<PrefixValueResponse>>, Status>
General-purpose prefixed key-value state query API, that can be used to query arbitrary prefixes in the JMT storage.
Sourcepub async fn watch(
&mut self,
request: impl IntoRequest<WatchRequest>,
) -> Result<Response<Streaming<WatchResponse>>, Status>
pub async fn watch( &mut self, request: impl IntoRequest<WatchRequest>, ) -> Result<Response<Streaming<WatchResponse>>, Status>
Subscribes to a stream of key-value updates, with regex filtering on keys.
Trait Implementations§
Source§impl<T: Clone> Clone for QueryServiceClient<T>
impl<T: Clone> Clone for QueryServiceClient<T>
Source§fn clone(&self) -> QueryServiceClient<T>
fn clone(&self) -> QueryServiceClient<T>
Returns a copy 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 QueryServiceClient<T>
impl<T> RefUnwindSafe for QueryServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for QueryServiceClient<T>where
T: Send,
impl<T> Sync for QueryServiceClient<T>where
T: Sync,
impl<T> Unpin for QueryServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for QueryServiceClient<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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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