pub struct ActivityHookConfig {
pub command: Vec<String>,
pub idle_grace_seconds: u64,
pub timeout_seconds: u64,
pub retry_seconds: u64,
}Expand description
Local foreground command holding a host inhibitor until stdin closes.
Fields§
§command: Vec<String>Absolute trusted executable followed by its arguments; no shell is added.
idle_grace_seconds: u64Hold after the latest work transition or first confirmed idle observation.
timeout_seconds: u64Deadline for activity measurements and each graceful child shutdown phase.
retry_seconds: u64Retry and child-health interval after a failed measurement or command exit.
Implementations§
Source§impl ActivityHookConfig
impl ActivityHookConfig
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validates local command text, deadlines, and executable identity.
§Errors
Returns an error for invalid settings or an unavailable executable.
Sourcepub fn validate_roots<'a>(
&self,
roots: impl IntoIterator<Item = &'a Path>,
) -> Result<()>
pub fn validate_roots<'a>( &self, roots: impl IntoIterator<Item = &'a Path>, ) -> Result<()>
Rejects hook executables located inside protected or agent-writable roots.
§Errors
Returns an error for inaccessible roots or an overlapping executable.
Trait Implementations§
Source§impl Clone for ActivityHookConfig
impl Clone for ActivityHookConfig
Source§impl Debug for ActivityHookConfig
impl Debug for ActivityHookConfig
Source§impl Default for ActivityHookConfig
impl Default for ActivityHookConfig
Source§impl<'de> Deserialize<'de> for ActivityHookConfigwhere
ActivityHookConfig: Default,
impl<'de> Deserialize<'de> for ActivityHookConfigwhere
ActivityHookConfig: Default,
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ActivityHookConfig
Source§impl PartialEq for ActivityHookConfig
impl PartialEq for ActivityHookConfig
Source§impl Serialize for ActivityHookConfig
impl Serialize for ActivityHookConfig
impl StructuralPartialEq for ActivityHookConfig
Auto Trait Implementations§
impl Freeze for ActivityHookConfig
impl RefUnwindSafe for ActivityHookConfig
impl Send for ActivityHookConfig
impl Sync for ActivityHookConfig
impl Unpin for ActivityHookConfig
impl UnsafeUnpin for ActivityHookConfig
impl UnwindSafe for ActivityHookConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.