pub struct PositionState {
pub symbol: String,
pub shares: f64,
pub avg_price: f64,
}Expand description
The agent’s current holding in one instrument.
Fields§
§symbol: String§avg_price: f64Trait Implementations§
Source§impl Clone for PositionState
impl Clone for PositionState
Source§fn clone(&self) -> PositionState
fn clone(&self) -> PositionState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PositionState
impl Debug for PositionState
Source§impl<'de> Deserialize<'de> for PositionState
impl<'de> Deserialize<'de> for PositionState
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 PositionState
impl RefUnwindSafe for PositionState
impl Send for PositionState
impl Sync for PositionState
impl Unpin for PositionState
impl UnsafeUnpin for PositionState
impl UnwindSafe for PositionState
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