pub struct Subaccount(/* private fields */);Expand description
A canonical 32-byte ICRC account subaccount.
Implementations§
Source§impl Subaccount
impl Subaccount
Sourcepub const fn from_array(array: [u8; 32]) -> Self
pub const fn from_array(array: [u8; 32]) -> Self
Construct from the exact fixed-width byte array.
Sourcepub fn from_hex(text: &str) -> Result<Self, SchemaContractError>
pub fn from_hex(text: &str) -> Result<Self, SchemaContractError>
Parse 64 ASCII hex digits, optionally prefixed by lowercase 0x.
§Errors
Returns SchemaContractError::InvalidLiteral for invalid width,
non-ASCII input or non-hex characters. No trimming is performed.
Trait Implementations§
Source§impl Clone for Subaccount
impl Clone for Subaccount
impl Copy for Subaccount
Source§impl Debug for Subaccount
impl Debug for Subaccount
Source§impl Default for Subaccount
impl Default for Subaccount
Source§impl<'de> Deserialize<'de> for Subaccount
impl<'de> Deserialize<'de> for Subaccount
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 Display for Subaccount
impl Display for Subaccount
impl Eq for Subaccount
Source§impl From<Principal> for Subaccount
impl From<Principal> for Subaccount
Source§impl Hash for Subaccount
impl Hash for Subaccount
Source§impl Ord for Subaccount
impl Ord for Subaccount
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
Source§impl PartialEq for Subaccount
impl PartialEq for Subaccount
Source§impl PartialOrd for Subaccount
impl PartialOrd for Subaccount
Source§impl Serialize for Subaccount
impl Serialize for Subaccount
impl StructuralPartialEq for Subaccount
Auto Trait Implementations§
impl Freeze for Subaccount
impl RefUnwindSafe for Subaccount
impl Send for Subaccount
impl Sync for Subaccount
impl Unpin for Subaccount
impl UnsafeUnpin for Subaccount
impl UnwindSafe for Subaccount
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