pub struct Workspace {
pub git_root: Option<String>,
pub repository: Option<String>,
pub branch: Option<String>,
pub revision: Option<String>,
}Expand description
Git/workspace context parsed from a session’s workspace.yaml.
⚠️ [reverse-eng, Medium] — the exact field names and structure are
unverified (see docs/agents/formats/copilot-cli/session-state.md). Rather
than pull in a YAML dependency for a guessed schema, parse_workspace
does a tolerant line scan that matches known key spellings at any
indentation (so both a flat file and a one-level-nested git: block
resolve). Correct once verified against a real workspace.yaml.
Fields§
§git_root: Option<String>Absolute path to the repository root.
repository: Option<String>Repository identifier (owner/name, or a remote URL).
branch: Option<String>Active branch at session time.
revision: Option<String>Commit hash, when recorded.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl UnwindSafe for Workspace
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