atomic_struct_core
atomic_struct_core provides the types used by the atomic_struct macros.
AtomicMember<T>wraps the typeTinArc<tokio::sync::Mutex<T>>and adds methods to change the inner Value.
Features
- serde: activates serde compatibility fot the AtomicMember
- fields are serilized without any mutex overhead
Installation
Add the crate to your Cargo.toml:
[]
= { ="0.1.5" } # or crates.io version when published
Examples
let atomic_int = new;
assert_eq!;
atomic_int.set.await;
assert_eq!;