pub trait IntoTaskHandlerResult {
// Required method
fn into_task_handler_result(self) -> Result<(), impl Debug>;
}Expand description
Trait for converting task handler return types into a standardized Result.
This trait allows task handlers to return different types while maintaining a consistent interface. It enables task handlers to return:
()(unit type) for successful execution with no return valueResult<(), E>for success/failure with error type E
The trait converts these different return types into a standardized Result<(), impl Debug>.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl IntoTaskHandlerResult for ()
Implementation for the unit type, allowing tasks to simply return ().
impl IntoTaskHandlerResult for ()
Implementation for the unit type, allowing tasks to simply return ().
Source§impl<D: Debug> IntoTaskHandlerResult for Result<(), D>
Implementation for Result types, allowing tasks to return errors directly.
impl<D: Debug> IntoTaskHandlerResult for Result<(), D>
Implementation for Result types, allowing tasks to return errors directly.