Struct hedera::AccountBalance
source · pub struct AccountBalance {
pub account_id: AccountId,
pub hbars: Hbar,
pub tokens: HashMap<TokenId, u64>,
pub token_decimals: HashMap<TokenId, u32>,
}
Expand description
Response from AccountBalanceQuery
.
Fields§
§account_id: AccountId
The account that is being referenced.
hbars: Hbar
Current balance of the referenced account.
tokens: HashMap<TokenId, u64>
👎Deprecated: use a mirror query
Token balances for the referenced account.
token_decimals: HashMap<TokenId, u32>
👎Deprecated: use a mirror query
Token decimals for the referenced account.
Implementations§
source§impl AccountBalance
impl AccountBalance
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create a new AccountBalance
from protobuf-encoded bytes
.
§Errors
Error::FromProtobuf
if decoding the bytes fails to produce a valid protobuf.Error::FromProtobuf
if decoding the protobuf fails.
Trait Implementations§
source§impl Clone for AccountBalance
impl Clone for AccountBalance
source§fn clone(&self) -> AccountBalance
fn clone(&self) -> AccountBalance
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for AccountBalance
impl RefUnwindSafe for AccountBalance
impl Send for AccountBalance
impl Sync for AccountBalance
impl Unpin for AccountBalance
impl UnwindSafe for AccountBalance
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request