pub struct HandlerEntry {
pub factory: fn(&dyn IServiceResolver) -> Box<dyn Any + Send>,
pub call: fn(Box<dyn Any + Send>, Box<dyn Any + Send>) -> Pin<Box<dyn Future<Output = Result<Box<dyn Any + Send>, Error>> + Send>>,
}Expand description
A single compiled handler entry in the registry.
Stores only the factory and call bridge — no cached instance. The factory is called per request to produce a fresh owned handler.
Fields§
§factory: fn(&dyn IServiceResolver) -> Box<dyn Any + Send>Per-request factory: receives the scoped resolver, returns an owned handler.
call: fn(Box<dyn Any + Send>, Box<dyn Any + Send>) -> Pin<Box<dyn Future<Output = Result<Box<dyn Any + Send>, Error>> + Send>>Type-erased call bridge: invokes handle(&mut self, req) on the owned handler.
Trait Implementations§
Source§impl Clone for HandlerEntry
impl Clone for HandlerEntry
Source§fn clone(&self) -> HandlerEntry
fn clone(&self) -> HandlerEntry
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 moreAuto 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