pub struct Position {
pub symbol: String,
pub quantity: f64,
pub avg_cost: f64,
pub market_value: f64,
pub unrealized_pnl: f64,
pub realized_pnl: f64,
}Expand description
Portfolio position
Fields§
§symbol: String§quantity: f64§avg_cost: f64§market_value: f64§unrealized_pnl: f64§realized_pnl: f64Trait Implementations§
Source§impl FromNapiValue for Position
impl FromNapiValue for Position
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for Position
impl ToNapiValue for Position
Source§unsafe fn to_napi_value(env: napi_env, val: Position) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Position) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for Position
impl ValidateNapiValue for Position
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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