pub struct Account {
pub owner: Principal,
pub subaccount: Option<Subaccount>,
}Expand description
An owned account for application protocols. External ledger DTOs remain separate.
Fields§
§owner: PrincipalAccount owner.
subaccount: Option<Subaccount>Explicit subaccount, or the effective all-zero default.
Implementations§
Source§impl Account
impl Account
Sourcepub const MAX_LENGTH_IN_TEXT: usize
pub const MAX_LENGTH_IN_TEXT: usize
Maximum canonical account text length, including checksum and subaccount.
Sourcepub fn effective_subaccount(&self) -> &Subaccount
pub fn effective_subaccount(&self) -> &Subaccount
Return the explicit subaccount or the all-zero default.
Trait Implementations§
impl Copy 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
impl Eq for Account
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
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