pub enum Workspace {
Project(PathBuf),
Scratch(PathBuf),
}Expand description
What a session works in (docs/ARCHITECTURE.md §3.2).
Variants§
Project(PathBuf)
A project: the tools work in it, and its project directory is the project tier.
Scratch(PathBuf)
No project (project_root: null): no project tier, no git or
AGENTS.md context, and the tools work in this directory of the
session’s own under the state root’s scratchpad
(crate::paths::session_scratch_dir) — never in the state root’s
parent, which for ~/.agix is the user’s home.
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn project_of(local_data_dir: &Path) -> Self
pub fn project_of(local_data_dir: &Path) -> Self
The project whose project directory is local_data_dir.
Sourcepub fn project_root(&self) -> Option<&Path>
pub fn project_root(&self) -> Option<&Path>
The project, None without one.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Workspace
impl<'de> Deserialize<'de> for Workspace
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 Workspace
Source§impl JsonSchema for Workspace
impl JsonSchema for Workspace
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Workspace
Auto Trait Implementations§
impl Forget for Workspace
impl Freeze for Workspace
impl Move 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