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

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 WriteError(WriteZero)

Limit for the number of bytes reached

This is called when there is alredy maximum bytes in the buffer (third argument of Delimiter) but no delimiter found.

Trait Implementations

impl Debug for Exception
[src]

Formats the value using the given formatter.

impl Display for Exception

Formats the value using the given formatter. Read more

impl Error for Exception

A short description of the error. Read more

The lower-level cause of this error, if any. Read more