Skip to main content

MsgAddress

Enum MsgAddress 

Source
pub enum MsgAddress {
    None,
    Std {
        workchain: i8,
        account: [u8; 32],
    },
}
Expand description

The cell model a decoded account carries, defined in ton-net-cell and surfaced here.

The list is the closure of one rule over the cell model: a type a method on a re-exported cell type answers with is nameable here, or that method is unusable through the facade. An Account carries its code and data as Cells, and from a Cell the answers this reaches are a Slice from Cell::parse, an Identity from Cell::identity, a Builder from Cell::to_builder, and a CellError from every read that can fail. Types a cell answers with that need no name of their own, a Vec<u8> from Cell::to_boc and a String from Cell::dump, are outside it. A Slice adds the Dict that Slice::load_dict answers with, the Lookup, DictEntry and DictIter that a dictionary is read through, and the MsgAddress that Slice::load_address reads.

MsgAddress is the wire form an address takes inside a message, which is not Address: that one is the form a person writes and a caller parses.

The block layer is not closed the same way. Account::decode answers with a BlockError, which is not nameable here, so a caller reads that failure through the From conversion into Error rather than by naming it. Closing that is a separate decision about which layer’s error a consumer sees.

What the rule does not pull in stays out. The augmented and prefix dictionaries, the proof builders, and the streaming readers are reachable from no method on a type this crate returns, so a consumer whose need is the cell engine on its own depends on ton-net-cell rather than finding half of it here. An account address, as a message carries it.

Variants§

§

None

No account, the form an empty source or an uninitialised destination takes.

§

Std

A standard internal address: a workchain and the account id within it.

Fields

§workchain: i8

The workchain the account lives in.

§account: [u8; 32]

The account id, a 256-bit hash.

Trait Implementations§

Source§

impl Clone for MsgAddress

Source§

fn clone(&self) -> MsgAddress

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MsgAddress

Source§

impl Debug for MsgAddress

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for MsgAddress

Source§

impl PartialEq for MsgAddress

Source§

fn eq(&self, other: &MsgAddress) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MsgAddress

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.