pub struct ShellTimeouts { /* private fields */ }Expand description
How long a shell command may run, fixed when the session is created.
Implementations§
Source§impl ShellTimeouts
impl ShellTimeouts
pub const DEFAULT: Self
Sourcepub fn new(default_secs: u32, max_secs: u32) -> Result<Self, ShellTimeoutsError>
pub fn new(default_secs: u32, max_secs: u32) -> Result<Self, ShellTimeoutsError>
Checks both values, in seconds.
§Errors
Fails when a value is outside 1..=LONGEST_SHELL_TIMEOUT_SECS or the default exceeds the maximum.
Sourcepub fn effective(self, requested_secs: Option<u64>) -> Duration
pub fn effective(self, requested_secs: Option<u64>) -> Duration
Timeout of a call: the agent’s request, or the default, held between 1 s and the maximum.
pub fn max(self) -> Duration
Trait Implementations§
Source§impl Clone for ShellTimeouts
impl Clone for ShellTimeouts
impl Copy for ShellTimeouts
Source§impl Debug for ShellTimeouts
impl Debug for ShellTimeouts
Source§impl Default for ShellTimeouts
impl Default for ShellTimeouts
Source§impl<'de> Deserialize<'de> for ShellTimeouts
impl<'de> Deserialize<'de> for ShellTimeouts
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 ShellTimeouts
Source§impl PartialEq for ShellTimeouts
impl PartialEq for ShellTimeouts
Source§impl Serialize for ShellTimeouts
impl Serialize for ShellTimeouts
impl StructuralPartialEq for ShellTimeouts
Auto Trait Implementations§
impl Freeze for ShellTimeouts
impl RefUnwindSafe for ShellTimeouts
impl Send for ShellTimeouts
impl Sync for ShellTimeouts
impl Unpin for ShellTimeouts
impl UnsafeUnpin for ShellTimeouts
impl UnwindSafe for ShellTimeouts
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