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.
Sourcepub fn git_entry(projects_dir: &str, project_dir: &str, git: &str) -> WinScript
pub fn git_entry(projects_dir: &str, project_dir: &str, git: &str) -> WinScript
The script that probes the .git entry of one project (GIT_ENTRY).
The three native paths are <data>\projects, the project directory and
its .git; they travel only as parameters.
Sourcepub fn enumerate(prefix: &str, roots: &[String]) -> WinScript
pub fn enumerate(prefix: &str, roots: &[String]) -> WinScript
The script that walks roots with prefix in front of each
(ENUMERATE). prefix is LONG_PATH_PREFIX on a Windows host.
Sourcepub fn enumerate_children(prefix: &str, roots: &[String]) -> WinScript
pub fn enumerate_children(prefix: &str, roots: &[String]) -> WinScript
The script that lists the direct children of roots with prefix in
front of each (ENUMERATE_CHILDREN); its result parses with
parse_enumeration.