Struct lfest::prelude::QuantityFilter
source · pub struct QuantityFilter<S>where
S: Currency,{
pub min_quantity: S,
pub max_quantity: S,
pub step_size: S,
}
Expand description
The SizeFilter
defines the quantity rules that each order needs to follow
The generic currency S
is always the PairedCurrency
of the margin
currency
Fields§
§min_quantity: S
Defines the minimum quantity
of any order
Disabled if 0
max_quantity: S
Defines the maximum quantity
of any order
Disabled if 0
step_size: S
Defines the intervals that a quantity
can be increased / decreased by.
For the filter to pass,
(quantity - min_qty) % step_size == 0
Trait Implementations§
source§impl<S> Clone for QuantityFilter<S>
impl<S> Clone for QuantityFilter<S>
source§fn clone(&self) -> QuantityFilter<S>
fn clone(&self) -> QuantityFilter<S>
Returns a copy 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<S> Debug for QuantityFilter<S>
impl<S> Debug for QuantityFilter<S>
Auto Trait Implementations§
impl<S> Freeze for QuantityFilter<S>where
S: Freeze,
impl<S> RefUnwindSafe for QuantityFilter<S>where
S: RefUnwindSafe,
impl<S> Send for QuantityFilter<S>
impl<S> Sync for QuantityFilter<S>where
S: Sync,
impl<S> Unpin for QuantityFilter<S>where
S: Unpin,
impl<S> UnwindSafe for QuantityFilter<S>where
S: UnwindSafe,
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