pub struct OpaqueHandler<F> { /* private fields */ }Expand description
Wrapper for closures that receive &mut World directly as a Handler.
Created by IntoHandler::into_handler when the function signature is
FnMut(&mut World, E). The closure handles its own resource access —
no Param resolution occurs.
Prefer named functions with Param resolution for hot-path handlers.
OpaqueHandler is an escape hatch for cases where dynamic or conditional
resource access is needed.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for OpaqueHandler<F>where
F: Freeze,
impl<F> RefUnwindSafe for OpaqueHandler<F>where
F: RefUnwindSafe,
impl<F> Send for OpaqueHandler<F>where
F: Send,
impl<F> Sync for OpaqueHandler<F>where
F: Sync,
impl<F> Unpin for OpaqueHandler<F>where
F: Unpin,
impl<F> UnsafeUnpin for OpaqueHandler<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for OpaqueHandler<F>where
F: UnwindSafe,
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