#[non_exhaustive]pub enum Error {
Server {
code: String,
message: String,
},
Protocol(String),
Io(Error),
Timeout(String),
TooLarge(String),
TooManyEntries(String),
Partial {
written: usize,
source: Box<Error>,
},
}Expand description
Errors returned by the client. New variants can be added, so a match needs a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Server
The server answered with an error frame. code is a POSIX name such as ENOENT.
Protocol(String)
The peer broke the frame or message contract.
Io(Error)
The socket failed.
Timeout(String)
A call did not finish within Options::call_timeout. On a pipelining connection only this
call fails and the late reply is dropped. Otherwise the connection was dropped, so a late
reply cannot reach another call, and its open files and watches are gone. The code is
DEADLINE_EXCEEDED and the io::ErrorKind is TimedOut.
TooLarge(String)
A request is larger than the frame limits. Nothing was sent and the connection is intact.
TooManyEntries(String)
A directory helper hit its bound: read_dir_all found more entries than its limit, or
walk queued more pending directories than its limit. The message names the limit.
Partial
A write that covers more than one frame failed after written bytes were stored.
source is the failure. code and the io::ErrorKind come from source.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()