pub enum SizeHint {
MarginFraction(f64),
NotionalUsd(f64),
Quantity(Volume),
Default,
}Expand description
How large the brain wants the next order to be. The risk layer can honour, scale down, or reject this hint.
Variants§
MarginFraction(f64)
Use a fraction of available margin (0.0..=1.0).
NotionalUsd(f64)
Target a specific notional in quote currency.
Quantity(Volume)
Target a specific number of contracts or base units.
Default
Defer to the risk layer’s default sizing entirely.
Trait Implementations§
impl Copy for SizeHint
Source§impl<'de> Deserialize<'de> for SizeHint
impl<'de> Deserialize<'de> for SizeHint
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SizeHint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SizeHint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SizeHint
impl Serialize for SizeHint
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SizeHint
impl RefUnwindSafe for SizeHint
impl Send for SizeHint
impl Sync for SizeHint
impl Unpin for SizeHint
impl UnsafeUnpin for SizeHint
impl UnwindSafe for SizeHint
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