Enum ibc_relayer::object::Object
source · pub enum Object {
Client(Client),
Connection(Connection),
Channel(Channel),
Packet(Packet),
Wallet(Wallet),
CrossChainQuery(CrossChainQuery),
}
Expand description
An object determines the amount of parallelism that can
be exercised when processing IbcEvent
between two chains. For each Object
, a corresponding
WorkerHandle
is spawned and all IbcEvent
s mapped
to an Object
are sent to the associated WorkerHandle
for processing.
Variants§
Client(Client)
See Client
.
Connection(Connection)
See Connection
.
Channel(Channel)
See Channel
.
Packet(Packet)
See Packet
.
Wallet(Wallet)
See Wallet
CrossChainQuery(CrossChainQuery)
See CrossChainQuery
Implementations§
source§impl Object
impl Object
sourcepub fn notify_new_block(&self, src_chain_id: &ChainId) -> bool
pub fn notify_new_block(&self, src_chain_id: &ChainId) -> bool
Returns true
if this Object
is for a WorkerHandle
which is interested in new block events originating from the chain with
the given ChainId
. Returns false
otherwise.
sourcepub fn for_chain(&self, chain_id: &ChainId) -> bool
pub fn for_chain(&self, chain_id: &ChainId) -> bool
Returns whether or not this object pertains to the given chain.
sourcepub fn object_type(&self) -> ObjectType
pub fn object_type(&self) -> ObjectType
Return the type of object
source§impl Object
impl Object
pub fn src_chain_id(&self) -> &ChainId
pub fn dst_chain_id(&self) -> &ChainId
pub fn short_name(&self) -> String
sourcepub fn for_update_client(
e: &UpdateClient,
dst_chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn for_update_client( e: &UpdateClient, dst_chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the object associated with the given UpdateClient
event.
sourcepub fn client_from_chan_open_events(
e: &Attributes,
chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn client_from_chan_open_events( e: &Attributes, chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the client object associated with the given channel event attributes.
sourcepub fn connection_from_conn_open_events(
e: &ConnectionAttributes,
src_chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn connection_from_conn_open_events( e: &ConnectionAttributes, src_chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the Connection object associated with the given
Open
connection event.
sourcepub fn channel_from_chan_open_events(
attributes: &Attributes,
src_chain: &impl ChainHandle,
allow_non_open_connection: bool,
) -> Result<Self, ObjectError>
pub fn channel_from_chan_open_events( attributes: &Attributes, src_chain: &impl ChainHandle, allow_non_open_connection: bool, ) -> Result<Self, ObjectError>
Build the Channel object associated with the given
Open
channel event.
pub fn channel_from_chan_upgrade_events( attributes: &UpgradeAttributes, src_chain: &impl ChainHandle, allow_non_open_connection: bool, ) -> Result<Self, ObjectError>
sourcepub fn for_send_packet(
e: &SendPacket,
src_chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn for_send_packet( e: &SendPacket, src_chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the object associated with the given SendPacket
event.
sourcepub fn for_write_ack(
e: &WriteAcknowledgement,
src_chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn for_write_ack( e: &WriteAcknowledgement, src_chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the object associated with the given WriteAcknowledgement
event.
sourcepub fn for_timeout_packet(
e: &TimeoutPacket,
src_chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn for_timeout_packet( e: &TimeoutPacket, src_chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the object associated with the given TimeoutPacket
event.
sourcepub fn for_close_init_channel(
e: &CloseInit,
src_chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn for_close_init_channel( e: &CloseInit, src_chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the object associated with the given CloseInit
event.
sourcepub fn for_cross_chain_query_packet(
p: &CrossChainQueryPacket,
src_chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn for_cross_chain_query_packet( p: &CrossChainQueryPacket, src_chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the object associated with the given CrossChainQuery
event.
sourcepub fn for_incentivized_packet(
e: &IncentivizedPacket,
src_chain: &impl ChainHandle,
) -> Result<Self, ObjectError>
pub fn for_incentivized_packet( e: &IncentivizedPacket, src_chain: &impl ChainHandle, ) -> Result<Self, ObjectError>
Build the object associated with the given IncentivizedPacket
event.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Object
impl<'de> Deserialize<'de> for Object
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<Connection> for Object
impl From<Connection> for Object
source§fn from(c: Connection) -> Self
fn from(c: Connection) -> Self
source§impl From<CrossChainQuery> for Object
impl From<CrossChainQuery> for Object
source§fn from(c: CrossChainQuery) -> Self
fn from(c: CrossChainQuery) -> Self
source§impl Ord for Object
impl Ord for Object
source§impl PartialEq for Object
impl PartialEq for Object
source§impl PartialOrd for Object
impl PartialOrd for Object
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Object
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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> 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>
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>
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>
T
in a tonic::Request