Struct AccountId
pub struct AccountId(pub [u8; 32]);
Expand description
The default environment AccountId
type.
§Note
This is a mirror of the AccountId
type used in the default configuration
of PALLET contracts.
Tuple Fields§
§0: [u8; 32]
Trait Implementations§
§impl Decode for AccountId
impl Decode for AccountId
§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<AccountId, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<AccountId, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§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
§impl DecodeAsFields for AccountId
impl DecodeAsFields for AccountId
§fn decode_as_fields<R, 'info>(
input: &mut &[u8],
fields: &mut dyn FieldIter<'info, <R as TypeResolver>::TypeId, Item = Field<'info, <R as TypeResolver>::TypeId>>,
types: &'info R,
) -> Result<AccountId, Error>where
R: TypeResolver,
fn decode_as_fields<R, 'info>(
input: &mut &[u8],
fields: &mut dyn FieldIter<'info, <R as TypeResolver>::TypeId, Item = Field<'info, <R as TypeResolver>::TypeId>>,
types: &'info R,
) -> Result<AccountId, Error>where
R: TypeResolver,
Given some bytes and some fields denoting their structure, attempt to decode.
§impl Encode for AccountId
impl Encode for AccountId
§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
Convert self to a slice and append it to the destination.
§fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
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
§impl EncodeAsFields for AccountId
impl EncodeAsFields for AccountId
§fn encode_as_fields_to<ScaleEncodeResolver>(
&self,
__encode_as_type_fields: &mut dyn FieldIter<'_, <ScaleEncodeResolver as TypeResolver>::TypeId, Item = Field<'_, <ScaleEncodeResolver as TypeResolver>::TypeId>>,
__encode_as_type_types: &ScaleEncodeResolver,
__encode_as_type_out: &mut Vec<u8>,
) -> Result<(), Error>where
ScaleEncodeResolver: TypeResolver,
fn encode_as_fields_to<ScaleEncodeResolver>(
&self,
__encode_as_type_fields: &mut dyn FieldIter<'_, <ScaleEncodeResolver as TypeResolver>::TypeId, Item = Field<'_, <ScaleEncodeResolver as TypeResolver>::TypeId>>,
__encode_as_type_types: &ScaleEncodeResolver,
__encode_as_type_out: &mut Vec<u8>,
) -> Result<(), Error>where
ScaleEncodeResolver: TypeResolver,
Given some fields describing the shape of a type, attempt to encode to that shape.
§fn encode_as_fields<R>(
&self,
fields: &mut dyn FieldIter<'_, <R as TypeResolver>::TypeId, Item = Field<'_, <R as TypeResolver>::TypeId>>,
types: &R,
) -> Result<Vec<u8>, Error>where
R: TypeResolver,
fn encode_as_fields<R>(
&self,
fields: &mut dyn FieldIter<'_, <R as TypeResolver>::TypeId, Item = Field<'_, <R as TypeResolver>::TypeId>>,
types: &R,
) -> Result<Vec<u8>, Error>where
R: TypeResolver,
This is a helper function which internally calls [
EncodeAsFields::encode_as_fields_to
]. Prefer to
implement that instead.§impl EncodeAsType for AccountId
impl EncodeAsType for AccountId
§fn encode_as_type_to<ScaleEncodeResolver>(
&self,
__encode_as_type_type_id: <ScaleEncodeResolver as TypeResolver>::TypeId,
__encode_as_type_types: &ScaleEncodeResolver,
__encode_as_type_out: &mut Vec<u8>,
) -> Result<(), Error>where
ScaleEncodeResolver: TypeResolver,
fn encode_as_type_to<ScaleEncodeResolver>(
&self,
__encode_as_type_type_id: <ScaleEncodeResolver as TypeResolver>::TypeId,
__encode_as_type_types: &ScaleEncodeResolver,
__encode_as_type_out: &mut Vec<u8>,
) -> Result<(), Error>where
ScaleEncodeResolver: TypeResolver,
Given some
type_id
, types
, a context
and some output target for the SCALE encoded bytes,
attempt to SCALE encode the current value into the type given by type_id
.§impl IntoVisitor for AccountId
impl IntoVisitor for AccountId
§type AnyVisitor<ScaleDecodeTypeResolver: TypeResolver> = Visitor<ScaleDecodeTypeResolver>
type AnyVisitor<ScaleDecodeTypeResolver: TypeResolver> = Visitor<ScaleDecodeTypeResolver>
The visitor type used to decode SCALE encoded bytes to
Self
.§fn into_visitor<ScaleDecodeTypeResolver>() -> <AccountId as IntoVisitor>::AnyVisitor<ScaleDecodeTypeResolver>where
ScaleDecodeTypeResolver: TypeResolver,
fn into_visitor<ScaleDecodeTypeResolver>() -> <AccountId as IntoVisitor>::AnyVisitor<ScaleDecodeTypeResolver>where
ScaleDecodeTypeResolver: TypeResolver,
A means of obtaining this visitor.
§impl MaxEncodedLen for AccountId
impl MaxEncodedLen for AccountId
§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
§impl Ord for AccountId
impl Ord for AccountId
§impl PartialOrd for AccountId
impl PartialOrd for AccountId
§impl<'a> TryFrom<&'a [u8]> for AccountId
impl<'a> TryFrom<&'a [u8]> for AccountId
§type Error = TryFromSliceError
type Error = TryFromSliceError
The type returned in the event of a conversion error.
impl AccountIdGuard for AccountId
The ink! provided AccountId
used in the DefaultEnvironment
.
impl Copy for AccountId
impl EncodeLike for AccountId
impl Eq for AccountId
impl StructuralPartialEq for AccountId
Auto Trait Implementations§
impl Freeze for AccountId
impl RefUnwindSafe for AccountId
impl Send for AccountId
impl Sync for AccountId
impl Unpin for AccountId
impl UnwindSafe for AccountId
Blanket Implementations§
§impl<T, U> AsByteSlice<T> for U
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8] ⓘ
§impl<T, U> AsMutByteSlice<T> for U
impl<T, U> AsMutByteSlice<T> for U
fn as_mut_byte_slice(&mut self) -> &mut [u8] ⓘ
§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,
§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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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> DecodeAsType for Twhere
T: IntoVisitor,
impl<T> DecodeAsType for Twhere
T: IntoVisitor,
fn decode_as_type_maybe_compact<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
is_compact: bool,
) -> Result<T, Error>where
R: TypeResolver,
§fn decode_as_type<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Self, Error>where
R: TypeResolver,
fn decode_as_type<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Self, Error>where
R: TypeResolver,
Given some input bytes, a
type_id
, and type registry, attempt to decode said bytes into
Self
. Implementations should modify the &mut
reference to the bytes such that any bytes
not used in the course of decoding are still pointed to after decoding is complete.§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<T> DefensiveMax<T> for Twhere
T: PartialOrd,
impl<T> DefensiveMax<T> for Twhere
T: PartialOrd,
§fn defensive_max(self, other: T) -> T
fn defensive_max(self, other: T) -> T
§fn defensive_strict_max(self, other: T) -> T
fn defensive_strict_max(self, other: T) -> T
§impl<T> DefensiveMin<T> for Twhere
T: PartialOrd,
impl<T> DefensiveMin<T> for Twhere
T: PartialOrd,
§fn defensive_min(self, other: T) -> T
fn defensive_min(self, other: T) -> T
§fn defensive_strict_min(self, other: T) -> T
fn defensive_strict_min(self, other: T) -> T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<P> Storable for Pwhere
P: Codec,
impl<P> Storable for Pwhere
P: Codec,
§fn encode<T>(&self, dest: &mut T)where
T: Output + ?Sized,
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,
fn decode<I>(input: &mut I) -> Result<P, Error>where
I: Input,
Attempt to deserialize the value from input.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
The exact number of bytes this type consumes in the encoded form.
§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.
§impl<P> StorageKey for Pwhere
P: Packed,
impl<P> StorageKey for Pwhere
P: Packed,
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
)§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.