pub struct NegotiationStats {
pub total_negotiations: u64,
pub accepted: u64,
pub not_requested: u64,
pub no_match: u64,
}Expand description
协商统计信息,用于可观测性。
Fields§
§total_negotiations: u64总协商次数
accepted: u64协商成功次数
not_requested: u64客户端未请求协议的次数
no_match: u64无匹配协议的次数
Implementations§
Source§impl NegotiationStats
impl NegotiationStats
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
成功率(0.0..=1.0),总次数为 0 时返回 0.0
Trait Implementations§
Source§impl Clone for NegotiationStats
impl Clone for NegotiationStats
Source§fn clone(&self) -> NegotiationStats
fn clone(&self) -> NegotiationStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NegotiationStats
impl Debug for NegotiationStats
Source§impl Default for NegotiationStats
impl Default for NegotiationStats
Source§fn default() -> NegotiationStats
fn default() -> NegotiationStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NegotiationStats
impl RefUnwindSafe for NegotiationStats
impl Send for NegotiationStats
impl Sync for NegotiationStats
impl Unpin for NegotiationStats
impl UnsafeUnpin for NegotiationStats
impl UnwindSafe for NegotiationStats
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