pub struct EncodingOptions { /* private fields */ }Expand description
Options to customize the encoding behavior.
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 and default transfer type.
Sourcepub fn with_transfer_type(self, t: UserTransferType) -> Self
pub fn with_transfer_type(self, t: UserTransferType) -> Self
Override the token transfer method.
Sourcepub fn with_permit2(self, permit: PermitSingle, sig: Bytes) -> Self
pub fn with_permit2(self, permit: PermitSingle, sig: Bytes) -> Self
Set the Permit2 single-token authorization and its signature.
Sourcepub fn transfer_type(&self) -> &UserTransferType
pub fn transfer_type(&self) -> &UserTransferType
Token transfer method.
Sourcepub fn permit(&self) -> Option<&PermitSingle>
pub fn permit(&self) -> Option<&PermitSingle>
Permit2 single-token authorization, if set.
Sourcepub fn permit2_signature(&self) -> Option<&Bytes>
pub fn permit2_signature(&self) -> Option<&Bytes>
Permit2 signature, if set.
Sourcepub fn with_client_fee_params(self, params: ClientFeeParams) -> Self
pub fn with_client_fee_params(self, params: ClientFeeParams) -> Self
Set the client fee params.
Sourcepub fn client_fee_params(&self) -> Option<&ClientFeeParams>
pub fn client_fee_params(&self) -> Option<&ClientFeeParams>
Client fee params, if set.
Trait Implementations§
Source§impl Clone for EncodingOptions
impl Clone for EncodingOptions
Source§fn clone(&self) -> EncodingOptions
fn clone(&self) -> EncodingOptions
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 EncodingOptions
impl Debug for EncodingOptions
Source§impl<'de> Deserialize<'de> for EncodingOptions
impl<'de> Deserialize<'de> for EncodingOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more