pub struct HandlerEntry {
pub name: String,
pub handler: ArcHandler<SharedState>,
}Expand description
Entry for a handler in the global inventory Handlers submit themselves to this list for auto-registration
Fields§
§name: StringName of the handler (matches config node names)
handler: ArcHandler<SharedState>The handler function (always uses SharedState)
Implementations§
Source§impl HandlerEntry
impl HandlerEntry
Sourcepub fn new(
name: impl Into<String>,
handler: ArcHandler<SharedState>,
) -> HandlerEntry
pub fn new( name: impl Into<String>, handler: ArcHandler<SharedState>, ) -> HandlerEntry
Create a new handler entry for auto-registration
Trait Implementations§
impl Collect for HandlerEntry
Auto Trait Implementations§
impl Freeze for HandlerEntry
impl !RefUnwindSafe for HandlerEntry
impl Send for HandlerEntry
impl Sync for HandlerEntry
impl Unpin for HandlerEntry
impl UnsafeUnpin for HandlerEntry
impl !UnwindSafe for HandlerEntry
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