pub enum WorkspaceKind {
Ephemeral,
Persistent,
}Expand description
The discriminant shared by WorkspacePolicy and AttemptWorkspace.
It exists so a2 can store one text column and d1/e1 can render one word
without matching on a payload they do not need. The payload — a root path, a
slot number — belongs to the enum that owns it, and reconstructing either
from this kind plus its raw column goes through from_persisted, which is
where the illegal combinations are refused.
Variants§
Ephemeral
D3: the default. The attempt directory is unique and removed on cleanup.
Persistent
D4: opt-in, repository-scoped, retaining _work in a stable slot.
Implementations§
Source§impl WorkspaceKind
impl WorkspaceKind
pub const fn is_persistent(self) -> bool
Trait Implementations§
Source§impl Clone for WorkspaceKind
impl Clone for WorkspaceKind
Source§fn clone(&self) -> WorkspaceKind
fn clone(&self) -> WorkspaceKind
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 WorkspaceKind
Source§impl Debug for WorkspaceKind
impl Debug for WorkspaceKind
Source§impl Default for WorkspaceKind
impl Default for WorkspaceKind
Source§fn default() -> WorkspaceKind
fn default() -> WorkspaceKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WorkspaceKind
impl<'de> Deserialize<'de> for WorkspaceKind
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
Source§impl Display for WorkspaceKind
impl Display for WorkspaceKind
impl Eq for WorkspaceKind
Source§impl FromStr for WorkspaceKind
impl FromStr for WorkspaceKind
Source§impl Hash for WorkspaceKind
impl Hash for WorkspaceKind
Source§impl Ord for WorkspaceKind
impl Ord for WorkspaceKind
Source§fn cmp(&self, other: &WorkspaceKind) -> Ordering
fn cmp(&self, other: &WorkspaceKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for WorkspaceKind
impl PartialEq for WorkspaceKind
Source§impl PartialOrd for WorkspaceKind
impl PartialOrd for WorkspaceKind
Source§impl Serialize for WorkspaceKind
impl Serialize for WorkspaceKind
impl StructuralPartialEq for WorkspaceKind
Auto Trait Implementations§
impl Freeze for WorkspaceKind
impl RefUnwindSafe for WorkspaceKind
impl Send for WorkspaceKind
impl Sync for WorkspaceKind
impl Unpin for WorkspaceKind
impl UnsafeUnpin for WorkspaceKind
impl UnwindSafe for WorkspaceKind
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