pub struct Balance {
pub balance: Option<f64>,
pub currency: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
The authenticated hacker’s payment balance
(GET /v1/hackers/payments/balance).
The endpoint returns a bare {"data":{"balance":105}} (no attributes
wrapper), so this type accepts both that shape and a JSON:API
{"data":{"attributes":{"balance":…}}} shape. Amounts are read from a
JSON number or a numeric string.
Fields§
§balance: Option<f64>The balance amount, if the server reported one.
currency: Option<String>The currency, if the server reported one.
extra: BTreeMap<String, Value>Fields the API returned that this version does not name.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Balance
impl<'de> Deserialize<'de> for Balance
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 Balance
impl RefUnwindSafe for Balance
impl Send for Balance
impl Sync for Balance
impl Unpin for Balance
impl UnsafeUnpin for Balance
impl UnwindSafe for Balance
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