pub struct Committer;Expand description
Wrapper around a single atomic operation, where multiple ghost steps can be performed.
Implementations§
Source§impl Committer
impl Committer
Sourcepub fn ward(self) -> AtomicI32
pub fn ward(self) -> AtomicI32
Identity of the committer
This is used so that we can only use the committer with the right [AtomicOwn].
(opaque) ⚠
Sourcepub fn shoot(&mut self, own: &mut Perm<AtomicI32>)
pub fn shoot(&mut self, own: &mut Perm<AtomicI32>)
‘Shoot’ the committer
This does the write on the atomic in ghost code, and can only be called once.
requires
!self.shot()requires
self.ward() == *own.ward()ensures
(^self).shot()ensures
(^own).ward() == (*own).ward()ensures
*(*own).val() == (*self).old_value()ensures
*(^own).val() == (*self).new_value()terminates
ghost
Auto Trait Implementations§
impl Freeze for Committer
impl RefUnwindSafe for Committer
impl Send for Committer
impl Sync for Committer
impl Unpin for Committer
impl UnwindSafe for Committer
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