pub enum Setting {
HeaderTableSize(u32),
EnablePush(u32),
MaxConcurrentStreams(u32),
InitialWindowSize(u32),
MaxFrameSize(u32),
MaxHeaderListSize(u32),
EnableConnectProtocol(u32),
}
Expand description
An enum that lists all valid settings that can be sent in a SETTINGS frame.
Each setting has a value that is a 32 bit unsigned integer (6.5.1.).
Variants§
HeaderTableSize(u32)
EnablePush(u32)
MaxConcurrentStreams(u32)
InitialWindowSize(u32)
MaxFrameSize(u32)
MaxHeaderListSize(u32)
EnableConnectProtocol(u32)
Implementations§
source§impl Setting
impl Setting
sourcepub fn from_id(id: u16, val: u32) -> Option<Setting>
pub fn from_id(id: u16, val: u32) -> Option<Setting>
Creates a new Setting
with the correct variant corresponding to the
given setting id, based on the settings IDs defined in section
6.5.2.
sourcefn load(raw: &[u8]) -> Option<Setting>
fn load(raw: &[u8]) -> Option<Setting>
Creates a new Setting
by parsing the given buffer of 6 bytes, which
contains the raw byte representation of the setting, according to the
“SETTINGS format” defined in section 6.5.1.
The raw
parameter should have length at least 6 bytes, since the
length of the raw setting is exactly 6 bytes.
§Panics
If given a buffer shorter than 6 bytes, the function will panic.
fn encode(&self, dst: &mut BytesMut)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Setting
impl RefUnwindSafe for Setting
impl Send for Setting
impl Sync for Setting
impl Unpin for Setting
impl UnwindSafe for Setting
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more