pub struct ExchangeRate {
pub hbars: u32,
pub cents: u32,
pub expiration_time: OffsetDateTime,
pub exchange_rate_in_cents: f64,
}
Expand description
Denotes a conversion between Hbars and cents (USD).
Fields§
§hbars: u32
Denotes Hbar
equivalent to cents (USD).
cents: u32
Denotes cents (USD) equivalent to Hbar
.
expiration_time: OffsetDateTime
Expiration time of this exchange rate.
exchange_rate_in_cents: f64
Exchange rate in cents
Implementations§
Source§impl ExchangeRate
impl ExchangeRate
Sourcepub fn exchange_rate_in_cents(&self) -> f64
pub fn exchange_rate_in_cents(&self) -> f64
Calculated exchange rate.
Trait Implementations§
Source§impl Clone for ExchangeRate
impl Clone for ExchangeRate
Source§fn clone(&self) -> ExchangeRate
fn clone(&self) -> ExchangeRate
Returns a duplicate 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 ExchangeRate
impl RefUnwindSafe for ExchangeRate
impl Send for ExchangeRate
impl Sync for ExchangeRate
impl Unpin for ExchangeRate
impl UnwindSafe for ExchangeRate
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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