Skip to main content

Revocation

Struct Revocation 

Source
pub struct Revocation<const N: usize> { /* private fields */ }
Available on crate feature rustcrypto only.
Expand description

§12.2.4.1’s revocation walk: the part that cannot be done in one command.

Constructed with every node whose ACL or NOC still names the old version, and ticked off as each is updated. is_complete is the only thing that may be reported as success — and §12.2.4.1 says outright that it may never arrive, because “some Nodes are permanently offline or otherwise unreachable”.

Implementations§

Source§

impl<const N: usize> Revocation<N>

Source

pub fn begin( previous: &JointFabricTags, nodes: impl IntoIterator<Item = NodeId>, ) -> Result<Self>

Begins a revocation: the new tags, and every node that has to be visited.

nodes is the whole fabric, administrators included — §12.2.4.1 updates NOCs and ACL entries, and a node whose ACL still lists the old Administrator CAT is a node the revoked administrator can still administer.

Source

pub const fn tags(&self) -> &JointFabricTags

The tags every node is being moved to.

Source

pub fn updated(&mut self, node: NodeId) -> bool

Records that one node now holds the new version.

Returns whether it was one that still owed the update — a second report for the same node is not progress, and counting it would let a retry loop declare the fabric safe.

Source

pub fn outstanding(&self) -> &[NodeId]

The nodes that have not been reached yet.

Source

pub fn is_complete(&self) -> bool

Whether every node has moved, and the revocation has actually taken effect.

Trait Implementations§

Source§

impl<const N: usize> Debug for Revocation<N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<const N: usize> Forget for Revocation<N>

§

impl<const N: usize> Freeze for Revocation<N>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; N]>>: Freeze,

§

impl<const N: usize> Move for Revocation<N>

§

impl<const N: usize> RefUnwindSafe for Revocation<N>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; N]>>: RefUnwindSafe,

§

impl<const N: usize> Send for Revocation<N>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; N]>>: Send,

§

impl<const N: usize> Sync for Revocation<N>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; N]>>: Sync,

§

impl<const N: usize> Unpin for Revocation<N>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; N]>>: Unpin,

§

impl<const N: usize> UnsafeUnpin for Revocation<N>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; N]>>: UnsafeUnpin,

§

impl<const N: usize> UnwindSafe for Revocation<N>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; N]>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.