pub struct RateHintsConfig {
pub flags: u8,
pub target_rate_x10: u16,
pub burst_allowance: u16,
}Available on crate feature
extensions only.Expand description
Rate hints configuration for negotiation
Fields§
§flags: u8Feature flags
target_rate_x10: u16Initial target rate (updates per second * 10, so 1.5/s = 15)
burst_allowance: u16Initial burst allowance
Implementations§
Source§impl RateHintsConfig
impl RateHintsConfig
Sourcepub fn target_rate(&self) -> f32
pub fn target_rate(&self) -> f32
Get target rate as updates per second
Sourcepub fn supports_dynamic(&self) -> bool
pub fn supports_dynamic(&self) -> bool
Check if dynamic hints are supported
Sourcepub fn supports_per_region(&self) -> bool
pub fn supports_per_region(&self) -> bool
Check if per-region hints are supported
Sourcepub fn to_extension(&self) -> Extension
pub fn to_extension(&self) -> Extension
Encode to extension
Sourcepub fn from_extension(ext: &Extension) -> Option<Self>
pub fn from_extension(ext: &Extension) -> Option<Self>
Decode from extension
Trait Implementations§
Source§impl Clone for RateHintsConfig
impl Clone for RateHintsConfig
Source§fn clone(&self) -> RateHintsConfig
fn clone(&self) -> RateHintsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RateHintsConfig
impl Debug for RateHintsConfig
Source§impl Default for RateHintsConfig
impl Default for RateHintsConfig
Source§impl PartialEq for RateHintsConfig
impl PartialEq for RateHintsConfig
impl Eq for RateHintsConfig
impl StructuralPartialEq for RateHintsConfig
Auto Trait Implementations§
impl Freeze for RateHintsConfig
impl RefUnwindSafe for RateHintsConfig
impl Send for RateHintsConfig
impl Sync for RateHintsConfig
impl Unpin for RateHintsConfig
impl UnwindSafe for RateHintsConfig
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