pub struct MsgEnvelope {
pub cur_addr: IntermediateAddr,
pub next_addr: IntermediateAddr,
pub fwd_fee_remaining: Tokens,
pub message: Lazy<OwnedMessage>,
}Expand description
Message with routing information.
Fields§
§cur_addr: IntermediateAddrCurrent address.
next_addr: IntermediateAddrNext-hop address.
fwd_fee_remaining: TokensRemaining transit fee.
message: Lazy<OwnedMessage>The message itself.
Implementations§
Source§impl MsgEnvelope
impl MsgEnvelope
Sourcepub fn load_message_info(&self) -> Result<IntMsgInfo, Error>
pub fn load_message_info(&self) -> Result<IntMsgInfo, Error>
Load only message info.
Sourcepub fn load_message(&self) -> Result<Message<'_>, Error>
pub fn load_message(&self) -> Result<Message<'_>, Error>
Load a non-owned message.
Sourcepub fn load_message_owned(&self) -> Result<OwnedMessage, Error>
pub fn load_message_owned(&self) -> Result<OwnedMessage, Error>
Load an owned message.
Sourcepub fn message_hash(&self) -> &HashBytes
pub fn message_hash(&self) -> &HashBytes
Returns a hash of the message.
Sourcepub fn collect_fee(&mut self, fee: Tokens) -> bool
pub fn collect_fee(&mut self, fee: Tokens) -> bool
Tries to substract transfer fee from envelope.
Trait Implementations§
Source§impl Clone for MsgEnvelope
impl Clone for MsgEnvelope
Source§fn clone(&self) -> MsgEnvelope
fn clone(&self) -> MsgEnvelope
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MsgEnvelope
impl Debug for MsgEnvelope
Source§impl<'tlb> Load<'tlb> for MsgEnvelope
impl<'tlb> Load<'tlb> for MsgEnvelope
Source§impl PartialEq for MsgEnvelope
impl PartialEq for MsgEnvelope
Source§impl Serialize for MsgEnvelope
impl Serialize for MsgEnvelope
Source§impl Store for MsgEnvelope
impl Store for MsgEnvelope
Source§fn store_into(
&self,
__builder: &mut CellBuilder,
__context: &dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, __builder: &mut CellBuilder, __context: &dyn CellContext, ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl Eq for MsgEnvelope
impl StructuralPartialEq for MsgEnvelope
Auto Trait Implementations§
impl Freeze for MsgEnvelope
impl !RefUnwindSafe for MsgEnvelope
impl Send for MsgEnvelope
impl Sync for MsgEnvelope
impl Unpin for MsgEnvelope
impl !UnwindSafe for MsgEnvelope
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
Compares
self to key and returns true if they are equal.