pub enum CgroupState {
Nonexistent,
Created,
Configured,
Attached,
Monitoring,
Removed,
}Expand description
Cgroup lifecycle state machine matching Nucleus_Resources_CgroupLifecycle.tla
State transitions: nonexistent -> created -> configured -> attached -> monitoring -> removed
Properties verified by TLA+ model:
- resource_limits_enforced: Once configured, can only move to attached, monitoring, or removed
- cleanup_guaranteed: Eventually reaches removed state
- no_resource_leak: Removed state is terminal and stable
Variants§
Nonexistent
Initial state - cgroup doesn’t exist
Created
Cgroup created in filesystem
Configured
Resource limits configured
Attached
Process attached to cgroup
Monitoring
Monitoring resource usage
Removed
Cgroup removed - terminal state
Trait Implementations§
Source§impl Clone for CgroupState
impl Clone for CgroupState
Source§fn clone(&self) -> CgroupState
fn clone(&self) -> CgroupState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CgroupState
impl Debug for CgroupState
Source§impl PartialEq for CgroupState
impl PartialEq for CgroupState
Source§fn eq(&self, other: &CgroupState) -> bool
fn eq(&self, other: &CgroupState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl StateTransition for CgroupState
impl StateTransition for CgroupState
Source§fn can_transition_to(&self, next: &CgroupState) -> bool
fn can_transition_to(&self, next: &CgroupState) -> 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 CgroupState
impl Eq for CgroupState
impl StructuralPartialEq for CgroupState
Auto Trait Implementations§
impl Freeze for CgroupState
impl RefUnwindSafe for CgroupState
impl Send for CgroupState
impl Sync for CgroupState
impl Unpin for CgroupState
impl UnsafeUnpin for CgroupState
impl UnwindSafe for CgroupState
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.