Struct soroban_sdk::Account
source · [−]pub struct Account(_);
Expand description
Account references a Stellar account and provides access to information about the account, such as its thresholds and signers.
Implementations
sourceimpl Account
impl Account
sourcepub fn from_public_key(public_key: &FixedBinary<32>) -> Result<Account, ()>
pub fn from_public_key(public_key: &FixedBinary<32>) -> Result<Account, ()>
Creates an account from a public key.
TODO: Return a Result
Err
if the account does not exist. Currently panics if account does not exist.
sourcepub fn low_threshold(&self) -> u32
pub fn low_threshold(&self) -> u32
Returns the low threshold for the Stellar account.
sourcepub fn medium_threshold(&self) -> u32
pub fn medium_threshold(&self) -> u32
Returns the medium threshold for the Stellar account.
sourcepub fn high_threshold(&self) -> u32
pub fn high_threshold(&self) -> u32
Returns the high threshold for the Stellar account.
sourcepub fn signer_weight(&self, signer: &FixedBinary<32>) -> u32
pub fn signer_weight(&self, signer: &FixedBinary<32>) -> u32
Returns the signer weight for the signer for this Stellar account. If
the signer does not exist for the account, returns zero (0
).
Trait Implementations
sourceimpl AsRef<FixedBinary<32>> for Account
impl AsRef<FixedBinary<32>> for Account
sourcefn as_ref(&self) -> &FixedBinary<32>
fn as_ref(&self) -> &FixedBinary<32>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Borrow<FixedBinary<32>> for &Account
impl Borrow<FixedBinary<32>> for &Account
sourcefn borrow(&self) -> &FixedBinary<32>
fn borrow(&self) -> &FixedBinary<32>
Immutably borrows from an owned value. Read more
sourceimpl Borrow<FixedBinary<32>> for &mut Account
impl Borrow<FixedBinary<32>> for &mut Account
sourcefn borrow(&self) -> &FixedBinary<32>
fn borrow(&self) -> &FixedBinary<32>
Immutably borrows from an owned value. Read more
sourceimpl Borrow<FixedBinary<32>> for Account
impl Borrow<FixedBinary<32>> for Account
sourcefn borrow(&self) -> &FixedBinary<32>
fn borrow(&self) -> &FixedBinary<32>
Immutably borrows from an owned value. Read more
sourceimpl Ord for Account
impl Ord for Account
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Account> for Account
impl PartialOrd<Account> for Account
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Account
Auto Trait Implementations
impl !RefUnwindSafe for Account
impl !Send for Account
impl !Sync for Account
impl Unpin for Account
impl !UnwindSafe for Account
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more