Module async

Source

Traits§

AsyncErrorHandlerFunction
Trait alias for asynchronous error-handling functions used in a recoverable context.
AsyncRecoverableFunction
Trait alias for asynchronous functions that can be executed in a recoverable context.
ErrorHandlerFunction
Trait alias for error-handling functions used in a recoverable context.
FunctionMutTrait
Trait alias for functions that can be executed in a recoverable context.
FunctionOnceTrait
Trait alias for functions that can be executed in a recoverable context.
FunctionTrait
Trait alias for functions that can be executed in a recoverable context.
RecoverableFunction
Trait alias for functions that can be executed in a recoverable context.

Functions§

async_recoverable_spawn
Spawns a new thread to run the provided function function in a recoverable manner. If the function function panics during execution, the panic will be caught, and the thread will terminate without crashing the entire program.
async_recoverable_spawn_catch
Spawns a recoverable function with an error-handling function in a new thread.
async_recoverable_spawn_catch_finally
Spawns an asynchronous recoverable function, catches any errors with an error-handling function, and ensures that a final function is always executed, regardless of whether an error occurred.
async_run_error_handle_function
Executes an error-handling function with a given error message within a panic-safe context.
async_run_function
Executes a recoverable function within a panic-safe context.
tokio_error_to_string
Converts a panic-captured error value into a string.

Type Aliases§

ArcAsyncErrorHandlerFunction
Alias for an Arc-wrapped error handler function.
ArcAsyncRecoverableFunction
Alias for an Arc-wrapped recoverable function.
AsyncSpawnResult
Type alias for the result type returned by spawnable functions.
SpawnError
SpawnError
SyncSpawnResult
Type alias for the result type returned by spawnable functions.