pub struct QueryClient<T> { /* private fields */ }Expand description
Query provides defines the gRPC querier service
Implementations§
Source§impl QueryClient<Channel>
impl QueryClient<Channel>
Source§impl<T> QueryClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> QueryClient<T>where
T: GrpcService<Body>,
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,
) -> QueryClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::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 channel(
&mut self,
request: impl IntoRequest<QueryChannelRequest>,
) -> Result<Response<QueryChannelResponse>, Status>
pub async fn channel( &mut self, request: impl IntoRequest<QueryChannelRequest>, ) -> Result<Response<QueryChannelResponse>, Status>
Channel queries an IBC Channel.
Sourcepub async fn channels(
&mut self,
request: impl IntoRequest<QueryChannelsRequest>,
) -> Result<Response<QueryChannelsResponse>, Status>
pub async fn channels( &mut self, request: impl IntoRequest<QueryChannelsRequest>, ) -> Result<Response<QueryChannelsResponse>, Status>
Channels queries all the IBC channels of a chain.
Sourcepub async fn connection_channels(
&mut self,
request: impl IntoRequest<QueryConnectionChannelsRequest>,
) -> Result<Response<QueryConnectionChannelsResponse>, Status>
pub async fn connection_channels( &mut self, request: impl IntoRequest<QueryConnectionChannelsRequest>, ) -> Result<Response<QueryConnectionChannelsResponse>, Status>
ConnectionChannels queries all the channels associated with a connection end.
Sourcepub async fn channel_client_state(
&mut self,
request: impl IntoRequest<QueryChannelClientStateRequest>,
) -> Result<Response<QueryChannelClientStateResponse>, Status>
pub async fn channel_client_state( &mut self, request: impl IntoRequest<QueryChannelClientStateRequest>, ) -> Result<Response<QueryChannelClientStateResponse>, Status>
ChannelClientState queries for the client state for the channel associated with the provided channel identifiers.
Sourcepub async fn channel_consensus_state(
&mut self,
request: impl IntoRequest<QueryChannelConsensusStateRequest>,
) -> Result<Response<QueryChannelConsensusStateResponse>, Status>
pub async fn channel_consensus_state( &mut self, request: impl IntoRequest<QueryChannelConsensusStateRequest>, ) -> Result<Response<QueryChannelConsensusStateResponse>, Status>
ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers.
Sourcepub async fn packet_commitment(
&mut self,
request: impl IntoRequest<QueryPacketCommitmentRequest>,
) -> Result<Response<QueryPacketCommitmentResponse>, Status>
pub async fn packet_commitment( &mut self, request: impl IntoRequest<QueryPacketCommitmentRequest>, ) -> Result<Response<QueryPacketCommitmentResponse>, Status>
PacketCommitment queries a stored packet commitment hash.
Sourcepub async fn packet_commitments(
&mut self,
request: impl IntoRequest<QueryPacketCommitmentsRequest>,
) -> Result<Response<QueryPacketCommitmentsResponse>, Status>
pub async fn packet_commitments( &mut self, request: impl IntoRequest<QueryPacketCommitmentsRequest>, ) -> Result<Response<QueryPacketCommitmentsResponse>, Status>
PacketCommitments returns all the packet commitments hashes associated with a channel.
Sourcepub async fn packet_receipt(
&mut self,
request: impl IntoRequest<QueryPacketReceiptRequest>,
) -> Result<Response<QueryPacketReceiptResponse>, Status>
pub async fn packet_receipt( &mut self, request: impl IntoRequest<QueryPacketReceiptRequest>, ) -> Result<Response<QueryPacketReceiptResponse>, Status>
PacketReceipt queries if a given packet sequence has been received on the queried chain
Sourcepub async fn packet_acknowledgement(
&mut self,
request: impl IntoRequest<QueryPacketAcknowledgementRequest>,
) -> Result<Response<QueryPacketAcknowledgementResponse>, Status>
pub async fn packet_acknowledgement( &mut self, request: impl IntoRequest<QueryPacketAcknowledgementRequest>, ) -> Result<Response<QueryPacketAcknowledgementResponse>, Status>
PacketAcknowledgement queries a stored packet acknowledgement hash.
Sourcepub async fn packet_acknowledgements(
&mut self,
request: impl IntoRequest<QueryPacketAcknowledgementsRequest>,
) -> Result<Response<QueryPacketAcknowledgementsResponse>, Status>
pub async fn packet_acknowledgements( &mut self, request: impl IntoRequest<QueryPacketAcknowledgementsRequest>, ) -> Result<Response<QueryPacketAcknowledgementsResponse>, Status>
PacketAcknowledgements returns all the packet acknowledgements associated with a channel.
Sourcepub async fn unreceived_packets(
&mut self,
request: impl IntoRequest<QueryUnreceivedPacketsRequest>,
) -> Result<Response<QueryUnreceivedPacketsResponse>, Status>
pub async fn unreceived_packets( &mut self, request: impl IntoRequest<QueryUnreceivedPacketsRequest>, ) -> Result<Response<QueryUnreceivedPacketsResponse>, Status>
UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences.
Sourcepub async fn unreceived_acks(
&mut self,
request: impl IntoRequest<QueryUnreceivedAcksRequest>,
) -> Result<Response<QueryUnreceivedAcksResponse>, Status>
pub async fn unreceived_acks( &mut self, request: impl IntoRequest<QueryUnreceivedAcksRequest>, ) -> Result<Response<QueryUnreceivedAcksResponse>, Status>
UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a channel and sequences.
Sourcepub async fn next_sequence_receive(
&mut self,
request: impl IntoRequest<QueryNextSequenceReceiveRequest>,
) -> Result<Response<QueryNextSequenceReceiveResponse>, Status>
pub async fn next_sequence_receive( &mut self, request: impl IntoRequest<QueryNextSequenceReceiveRequest>, ) -> Result<Response<QueryNextSequenceReceiveResponse>, Status>
NextSequenceReceive returns the next receive sequence for a given channel.
Sourcepub async fn next_sequence_send(
&mut self,
request: impl IntoRequest<QueryNextSequenceSendRequest>,
) -> Result<Response<QueryNextSequenceSendResponse>, Status>
pub async fn next_sequence_send( &mut self, request: impl IntoRequest<QueryNextSequenceSendRequest>, ) -> Result<Response<QueryNextSequenceSendResponse>, Status>
NextSequenceSend returns the next send sequence for a given channel.
Sourcepub async fn upgrade_error(
&mut self,
request: impl IntoRequest<QueryUpgradeErrorRequest>,
) -> Result<Response<QueryUpgradeErrorResponse>, Status>
pub async fn upgrade_error( &mut self, request: impl IntoRequest<QueryUpgradeErrorRequest>, ) -> Result<Response<QueryUpgradeErrorResponse>, Status>
UpgradeError returns the error receipt if the upgrade handshake failed.
Sourcepub async fn upgrade(
&mut self,
request: impl IntoRequest<QueryUpgradeRequest>,
) -> Result<Response<QueryUpgradeResponse>, Status>
pub async fn upgrade( &mut self, request: impl IntoRequest<QueryUpgradeRequest>, ) -> Result<Response<QueryUpgradeResponse>, Status>
Upgrade returns the upgrade for a given port and channel id.
Sourcepub async fn channel_params(
&mut self,
request: impl IntoRequest<QueryChannelParamsRequest>,
) -> Result<Response<QueryChannelParamsResponse>, Status>
pub async fn channel_params( &mut self, request: impl IntoRequest<QueryChannelParamsRequest>, ) -> Result<Response<QueryChannelParamsResponse>, Status>
ChannelParams queries all parameters of the ibc channel submodule.
Trait Implementations§
Source§impl<T: Clone> Clone for QueryClient<T>
impl<T: Clone> Clone for QueryClient<T>
Source§fn clone(&self) -> QueryClient<T>
fn clone(&self) -> QueryClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for QueryClient<T>
impl<T> RefUnwindSafe for QueryClient<T>where
T: RefUnwindSafe,
impl<T> Send for QueryClient<T>where
T: Send,
impl<T> Sync for QueryClient<T>where
T: Sync,
impl<T> Unpin for QueryClient<T>where
T: Unpin,
impl<T> UnwindSafe for QueryClient<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
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>
T in a tonic::Request