pub struct WorkerRegistry { /* private fields */ }Expand description
Implementations§
Source§impl WorkerRegistry
impl WorkerRegistry
Sourcepub fn register<N>(&mut self, name: impl Into<String>, node: N) -> &mut Selfwhere
N: Node + 'static,
pub fn register<N>(&mut self, name: impl Into<String>, node: N) -> &mut Selfwhere
N: Node + 'static,
Register a handler under name.
Accepts any Node implementation — including plain async closures
via the core blanket impl, so the ergonomics match
GraphBuilder::add_node exactly.
Registering the same name twice replaces the previous handler.
Trait Implementations§
Source§impl Clone for WorkerRegistry
impl Clone for WorkerRegistry
Source§fn clone(&self) -> WorkerRegistry
fn clone(&self) -> WorkerRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for WorkerRegistry
impl Default for WorkerRegistry
Source§fn default() -> WorkerRegistry
fn default() -> WorkerRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerRegistry
impl !UnwindSafe for WorkerRegistry
impl Freeze for WorkerRegistry
impl Send for WorkerRegistry
impl Sync for WorkerRegistry
impl Unpin for WorkerRegistry
impl UnsafeUnpin for WorkerRegistry
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