Enum rotor_stream::Exception
[−]
pub enum Exception { EndOfStream, LimitReached, ReadError(Error), WriteError(Error), ConnectError(Error), }
An exception value that is received in Protocol::exception
method
This thing is usually used for nice error detection. But sometimes it is also useful for valid protocol processing. For example it allows to detect end-of-stream-delimited prootols (of those which make of use of TCP half close)
Variants
EndOfStream | End of stream reached (when reading) This may be not a broken expectation, we just notify of end of stream always (if the state machine is still alive) Note: the equivalent of end of stream for write system call is
translated to | |
LimitReached | Limit for the number of bytes reached This is called when there is alredy maximum bytes in the buffer
(third argument of | |
ReadError | ||
WriteError | ||
ConnectError |