pub enum Amount {
Decimal(f64),
Raw(u64),
All,
}Variants§
Implementations§
Source§impl Amount
impl Amount
pub fn parse(arg: &str) -> Result<Amount, String>
pub fn parse_decimal(arg: &str) -> Result<Amount, String>
pub fn parse_raw(arg: &str) -> Result<Amount, String>
pub fn parse_decimal_or_all(arg: &str) -> Result<Amount, String>
pub fn to_raw_amount(&self, decimals: u8) -> Self
pub fn sol_to_lamport(&self) -> Amount
Trait Implementations§
impl Copy for Amount
impl StructuralPartialEq for Amount
Auto Trait Implementations§
impl Freeze for Amount
impl RefUnwindSafe for Amount
impl Send for Amount
impl Sync for Amount
impl Unpin for Amount
impl UnwindSafe for Amount
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