[][src]Struct cxmr_candles::Candle

pub struct Candle {
    pub time: u64,
    pub open: f32,
    pub high: f32,
    pub low: f32,
    pub close: f32,
    pub volume: f64,
}

Candle data structure.

Fields

time: u64

Candle open time.

open: f32

Opening rate in points.

high: f32

Highest rate in points.

low: f32

Lowest rate in points.

close: f32

Closing rate in points.

volume: f64

Candle volume total.

Methods

impl Candle[src]

pub fn new(rate: f32, time: u64) -> Self[src]

Creates a new candle.

pub fn is_filled(&self) -> bool[src]

Returns true if candle volume is not zero.

pub fn update(&mut self, rate: f32, volume: f64) -> Option<UpdateKind>[src]

Updates candle rate data.

pub fn squash(&mut self, other: &Candle)[src]

Squashes another candle into self.

Trait Implementations

impl Clone for Candle[src]

impl Close for Candle[src]

impl Debug for Candle[src]

impl Default for Candle[src]

impl High for Candle[src]

impl<'_> Into<String> for &'_ Candle[src]

impl Low for Candle[src]

impl Open for Candle[src]

impl PartialEq<Candle> for Candle[src]

impl StructuralPartialEq for Candle[src]

impl Time for Candle[src]

impl Volume for Candle[src]

Auto Trait Implementations

impl RefUnwindSafe for Candle

impl Send for Candle

impl Sync for Candle

impl Unpin for Candle

impl UnwindSafe for Candle

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.