Struct Packet
pub struct Packet {
pub sequence: Sequence,
pub port_on_a: PortId,
pub chan_on_a: ChannelId,
pub port_on_b: PortId,
pub chan_on_b: ChannelId,
pub data: Vec<u8>,
pub timeout_height_on_b: TimeoutHeight,
pub timeout_timestamp_on_b: Timestamp,
}
Fields§
§sequence: Sequence
§port_on_a: PortId
§chan_on_a: ChannelId
§port_on_b: PortId
§chan_on_b: ChannelId
§data: Vec<u8>
§timeout_height_on_b: TimeoutHeight
§timeout_timestamp_on_b: Timestamp
Implementations§
§impl Packet
impl Packet
pub fn timed_out(
&self,
dst_chain_ts: &Timestamp,
dst_chain_height: Height,
) -> bool
pub fn timed_out( &self, dst_chain_ts: &Timestamp, dst_chain_height: Height, ) -> bool
Checks whether a packet from a
SendPacket
event is timed-out relative to the current state of the
destination chain.
Checks both for time-out relative to the destination chain’s
current timestamp dst_chain_ts
as well as relative to
the height dst_chain_height
.
Note: a timed-out packet should result in a
MsgTimeout
,
instead of the common-case where it results in
MsgRecvPacket
.
Trait Implementations§
impl Eq for Packet
impl StructuralPartialEq for Packet
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Wrap the input message
T
in a tonic::Request