pub struct WinScript {
pub name: &'static str,
pub body: &'static str,
pub params: Value,
}Expand description
One fixed script and its parameters.
Fields§
§name: &'static strA short name for error messages.
body: &'static strThe script body, a const. It reads its parameters from $p and ends
by calling E with the result.
params: ValueThe parameters: a JSON object (or Null for none), decoded in-script.
Implementations§
Source§impl WinScript
impl WinScript
Sourcepub fn move_replace(src: &str, dst: &str) -> WinScript
pub fn move_replace(src: &str, dst: &str) -> WinScript
The script that replaces dst with src (MOVE_REPLACE).
Sourcepub fn record_replace(src: &str, dst: &str, retries: u32) -> WinScript
pub fn record_replace(src: &str, dst: &str, retries: u32) -> WinScript
The script that atomically replaces the release record dst with
src (RECORD_REPLACE). retries is how often a sharing violation
is retried; like both paths it travels only in the JSON parameters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WinScript
impl RefUnwindSafe for WinScript
impl Send for WinScript
impl Sync for WinScript
impl Unpin for WinScript
impl UnsafeUnpin for WinScript
impl UnwindSafe for WinScript
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