Struct httpbis::solicit::frame::goaway::GoawayFrame [−][src]
pub struct GoawayFrame { pub last_stream_id: StreamId, pub raw_error_code: u32, pub debug_data: Bytes, // some fields omitted }
The struct represents the GOAWAY
HTTP/2 frame.
Fields
last_stream_id: StreamId
raw_error_code: u32
debug_data: Bytes
Methods
impl GoawayFrame
[src]
impl GoawayFrame
pub fn new(last_stream_id: StreamId, error_code: ErrorCode) -> Self
[src]
pub fn new(last_stream_id: StreamId, error_code: ErrorCode) -> Self
Create a new GOAWAY
frame with the given error code and no debug data.
pub fn with_debug_data(
last_stream_id: StreamId,
error_code: ErrorCode,
debug_data: Bytes
) -> Self
[src]
pub fn with_debug_data(
last_stream_id: StreamId,
error_code: ErrorCode,
debug_data: Bytes
) -> Self
Create a new GOAWAY
frame with the given parts.
pub fn error_code(&self) -> ErrorCode
[src]
pub fn error_code(&self) -> ErrorCode
Returns the interpreted error code of the frame. Any unknown error codes are mapped into
the InternalError
variant of the enum.
pub fn raw_error_code(&self) -> u32
[src]
pub fn raw_error_code(&self) -> u32
Returns the original raw error code of the frame. If the code is unknown, it will not be changed.
pub fn last_stream_id(&self) -> StreamId
[src]
pub fn last_stream_id(&self) -> StreamId
Returns the associated last stream ID.
pub fn debug_data(&self) -> &Bytes
[src]
pub fn debug_data(&self) -> &Bytes
Returns the debug data associated with the frame.
pub fn payload_len(&self) -> u32
[src]
pub fn payload_len(&self) -> u32
Returns the total length of the frame's payload, including any debug data.
Trait Implementations
impl Clone for GoawayFrame
[src]
impl Clone for GoawayFrame
fn clone(&self) -> GoawayFrame
[src]
fn clone(&self) -> GoawayFrame
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for GoawayFrame
[src]
impl Debug for GoawayFrame
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for GoawayFrame
[src]
impl PartialEq for GoawayFrame
fn eq(&self, other: &GoawayFrame) -> bool
[src]
fn eq(&self, other: &GoawayFrame) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &GoawayFrame) -> bool
[src]
fn ne(&self, other: &GoawayFrame) -> bool
This method tests for !=
.
impl Frame for GoawayFrame
[src]
impl Frame for GoawayFrame
type FlagType = NoFlag
The type that represents the flags that the particular Frame
can take. This makes sure that only valid Flag
s are used with each Frame
. Read more
fn from_raw(raw_frame: &RawFrame) -> ParseFrameResult<Self>
[src]
fn from_raw(raw_frame: &RawFrame) -> ParseFrameResult<Self>
Creates a new Frame
from the given RawFrame
(i.e. header and payload), if possible. Read more
fn flags(&self) -> Flags<NoFlag>
[src]
fn flags(&self) -> Flags<NoFlag>
Frame flags
fn get_stream_id(&self) -> StreamId
[src]
fn get_stream_id(&self) -> StreamId
Returns the StreamId
of the stream to which the frame is associated
fn get_header(&self) -> FrameHeader
[src]
fn get_header(&self) -> FrameHeader
Returns a FrameHeader
based on the current state of the Frame
.
impl FrameIR for GoawayFrame
[src]
impl FrameIR for GoawayFrame
fn serialize_into(self, builder: &mut FrameBuilder)
[src]
fn serialize_into(self, builder: &mut FrameBuilder)
Write out the on-the-wire representation of the frame into the given FrameBuilder
.
fn serialize_into_vec(self) -> Vec<u8> where
Self: Sized,
[src]
fn serialize_into_vec(self) -> Vec<u8> where
Self: Sized,
impl From<GoawayFrame> for HttpFrame
[src]
impl From<GoawayFrame> for HttpFrame
fn from(frame: GoawayFrame) -> Self
[src]
fn from(frame: GoawayFrame) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for GoawayFrame
impl Send for GoawayFrame
impl Sync for GoawayFrame
impl Sync for GoawayFrame