pub struct CandleStick<'a, X, Y: PartialOrd> { /* private fields */ }Expand description
The candelstick data point element
Implementations§
Source§impl<'a, X: Clone, Y: PartialOrd> CandleStick<'a, X, Y>
impl<'a, X: Clone, Y: PartialOrd> CandleStick<'a, X, Y>
Sourcepub fn new<GS: Into<ShapeStyle<'a>>, LS: Into<ShapeStyle<'a>>>(
x: X,
open: Y,
high: Y,
low: Y,
close: Y,
gain_style: GS,
loss_style: LS,
width: u32,
) -> Self
pub fn new<GS: Into<ShapeStyle<'a>>, LS: Into<ShapeStyle<'a>>>( x: X, open: Y, high: Y, low: Y, close: Y, gain_style: GS, loss_style: LS, width: u32, ) -> Self
Create a new candlestick element, which requires the Y coordinate can be compared
Trait Implementations§
Source§impl<'a, X: 'a, Y: 'a + PartialOrd, DB: DrawingBackend> Drawable<DB> for CandleStick<'a, X, Y>
impl<'a, X: 'a, Y: 'a + PartialOrd, DB: DrawingBackend> Drawable<DB> for CandleStick<'a, X, Y>
Source§fn draw<I: Iterator<Item = BackendCoord>>(
&self,
points: I,
backend: &mut DB,
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
fn draw<I: Iterator<Item = BackendCoord>>( &self, points: I, backend: &mut DB, ) -> Result<(), DrawingErrorKind<DB::ErrorType>>
Actually draws the element. The key points is already translated into the
image cooridnate and can be used by DC directly
Source§impl<'b, 'a, X: 'a, Y: PartialOrd + 'a> PointCollection<'a, (X, Y)> for &'a CandleStick<'b, X, Y>
impl<'b, 'a, X: 'a, Y: PartialOrd + 'a> PointCollection<'a, (X, Y)> for &'a CandleStick<'b, X, Y>
Auto Trait Implementations§
impl<'a, X, Y> Freeze for CandleStick<'a, X, Y>
impl<'a, X, Y> !RefUnwindSafe for CandleStick<'a, X, Y>
impl<'a, X, Y> !Send for CandleStick<'a, X, Y>
impl<'a, X, Y> !Sync for CandleStick<'a, X, Y>
impl<'a, X, Y> Unpin for CandleStick<'a, X, Y>
impl<'a, X, Y> !UnwindSafe for CandleStick<'a, X, Y>
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, DB, Coord> IntoDynElement<DB, Coord> for Twhere
T: Drawable<DB> + 'static,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
impl<T, DB, Coord> IntoDynElement<DB, Coord> for Twhere
T: Drawable<DB> + 'static,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
Source§fn into_dyn(self) -> DynElement<DB, Coord>
fn into_dyn(self) -> DynElement<DB, Coord>
Make the conversion
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