pub struct QuoteOptions { /* private fields */ }Expand description
Optional parameters that tune solving behaviour for a QuoteParams request.
Build via the builder methods; unset options use server defaults.
Implementations§
Source§impl QuoteOptions
impl QuoteOptions
Sourcepub fn with_timeout_ms(self, ms: u64) -> Self
pub fn with_timeout_ms(self, ms: u64) -> Self
Cap the solver’s wall-clock budget to ms milliseconds.
Sourcepub fn with_min_responses(self, n: usize) -> Self
pub fn with_min_responses(self, n: usize) -> Self
Return as soon as at least n solver pools have responded, rather than waiting for all.
Use HealthStatus::num_solver_pools to discover how many pools are active before
setting this value. Values exceeding the active pool count are clamped by the server.
Sourcepub fn with_max_gas(self, gas: BigUint) -> Self
pub fn with_max_gas(self, gas: BigUint) -> Self
Discard quotes whose estimated gas cost exceeds gas.
Sourcepub fn with_encoding_options(self, opts: EncodingOptions) -> Self
pub fn with_encoding_options(self, opts: EncodingOptions) -> Self
Request server-side calldata generation. The resulting Quote::transaction will be
populated when this option is set.
Sourcepub fn timeout_ms(&self) -> Option<u64>
pub fn timeout_ms(&self) -> Option<u64>
The configured timeout in milliseconds, or None if using the server default.
Sourcepub fn min_responses(&self) -> Option<usize>
pub fn min_responses(&self) -> Option<usize>
The configured minimum response count, or None if using the server default.
Trait Implementations§
Source§impl Default for QuoteOptions
impl Default for QuoteOptions
Source§fn default() -> QuoteOptions
fn default() -> QuoteOptions
Source§impl TryFrom<QuoteOptions> for QuoteOptions
impl TryFrom<QuoteOptions> for QuoteOptions
Auto Trait Implementations§
impl !Freeze for QuoteOptions
impl RefUnwindSafe for QuoteOptions
impl Send for QuoteOptions
impl Sync for QuoteOptions
impl Unpin for QuoteOptions
impl UnsafeUnpin for QuoteOptions
impl UnwindSafe for QuoteOptions
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more