#[non_exhaustive]pub enum PollError {
Malformed {
path: Utf8PathBuf,
contents: Vec<u8>,
source: Box<dyn Error + Send + Sync>,
},
Io {
path: Utf8PathBuf,
source: Error,
},
ProcessExited {
path: Utf8PathBuf,
status: ExitStatus,
},
ChildTryWait {
path: Utf8PathBuf,
source: Error,
},
}Expand description
A permanent error indicating the port file could not be read, returned by
poll_once.
This is also part of the WaitForError::Poll variant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Malformed
The file was present but its contents could not be parsed.
When the file is produced by write or another atomic writer, there
is no danger of seeing a partial write, so a parse error is permanent.
However, a non-atomic writer can momentarily expose an incomplete file,
which would be reported as malformed here.
Fields
path: Utf8PathBufThe path to the port file.
Io
The file could not be read for a reason other than “not found yet” or an interrupted read.
Io is returned for all I/O error kinds other than the following:
io::ErrorKind::NotFound, since that indicates the port file is not present.io::ErrorKind::Interrupted, which should be retried.- On Windows, OS error 32 (
ERROR_SHARING_VIOLATION), which usually indicates an antivirus or other scanner.
Fields
path: Utf8PathBufThe path to the port file.
ProcessExited
The child process exited before the port file appeared.
Fields
path: Utf8PathBufThe path to the port file.
status: ExitStatusThe exit status of the child process.
ChildTryWait
There was an error determining whether the child process was alive.
Fields
path: Utf8PathBufThe path to the port file.
Implementations§
Trait Implementations§
Source§impl Error for PollError
impl Error for PollError
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()