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 Clone for AccountID

source§

fn clone(&self) -> AccountID

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for AccountID

source§

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

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

impl Decode for AccountID

source§

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,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl Default for AccountID

source§

fn default() -> AccountID

Returns the “default value” for a type. Read more
source§

impl Encode for AccountID

source§

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 encode(&self) -> Vec<u8>

Convert self to an owned vector.
source§

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 size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl PartialEq<AccountID> for AccountID

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StorageLayout for AccountID

source§

fn layout(__key: &Key) -> Layout

Returns the static storage layout of Self. Read more
source§

impl TypeInfo for AccountID

§

type Identity = AccountID

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl Copy for AccountID

source§

impl EncodeLike<AccountID> for AccountID

source§

impl Eq for AccountID

source§

impl StructuralEq for AccountID

source§

impl StructuralPartialEq for AccountID

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> DecodeAll for Twhere T: Decode,

§

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,

§

fn decode_all_with_depth_limit( limit: u32, input: &mut &[u8] ) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
§

fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>where I: Input,

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. Read more
§

impl<T> DefaultEnv for T

§

fn env() -> EnvAccess<'static, DefaultEnvironment>

§

impl<T> Flush for Twhere T: Storable + StorageKey,

§

fn flush(&self)

Method flushes the current state of Self into storage. ink! recursively calculate a key of each field. So if you want to flush the correct state of the contract, you have to this method on storage struct.
§

fn load(&mut self)

Method loads the current state of Self from storage. ink! recursively calculate a key of each field. So if you want to load the correct state of the contract, you have to this method on storage struct.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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.

§

impl<T> KeyedVec for Twhere T: Codec,

§

fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8, Global>

Return an encoding of Self prepended by given slice.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<P> Storable for Pwhere P: Codec,

§

fn encode<T>(&self, dest: &mut T)where T: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn decode<I>(input: &mut I) -> Result<P, Error>where I: Input,

Attempt to deserialize the value from input.
§

impl<P, Key> StorableHint<Key> for Pwhere P: Packed, Key: StorageKey,

§

type Type = P

Storable type with storage key inside.
§

type PreferredKey = AutoKey

The storage key that the type prefers. It can be overwritten by an auto-generated storage key.
§

impl<T> StorageAsMut for Twhere T: StorageAsRef,

§

fn data<Data>(&mut self) -> &mut Datawhere Data: OccupyStorage, Self: Storage<Data>,

§

impl<T> StorageAsRef for T

§

fn data<Data>(&self) -> &Datawhere Data: OccupyStorage, Self: Storage<Data>,

§

impl<P> StorageKey for Pwhere P: Packed,

§

const KEY: u32 = 0u32

Storage key of the type.
§

fn key(&self) -> u32

Returns the storage key.
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<S> Codec for Swhere S: Decode + Encode,

§

impl<T> EncodeLike<&&T> for Twhere T: Encode,

§

impl<T> EncodeLike<&T> for Twhere T: Encode,

§

impl<T> EncodeLike<&mut T> for Twhere T: Encode,

§

impl<T> EncodeLike<Arc<T>> for Twhere T: Encode,

§

impl<T> EncodeLike<Box<T, Global>> for Twhere T: Encode,

§

impl<'a, T> EncodeLike<Cow<'a, T>> for Twhere T: ToOwned + Encode,

§

impl<T> EncodeLike<Rc<T>> for Twhere T: Encode,

§

impl<S> FullCodec for Swhere S: Decode + FullEncode,

§

impl<S> FullEncode for Swhere S: Encode + EncodeLike<S>,

§

impl<T> JsonSchemaMaybe for T

§

impl<P> Packed for Pwhere P: Decode + Encode,

§

impl<T> StaticTypeInfo for Twhere T: TypeInfo + 'static,