[−][src]Struct cxmr_candles::Candle
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,