Enum webparse::http::http2::frame::Frame

source ·
pub enum Frame<T = Binary> {
    Data(Data<T>),
    Headers(Headers),
    Priority(Priority),
    PushPromise(PushPromise),
    Settings(Settings),
    Ping(Ping),
    GoAway(GoAway),
    WindowUpdate(WindowUpdate),
    Reset(Reset),
}

Variants§

§

Data(Data<T>)

§

Headers(Headers)

§

Priority(Priority)

§

PushPromise(PushPromise)

§

Settings(Settings)

§

Ping(Ping)

§

GoAway(GoAway)

§

WindowUpdate(WindowUpdate)

§

Reset(Reset)

Implementations§

source§

impl Frame<Binary>

source

pub fn trim_padding<B: Buf>(header: &FrameHeader, buf: &mut B) -> WebResult<()>

source

pub fn display_name(&self) -> String

source

pub fn stream_id(&self) -> StreamIdentifier

source

pub fn flags(&self) -> Flag

source

pub fn is_header(&self) -> bool

source

pub fn is_data(&self) -> bool

source

pub fn is_end_headers(&self) -> bool

source

pub fn is_end_stream(&self) -> bool

source

pub fn encode<B: Buf + BufMut>( self, buf: &mut B, encoder: &mut Encoder ) -> WebResult<usize>

source§

impl<T: Buf> Frame<T>

source

pub fn parse( header: FrameHeader, buf: T, decoder: &mut Decoder, max_header_list_size: usize ) -> WebResult<Frame<T>>

source

pub fn encoded_len(&self) -> usize

How many bytes this Frame will use in a buffer when encoding.

source

pub fn no_serialize_header(&self) -> bool

Trait Implementations§

source§

impl<T: Debug> Debug for Frame<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<B> From<GoAway> for Frame<B>

source§

fn from(src: GoAway) -> Self

Converts to this type from the input type.
source§

impl<T> From<Headers> for Frame<T>

source§

fn from(src: Headers) -> Self

Converts to this type from the input type.
source§

impl<T> From<Ping> for Frame<T>

source§

fn from(src: Ping) -> Frame<T>

Converts to this type from the input type.
source§

impl<B> From<Priority> for Frame<B>

source§

fn from(src: Priority) -> Self

Converts to this type from the input type.
source§

impl<T> From<PushPromise> for Frame<T>

source§

fn from(src: PushPromise) -> Self

Converts to this type from the input type.
source§

impl<B> From<Reset> for Frame<B>

source§

fn from(src: Reset) -> Self

Converts to this type from the input type.
source§

impl<B> From<WindowUpdate> for Frame<B>

source§

fn from(src: WindowUpdate) -> Self

Converts to this type from the input type.
source§

impl<T: Buf> Serialize for Frame<T>

source§

fn serialize<B: Buf + BufMut>(&mut self, _buffer: &mut B) -> WebResult<usize>

Auto Trait Implementations§

§

impl<T = Binary> !RefUnwindSafe for Frame<T>

§

impl<T> Send for Frame<T>
where T: Send,

§

impl<T> Sync for Frame<T>
where T: Sync,

§

impl<T> Unpin for Frame<T>
where T: Unpin,

§

impl<T = Binary> !UnwindSafe for Frame<T>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.