pub struct GraphActor { /* private fields */ }Expand description
The graph actor — single writer, owns all graph state.
Run in a dedicated tokio task via tokio::spawn(actor.run()).
Implementations§
Source§impl GraphActor
impl GraphActor
Sourcepub fn new(config: GraphConfig) -> (Self, GraphHandle, Receiver<GraphEvent>)
pub fn new(config: GraphConfig) -> (Self, GraphHandle, Receiver<GraphEvent>)
Create a new GraphActor. Returns (actor, handle, event_receiver).
Sourcepub fn add_initial_nodes(&mut self, specs: Vec<NodeSpec>)
pub fn add_initial_nodes(&mut self, specs: Vec<NodeSpec>)
Seed the graph with initial nodes before starting the run loop.
Auto Trait Implementations§
impl Freeze for GraphActor
impl RefUnwindSafe for GraphActor
impl Send for GraphActor
impl Sync for GraphActor
impl Unpin for GraphActor
impl UnsafeUnpin for GraphActor
impl UnwindSafe for GraphActor
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