Struct QueryClient

pub struct QueryClient<T> { /* private fields */ }
Expand description

Query provides defines the gRPC querier service

Implementations§

§

impl QueryClient<Channel>

pub async fn connect<D>(dst: D) -> Result<QueryClient<Channel>, Error>
where D: TryInto<Endpoint>, <D as TryInto<Endpoint>>::Error: Into<Box<dyn Error + Sync + Send>>,

Attempt to create a new client by connecting to a given endpoint.

§

impl<T> QueryClient<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) -> QueryClient<T>

pub fn with_origin(inner: T, origin: Uri) -> QueryClient<T>

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> QueryClient<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,

pub fn send_compressed(self, encoding: CompressionEncoding) -> QueryClient<T>

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

pub fn accept_compressed(self, encoding: CompressionEncoding) -> QueryClient<T>

Enable decompressing responses.

pub fn max_decoding_message_size(self, limit: usize) -> QueryClient<T>

Limits the maximum size of a decoded message.

Default: 4MB

pub fn max_encoding_message_size(self, limit: usize) -> QueryClient<T>

Limits the maximum size of an encoded message.

Default: usize::MAX

pub async fn channel( &mut self, request: impl IntoRequest<QueryChannelRequest>, ) -> Result<Response<QueryChannelResponse>, Status>

Channel queries an IBC Channel.

pub async fn channels( &mut self, request: impl IntoRequest<QueryChannelsRequest>, ) -> Result<Response<QueryChannelsResponse>, Status>

Channels queries all the IBC channels of a chain.

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.

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.

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.

pub async fn packet_commitment( &mut self, request: impl IntoRequest<QueryPacketCommitmentRequest>, ) -> Result<Response<QueryPacketCommitmentResponse>, Status>

PacketCommitment queries a stored packet commitment hash.

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.

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

pub async fn packet_acknowledgement( &mut self, request: impl IntoRequest<QueryPacketAcknowledgementRequest>, ) -> Result<Response<QueryPacketAcknowledgementResponse>, Status>

PacketAcknowledgement queries a stored packet acknowledgement hash.

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.

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.

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.

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.

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.

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.

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.

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§

§

impl<T> Clone for QueryClient<T>
where T: Clone,

§

fn clone(&self) -> QueryClient<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T> Debug for QueryClient<T>
where T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T