Struct ChannelQueryService

Source
pub struct ChannelQueryService<I>
where I: QueryContext + Send + Sync + 'static, ConsensusStateRef<I>: Into<Any>,
{ /* private fields */ }
Expand description

The generic I must be a type where writes from one thread are readable from another. This means using Arc<Mutex<_>> or Arc<RwLock<_>> in most cases.

Implementations§

Source§

impl<I> ChannelQueryService<I>
where I: QueryContext + Send + Sync + 'static, ConsensusStateRef<I>: Into<Any>,

Source

pub fn new(ibc_context: I) -> Self

The parameter ibc_context must be a type where writes from one thread are readable from another. This means using Arc<Mutex<_>> or Arc<RwLock<_>> in most cases.

Trait Implementations§

Source§

impl<I> Query for ChannelQueryService<I>
where I: QueryContext + Send + Sync + 'static, ConsensusStateRef<I>: Into<Any>,

Source§

fn packet_acknowledgements<'life0, 'async_trait>( &'life0 self, request: Request<QueryPacketAcknowledgementsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryPacketAcknowledgementsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns all the acknowledgements if sequences are omitted.

Source§

fn unreceived_packets<'life0, 'async_trait>( &'life0 self, request: Request<QueryUnreceivedPacketsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryUnreceivedPacketsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns all the unreceived packets if sequences are omitted.

Source§

fn unreceived_acks<'life0, 'async_trait>( &'life0 self, request: Request<QueryUnreceivedAcksRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryUnreceivedAcksResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns all the unreceived acknowledgements if sequences are omitted.

Source§

fn channel<'life0, 'async_trait>( &'life0 self, request: Request<QueryChannelRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryChannelResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Channel queries an IBC Channel.
Source§

fn channels<'life0, 'async_trait>( &'life0 self, request: Request<QueryChannelsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryChannelsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Channels queries all the IBC channels of a chain.
Source§

fn connection_channels<'life0, 'async_trait>( &'life0 self, request: Request<QueryConnectionChannelsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryConnectionChannelsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ConnectionChannels queries all the channels associated with a connection end.
Source§

fn channel_client_state<'life0, 'async_trait>( &'life0 self, request: Request<QueryChannelClientStateRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryChannelClientStateResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ChannelClientState queries for the client state for the channel associated with the provided channel identifiers.
Source§

fn channel_consensus_state<'life0, 'async_trait>( &'life0 self, request: Request<QueryChannelConsensusStateRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryChannelConsensusStateResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers.
Source§

fn packet_commitment<'life0, 'async_trait>( &'life0 self, request: Request<QueryPacketCommitmentRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryPacketCommitmentResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

PacketCommitment queries a stored packet commitment hash.
Source§

fn packet_commitments<'life0, 'async_trait>( &'life0 self, request: Request<QueryPacketCommitmentsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryPacketCommitmentsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

PacketCommitments returns all the packet commitments hashes associated with a channel.
Source§

fn packet_receipt<'life0, 'async_trait>( &'life0 self, request: Request<QueryPacketReceiptRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryPacketReceiptResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

PacketReceipt queries if a given packet sequence has been received on the queried chain
Source§

fn packet_acknowledgement<'life0, 'async_trait>( &'life0 self, request: Request<QueryPacketAcknowledgementRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryPacketAcknowledgementResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

PacketAcknowledgement queries a stored packet acknowledgement hash.
Source§

fn next_sequence_receive<'life0, 'async_trait>( &'life0 self, request: Request<QueryNextSequenceReceiveRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryNextSequenceReceiveResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

NextSequenceReceive returns the next receive sequence for a given channel.
Source§

fn next_sequence_send<'life0, 'async_trait>( &'life0 self, request: Request<QueryNextSequenceSendRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryNextSequenceSendResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

NextSequenceSend returns the next send sequence for a given channel.
Source§

fn upgrade_error<'life0, 'async_trait>( &'life0 self, _request: Request<QueryUpgradeErrorRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryUpgradeErrorResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

UpgradeError returns the error receipt if the upgrade handshake failed.
Source§

fn upgrade<'life0, 'async_trait>( &'life0 self, _request: Request<QueryUpgradeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryUpgradeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Upgrade returns the upgrade for a given port and channel id.
Source§

fn channel_params<'life0, 'async_trait>( &'life0 self, _request: Request<QueryChannelParamsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryChannelParamsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ChannelParams queries all parameters of the ibc channel submodule.

Auto Trait Implementations§

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
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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

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

impl<T, Raw> IntoResponse<Raw> for T
where T: Into<Raw>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T, C> Convertible<C> for T
where T: TryFrom<C> + Into<C>,

Source§

impl<T> JsonSchemaMaybe for T