Crates.io | atomic_macro |
lib.rs | atomic_macro |
version | 0.1.1 |
source | src |
created_at | 2022-01-19 07:08:21.091296 |
updated_at | 2022-01-19 10:23:17.742773 |
description | Attribute macros for generating AtomicXXX |
homepage | |
repository | https://github.com/rise0chen/atomic_macro |
max_upload_size | |
id | 516599 |
size | 16,377 |
#[atomic_macro::atomic(32)]
struct SomeStruct {
field_one: u8,
field_two: u16,
}
impl From<u32> for SomeStruct {
fn from(value: u32) -> Self {
...
}
}
impl From<SomeStruct> for u32 {
fn from(value: SomeStruct) -> Self {
...
}
}
enum AtomicSomeStruct(AtomicU32);
impl AtomicSomeStruct {
fn load(&self, order: Ordering) -> SomeStruct;
fn store(&self, val: SomeStruct, order: Ordering);
...
}