Enum binate::frame::FrameType[][src]

#[non_exhaustive]
pub enum FrameType {
Show variants SETUP, LEASE, KEEPALIVE, REQUEST_RESPONSE, REQUEST_FNF, REQUEST_STREAM, REQUEST_CHANNEL, REQUEST_N, CANCEL, PAYLOAD, ERROR, METADATA_PUSH, RESUME, RESUME_OK, EXT,
}
This is supported on crate feature frame only.
Expand description

Type of frame.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SETUP

Sent by client to initiate protocol processing.

LEASE

Sent by Responder to grant the ability to send requests.

KEEPALIVE

Connection keepalive.

REQUEST_RESPONSE

Request single response.

REQUEST_FNF

A single one-way message.

REQUEST_STREAM

Request a completable stream.

REQUEST_CHANNEL

Request a completable stream in both directions.

REQUEST_N

Request N more items with Reactive Streams semantics.

CANCEL

Cancel outstanding request.

PAYLOAD

Payload on a stream. For example, response to a request, or message on a channel.

ERROR

Error at connection or application level.

METADATA_PUSH

Asynchronous Metadata frame

RESUME

Replaces SETUP for Resuming Operation (optional)

RESUME_OK

Sent in response to a RESUME if resuming operation possible (optional)

EXT

Used To Extend more frame types as well as extensions.

Implementations

Specify the frame type with the raw value described in the Frame Types section of the RSocket protocol spec. This will return None if the given raw value is unrecognized.

Convert from underlying bit representation, if the bit representation contains a valid frame type.

In other words, the higher 6-bit of the given bit pattern will convert to a FrameType.

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
+-----------+-+-+-+-+-----------+-------------------------------+
|Frame Type |I|M|     Flags     |
+-----------+-+-+-+-+-----------+-------------------------------+

Returns the corresponding raw value of this frame type. The raw value is described in the Frame Types section of the RSocket protocol spec.

Convert this frame type to a bit representation, with the higher 6-bit of the return value setting to the raw value of the frame type.

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
+-----------+-+-+-+-+-----------+-------------------------------+
|Frame Type |I|M|     Flags     |
+-----------+-+-+-+-+-----------+-------------------------------+

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.