Skip to main content

PackedAddress

Struct PackedAddress 

Source
pub struct PackedAddress<Address>(/* private fields */);
Expand description

Address wrapper for ExecutionError with an alignment of 4 rather than its natural one.

This is needed for ExecutionResult that contains ExecutionError to fit within 16 bytes or two native registers on 64-bit platforms.

Implementations§

Source§

impl<Address> PackedAddress<Address>
where Address: Copy,

Source

pub const fn new(address: Address) -> Self

Create a new instance

Source

pub const fn get(self) -> Address

Read the address back

Trait Implementations§

Source§

impl<Address: Clone + Copy> Clone for PackedAddress<Address>

Source§

fn clone(&self) -> PackedAddress<Address>

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<Address: Copy> Copy for PackedAddress<Address>

Source§

impl<Address> Debug for PackedAddress<Address>
where Address: Debug + Copy,

Source§

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

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

impl<Address> Display for PackedAddress<Address>
where Address: Display + Copy,

Source§

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

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

impl<Address: Eq + Copy> Eq for PackedAddress<Address>

Source§

impl<Address> From<Address> for PackedAddress<Address>
where Address: Copy,

Source§

fn from(address: Address) -> Self

Converts to this type from the input type.
Source§

impl<Address> LowerHex for PackedAddress<Address>
where Address: LowerHex + Copy,

Source§

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

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

impl<Address: PartialEq + Copy> PartialEq for PackedAddress<Address>

Source§

fn eq(&self, other: &PackedAddress<Address>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<Address: PartialEq> StructuralPartialEq for PackedAddress<Address>

Auto Trait Implementations§

§

impl<Address> Freeze for PackedAddress<Address>
where Address: Freeze,

§

impl<Address> RefUnwindSafe for PackedAddress<Address>
where Address: RefUnwindSafe,

§

impl<Address> Send for PackedAddress<Address>
where Address: Send,

§

impl<Address> Sync for PackedAddress<Address>
where Address: Sync,

§

impl<Address> Unpin for PackedAddress<Address>
where Address: Unpin,

§

impl<Address> UnsafeUnpin for PackedAddress<Address>
where Address: UnsafeUnpin,

§

impl<Address> UnwindSafe for PackedAddress<Address>
where Address: UnwindSafe,

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<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.