pub struct FixedTickScheme { /* private fields */ }Expand description
Fixed price grid with an exact, positive tick size.
Navigation returns None if the requested output precision cannot represent the tick exactly.
Implementations§
Source§impl FixedTickScheme
impl FixedTickScheme
Sourcepub fn new(tick: Price) -> Result<Self, TickSchemeError>
pub fn new(tick: Price) -> Result<Self, TickSchemeError>
Creates a new FixedTickScheme with the given tick size.
§Errors
Returns an error if the tick is not positive, is outside the representable price range, has invalid precision, or contains fractional digits beyond its precision.
Sourcepub fn new_with_precision(
tick: Price,
price_precision: u8,
) -> Result<Self, TickSchemeError>
pub fn new_with_precision( tick: Price, price_precision: u8, ) -> Result<Self, TickSchemeError>
Creates a fixed tick scheme with an explicit default output precision.
§Errors
Returns an error if the tick is invalid, the output precision is invalid, or the tick is not exactly representable at that precision.
Trait Implementations§
Source§impl Clone for FixedTickScheme
impl Clone for FixedTickScheme
impl Copy for FixedTickScheme
Source§impl Debug for FixedTickScheme
impl Debug for FixedTickScheme
Source§impl Display for FixedTickScheme
impl Display for FixedTickScheme
impl Eq for FixedTickScheme
Source§impl PartialEq for FixedTickScheme
impl PartialEq for FixedTickScheme
Source§impl TickSchemeRule for FixedTickScheme
impl TickSchemeRule for FixedTickScheme
Auto Trait Implementations§
impl Freeze for FixedTickScheme
impl RefUnwindSafe for FixedTickScheme
impl Send for FixedTickScheme
impl Sync for FixedTickScheme
impl Unpin for FixedTickScheme
impl UnsafeUnpin for FixedTickScheme
impl UnwindSafe for FixedTickScheme
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more