pub struct ForcedTransitionAudit { /* private fields */ }Expand description
Durable audit evidence for one forced-transition attempt — emitted for allowed, denied, and failed attempts alike.
This is the durable audit evidence ADR 0037 requires. Because a forced
transition can bypass quorum, every attempt — including the ones that were
refused — must leave a trail; making the audit the return value of
force_transition means a caller cannot perform a force without also
receiving its evidence. The record captures who (operator), why (reason),
what (collection/range/target), when (attempted_at_ms), and the
disposition (the outcome, with the full epoch/version
boundary on success).
Implementations§
Source§impl ForcedTransitionAudit
impl ForcedTransitionAudit
Sourcepub fn attempted_at_ms(&self) -> u64
pub fn attempted_at_ms(&self) -> u64
The wall-clock time (ms) the attempt was evaluated, as supplied by the caller.
Sourcepub fn operator(&self) -> Option<&NodeIdentity>
pub fn operator(&self) -> Option<&NodeIdentity>
The operator principal that exercised the capability, if one was presented.
None on an attempt denied for MissingCapability.
Sourcepub fn reason(&self) -> Option<&str>
pub fn reason(&self) -> Option<&str>
The operator’s stated reason, if one was attached. None on an attempt
denied for MissingReason (or missing
capability).
pub fn collection(&self) -> &CollectionId
pub fn range_id(&self) -> RangeId
Sourcepub fn target(&self) -> &NodeIdentity
pub fn target(&self) -> &NodeIdentity
The node the force tried to install as owner.
pub fn disposition(&self) -> &ForcedTransitionDisposition
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Whether the force was authorised and applied.
Sourcepub fn fenced_old_owner(&self) -> bool
pub fn fenced_old_owner(&self) -> bool
Whether a successful force bumped the ownership epoch — true for every
allowed force, since installing a new owner always advances the epoch and so
fences any old owner that later reappears. false for denied/failed
attempts, where nothing moved.
Trait Implementations§
Source§impl Clone for ForcedTransitionAudit
impl Clone for ForcedTransitionAudit
Source§fn clone(&self) -> ForcedTransitionAudit
fn clone(&self) -> ForcedTransitionAudit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ForcedTransitionAudit
impl Debug for ForcedTransitionAudit
Source§impl Display for ForcedTransitionAudit
impl Display for ForcedTransitionAudit
impl Eq for ForcedTransitionAudit
Source§impl PartialEq for ForcedTransitionAudit
impl PartialEq for ForcedTransitionAudit
Source§fn eq(&self, other: &ForcedTransitionAudit) -> bool
fn eq(&self, other: &ForcedTransitionAudit) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ForcedTransitionAudit
Auto Trait Implementations§
impl Freeze for ForcedTransitionAudit
impl RefUnwindSafe for ForcedTransitionAudit
impl Send for ForcedTransitionAudit
impl Sync for ForcedTransitionAudit
impl Unpin for ForcedTransitionAudit
impl UnsafeUnpin for ForcedTransitionAudit
impl UnwindSafe for ForcedTransitionAudit
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request