pub struct HandlerRegistry { /* private fields */ }Implementations§
Source§impl HandlerRegistry
impl HandlerRegistry
pub fn new() -> Self
pub fn is_empty(&self) -> bool
pub fn on<F>(&mut self, id: &str, f: F)where
F: Fn(&RuntimeNode, &ExecutionContext, &mut NodeIo<'_>) -> Result<(), NodeError> + Send + Sync + 'static,
pub fn on_stateful<F>(&mut self, id: &str, f: F)where
F: FnMut(&RuntimeNode, &ExecutionContext, &mut NodeIo<'_>) -> Result<(), NodeError> + Send + 'static,
pub fn merge(&mut self, other: HandlerRegistry)
pub fn has_handler(&self, id: &str) -> bool
pub fn with_prefix(self, prefix: &str) -> Self
Trait Implementations§
Source§impl Default for HandlerRegistry
impl Default for HandlerRegistry
Source§impl NodeHandler for HandlerRegistry
impl NodeHandler for HandlerRegistry
fn run( &self, node: &RuntimeNode, ctx: &ExecutionContext, io: &mut NodeIo<'_>, ) -> Result<(), NodeError>
Auto Trait Implementations§
impl Freeze for HandlerRegistry
impl !RefUnwindSafe for HandlerRegistry
impl Send for HandlerRegistry
impl Sync for HandlerRegistry
impl Unpin for HandlerRegistry
impl !UnwindSafe for HandlerRegistry
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().