pub struct NativeBalance {
pub lamports: u64,
pub price_per_sol: f64,
pub total_price: f64,
}Expand description
Native SOL balance information for a Solana wallet.
Included in API responses when show_native_balance: true is set in display options
for methods like getAssetsByOwner or searchAssets.
§Fields
lamports: The wallet’s SOL balance in lamports (1 SOL = 1,000,000,000 lamports)price_per_sol: Current market price of 1 SOL in USDtotal_price: Total USD value of the wallet’s SOL balance (lamports × price_per_sol / 1e9)
§Example
{
"lamports": 5000000000,
"price_per_sol": 100.50,
"total_price": 502.50
}This represents 5 SOL worth $502.50 USD at $100.50 per SOL.
Fields§
§lamports: u64§price_per_sol: f64§total_price: f64Trait Implementations§
Source§impl Debug for NativeBalance
impl Debug for NativeBalance
Source§impl Default for NativeBalance
impl Default for NativeBalance
Source§fn default() -> NativeBalance
fn default() -> NativeBalance
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NativeBalance
impl<'de> Deserialize<'de> for NativeBalance
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
Auto Trait Implementations§
impl Freeze for NativeBalance
impl RefUnwindSafe for NativeBalance
impl Send for NativeBalance
impl Sync for NativeBalance
impl Unpin for NativeBalance
impl UnsafeUnpin for NativeBalance
impl UnwindSafe for NativeBalance
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more