pub struct Test {
pub strategy_name: String,
pub iid: Iid,
pub deposit: f64,
pub commission: f64,
pub begin_ts_nanos: i64,
pub end_ts_nanos: i64,
pub status: TestStatus,
pub trade_list: TradeList,
}Fields§
§strategy_name: String§iid: Iid§deposit: f64§commission: f64§begin_ts_nanos: i64§end_ts_nanos: i64§status: TestStatus§trade_list: TradeListImplementations§
Source§impl Test
impl Test
pub fn new(strategy: &impl Strategy, iid: &Iid) -> Self
pub fn from_bin(bytes: &[u8]) -> Self
pub fn to_bin(&self) -> Vec<u8> ⓘ
pub fn save(test: &Test) -> Result<(), String>
pub fn load(path: &Path) -> Result<Test, String>
pub fn delete(test: &Test) -> Result<(), String>
pub fn name(&self) -> String
pub fn begin(&self) -> DateTime<Utc>
pub fn end(&self) -> DateTime<Utc>
pub fn set_begin(&mut self, dt: &DateTime<Utc>)
pub fn set_end(&mut self, dt: &DateTime<Utc>)
pub fn path(&self) -> PathBuf
pub fn clear(&mut self)
Trait Implementations§
impl<'__de> Decode<'__de> for Testwhere
'__de:,
impl Encode for Test
impl StructuralPartialEq for Test
Auto Trait Implementations§
impl Freeze for Test
impl RefUnwindSafe for Test
impl Send for Test
impl Sync for Test
impl Unpin for Test
impl UnsafeUnpin for Test
impl UnwindSafe for Test
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DecodeOwned for Twhere
T: for<'de> Decode<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more