pub struct Account {
pub owner: Principal,
pub subaccount: Option<Subaccount>,
}Expand description
Account
Account representation of ledgers supporting the ICRC-1 standard.
Code ported from icrc-ledger-types as we don’t want to include that one, it’s out of date and has a lot of extra dependencies
Fields§
§owner: Principal§subaccount: Option<Subaccount>Implementations§
Source§impl Account
impl Account
pub fn new<P: Into<Principal>, S: Into<Subaccount>>( owner: P, subaccount: Option<S>, ) -> Self
Sourcepub fn effective_subaccount(&self) -> &Subaccount
pub fn effective_subaccount(&self) -> &Subaccount
The effective subaccount of an account - the subaccount if it is set, otherwise the default subaccount of all zeroes.
Trait Implementations§
Source§impl CandidType for Account
impl CandidType for Account
Source§impl<'de> Deserialize<'de> for Account
impl<'de> Deserialize<'de> for Account
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Account
impl Ord for Account
Source§impl PartialOrd for Account
impl PartialOrd for Account
impl Copy for Account
impl Eq for Account
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin 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