pub struct Candles {
pub timestamp: Vec<i64>,
pub open: Vec<f64>,
pub high: Vec<f64>,
pub low: Vec<f64>,
pub close: Vec<f64>,
pub volume: Vec<f64>,
pub fields: CandleFieldFlags,
pub hl2: Vec<f64>,
pub hlc3: Vec<f64>,
pub ohlc4: Vec<f64>,
pub hlcc4: Vec<f64>,
}Fields§
§timestamp: Vec<i64>§open: Vec<f64>§high: Vec<f64>§low: Vec<f64>§close: Vec<f64>§volume: Vec<f64>§fields: CandleFieldFlags§hl2: Vec<f64>§hlc3: Vec<f64>§ohlc4: Vec<f64>§hlcc4: Vec<f64>Implementations§
Source§impl Candles
impl Candles
pub fn new( timestamp: Vec<i64>, open: Vec<f64>, high: Vec<f64>, low: Vec<f64>, close: Vec<f64>, volume: Vec<f64>, ) -> Self
pub fn new_with_fields( timestamp: Vec<i64>, open: Vec<f64>, high: Vec<f64>, low: Vec<f64>, close: Vec<f64>, volume: Vec<f64>, fields: CandleFieldFlags, ) -> Self
pub fn get_timestamp(&self) -> Result<&[i64], Box<dyn Error>>
pub fn get_calculated_field( &self, field: &str, ) -> Result<&[f64], Box<dyn Error>>
pub fn select_candle_field(&self, field: &str) -> Result<&[f64], Box<dyn Error>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Candles
impl RefUnwindSafe for Candles
impl Send for Candles
impl Sync for Candles
impl Unpin for Candles
impl UnsafeUnpin for Candles
impl UnwindSafe for Candles
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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