pub enum NamespaceState {
Active,
Deleted,
}Expand description
Lifecycle state recorded in the namespace head.
There is no initialization state: the head is published complete by one conditional write, so a namespace either has a head (active or deleted) or does not exist. The one transition the head must record is deletion, because a deleted namespace keeps its head forever as the id-reuse tombstone.
Decoding is fail-closed: a reader presented with a state it does not recognize fails with a typed decode error instead of serving the namespace.
Variants§
Active
The namespace serves reads and accepts commits.
Deleted
Terminal: the namespace’s history has ended. Reads, commits, forks, and re-creation of the same id are all refused.
Implementations§
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NamespaceState
Source§impl Debug for NamespaceState
impl Debug for NamespaceState
Source§impl Default for NamespaceState
impl Default for NamespaceState
Source§fn default() -> NamespaceState
fn default() -> NamespaceState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NamespaceState
impl<'de> Deserialize<'de> for NamespaceState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NamespaceState
Source§impl PartialEq for NamespaceState
impl PartialEq for NamespaceState
Source§impl Serialize for NamespaceState
impl Serialize 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