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

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 1.

Fields

settings

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

fn new() -> SettingsFrame

Creates a new SettingsFrame

fn new_ack() -> SettingsFrame

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

fn add_setting(&mut self, setting: HttpSetting)

Adds the given setting to the frame.

fn set_ack(&mut self)

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

fn is_ack(&self) -> bool

Checks whether the SettingsFrame has an ACK attached to it.

Trait Implementations

impl Frame for SettingsFrame

type FlagType = SettingsFlag

fn from_raw(raw_frame: RawFrame) -> Option<SettingsFrame>

fn is_set(&self, flag: SettingsFlag) -> bool

fn get_stream_id(&self) -> StreamId

fn get_header(&self) -> FrameHeader

fn set_flag(&mut self, flag: SettingsFlag)

fn serialize(&self) -> Vec<u8>

Derived Implementations

impl PartialEq for SettingsFrame

fn eq(&self, arg_0: &SettingsFrame) -> bool

fn ne(&self, arg_0: &SettingsFrame) -> bool

impl Debug for SettingsFrame

fn fmt(&self, arg_0: &mut Formatter) -> Result

impl Clone for SettingsFrame

fn clone(&self) -> SettingsFrame

1.0.0fn clone_from(&mut self, source: &Self)