[][src]Struct solicit::http::frame::RawFrame

pub struct RawFrame { /* fields omitted */ }

A struct that defines the format of the raw HTTP/2 frame, i.e. the frame as it is read from the wire.

This format is defined in section 4.1. of the HTTP/2 spec.

The RawFrame struct simply stores the raw components of an HTTP/2 frame: its header and the payload as a sequence of bytes.

It does not try to interpret the payload bytes, nor do any validation in terms of its validity based on the frame type given in the header. It is simply a wrapper around the two parts of an HTTP/2 frame.

Methods

impl RawFrame
[src]

Creates a new RawFrame with the given FrameHeader. The payload is left empty.

Creates a new RawFrame with the given header and payload. Does not do any validation to determine whether the frame is in a correct state as constructed.

Creates a new RawFrame by parsing the given buffer.

Returns

A RawFrame instance constructed from the given buffer.

If the buffer cannot be parsed into a frame, which includes the payload section having a different length than what was found in the header, None is returned.

Returns a Vec of bytes representing the serialized (on-the-wire) representation of this raw frame.

Returns a FrameHeader instance corresponding to the headers of the RawFrame.

Returns a slice representing the payload of the RawFrame.

Trait Implementations

impl Clone for RawFrame
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl From<Vec<u8>> for RawFrame
[src]

Provide a conversion from a Vec.

This conversion is unchecked and could cause the resulting RawFrame to be an invalid HTTP/2 frame.

Performs the conversion.

impl Into<Vec<u8>> for RawFrame
[src]

Provide a conversion into a Vec.

Performs the conversion.

impl PartialEq<RawFrame> for RawFrame
[src]

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

This method tests for !=.

impl Debug for RawFrame
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for RawFrame

impl Sync for RawFrame

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

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

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more