pub trait CommandWorkspaceContext {
// Required methods
fn workspace(&self) -> PathBuf;
fn effective_home_dir(&self) -> Option<PathBuf>;
fn inspect_workspace_target(&self, candidate: &Path) -> WorkspaceTarget;
fn read_anchor_document(&self) -> Result<Option<String>, String>;
fn append_anchor_bytes(
&mut self,
parts: &[&[u8]],
) -> Result<PathBuf, AnchorWriteError>;
fn replace_anchor_document(&mut self, bytes: &[u8]) -> Result<(), String>;
fn work_state_snapshot(&self) -> Result<Option<String>, String>;
fn operation_digest(&mut self) -> Result<String, String>;
}Expand description
Workspace path, bounded work-state observations and confined anchor storage.
Required Methods§
fn workspace(&self) -> PathBuf
fn effective_home_dir(&self) -> Option<PathBuf>
fn inspect_workspace_target(&self, candidate: &Path) -> WorkspaceTarget
fn read_anchor_document(&self) -> Result<Option<String>, String>
fn append_anchor_bytes( &mut self, parts: &[&[u8]], ) -> Result<PathBuf, AnchorWriteError>
fn replace_anchor_document(&mut self, bytes: &[u8]) -> Result<(), String>
fn work_state_snapshot(&self) -> Result<Option<String>, String>
Sourcefn operation_digest(&mut self) -> Result<String, String>
fn operation_digest(&mut self) -> Result<String, String>
Session-aware canonical operation digest. Returns the final user-facing digest text or a safe explicit error; never a serialized snapshot. No-active-work and temporary-unavailability semantics are preserved by the host implementation (FEAT-018 D5).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".