pub enum StdioClientError {
Document(RequestError),
Stdio(StdioError),
Source(SourceError),
PeerClosed {
method: MethodName,
},
TimedOut {
method: MethodName,
after: Duration,
},
Request(RequestError),
NoAnswer {
skipped: usize,
},
Terminate,
}Expand description
Why a client call did not complete.
Deliberately not
ClientError, which is the
layer above: that one adds “this session cannot do that”, and this one
cannot know. A caller that has a negotiated profile can add the fact; a
caller holding a transport and a pipe can only report the pipe.
Variants§
Document(RequestError)
The request document could not be assembled.
Kept separate from Request because they happen at
opposite ends of the call: this one is this client’s fault and happens
before a byte is written, and that one is the peer’s answer arriving
wrong. A caller that logged both as “bad request” would be wrong about
one of them.
Stdio(StdioError)
A frame could not be written to the child.
Source(SourceError)
The child’s bytes could not be read.
PeerClosed
The child closed its stdout before answering.
Its own account of having exited, as distinct from a child that has not
answered yet — which is TimedOut, and is the
failure a caller is most likely to meet and least likely to recognise.
Fields
method: MethodNameThe method that went unanswered.
TimedOut
The child did not answer within the client’s deadline.
Request(RequestError)
The peer’s answer was not a result.
NoAnswer
A run of frames arrived that were all somebody else’s.
Separate from TimedOut because the child is
demonstrably alive and sending: it is answering, just never this
request. A caller reading a log should not conclude the peer went away
when it is in fact answering everything except what was asked.
Terminate
The child could not be waited for after being killed.
Trait Implementations§
Source§impl Clone for StdioClientError
impl Clone for StdioClientError
Source§impl Debug for StdioClientError
impl Debug for StdioClientError
Source§impl Display for StdioClientError
impl Display for StdioClientError
impl Eq for StdioClientError
Source§impl Error for StdioClientError
impl Error for StdioClientError
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()