Crate async_context
source ·Expand description
A way to have some context within async functions. This can be used to implement React-like hooks.
Structs§
- Stores a future along with the async context provided for it. Create AsyncContext using provide_async_context Access the context using with_async_context or with_async_context_mut
Functions§
- Wraps a future with some async context. Within the future, the provided context can be retrieved using with_async_context or with_async_context_mut
- Retrieves immutable ref for async context in order to read values.
- Retrieves mutable ref for async context in order to read values.