pub struct EncodingOptions { /* private fields */ }Expand description
Options that instruct the server to return ABI-encoded calldata in the quote response.
Pass via QuoteOptions::with_encoding_options to opt into calldata generation. Without this,
the server returns routing information only and Quote::transaction will be None.
Implementations§
Source§impl EncodingOptions
impl EncodingOptions
Sourcepub fn new(slippage: f64) -> Self
pub fn new(slippage: f64) -> Self
Create encoding options with the given slippage tolerance.
slippage is a fraction (e.g. 0.005 for 0.5%). The transfer type defaults to
UserTransferType::TransferFrom.
Sourcepub fn with_permit2(
self,
permit: PermitSingle,
signature: Bytes,
) -> Result<Self, FyndError>
pub fn with_permit2( self, permit: PermitSingle, signature: Bytes, ) -> Result<Self, FyndError>
Enable Permit2 token transfer with a pre-computed EIP-712 signature.
signature must be the 65-byte result of signing the Permit2 typed-data hash
externally (ECDSA: 32-byte r, 32-byte s, 1-byte v).
§Errors
Returns crate::FyndError::Protocol if signature is not exactly 65 bytes.
Sourcepub fn with_vault_funds(self) -> Self
pub fn with_vault_funds(self) -> Self
Use funds from the Tycho Router vault (no token transfer performed).
Sourcepub fn with_client_fee(self, params: ClientFeeParams) -> Self
pub fn with_client_fee(self, params: ClientFeeParams) -> Self
Attach client fee configuration with a pre-signed EIP-712 signature.
Trait Implementations§
Source§impl Clone for EncodingOptions
impl Clone for EncodingOptions
Source§fn clone(&self) -> EncodingOptions
fn clone(&self) -> EncodingOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EncodingOptions
impl Debug for EncodingOptions
Source§impl TryFrom<EncodingOptions> for EncodingOptions
impl TryFrom<EncodingOptions> for EncodingOptions
Auto Trait Implementations§
impl !Freeze for EncodingOptions
impl RefUnwindSafe for EncodingOptions
impl Send for EncodingOptions
impl Sync for EncodingOptions
impl Unpin for EncodingOptions
impl UnsafeUnpin for EncodingOptions
impl UnwindSafe for EncodingOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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