Struct tastyworks::csv::Transaction
source · [−]pub struct Transaction {Show 15 fields
pub date: DateTime<FixedOffset>,
pub trade_type: String,
pub action: Option<TradeAction>,
pub symbol: Option<String>,
pub instrument_type: Option<String>,
pub description: String,
pub value: Decimal,
pub quantity: Decimal,
pub average_price: Option<Decimal>,
pub commissions: Option<Decimal>,
pub fees: Decimal,
pub multiplier: Option<i32>,
pub expiration_date: Option<TransactionExpiration>,
pub strike_price: Option<Decimal>,
pub call_or_put: Option<OptionTypeUpperCase>,
}
Fields
date: DateTime<FixedOffset>
trade_type: String
action: Option<TradeAction>
symbol: Option<String>
instrument_type: Option<String>
description: String
value: Decimal
quantity: Decimal
average_price: Option<Decimal>
commissions: Option<Decimal>
fees: Decimal
multiplier: Option<i32>
expiration_date: Option<TransactionExpiration>
strike_price: Option<Decimal>
call_or_put: Option<OptionTypeUpperCase>
Implementations
sourceimpl Transaction
impl Transaction
pub fn underlying_symbol(&self) -> Option<&str>
Trait Implementations
sourceimpl Debug for Transaction
impl Debug for Transaction
sourceimpl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
sourcefn 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
sourceimpl From<Transaction> for Item
impl From<Transaction> for Item
sourcefn from(csv: Transaction) -> Self
fn from(csv: Transaction) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.