pub struct CallBackStream<T: Element + Hash + Eq> { /* private fields */ }Expand description
A queue of values that are emitted at specified times. Useful for unit tests. Can also be used to feed stream output back into the Graph as input on later cycles.
Implementations§
Source§impl<T: Element + Hash + Eq> CallBackStream<T>
impl<T: Element + Hash + Eq> CallBackStream<T>
Trait Implementations§
Source§impl<T: Element + Hash + Eq> MutableNode for CallBackStream<T>
impl<T: Element + Hash + Eq> MutableNode for CallBackStream<T>
Source§fn cycle(&mut self, state: &mut GraphState) -> bool
fn cycle(&mut self, state: &mut GraphState) -> bool
Called by the graph when it determines that this node
is required to be cycled.
Source§fn start(&mut self, state: &mut GraphState)
fn start(&mut self, state: &mut GraphState)
Called by the graph after wiring and before the first cycle.
Can be used to request an initial callback.
Source§fn setup(&mut self, state: &mut GraphState)
fn setup(&mut self, state: &mut GraphState)
called by the graph after wiring and before start
Source§fn stop(&mut self, state: &mut GraphState)
fn stop(&mut self, state: &mut GraphState)
Called by the graph after the last cycle. Can be used to clean up resources.
fn teardown(&mut self, state: &mut GraphState)
fn type_name(&self) -> String
Source§impl<T: Element + Hash + Eq> StreamPeekRef<T> for CallBackStream<T>
impl<T: Element + Hash + Eq> StreamPeekRef<T> for CallBackStream<T>
Auto Trait Implementations§
impl<T> Freeze for CallBackStream<T>where
T: Freeze,
impl<T> RefUnwindSafe for CallBackStream<T>where
T: RefUnwindSafe,
impl<T> Send for CallBackStream<T>where
T: Send,
impl<T> Sync for CallBackStream<T>where
T: Sync,
impl<T> Unpin for CallBackStream<T>where
T: Unpin,
impl<T> UnwindSafe for CallBackStream<T>where
T: 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
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