Struct OhlcvBar
pub struct OhlcvBar { /* private fields */ }Expand description
A primitive OHLCV bar.
Implementations§
§impl OhlcvBar
impl OhlcvBar
pub fn new(bar: OhlcBar, volume: f64) -> Result<OhlcvBar, BarError>
pub fn new(bar: OhlcBar, volume: f64) -> Result<OhlcvBar, BarError>
Creates an OHLCV bar from an OHLC bar and finite non-negative volume.
§Errors
Returns [BarError::NonFiniteVolume] or [BarError::NegativeVolume] when volume is
invalid.
Trait Implementations§
impl StructuralPartialEq for OhlcvBar
Auto Trait Implementations§
impl Freeze for OhlcvBar
impl RefUnwindSafe for OhlcvBar
impl Send for OhlcvBar
impl Sync for OhlcvBar
impl Unpin for OhlcvBar
impl UnsafeUnpin for OhlcvBar
impl UnwindSafe for OhlcvBar
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