pub struct ConversionOptions {
pub conversion_type: ConversionType,
pub max_slippage_bps: Option<u32>,
pub completion_timeout_secs: Option<u32>,
}Expand description
Options for conversion when fulfilling a payment. When set, the SDK will perform a conversion before fulfilling the payment. If not set, the payment will only be fulfilled if the wallet has sufficient balance of the required asset.
Fields§
§conversion_type: ConversionTypeThe type of conversion to perform when fulfilling the payment
max_slippage_bps: Option<u32>The optional maximum slippage in basis points (1/100 of a percent) allowed when
a conversion is needed to fulfill the payment. Defaults to 50 bps (0.5%) if not set.
The conversion will fail if the actual amount received is less than
estimated_amount * (1 - max_slippage_bps / 10_000).
completion_timeout_secs: Option<u32>The optional timeout in seconds to wait for the conversion to complete when fulfilling the payment. This timeout only concerns waiting for the received payment of the conversion. If the timeout is reached before the conversion is complete, the payment will fail. Defaults to 30 seconds if not set.
Trait Implementations§
Source§impl Clone for ConversionOptions
impl Clone for ConversionOptions
Source§fn clone(&self) -> ConversionOptions
fn clone(&self) -> ConversionOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConversionOptions
impl Debug for ConversionOptions
Auto Trait Implementations§
impl Freeze for ConversionOptions
impl RefUnwindSafe for ConversionOptions
impl Send for ConversionOptions
impl Sync for ConversionOptions
impl Unpin for ConversionOptions
impl UnwindSafe for ConversionOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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>
T in a tonic::Request