pub struct ConversionEstimate {
pub options: ConversionOptions,
pub amount_in: u128,
pub amount_out: u128,
pub fee: u128,
pub amount_adjustment: Option<AmountAdjustmentReason>,
}Expand description
Response from estimating a conversion, used when preparing a payment that requires conversion
Fields§
§options: ConversionOptionsThe conversion options used for the estimate
amount_in: u128The input amount for the conversion.
For FromBitcoin: the satoshis required to produce the desired token output.
For ToBitcoin: the token amount being converted.
amount_out: u128The estimated output amount from the conversion.
For FromBitcoin: the estimated token amount received.
For ToBitcoin: the estimated satoshis received.
fee: u128The fee estimated for the conversion. Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
amount_adjustment: Option<AmountAdjustmentReason>The reason the conversion amount was adjusted, if applicable.
Trait Implementations§
Source§impl Clone for ConversionEstimate
impl Clone for ConversionEstimate
Source§fn clone(&self) -> ConversionEstimate
fn clone(&self) -> ConversionEstimate
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 moreSource§impl Debug for ConversionEstimate
impl Debug for ConversionEstimate
Auto Trait Implementations§
impl Freeze for ConversionEstimate
impl RefUnwindSafe for ConversionEstimate
impl Send for ConversionEstimate
impl Sync for ConversionEstimate
impl Unpin for ConversionEstimate
impl UnwindSafe for ConversionEstimate
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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