pub struct GraphState { /* private fields */ }Expand description
Maintains the parts of the graph state that is accessible to Nodes.
Implementations§
Source§impl GraphState
impl GraphState
pub fn new( run_time: Arc<Runtime>, run_mode: RunMode, run_for: RunFor, start_time: NanoTime, ) -> Self
pub fn start_time(&self) -> NanoTime
pub fn tokio_runtime(&self) -> Arc<Runtime>
pub fn add_callback(&mut self, time: NanoTime)
pub fn always_callback(&mut self)
pub fn is_last_cycle(&self) -> bool
Sourcepub fn ticked(&self, node: Rc<dyn Node>) -> bool
pub fn ticked(&self, node: Rc<dyn Node>) -> bool
Returns true if node has ticked on the current engine cycle
pub fn terminate(&mut self, result: Result<()>)
pub fn node_index(&self, node: Rc<dyn Node>) -> Option<usize>
pub fn run_mode(&self) -> RunMode
pub fn run_for(&self) -> RunFor
pub fn log(&self, level: Level, msg: &str)
Auto Trait Implementations§
impl Freeze for GraphState
impl !RefUnwindSafe for GraphState
impl !Send for GraphState
impl !Sync for GraphState
impl Unpin for GraphState
impl !UnwindSafe for GraphState
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