pub struct SwingPoint { /* private fields */ }Expand description
One immutable swing point with explicit anchor and confirmation times.
Implementations§
Source§impl SwingPoint
impl SwingPoint
pub fn new( kind: SwingKind, price: f64, anchor_open_time: NaiveDateTime, anchor_close_time: NaiveDateTime, confirmed_at: NaiveDateTime, ) -> Result<Self, AnalysisError>
pub fn kind(&self) -> SwingKind
pub fn price(&self) -> f64
pub fn anchor_open_time(&self) -> NaiveDateTime
pub fn anchor_close_time(&self) -> NaiveDateTime
pub fn confirmed_at(&self) -> NaiveDateTime
Trait Implementations§
Source§impl Clone for SwingPoint
impl Clone for SwingPoint
Source§impl Debug for SwingPoint
impl Debug for SwingPoint
Source§impl<'de> Deserialize<'de> for SwingPoint
impl<'de> Deserialize<'de> for SwingPoint
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
Source§impl PartialEq for SwingPoint
impl PartialEq for SwingPoint
Source§impl Serialize for SwingPoint
impl Serialize for SwingPoint
impl StructuralPartialEq for SwingPoint
Auto Trait Implementations§
impl Freeze for SwingPoint
impl RefUnwindSafe for SwingPoint
impl Send for SwingPoint
impl Sync for SwingPoint
impl Unpin for SwingPoint
impl UnsafeUnpin for SwingPoint
impl UnwindSafe for SwingPoint
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