pub struct ExportOptions {
pub atomic: bool,
pub overwrite: bool,
}Expand description
Options for filesystem export operations.
§Examples
use mcp_execution_files::ExportOptions;
let options = ExportOptions::default()
.with_atomic_writes(true)
.with_overwrite(true);Fields§
§atomic: boolUse atomic writes (write to temp file, then rename)
overwrite: boolOverwrite existing files
Implementations§
Source§impl ExportOptions
impl ExportOptions
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates new export options with defaults.
Defaults:
- atomic: true (safer)
- overwrite: true (common case)
Sourcepub const fn with_atomic_writes(self, atomic: bool) -> Self
pub const fn with_atomic_writes(self, atomic: bool) -> Self
Sets whether to use atomic writes.
Sourcepub const fn with_overwrite(self, overwrite: bool) -> Self
pub const fn with_overwrite(self, overwrite: bool) -> Self
Sets whether to overwrite existing files.
Trait Implementations§
Source§impl Clone for ExportOptions
impl Clone for ExportOptions
Source§fn clone(&self) -> ExportOptions
fn clone(&self) -> ExportOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExportOptions
impl Debug for ExportOptions
Auto Trait Implementations§
impl Freeze for ExportOptions
impl RefUnwindSafe for ExportOptions
impl Send for ExportOptions
impl Sync for ExportOptions
impl Unpin for ExportOptions
impl UnwindSafe for ExportOptions
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