pub struct MaintenanceCommand {
pub program: String,
pub args: Vec<String>,
}Expand description
The argv of a maintenance command: the program, and the arguments it is spawned with.
A program beside its arguments rather than one list, because a list can be empty and an argv cannot — there is nothing to spawn without a program — so a caller that builds a rule in memory is refused by the type rather than at a validation it has not reached yet.
The document’s own form is unchanged: a non-empty sequence whose first element is
the program and whose rest are its arguments, spawned with no shell, so &&,
pipes and globs are passed through literally rather than composed. A host that
wants composition writes a script and names it here. Both ways a document can
name nothing to spawn — an empty sequence, and a first element that is the empty
string — are refused where it deserializes, naming the key; what this build
writes is the sequence it read.
Fields§
§program: StringThe program, spawned in the slot’s worktree. Never empty.
args: Vec<String>Its arguments, in the order the sequence spelled them. An argument may be the empty string — a program is entitled to take one — which is why only the program is held to being non-empty.
Implementations§
Trait Implementations§
Source§impl Clone for MaintenanceCommand
impl Clone for MaintenanceCommand
Source§impl Debug for MaintenanceCommand
impl Debug for MaintenanceCommand
Source§impl<'de> Deserialize<'de> for MaintenanceCommand
impl<'de> Deserialize<'de> for MaintenanceCommand
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for MaintenanceCommand
Source§impl PartialEq for MaintenanceCommand
impl PartialEq for MaintenanceCommand
Source§impl Serialize for MaintenanceCommand
The sequence the host wrote, so a document round-trips as it stands.
impl Serialize for MaintenanceCommand
The sequence the host wrote, so a document round-trips as it stands.
impl StructuralPartialEq for MaintenanceCommand
Auto Trait Implementations§
impl Freeze for MaintenanceCommand
impl RefUnwindSafe for MaintenanceCommand
impl Send for MaintenanceCommand
impl Sync for MaintenanceCommand
impl Unpin for MaintenanceCommand
impl UnsafeUnpin for MaintenanceCommand
impl UnwindSafe for MaintenanceCommand
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.