pub struct PayCommand {
pub amount: f64,
pub currency: Currency,
}
Fields§
§amount: f64
§currency: Currency
Implementations§
Source§impl PayCommand
impl PayCommand
pub fn from_string(description: &String) -> Option<PayCommand>
pub fn get_amount_usd(&self, exchange_rate: &f64) -> f64
pub fn get_amount_bsv(&self, exchange_rate: &f64) -> f64
Trait Implementations§
Source§impl From<PayCommand> for JsValue
impl From<PayCommand> for JsValue
Source§fn from(value: PayCommand) -> Self
fn from(value: PayCommand) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for PayCommand
impl FromWasmAbi for PayCommand
Source§impl IntoWasmAbi for PayCommand
impl IntoWasmAbi for PayCommand
Source§impl LongRefFromWasmAbi for PayCommand
impl LongRefFromWasmAbi for PayCommand
Source§impl OptionFromWasmAbi for PayCommand
impl OptionFromWasmAbi for PayCommand
Source§impl OptionIntoWasmAbi for PayCommand
impl OptionIntoWasmAbi for PayCommand
Source§impl RefFromWasmAbi for PayCommand
impl RefFromWasmAbi for PayCommand
Source§type Anchor = RcRef<PayCommand>
type Anchor = RcRef<PayCommand>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for PayCommand
impl RefMutFromWasmAbi for PayCommand
Source§impl TryFromJsValue for PayCommand
impl TryFromJsValue for PayCommand
Source§impl VectorFromWasmAbi for PayCommand
impl VectorFromWasmAbi for PayCommand
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[PayCommand]>
Source§impl VectorIntoJsValue for PayCommand
impl VectorIntoJsValue for PayCommand
fn vector_into_jsvalue(vector: Box<[PayCommand]>) -> JsValue
Source§impl VectorIntoWasmAbi for PayCommand
impl VectorIntoWasmAbi for PayCommand
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[PayCommand]>) -> Self::Abi
Source§impl WasmDescribeVector for PayCommand
impl WasmDescribeVector for PayCommand
impl SupportsConstructor for PayCommand
impl SupportsInstanceProperty for PayCommand
impl SupportsStaticProperty for PayCommand
Auto Trait Implementations§
impl Freeze for PayCommand
impl RefUnwindSafe for PayCommand
impl Send for PayCommand
impl Sync for PayCommand
impl Unpin for PayCommand
impl UnwindSafe for PayCommand
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> 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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.