pub struct PolicyCell { /* private fields */ }Expand description
The run policy in force for one run (crates/runtime/spec/PolicyTake.lean
§8-62, runtime D28).
One writer and many readers. A change that reaches the run at any
safe point waits in the cell, and the run’s driver loop puts the
last one in force at SafePoint::BeforeWave and nowhere else; the
write gates hold a PolicyReader that they ask once per write. So
every call of one wave is judged under one policy, the one in force
when the wave began.
Implementations§
Source§impl PolicyCell
impl PolicyCell
Sourcepub fn new(start: RunPolicy) -> PolicyCell
pub fn new(start: RunPolicy) -> PolicyCell
The cell a run opens with, holding run_started.policy.
Sourcepub fn reader(&self) -> PolicyReader
pub fn reader(&self) -> PolicyReader
A read-only view of the policy in force, for a write gate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PolicyCell
impl RefUnwindSafe for PolicyCell
impl Send for PolicyCell
impl Sync for PolicyCell
impl Unpin for PolicyCell
impl UnsafeUnpin for PolicyCell
impl UnwindSafe for PolicyCell
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