[][src]Struct solicit::http::frame::settings::SettingsFrame

pub struct SettingsFrame {
    pub settings: Vec<HttpSetting>,
    // some fields omitted
}

A struct representing the SETTINGS frames of HTTP/2, as defined in the HTTP/2 spec, section 6.5.

The struct does not try to prevent the client from creating malformed SETTINGS frames, such as ones that have the ACK flag set along with some settings values. The users are responsible to follow the prescribed rules before sending the frame to the peer.

On parsing received frames, it treats the following as errors:

What is not treated as an error (for now) are settings values out of allowed bounds such as a EnablePush being set to something other than 0 or

Fields

Contains all the settings that are currently set in the frame. It is safe to access this field (to read, add, or remove settings), even though a helper method add_setting exists.

Methods

impl SettingsFrame
[src]

Creates a new SettingsFrame

A convenience constructor that returns a SettingsFrame with the ACK flag already set and no settings.

Adds the given setting to the frame.

Sets the ACK flag for the frame. This method is just a convenience method for calling frame.set_flag(SettingsFlag::Ack).

Checks whether the SettingsFrame has an ACK attached to it.

Trait Implementations

impl Frame for SettingsFrame
[src]

The type that represents the flags that the particular Frame can take. This makes sure that only valid Flags are used with each Frame.

Creates a new SettingsFrame with the given RawFrame (i.e. header and payload), if possible.

Returns

None if a valid SettingsFrame cannot be constructed from the given RawFrame. The stream ID must be 0 in order for the frame to be valid. If the ACK flag is set, there MUST not be a payload. The total payload length must be multiple of 6.

Otherwise, returns a newly constructed SettingsFrame.

Tests if the given flag is set for the frame.

Returns the StreamId of the stream to which the frame is associated.

A SettingsFrame always has to be associated to stream 0.

Returns a FrameHeader based on the current state of the Frame.

Sets the given flag for the frame.

Returns a Vec with the serialized representation of the frame.

impl Clone for SettingsFrame
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq<SettingsFrame> for SettingsFrame
[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 SettingsFrame
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for SettingsFrame

impl Sync for SettingsFrame

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