pub struct Hook { /* private fields */ }
Expand description
Hook specifies a command that is run at a particular event in the lifecycle of a container.
Implementations§
Source§impl Hook
impl Hook
Sourcepub fn path(&self) -> &PathBuf
pub fn path(&self) -> &PathBuf
Path to the binary to be executed. Following similar semantics to
IEEE Std 1003.1-2008 execv
’s path. This
specification extends the IEEE standard in that path MUST be
absolute.
Source§impl Hook
impl Hook
Sourcepub fn path_mut(&mut self) -> &mut PathBuf
pub fn path_mut(&mut self) -> &mut PathBuf
Path to the binary to be executed. Following similar semantics to
IEEE Std 1003.1-2008 execv
’s path. This
specification extends the IEEE standard in that path MUST be
absolute.
Sourcepub fn args_mut(&mut self) -> &mut Option<Vec<String>>
pub fn args_mut(&mut self) -> &mut Option<Vec<String>>
Arguments used for the binary, including the binary name itself.
Following the same semantics as IEEE Std 1003.1-2008
execv
’s argv.
Sourcepub fn env_mut(&mut self) -> &mut Option<Vec<String>>
pub fn env_mut(&mut self) -> &mut Option<Vec<String>>
Additional key=value
environment variables. Following the same
semantics as IEEE Std 1003.1-2008’s environ
.
Sourcepub fn timeout_mut(&mut self) -> &mut Option<i64>
pub fn timeout_mut(&mut self) -> &mut Option<i64>
Timeout is the number of seconds before aborting the hook. If set, timeout MUST be greater than zero.
Source§impl Hook
impl Hook
Sourcepub fn set_path(&mut self, val: PathBuf) -> &mut Self
pub fn set_path(&mut self, val: PathBuf) -> &mut Self
Path to the binary to be executed. Following similar semantics to
IEEE Std 1003.1-2008 execv
’s path. This
specification extends the IEEE standard in that path MUST be
absolute.
Sourcepub fn set_args(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_args(&mut self, val: Option<Vec<String>>) -> &mut Self
Arguments used for the binary, including the binary name itself.
Following the same semantics as IEEE Std 1003.1-2008
execv
’s argv.
Sourcepub fn set_env(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_env(&mut self, val: Option<Vec<String>>) -> &mut Self
Additional key=value
environment variables. Following the same
semantics as IEEE Std 1003.1-2008’s environ
.
Sourcepub fn set_timeout(&mut self, val: Option<i64>) -> &mut Self
pub fn set_timeout(&mut self, val: Option<i64>) -> &mut Self
Timeout is the number of seconds before aborting the hook. If set, timeout MUST be greater than zero.