Enum ibc_relayer::object::Object
source · [−]pub enum Object {
Client(Client),
Connection(Connection),
Channel(Channel),
Packet(Packet),
Wallet(Wallet),
}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 IbcEvents 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
Implementations
sourceimpl 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
sourceimpl 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
) -> Result<Self, ObjectError>
pub fn channel_from_chan_open_events(
attributes: &Attributes,
src_chain: &impl ChainHandle
) -> Result<Self, ObjectError>
Build the Channel object associated with the given
Open channel event.
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.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Object
impl<'de> Deserialize<'de> for Object
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Connection> for Object
impl From<Connection> for Object
sourcefn from(c: Connection) -> Self
fn from(c: Connection) -> Self
Converts to this type from the input type.
sourceimpl Ord for Object
impl Ord for Object
sourceimpl PartialOrd<Object> for Object
impl PartialOrd<Object> for Object
sourcefn partial_cmp(&self, other: &Object) -> Option<Ordering>
fn partial_cmp(&self, other: &Object) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for Object
impl StructuralEq for Object
impl StructuralPartialEq for Object
Auto Trait Implementations
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T in a tonic::Request
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more