pub struct GraphContext { /* private fields */ }Expand description
Execution context for running filter graphs.
Implementations§
Source§impl GraphContext
impl GraphContext
Sourcepub fn new(graph: FilterGraph) -> Self
pub fn new(graph: FilterGraph) -> Self
Create a new execution context for a graph.
Sourcepub fn graph(&self) -> &FilterGraph
pub fn graph(&self) -> &FilterGraph
Get a reference to the underlying graph.
Sourcepub fn graph_mut(&mut self) -> &mut FilterGraph
pub fn graph_mut(&mut self) -> &mut FilterGraph
Get a mutable reference to the underlying graph.
Sourcepub fn frame_pool(&self) -> &FramePool
pub fn frame_pool(&self) -> &FramePool
Get the frame pool.
Sourcepub fn frame_pool_mut(&mut self) -> &mut FramePool
pub fn frame_pool_mut(&mut self) -> &mut FramePool
Get mutable access to the frame pool.
Sourcepub fn stats(&self) -> &ProcessingStats
pub fn stats(&self) -> &ProcessingStats
Get processing statistics.
Sourcepub fn node_stats(&self, id: NodeId) -> Option<&NodeStats>
pub fn node_stats(&self, id: NodeId) -> Option<&NodeStats>
Get statistics for a specific node.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the context is currently running.
Sourcepub fn initialize(&mut self) -> GraphResult<()>
pub fn initialize(&mut self) -> GraphResult<()>
Initialize the context for processing.
Sourcepub fn start(&mut self) -> GraphResult<()>
pub fn start(&mut self) -> GraphResult<()>
Start processing.
Sourcepub fn step(&mut self) -> GraphResult<bool>
pub fn step(&mut self) -> GraphResult<bool>
Process one step.
Sourcepub fn stop(&mut self) -> GraphResult<()>
pub fn stop(&mut self) -> GraphResult<()>
Stop processing.
Sourcepub fn reset(&mut self) -> GraphResult<()>
pub fn reset(&mut self) -> GraphResult<()>
Reset the context.
Sourcepub fn flush(&mut self) -> GraphResult<()>
pub fn flush(&mut self) -> GraphResult<()>
Flush all pending frames.
Sourcepub fn run_to_completion(&mut self) -> GraphResult<()>
pub fn run_to_completion(&mut self) -> GraphResult<()>
Run the graph until completion or error.
Auto Trait Implementations§
impl Freeze for GraphContext
impl !RefUnwindSafe for GraphContext
impl Send for GraphContext
impl Sync for GraphContext
impl Unpin for GraphContext
impl UnsafeUnpin for GraphContext
impl !UnwindSafe for GraphContext
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