Enum ShellDialect
pub enum ShellDialect {
Posix,
WindowsCmd,
PowerShell,
None,
}Expand description
Shell language understood by a runtime’s command builder.
This is part of the execution boundary: security policy must validate the
same language that RuntimeAdapter::build_shell_command will interpret.
The command-risk policy needs this to apply platform-specific safety rules —
notably the null device: a POSIX shell treats nul as an ordinary relative
filename (so echo x >nul would create/truncate a workspace file), while
Windows cmd.exe resolves it to the discard-only null device. A redirect to
nul is therefore only safe under ShellDialect::WindowsCmd.
The dialect follows the effective execution sink, not merely the host OS.
Docker always runs through sh -c and stays ShellDialect::Posix even on
a Windows host. Native cron execution follows the configured runtime dialect.
Variants§
Posix
POSIX sh/bash semantics — Unix native execution and Docker sh -c.
The conservative default.
WindowsCmd
Windows cmd.exe semantics — native execution on a Windows host.
PowerShell
Windows PowerShell or PowerShell 7+.
None
The runtime does not expose shell execution.
Trait Implementations§
Source§impl Clone for ShellDialect
impl Clone for ShellDialect
Source§fn clone(&self) -> ShellDialect
fn clone(&self) -> ShellDialect
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ShellDialect
Source§impl Debug for ShellDialect
impl Debug for ShellDialect
Source§impl Default for ShellDialect
impl Default for ShellDialect
Source§fn default() -> ShellDialect
fn default() -> ShellDialect
impl Eq for ShellDialect
Source§impl PartialEq for ShellDialect
impl PartialEq for ShellDialect
impl StructuralPartialEq for ShellDialect
Auto Trait Implementations§
impl Freeze for ShellDialect
impl RefUnwindSafe for ShellDialect
impl Send for ShellDialect
impl Sync for ShellDialect
impl Unpin for ShellDialect
impl UnsafeUnpin for ShellDialect
impl UnwindSafe for ShellDialect
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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