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.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hook
impl<'de> Deserialize<'de> for Hook
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Hook
impl StructuralPartialEq for Hook
Auto Trait Implementations§
impl Freeze for Hook
impl RefUnwindSafe for Hook
impl Send for Hook
impl Sync for Hook
impl Unpin for Hook
impl UnwindSafe for Hook
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)