pub struct SessionCheck { /* private fields */ }Expand description
A command to run in a session’s work folder once the session has ended.
Implementations§
Source§impl SessionCheck
impl SessionCheck
Sourcepub fn new(
command: &str,
files: Option<PathBuf>,
timeout: Duration,
) -> Result<Self, String>
pub fn new( command: &str, files: Option<PathBuf>, timeout: Duration, ) -> Result<Self, String>
command split into a binary and its arguments the way the shell tool splits a command
line: whitespace separates words, quotes group them, a backslash escapes one character,
and nothing is expanded. files is a directory copied into the work folder’s root before
the command runs. Refuses a command with no words and a zero timeout.
Sourcepub fn binary(&self) -> &str
pub fn binary(&self) -> &str
The binary the command runs, which must be in capabilities.shell.allow.
Sourcepub fn args(&self) -> &[String]
pub fn args(&self) -> &[String]
The arguments after Self::binary.
Trait Implementations§
Source§impl Clone for SessionCheck
impl Clone for SessionCheck
Auto Trait Implementations§
impl Freeze for SessionCheck
impl RefUnwindSafe for SessionCheck
impl Send for SessionCheck
impl Sync for SessionCheck
impl Unpin for SessionCheck
impl UnsafeUnpin for SessionCheck
impl UnwindSafe for SessionCheck
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more