pub struct Leaf<I: Indicator> { /* private fields */ }Expand description
Adapts any existing Indicator into a dependency-free GraphIndicator leaf node, so the
full existing indicator catalog can be used inside a CompositionGraph unchanged.
Implementations§
Trait Implementations§
Source§impl<I: Indicator> GraphIndicator for Leaf<I>
impl<I: Indicator> GraphIndicator for Leaf<I>
fn name(&self) -> &str
Source§fn dependencies(&self) -> &[String]
fn dependencies(&self) -> &[String]
Names of other graph nodes whose current-bar output this node reads via
deps in
GraphIndicator::compute. Must match node names actually present in the graph.fn warmup_period(&self) -> usize
fn reset(&mut self)
fn compute( &mut self, bar: &Bar, _deps: &HashMap<String, IndicatorOutput>, ) -> Option<IndicatorOutput>
Auto Trait Implementations§
impl<I> Freeze for Leaf<I>where
I: Freeze,
impl<I> RefUnwindSafe for Leaf<I>where
I: RefUnwindSafe,
impl<I> Send for Leaf<I>
impl<I> Sync for Leaf<I>
impl<I> Unpin for Leaf<I>where
I: Unpin,
impl<I> UnsafeUnpin for Leaf<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for Leaf<I>where
I: UnwindSafe,
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