pub struct LimitOrderAdvancedSettings {
pub receiver: Option<Address>,
pub valid_to: Option<u32>,
pub partner_fee: Option<PartnerFee>,
pub partially_fillable: Option<bool>,
pub app_data: Option<String>,
}Expand description
Advanced overrides for limit order submission.
Applied on top of LimitTradeParameters via
apply_settings_to_limit_trade_parameters.
Mirrors LimitOrderAdvancedSettings from the TypeScript SDK.
Fields§
§receiver: Option<Address>Override for the order receiver.
valid_to: Option<u32>Absolute order expiry timestamp. Overrides valid_for in the params.
partner_fee: Option<PartnerFee>Partner fee override (replaces any fee set at the config level).
partially_fillable: Option<bool>Whether the order may be partially filled.
app_data: Option<String>Pre-computed app-data hash override (0x-prefixed bytes32).
Implementations§
Source§impl LimitOrderAdvancedSettings
impl LimitOrderAdvancedSettings
Sourcepub const fn with_receiver(
self,
receiver: Address,
) -> LimitOrderAdvancedSettings
pub const fn with_receiver( self, receiver: Address, ) -> LimitOrderAdvancedSettings
Override the order receiver address.
§Arguments
receiver— the address that will receive the bought tokens.
§Returns
The modified LimitOrderAdvancedSettings with the receiver set.
Sourcepub const fn with_valid_to(self, valid_to: u32) -> LimitOrderAdvancedSettings
pub const fn with_valid_to(self, valid_to: u32) -> LimitOrderAdvancedSettings
Set an absolute order expiry Unix timestamp.
§Arguments
valid_to— Unix timestamp after which the order expires.
§Returns
The modified LimitOrderAdvancedSettings with the expiry set.
Sourcepub fn with_partner_fee(self, fee: PartnerFee) -> LimitOrderAdvancedSettings
pub fn with_partner_fee(self, fee: PartnerFee) -> LimitOrderAdvancedSettings
Override the partner fee for this limit order.
§Arguments
fee— thePartnerFeeto apply.
§Returns
The modified LimitOrderAdvancedSettings with the partner fee set.
Sourcepub const fn with_partially_fillable(
self,
partially_fillable: bool,
) -> LimitOrderAdvancedSettings
pub const fn with_partially_fillable( self, partially_fillable: bool, ) -> LimitOrderAdvancedSettings
Override whether the order may be partially filled.
§Arguments
partially_fillable—trueto allow partial fills.
§Returns
The modified LimitOrderAdvancedSettings with the flag set.
Sourcepub fn with_app_data(
self,
app_data: impl Into<String>,
) -> LimitOrderAdvancedSettings
pub fn with_app_data( self, app_data: impl Into<String>, ) -> LimitOrderAdvancedSettings
Override the pre-computed app-data hash (0x-prefixed bytes32).
§Arguments
app_data—0x-prefixed 32-byte hex string of the app-data hash.
§Returns
The modified LimitOrderAdvancedSettings with the app-data hash set.
Sourcepub const fn has_receiver(&self) -> bool
pub const fn has_receiver(&self) -> bool
Sourcepub const fn has_valid_to(&self) -> bool
pub const fn has_valid_to(&self) -> bool
Sourcepub const fn has_partner_fee(&self) -> bool
pub const fn has_partner_fee(&self) -> bool
Sourcepub const fn has_partially_fillable(&self) -> bool
pub const fn has_partially_fillable(&self) -> bool
Returns true if a partially-fillable override is set.
§Returns
true when partially_fillable is Some.
Sourcepub const fn has_app_data(&self) -> bool
pub const fn has_app_data(&self) -> bool
Trait Implementations§
Source§impl Clone for LimitOrderAdvancedSettings
impl Clone for LimitOrderAdvancedSettings
Source§fn clone(&self) -> LimitOrderAdvancedSettings
fn clone(&self) -> LimitOrderAdvancedSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LimitOrderAdvancedSettings
impl Debug for LimitOrderAdvancedSettings
Source§impl Default for LimitOrderAdvancedSettings
impl Default for LimitOrderAdvancedSettings
Source§fn default() -> LimitOrderAdvancedSettings
fn default() -> LimitOrderAdvancedSettings
Auto Trait Implementations§
impl Freeze for LimitOrderAdvancedSettings
impl RefUnwindSafe for LimitOrderAdvancedSettings
impl Send for LimitOrderAdvancedSettings
impl Sync for LimitOrderAdvancedSettings
impl Unpin for LimitOrderAdvancedSettings
impl UnsafeUnpin for LimitOrderAdvancedSettings
impl UnwindSafe for LimitOrderAdvancedSettings
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.