pub struct ExitCode(/* private fields */);Expand description
A script exit code.
The mapping is fixed and mirrors the conventions a model already knows from bash and coreutils.
Implementations§
Source§impl ExitCode
impl ExitCode
Sourcepub const FAILURE: Self
pub const FAILURE: Self
A capability call ran and errored, or a builtin reported a runtime failure.
Sourcepub const TIMEOUT: Self
pub const TIMEOUT: Self
The script exceeded its wall-clock deadline, matching coreutils timeout(1).
Sourcepub const DENIED: Self
pub const DENIED: Self
A capability was found but authorization refused it, matching bash’s “cannot execute”.
Sourcepub fn from_script_exit(status: i64) -> Self
pub fn from_script_exit(status: i64) -> Self
Wraps a raw status, mirroring bash’s N mod 256 wraparound for exit N.
Sourcepub const fn from_capability_result(result: &CapabilityCallResult) -> Self
pub const fn from_capability_result(result: &CapabilityCallResult) -> Self
Maps one capability call outcome onto its exit code.
Trait Implementations§
impl Copy for ExitCode
impl Eq for ExitCode
Source§impl Ord for ExitCode
impl Ord for ExitCode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for ExitCode
impl PartialOrd for ExitCode
impl StructuralPartialEq for ExitCode
Auto Trait Implementations§
impl Freeze for ExitCode
impl RefUnwindSafe for ExitCode
impl Send for ExitCode
impl Sync for ExitCode
impl Unpin for ExitCode
impl UnsafeUnpin for ExitCode
impl UnwindSafe for ExitCode
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.