pub enum StdioError {
Transport,
ReplyTooLarge {
limit: MaxFrameSize,
len: usize,
},
}Expand description
Why the stdio transport could not carry a frame.
Deliberately not crate::application::jsonrpc::SourceError or
crate::application::session::SinkError. Those are the ports, and they
carry no detail on purpose: the application layer is protocol-neutral and
must not learn that a broken pipe and an oversized reply are different
failures. This is the transport’s own account, and it is what a caller
driving StdioSource or StdioSink directly actually learns.
Variants§
Transport
The peer’s stream refused a read or a write.
Carries no io::Error on purpose, for the reason the ports do not: a
caller in a position to do something about which failure it was
inspects its own transport, and one that is not has nothing useful to do
with the difference.
ReplyTooLarge
A reply was larger than the transport is configured to write.
Terminal, and not a truncated write. The document does not fit a frame, so there is no frame to write, and writing the bytes anyway would put a line on the wire that the peer’s decoder must then reject as malformed — a protocol error caused by our own answer, reported as a protocol error from the peer’s side, with nothing in this process to connect the two.
Fields
limit: MaxFrameSizeThe ceiling the caller configured.
Trait Implementations§
Source§impl Clone for StdioError
impl Clone for StdioError
impl Copy for StdioError
Source§impl Debug for StdioError
impl Debug for StdioError
Source§impl Display for StdioError
impl Display for StdioError
impl Eq for StdioError
Source§impl Error for StdioError
impl Error for StdioError
1.30.0 · 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()