pub struct Writer<T>where
T: AnyBitPattern,{ /* private fields */ }Expand description
Implementations§
Source§impl<T> Writer<T>where
T: AnyBitPattern,
impl<T> Writer<T>where
T: AnyBitPattern,
Sourcepub fn write(&self, value: T)
pub fn write(&self, value: T)
Writes a new value, replacing the current one.
Wait-free. Concurrent readers may observe the in-progress write but will retry until they see a consistent value.
§Examples
use low_latency_data_structures::seqlock::new;
let (writer, reader) = new(0u64);
writer.write(7);
assert_eq!(reader.read(), 7);Trait Implementations§
Source§impl<T> Debug for Writer<T>where
T: AnyBitPattern,
impl<T> Debug for Writer<T>where
T: AnyBitPattern,
impl<T> Send for Writer<T>where
T: AnyBitPattern,
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Writer<T>
impl<T> !Sync for Writer<T>
impl<T> !UnwindSafe for Writer<T>
impl<T> Freeze for Writer<T>
impl<T> Unpin for Writer<T>
impl<T> UnsafeUnpin for Writer<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more