pub struct AccountID {
address: <<ILOCKmvp as ContractEnv>::Env as Environment>::AccountId,
}
Expand description
This is a type wrapper to implement Default method on AccountId type. Ink 4 stable eliminated AccountId Default (which was zero address, that has known private key) …we only really need this because Openbrush contract relies on deriving Default for contract storage, and our AccesData struct contains AccountId.
Fields§
§address: <<ILOCKmvp as ContractEnv>::Env as Environment>::AccountId
Trait Implementations§
source§impl Decode for AccountID
impl Decode for AccountID
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
source§impl Encode for AccountID
impl Encode for AccountID
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
source§fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl PartialEq<AccountID> for AccountID
impl PartialEq<AccountID> for AccountID
impl Copy for AccountID
impl EncodeLike<AccountID> for AccountID
impl Eq for AccountID
impl StructuralEq for AccountID
impl StructuralPartialEq for AccountID
Auto Trait Implementations§
impl RefUnwindSafe for AccountID
impl Send for AccountID
impl Sync for AccountID
impl Unpin for AccountID
impl UnwindSafe for AccountID
Blanket Implementations§
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere T: Decode,
§impl<T> Flush for Twhere
T: Storable + StorageKey,
impl<T> Flush for Twhere T: Storable + StorageKey,
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere T: Codec,
§impl<P> Storable for Pwhere
P: Codec,
impl<P> Storable for Pwhere P: Codec,
§impl<P, Key> StorableHint<Key> for Pwhere
P: Packed,
Key: StorageKey,
impl<P, Key> StorableHint<Key> for Pwhere P: Packed, Key: StorageKey,
§type PreferredKey = AutoKey
type PreferredKey = AutoKey
The storage key that the type prefers. It can be overwritten by an auto-generated storage key.