pub struct Account { /* private fields */ }Expand description
Canonical ICRC account atom.
Implementations§
Source§impl Account
impl Account
Sourcepub fn new<P, S>(owner: P, subaccount: Option<S>) -> Account
pub fn new<P, S>(owner: P, subaccount: Option<S>) -> Account
Construct from convertible owner and optional subaccount values.
Sourcepub const fn from_owner_and_subaccount(
owner: Principal,
subaccount: Option<Subaccount>,
) -> Account
pub const fn from_owner_and_subaccount( owner: Principal, subaccount: Option<Subaccount>, ) -> Account
Construct from canonical components.
Sourcepub const fn subaccount(&self) -> Option<Subaccount>
pub const fn subaccount(&self) -> Option<Subaccount>
Return the optional subaccount.
Sourcepub fn to_icrc_type(self) -> Account
pub fn to_icrc_type(self) -> Account
Convert to the upstream ICRC account type.
Trait Implementations§
Source§impl CandidType for Account
impl CandidType for Account
impl Copy for Account
Source§impl<'de> Deserialize<'de> for Account
impl<'de> Deserialize<'de> for Account
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Account, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Account, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Account
Source§impl NormalizeAuto for Account
impl NormalizeAuto for Account
fn normalize_self(&mut self, _ctx: &mut dyn VisitorContext)
Source§impl NormalizeCustom for Account
impl NormalizeCustom for Account
fn normalize_custom(&mut self, _ctx: &mut dyn VisitorContext)
Source§impl Ord for Account
impl Ord for Account
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Account
impl PartialOrd for Account
Source§impl Serialize for Account
impl Serialize for Account
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Account
Source§impl ValidateAuto for Account
impl ValidateAuto for Account
fn validate_self(&self, _ctx: &mut dyn VisitorContext)
Source§impl ValidateCustom for Account
impl ValidateCustom for Account
fn validate_custom(&self, _ctx: &mut dyn VisitorContext)
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnsafeUnpin for Account
impl UnwindSafe for Account
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> CustomError for T
impl<T> CustomError for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> Normalize for Twhere
T: NormalizeAuto + NormalizeCustom,
Source§impl<T> NormalizeAndValidate for Twhere
T: Visitable,
impl<T> NormalizeAndValidate for Twhere
T: Visitable,
Source§fn normalize_and_validate(self) -> Result<Self, VisitorError>
fn normalize_and_validate(self) -> Result<Self, VisitorError>
Normalize and then validate this application-owned value. Read more