MessageDataRef

Struct MessageDataRef 

Source
pub struct MessageDataRef<'a> {
    pub msg_hash: &'a [u8; 32],
    pub total_fee: u128,
    pub selector: &'a [u8; 32],
    pub sender_addr: &'a [u8],
    pub dest_addr: Pubkey,
    pub payload: &'a [u8],
    pub reserved: &'a [u8],
    pub transmitter_params: &'a [u8],
    pub src_chain_id: u128,
    pub src_block_number: u128,
    pub src_op_tx_id: &'a [[u8; 32]; 2],
}
Expand description

Non-owned Message Data and message hash.

Fields§

§msg_hash: &'a [u8; 32]

The hash of the message.

§total_fee: u128§selector: &'a [u8; 32]

The encoded target function selector.

§sender_addr: &'a [u8]

Sender contract address.

§dest_addr: Pubkey

Destination contract address.

§payload: &'a [u8]

The message payload.

§reserved: &'a [u8]

Reserved field for future use.

§transmitter_params: &'a [u8]

Additional transmitter parameters.

§src_chain_id: u128

Source chain identifier.

§src_block_number: u128

Proposal transaction block number.

§src_op_tx_id: &'a [[u8; 32]; 2]

Proposal transaction ID.

Implementations§

Source§

impl MessageDataRef<'_>

Source

pub unsafe fn load(msg_data_ptr: *const u8, msg_data_len: usize) -> Self

Parse MessageDataRef out of the raw pointer and length.

§Safety
  • msg_data_ptr must point to at least msg_data_len bytes of valid, initialized memory that must remain alive and immutable for the duration of its use.

Auto Trait Implementations§

§

impl<'a> Freeze for MessageDataRef<'a>

§

impl<'a> RefUnwindSafe for MessageDataRef<'a>

§

impl<'a> Send for MessageDataRef<'a>

§

impl<'a> Sync for MessageDataRef<'a>

§

impl<'a> Unpin for MessageDataRef<'a>

§

impl<'a> UnwindSafe for MessageDataRef<'a>

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, 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> 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