[−][src]Struct zap_model::task::Script
A Script represents something that can be executed oa a remote host.
These come in two variants:
- Inline string of shell commands to run
- A script or binary file to transfer and execute
Fields
inline: Option<String>
Inline scripts will have parameters rendered into then with handlebars syntax
file: Option<PathBuf>
File scripts will be executed with the parameters passed as command line arguments, e.g. the "msg" parameter would be passed as: ./file --msg=value
Implementations
impl Script
[src]
pub fn has_file(&self) -> bool
[src]
pub fn as_bytes(
&self,
parameters: Option<&HashMap<String, String>>
) -> Option<Vec<u8>>
[src]
&self,
parameters: Option<&HashMap<String, String>>
) -> Option<Vec<u8>>
Return the script's contents as bytes
This is useful for transferring the script to another host for execution
If the file
member is defined, that will be preferred, even if inline
is also defined
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Script
[src]
impl Send for Script
[src]
impl Sync for Script
[src]
impl Unpin for Script
[src]
impl UnwindSafe for Script
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,