pub struct DataItem { /* private fields */ }
Expand description
Data item is used as an input for indicators.
§Example
use ta::DataItem;
use ta::{Open, High, Low, Close, Volume};
let item = DataItem::builder()
.open(20.0)
.high(25.0)
.low(15.0)
.close(21.0)
.volume(7500.0)
.build()
.unwrap();
assert_eq!(item.open(), 20.0);
assert_eq!(item.high(), 25.0);
assert_eq!(item.low(), 15.0);
assert_eq!(item.close(), 21.0);
assert_eq!(item.volume(), 7500.0);
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataItem
impl RefUnwindSafe for DataItem
impl Send for DataItem
impl Sync for DataItem
impl Unpin for DataItem
impl UnwindSafe for DataItem
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