pub enum SpawnError {
CommandNotFound {
command: String,
},
PermissionDenied {
path: String,
},
PtyAllocation {
reason: String,
},
TerminalSetup {
reason: String,
},
InvalidEnv {
name: String,
},
InvalidWorkingDir {
path: String,
},
Io(Error),
InvalidArgument {
kind: String,
value: String,
reason: String,
},
}Expand description
Errors related to process spawning.
Variants§
CommandNotFound
Command not found.
PermissionDenied
Permission denied.
PtyAllocation
PTY allocation failed.
TerminalSetup
Failed to set up terminal.
InvalidEnv
Environment variable error.
InvalidWorkingDir
Working directory error.
Io(Error)
General I/O error during spawn.
InvalidArgument
Invalid command or argument.
Implementations§
Source§impl SpawnError
impl SpawnError
Sourcepub fn command_not_found(command: impl Into<String>) -> Self
pub fn command_not_found(command: impl Into<String>) -> Self
Create a command not found error.
Sourcepub fn permission_denied(path: impl Into<String>) -> Self
pub fn permission_denied(path: impl Into<String>) -> Self
Create a permission denied error.
Sourcepub fn pty_allocation(reason: impl Into<String>) -> Self
pub fn pty_allocation(reason: impl Into<String>) -> Self
Create a PTY allocation error.
Sourcepub fn terminal_setup(reason: impl Into<String>) -> Self
pub fn terminal_setup(reason: impl Into<String>) -> Self
Create a terminal setup error.
Sourcepub fn invalid_env(name: impl Into<String>) -> Self
pub fn invalid_env(name: impl Into<String>) -> Self
Create an invalid environment variable error.
Sourcepub fn invalid_working_dir(path: impl Into<String>) -> Self
pub fn invalid_working_dir(path: impl Into<String>) -> Self
Create an invalid working directory error.
Trait Implementations§
Source§impl Debug for SpawnError
impl Debug for SpawnError
Source§impl Display for SpawnError
impl Display for SpawnError
Source§impl Error for SpawnError
impl Error for SpawnError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for SpawnError
impl From<Error> for SpawnError
Source§impl From<SpawnError> for ExpectError
impl From<SpawnError> for ExpectError
Source§fn from(source: SpawnError) -> Self
fn from(source: SpawnError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SpawnError
impl !RefUnwindSafe for SpawnError
impl Send for SpawnError
impl Sync for SpawnError
impl Unpin for SpawnError
impl !UnwindSafe for SpawnError
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