Struct binate::frame::codec::ErrorFrame [−][src]
pub struct ErrorFrame { /* fields omitted */ }
frame
only.Expand description
The error frame.
Error frames are used for errors on individual requests/streams as well as connection errors and in response to SETUP frames.
Frame Contents
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID |
+-----------+-+-+---------------+-------------------------------+
|Frame Type |0|0| Flags |
+-----------+-+-+---------------+-------------------------------+
| Error Code |
+---------------------------------------------------------------+
Error Data
A Stream ID of 0 means the error pertains to the connection., including connection establishment. A Stream ID > 0 means the error pertains to a given stream.
The Error Data is typically an Exception message, but could include stringified stacktrace information if appropriate.
See the Frame Error
section of the RSocket protocol spec for more information.
Implementations
The Setup frame is invalid for the server (it could be that the client is too recent for the old server).
Stream ID MUST be 0.
Some (or all) of the parameters specified by the client are unsupported by the server.
Stream ID MUST be 0.
The server rejected the setup, it can specify the reason in the payload.
Stream ID MUST be 0.
The server rejected the resume, it can specify the reason in the payload.
Stream ID MUST be 0.
The connection is being terminated.
Sender or Receiver of this frame MAY close the connection immediately without waiting for outstanding streams to terminate. Stream ID MUST be 0.
The connection is being terminated.
Sender or Receiver of this frame MUST wait for outstanding streams to terminate before closing the connection. New requests MAY not be accepted. Stream ID MUST be 0.
Application layer logic generating a Reactive Streams
onError event.
Stream ID MUST be > 0.
Despite being a valid request, the Responder decided to reject it.
The Responder guarantees that it didn’t process the request. The reason for the rejection is explained in the Error Data section. Stream ID MUST be > 0.
The Responder canceled the request but may have started processing it (similar to REJECTED but doesn’t guarantee lack of side-effects).
Stream ID MUST be > 0.
The minimum error code that can used as application layer error.
The maximum error code that can used as application layer error.
Create a new ErrorFrame
.
stream_id
anderror_code
MUST be <=MAX_U31
.data
SHOULD be a UTF-8 encoded string.
Returns the error code in this error frame.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ErrorFrame
impl Send for ErrorFrame
impl Sync for ErrorFrame
impl Unpin for ErrorFrame
impl UnwindSafe for ErrorFrame
Blanket Implementations
Mutably borrows from an owned value. Read more