pub trait HandlerOnce<T>: 'static {
// Required method
fn handle(self, env: &Environment) -> T;
}Expand description
Handler trait for single-use handlers that are consumed during execution.
This trait is implemented by handlers that can only be called once because they consume themselves during processing.
Required Methods§
Sourcefn handle(self, env: &Environment) -> T
fn handle(self, env: &Environment) -> T
Processes the environment and returns a value of type T.
§Arguments
env- The environment containing request data and context
Trait Implementations§
Source§impl<T> Debug for dyn HandlerOnce<T>
impl<T> Debug for dyn HandlerOnce<T>
Source§impl<T: 'static> HandlerOnce<T> for Box<dyn HandlerOnce<T>>
impl<T: 'static> HandlerOnce<T> for Box<dyn HandlerOnce<T>>
Source§fn handle(self, env: &Environment) -> T
fn handle(self, env: &Environment) -> T
Processes the environment and returns a value of type T. Read more