pub struct Revision(pub u64);Expand description
A policy record’s own revision, for detecting a stale observation.
Policies are independent records and a poll only ever sees a random point of that set — never a snapshot with a version of its own — so a later poll can observe an older copy of one particular policy than a previous poll already applied (a slow replica, a retried request racing a fresher one, in any order the transport permits). Applying that older copy over the newer one would silently revert an operator’s edit, and in a deny-only system a reversion is a widening — the one direction every other property in this crate exists to prevent.
This crate does not perform that refusal itself: comparing two
observations of what is nominally the same policy over time is
exactly the kind of state this crate has no I/O and no polling to hold
— see the crate root’s “What is deliberately not here”. Revision is
here because the type that carries one policy’s declaration is where
the value naturally lives; a loader reading two observations of a
policy compares their Revisions and refuses to apply the lesser one.
Tuple Fields§
§0: u64Trait Implementations§
Source§impl Ord for Revision
impl Ord for Revision
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Revision
impl PartialOrd for Revision
impl Copy for Revision
impl Eq for Revision
impl StructuralPartialEq for Revision
Auto Trait Implementations§
impl Freeze for Revision
impl RefUnwindSafe for Revision
impl Send for Revision
impl Sync for Revision
impl Unpin for Revision
impl UnsafeUnpin for Revision
impl UnwindSafe for Revision
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.