pub struct ActorId(/* private fields */);Expand description
Program (actor) identifier.
Gear allows user and program interactions via messages. Source and target
program as well as user are represented by 256-bit identifier ActorId
struct. The source ActorId for a message being processed can be obtained
using gstd::msg::source() function. Also, each send function has a target
ActorId as one of the arguments.
NOTE: Implementation of From<u64> places bytes from idx=12 for Eth compatibility.
Implementations§
Source§impl ActorId
impl ActorId
Sourcepub fn to_ss58check(&self) -> Result<Ss58Address, ConversionError>
pub fn to_ss58check(&self) -> Result<Ss58Address, ConversionError>
Returns the ss58-check address with default ss58 version.
Sourcepub fn to_ss58check_with_version(
&self,
version: u16,
) -> Result<Ss58Address, ConversionError>
pub fn to_ss58check_with_version( &self, version: u16, ) -> Result<Ss58Address, ConversionError>
Returns the ss58-check address with given ss58 version.
Sourcepub fn to_address_lossy(&self) -> H160
pub fn to_address_lossy(&self) -> H160
Returns H160 with possible loss of the first 12 bytes.
Trait Implementations§
Source§impl<__AsT: ?Sized> AsMut<__AsT> for ActorId
impl<__AsT: ?Sized> AsMut<__AsT> for ActorId
Source§fn as_mut(&mut self) -> &mut __AsT
fn as_mut(&mut self) -> &mut __AsT
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl Ord for ActorId
impl Ord for ActorId
Source§impl PartialOrd for ActorId
impl PartialOrd for ActorId
impl Copy for ActorId
impl Eq for ActorId
impl Pod for ActorId
impl StructuralPartialEq for ActorId
Auto Trait Implementations§
impl Freeze for ActorId
impl RefUnwindSafe for ActorId
impl Send for ActorId
impl Sync for ActorId
impl Unpin for ActorId
impl UnwindSafe for ActorId
Blanket Implementations§
Source§impl<T, U> AsByteSlice<T> for U
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8] ⓘ
Source§impl<T, U> AsMutByteSlice<T> for U
impl<T, U> AsMutByteSlice<T> for U
fn as_mut_byte_slice(&mut self) -> &mut [u8] ⓘ
Source§impl<U> AsMutSliceOf for U
impl<U> AsMutSliceOf for U
fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error>where
T: FromByteSlice,
Source§impl<U> AsSliceOf for U
impl<U> AsSliceOf for U
fn as_slice_of<T>(&self) -> Result<&[T], Error>where
T: FromByteSlice,
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)