pub struct AccountID(/* private fields */);Expand description
Account ID is a unique integer identifier for an account. Every account has one and only one account identifier. This is distinct from an account’s “address”. An account may actually have multiple addresses in different “address spaces” from the point of view of an external user, but an account always has one unique account ID. The account ID zero is reserved for the “null account” meaning that the account is not valid or does not exist.
Implementations§
Trait Implementations§
Source§impl KeyFieldValue for AccountID
impl KeyFieldValue for AccountID
Source§fn encode<'a>(
key: &<AccountID as ObjectFieldValue>::In<'a>,
writer: &mut ReverseSliceWriter<'_>,
) -> Result<(), EncodeError>
fn encode<'a>( key: &<AccountID as ObjectFieldValue>::In<'a>, writer: &mut ReverseSliceWriter<'_>, ) -> Result<(), EncodeError>
Encode the key segment as a non-terminal segment.
Source§fn decode<'a>(
reader: &mut &'a [u8],
memory_manager: &'a MemoryManager,
) -> Result<<AccountID as ObjectFieldValue>::Out<'a>, DecodeError>
fn decode<'a>( reader: &mut &'a [u8], memory_manager: &'a MemoryManager, ) -> Result<<AccountID as ObjectFieldValue>::Out<'a>, DecodeError>
Decode the key segment as a non-terminal segment.
Source§fn out_size<'a>(key: &<AccountID as ObjectFieldValue>::In<'a>) -> usize
fn out_size<'a>(key: &<AccountID as ObjectFieldValue>::In<'a>) -> usize
Get the size of the key segment as a non-terminal segment.
Source§fn encode_terminal<'a>(
key: &Self::In<'a>,
writer: &mut ReverseSliceWriter<'_>,
) -> Result<(), EncodeError>
fn encode_terminal<'a>( key: &Self::In<'a>, writer: &mut ReverseSliceWriter<'_>, ) -> Result<(), EncodeError>
Encode the key segment as the terminal segment.
Source§fn decode_terminal<'a>(
reader: &mut &'a [u8],
memory_manager: &'a MemoryManager,
) -> Result<Self::Out<'a>, DecodeError>
fn decode_terminal<'a>( reader: &mut &'a [u8], memory_manager: &'a MemoryManager, ) -> Result<Self::Out<'a>, DecodeError>
Decode the key segment as the terminal segment.
Source§fn out_size_terminal<'a>(key: &Self::In<'a>) -> usize
fn out_size_terminal<'a>(key: &Self::In<'a>) -> usize
Get the size of the key segment as the terminal segment.
Source§impl ObjectFieldValue for AccountID
impl ObjectFieldValue for AccountID
Source§impl Ord for AccountID
impl Ord for AccountID
Source§impl PartialOrd for AccountID
impl PartialOrd for AccountID
Source§impl<'a> SchemaValue<'a> for AccountID
impl<'a> SchemaValue<'a> for AccountID
Source§type Type = AccountIdT
type Type = AccountIdT
The type of the value.
Source§type DecodeState = AccountID
type DecodeState = AccountID
In progress decoding state.
Source§fn visit_decode_state(
state: &mut <AccountID as SchemaValue<'a>>::DecodeState,
decoder: &mut dyn Decoder<'a>,
) -> Result<(), DecodeError>
fn visit_decode_state( state: &mut <AccountID as SchemaValue<'a>>::DecodeState, decoder: &mut dyn Decoder<'a>, ) -> Result<(), DecodeError>
Decode the value from the decoder.
Source§fn finish_decode_state(
state: <AccountID as SchemaValue<'a>>::DecodeState,
mem: &'a MemoryManager,
) -> Result<AccountID, DecodeError>
fn finish_decode_state( state: <AccountID as SchemaValue<'a>>::DecodeState, mem: &'a MemoryManager, ) -> Result<AccountID, DecodeError>
Finish decoding the value, return it and return the memory handle if needed.
impl Copy 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§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A> ObjectKey for Awhere
A: KeyFieldValue,
impl<A> ObjectKey for Awhere
A: KeyFieldValue,
Source§fn encode<'a>(
key: &<A as ObjectValue>::In<'a>,
writer: &mut ReverseSliceWriter<'_>,
) -> Result<(), EncodeError>
fn encode<'a>( key: &<A as ObjectValue>::In<'a>, writer: &mut ReverseSliceWriter<'_>, ) -> Result<(), EncodeError>
Encode the key.
Source§fn decode<'a>(
input: &'a [u8],
memory_manager: &'a MemoryManager,
) -> Result<<A as ObjectValue>::Out<'a>, DecodeError>
fn decode<'a>( input: &'a [u8], memory_manager: &'a MemoryManager, ) -> Result<<A as ObjectValue>::Out<'a>, DecodeError>
Decode the key.
Source§impl<A> ObjectValue for Awhere
A: ObjectFieldValue,
impl<A> ObjectValue for Awhere
A: ObjectFieldValue,
Source§const PSEUDO_TYPE: StructType<'static>
const PSEUDO_TYPE: StructType<'static>
The associated “pseudo-struct” type for the object value.
Source§type FieldTypes<'a> = (<<A as ObjectFieldValue>::In<'a> as SchemaValue<'a>>::Type,)
type FieldTypes<'a> = (<<A as ObjectFieldValue>::In<'a> as SchemaValue<'a>>::Type,)
The object value types as field types.
Source§type In<'a> = <A as ObjectFieldValue>::In<'a>
type In<'a> = <A as ObjectFieldValue>::In<'a>
The type that is used when inputting object values to functions.
Source§type Out<'a> = <A as ObjectFieldValue>::Out<'a>
type Out<'a> = <A as ObjectFieldValue>::Out<'a>
The type that is used in function return values.
Source§fn encode<'a>(
value: &<A as ObjectValue>::In<'a>,
encoder: &mut dyn Encoder,
) -> Result<(), EncodeError>
fn encode<'a>( value: &<A as ObjectValue>::In<'a>, encoder: &mut dyn Encoder, ) -> Result<(), EncodeError>
Encode each part of the value in reverse order.
Source§fn decode<'a>(
decoder: &mut dyn Decoder<'a>,
mem: &'a MemoryManager,
) -> Result<<A as ObjectValue>::Out<'a>, DecodeError>
fn decode<'a>( decoder: &mut dyn Decoder<'a>, mem: &'a MemoryManager, ) -> Result<<A as ObjectValue>::Out<'a>, DecodeError>
Decode the value from the decoder.
Source§impl<'a, V> OptionalValue<'a> for Vwhere
V: SchemaValue<'a>,
impl<'a, V> OptionalValue<'a> for Vwhere
V: SchemaValue<'a>,
Source§fn decode_value(
cdc: &dyn Codec,
data: &'a [u8],
memory_manager: &'a MemoryManager,
) -> Result<<V as OptionalValue<'a>>::Value, DecodeError>
fn decode_value( cdc: &dyn Codec, data: &'a [u8], memory_manager: &'a MemoryManager, ) -> Result<<V as OptionalValue<'a>>::Value, DecodeError>
Decode the value.
Source§fn encode_value<'b>(
cdc: &dyn Codec,
value: &<V as OptionalValue<'a>>::Value,
writer_factory: &'b dyn WriterFactory,
) -> Result<Option<&'b [u8]>, EncodeError>
fn encode_value<'b>( cdc: &dyn Codec, value: &<V as OptionalValue<'a>>::Value, writer_factory: &'b dyn WriterFactory, ) -> Result<Option<&'b [u8]>, EncodeError>
Encode the value.