#[repr(C)]pub struct Currency { /* private fields */ }Expand description
Represents device currency code and denomination.
Implementations§
source§impl Currency
impl Currency
sourcepub const fn code(&self) -> CurrencyCode
pub const fn code(&self) -> CurrencyCode
Gets the CurrencyCode for the Currency.
sourcepub fn set_code(&mut self, code: CurrencyCode)
pub fn set_code(&mut self, code: CurrencyCode)
Sets the CurrencyCode for the Currency.
sourcepub fn with_code(self, code: CurrencyCode) -> Self
pub fn with_code(self, code: CurrencyCode) -> Self
Builder function that sets the CurrencyCode for the Currency.
sourcepub const fn denomination(&self) -> Denomination
pub const fn denomination(&self) -> Denomination
Gets the Denomination for the Currency.
sourcepub fn set_denomination(&mut self, denomination: Denomination)
pub fn set_denomination(&mut self, denomination: Denomination)
Sets the Denomination for the Currency.
sourcepub fn with_denomination(self, denomination: Denomination) -> Self
pub fn with_denomination(self, denomination: Denomination) -> Self
Builder function that sets the Denomination for the Currency.
sourcepub fn from_bytes(buf: &[u8]) -> Result<Self>
pub fn from_bytes(buf: &[u8]) -> Result<Self>
Attempts to convert a byte buffer into a Currency.
Trait Implementations§
source§impl PartialEq for Currency
impl PartialEq for Currency
impl Copy for Currency
impl StructuralPartialEq for Currency
Auto Trait Implementations§
impl Freeze for Currency
impl RefUnwindSafe for Currency
impl Send for Currency
impl Sync for Currency
impl Unpin for Currency
impl UnwindSafe for Currency
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