pub struct WorkflowSideEffects { /* private fields */ }Expand description
Shared mutable store for a single workflow run.
Implementations§
Source§impl WorkflowSideEffects
impl WorkflowSideEffects
Shared handle.
Sourcepub fn set_git_cwd(&self, cwd: impl Into<PathBuf>)
pub fn set_git_cwd(&self, cwd: impl Into<PathBuf>)
Enable git operations rooted at cwd (must be a git work tree).
Sourcepub fn register_template(
&self,
name: impl Into<String>,
body: impl Into<String>,
)
pub fn register_template( &self, name: impl Into<String>, body: impl Into<String>, )
Register a named template body. Placeholders use {{key}}.
Sourcepub fn write_scratch(
&self,
name: &str,
content: String,
) -> Result<String, HostError>
pub fn write_scratch( &self, name: &str, content: String, ) -> Result<String, HostError>
Write scratch content; returns virtual path scratch/{name}.
§Errors
Empty name or oversized content.
Sourcepub fn render_template(
&self,
name: &str,
vars: &Value,
) -> Result<String, HostError>
pub fn render_template( &self, name: &str, vars: &Value, ) -> Result<String, HostError>
Render a registered template with string vars from a JSON object.
§Errors
Missing template or non-object vars.
Sourcepub fn scratch_len(&self) -> usize
pub fn scratch_len(&self) -> usize
Number of scratch entries (tests).
Sourcepub fn git_diff_since(&self, commit: &str) -> Result<String, HostError>
pub fn git_diff_since(&self, commit: &str) -> Result<String, HostError>
Run git diff <commit> (commit → working tree) in the configured cwd.
Optional capability: requires Self::set_git_cwd. Prefer leaving
git disabled unless the host product needs repository context.
§Errors
Missing cwd, invalid commit string, or git failure.
Trait Implementations§
Source§impl Debug for WorkflowSideEffects
impl Debug for WorkflowSideEffects
Source§impl Default for WorkflowSideEffects
impl Default for WorkflowSideEffects
Source§fn default() -> WorkflowSideEffects
fn default() -> WorkflowSideEffects
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for WorkflowSideEffects
impl RefUnwindSafe for WorkflowSideEffects
impl Send for WorkflowSideEffects
impl Sync for WorkflowSideEffects
impl Unpin for WorkflowSideEffects
impl UnsafeUnpin for WorkflowSideEffects
impl UnwindSafe for WorkflowSideEffects
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