pub struct FileWrite { /* private fields */ }Expand description
Capability that writes file contents with backup-before-mutate.
Every write creates a timestamped backup via BackupManager, enabling
rollback through the undo system. The backup is created before the
mutation, so a failed write still leaves a recoverable state.
Implementations§
Trait Implementations§
Source§impl TypedCapability for FileWrite
impl TypedCapability for FileWrite
Source§type Args = FileWriteArgs
type Args = FileWriteArgs
The typed arguments struct for this capability. Read more
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Returns a one-line description of what this capability does.
Source§fn execute(
&self,
args: FileWriteArgs,
ctx: &Context,
) -> Result<Output, CapabilityError>
fn execute( &self, args: FileWriteArgs, ctx: &Context, ) -> Result<Output, CapabilityError>
Executes the capability with typed arguments. Read more
Auto Trait Implementations§
impl Freeze for FileWrite
impl RefUnwindSafe for FileWrite
impl Send for FileWrite
impl Sync for FileWrite
impl Unpin for FileWrite
impl UnsafeUnpin for FileWrite
impl UnwindSafe for FileWrite
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