pub enum ErrorCause {
Expansion(ErrorCause),
NulByte(NulError),
FdNotOverwritten(Fd, Errno),
ReservedFd(Fd),
OpenFile(CString, Errno),
MalformedFd(String, ParseIntError),
UnreadableFd(Fd),
UnwritableFd(Fd),
TemporaryFileUnavailable(Errno),
}
Expand description
Types of errors that may occur in the redirection.
Variants§
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
Implementations§
Trait Implementations§
Source§impl Clone for ErrorCause
impl Clone for ErrorCause
Source§fn clone(&self) -> ErrorCause
fn clone(&self) -> ErrorCause
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ErrorCause
impl Debug for ErrorCause
Source§impl Display for ErrorCause
impl Display 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)>
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<ErrorCause> for ErrorCause
impl From<ErrorCause> for ErrorCause
Source§fn from(source: ErrorCause) -> Self
fn from(source: ErrorCause) -> Self
Converts to this type from the input type.
Source§impl From<NulError> for ErrorCause
impl From<NulError> for ErrorCause
Source§impl PartialEq for ErrorCause
impl PartialEq for ErrorCause
impl Eq for ErrorCause
impl StructuralPartialEq for ErrorCause
Auto Trait Implementations§
impl Freeze for ErrorCause
impl !RefUnwindSafe for ErrorCause
impl !Send for ErrorCause
impl !Sync for ErrorCause
impl Unpin for ErrorCause
impl !UnwindSafe 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
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> 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