#[non_exhaustive]pub enum SessionKind {
Root,
Subagent,
Unknown(String),
}Expand description
What kind of session this is.
Open: a new kind is additive evolution, and a client MUST render an
unknown value as an unknown-but-present kind rather than rejecting the
row. Both v1 values are terms the tree already uses — the child log
directory is subagent and ItemKind already carries a subagent
variant — so no new vocabulary is minted.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Root
A canonical or legacy root home.
Subagent
A child home under <parent-session-dir>/subagent/<child-id>/.
Unknown(String)
A value from a newer host, kept verbatim so an older client decodes the rest of the message. Excluded from the generated schema while the enum stays declared open; never construct it with a known word.
Implementations§
Trait Implementations§
Source§impl Clone for SessionKind
impl Clone for SessionKind
Source§impl Debug for SessionKind
impl Debug for SessionKind
Source§impl<'de> Deserialize<'de> for SessionKind
impl<'de> Deserialize<'de> for SessionKind
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 SessionKind
Source§impl PartialEq for SessionKind
impl PartialEq for SessionKind
Source§impl Serialize for SessionKind
impl Serialize for SessionKind
impl StructuralPartialEq for SessionKind
Auto Trait Implementations§
impl Freeze for SessionKind
impl RefUnwindSafe for SessionKind
impl Send for SessionKind
impl Sync for SessionKind
impl Unpin for SessionKind
impl UnsafeUnpin for SessionKind
impl UnwindSafe for SessionKind
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