pub struct ScriptCommand {
pub command: CommandLine,
pub pattern: OutputPattern,
pub exit: CommandExit,
pub expect_failure: bool,
pub set_var: Option<String>,
pub set_vars: HashMap<String, ShellBit>,
pub timeout: Option<Duration>,
pub expect: HashMap<String, ShellBit>,
}Fields§
§command: CommandLine§pattern: OutputPattern§exit: CommandExit§expect_failure: bool§set_var: Option<String>Single set variable (entire command output trimmed)
set_vars: HashMap<String, ShellBit>Specific set variables
timeout: Option<Duration>Specific command timeout
expect: HashMap<String, ShellBit>Input grok expectations
Implementations§
Source§impl ScriptCommand
impl ScriptCommand
pub fn new(command: CommandLine) -> Self
pub fn run( &self, context: &mut ScriptRunContext, ) -> Result<ScriptResult, ScriptRunError>
Trait Implementations§
Source§impl Debug for ScriptCommand
impl Debug for ScriptCommand
Auto Trait Implementations§
impl Freeze for ScriptCommand
impl RefUnwindSafe for ScriptCommand
impl Send for ScriptCommand
impl Sync for ScriptCommand
impl Unpin for ScriptCommand
impl UnsafeUnpin for ScriptCommand
impl UnwindSafe for ScriptCommand
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