pub enum NamespaceState {
Uninitialized,
Unshared,
Entered,
Cleaned,
}Expand description
Namespace lifecycle state machine matching Nucleus_Isolation_NamespaceLifecycle.tla
State transitions: uninitialized -> unshared -> entered -> cleaned
Properties verified by TLA+ model:
- isolation_integrity: Once entered, can only move to entered or cleaned
- cleanup_happens: If entered, eventually cleaned
Variants§
Uninitialized
Initial state before namespace creation
Namespaces created via unshare(2)
Entered
Process entered the namespaces
Cleaned
Namespaces cleaned up
Trait Implementations§
Source§impl Clone for NamespaceState
impl Clone for NamespaceState
Source§fn clone(&self) -> NamespaceState
fn clone(&self) -> NamespaceState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NamespaceState
impl Debug for NamespaceState
Source§impl PartialEq for NamespaceState
impl PartialEq for NamespaceState
Source§impl StateTransition for NamespaceState
impl StateTransition for NamespaceState
Source§fn can_transition_to(&self, next: &NamespaceState) -> bool
fn can_transition_to(&self, next: &NamespaceState) -> bool
Return
true if moving from self to next is a valid transition.Source§fn is_terminal(&self) -> bool
fn is_terminal(&self) -> bool
Return
true if this state is terminal (no forward transitions).Source§fn transition(self, next: Self) -> Result<Self>
fn transition(self, next: Self) -> Result<Self>
Attempt to transition, returning
Err(InvalidStateTransition) on failure.impl Copy for NamespaceState
impl Eq for NamespaceState
impl StructuralPartialEq for NamespaceState
Auto Trait Implementations§
impl Freeze for NamespaceState
impl RefUnwindSafe for NamespaceState
impl Send for NamespaceState
impl Sync for NamespaceState
impl Unpin for NamespaceState
impl UnsafeUnpin for NamespaceState
impl UnwindSafe for NamespaceState
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
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§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
Compare self to
key and return true if they are equal.