#[non_exhaustive]pub enum ErrorCause {
Expansion(ErrorCause),
NulByte(NulError),
FdNotOverwritten(Fd, Errno),
ReservedFd(Fd),
OpenFile(CString, Errno),
MalformedFd(String, ParseIntError),
UnreadableFd(Fd),
UnwritableFd(Fd),
TemporaryFileUnavailable(Errno),
UnsupportedPipeRedirection,
UnsupportedHereString,
}Expand description
Types of errors that may occur in the redirection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Expansion(ErrorCause)
Expansion error.
NulByte(NulError)
Pathname containing a nul byte.
FdNotOverwritten(Fd, Errno)
The target file descriptor could not be modified for the redirection.
ReservedFd(Fd)
Use of an FD reserved by the shell
This error occurs when a redirection tries to modify an existing FD with the CLOEXEC flag set. See the module documentation for details.
OpenFile(CString, Errno)
Error while opening a file.
The CString is the pathname of the file that could not be opened.
MalformedFd(String, ParseIntError)
Operand of <& or >& that cannot be parsed as an integer.
UnreadableFd(Fd)
<& applied to an unreadable file descriptor
UnwritableFd(Fd)
>& applied to an unwritable file descriptor
Error preparing a temporary file to save here-document content
UnsupportedPipeRedirection
Pipe redirection is used, which is not yet implemented.
UnsupportedHereString
Here-string redirection is used, which is not yet implemented.
Implementations§
Trait Implementations§
Source§impl Clone for ErrorCause
impl Clone for ErrorCause
Source§fn clone(&self) -> ErrorCause
fn clone(&self) -> ErrorCause
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ErrorCause
impl Debug for ErrorCause
Source§impl Display for ErrorCause
impl Display for ErrorCause
impl Eq for ErrorCause
Source§impl Error for ErrorCause
impl Error for ErrorCause
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ErrorCause> for ErrorCause
impl From<ErrorCause> for ErrorCause
Source§fn from(source: ErrorCause) -> Self
fn from(source: ErrorCause) -> Self
Source§impl From<NulError> for ErrorCause
impl From<NulError> for ErrorCause
Source§impl PartialEq for ErrorCause
impl PartialEq for ErrorCause
Source§fn eq(&self, other: &ErrorCause) -> bool
fn eq(&self, other: &ErrorCause) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ErrorCause
Auto Trait Implementations§
impl !RefUnwindSafe for ErrorCause
impl !Send for ErrorCause
impl !Sync for ErrorCause
impl !UnwindSafe for ErrorCause
impl Freeze for ErrorCause
impl Unpin for ErrorCause
impl UnsafeUnpin for ErrorCause
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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