Expand description
A way to have some context within async functions. This can be used to implement React-like hooks.
Structs§
- Async
Context - 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§
- provide_
async_ context - 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
- with_
async_ context - Retrieves immutable ref for async context in order to read values.
- with_
async_ context_ mut - Retrieves mutable ref for async context in order to read values.