Skip to main content

Crate local_async_utils

Crate local_async_utils 

Source

Modules§

prelude
sealed
Collections that never leak references to their content, and therefore can be safely accessed via shared references.
shared
Abstractions for accessing data shared between multiple tasks in a safe manner.
splittokio
Utilities for splitting AsyncRead + AsyncWrite types into separate read and write halves.
stopwatch
Utilities for measuring the duration of operations and logging if they exceed a specified threshold.
sync
Synchronization primitives for single-threaded async programming.

Macros§

debug_stopwatch
Creates a Stopwatch that will log a debug message if the elapsed time exceeds the threshold.
define_with
Convenience macro for invoking Shared::with() method.
define_with_unchecked
Convenience macro for invoking UnsafeShared::with_unchecked() method.
error_stopwatch
Creates a Stopwatch that will log an error message if the elapsed time exceeds the threshold.
info_stopwatch
Creates a Stopwatch that will log an info message if the elapsed time exceeds the threshold.
millisec
Shortcut for std::time::Duration::from_millis.
min
Shortcut for std::time::Duration::from_secs.
sec
Shortcut for std::time::Duration::from_secs.
trace_stopwatch
Creates a Stopwatch that will log a trace message if the elapsed time exceeds the threshold.
warn_stopwatch
Creates a Stopwatch that will log a warning message if the elapsed time exceeds the threshold.