pub struct Settings { /* private fields */ }Expand description
SETTINGS parameters this endpoint sends: at most one value per identifier,
kept and serialised in ascending identifier order (the order Node writes
them in). An empty Settings is a valid, empty SETTINGS frame.
Identifiers this crate does not know are sent as given, so a host can advertise extension settings; the named constants are the ones RFC 9113 section 6.5.2 and RFC 8441 define.
Implementations§
Source§impl Settings
impl Settings
pub const HEADER_TABLE_SIZE: u16 = 1
pub const ENABLE_PUSH: u16 = 2
pub const MAX_CONCURRENT_STREAMS: u16 = 3
pub const INITIAL_WINDOW_SIZE: u16 = 4
pub const MAX_FRAME_SIZE: u16 = 5
pub const MAX_HEADER_LIST_SIZE: u16 = 6
pub const ENABLE_CONNECT_PROTOCOL: u16 = 8
pub fn new() -> Self
Sourcepub fn from_limits(limits: &Limits) -> Self
pub fn from_limits(limits: &Limits) -> Self
The three limits Connection::new advertises.
Sourcepub fn set(&mut self, id: u16, value: u32) -> &mut Self
pub fn set(&mut self, id: u16, value: u32) -> &mut Self
Set id to value, replacing any earlier value for it.
pub fn remove(&mut self, id: u16) -> Option<u32>
pub fn get(&self, id: u16) -> Option<u32>
Sourcepub fn iter(&self) -> impl Iterator<Item = (u16, u32)> + '_
pub fn iter(&self) -> impl Iterator<Item = (u16, u32)> + '_
(identifier, value) pairs in ascending identifier order.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
impl Eq for Settings
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Forget for Settings
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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