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
)