#[non_exhaustive]pub enum ServerInfo {
ServerName(String),
ClientIp(String),
BandwidthLimit {
kbps: Option<String>,
managed: bool,
},
UnreadableBandwidthLimit {
literal: String,
},
Clock {
elapsed_seconds: u64,
},
}Expand description
Something the server said about itself or about the session, which changes nothing but may be worth logging.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ServerName(String)
The configured name of the server port the session is bound to.
Diagnostic only [docs/spec/04-notifications.md §5.4].
ClientIp(String)
The client’s own address, as the server sees it. A change between two
binds means the client moved network
[docs/spec/04-notifications.md §5.3].
BandwidthLimit
The bandwidth limit now in force for the session
[docs/spec/04-notifications.md §5.1].
Fields
UnreadableBandwidthLimit
The bandwidth constraint could not be read, so do not treat it as a
limit [docs/spec/04-notifications.md §5.1].
The server sent something that is neither unlimited, nor unmanaged,
nor a decimal number. It is reported apart from
BandwidthLimit rather than as a limit of
Some(""), because a caller acting on a fabricated number is worse off
than one told the value was unreadable. What the session’s real limit is
remains whatever the last readable CONS said.
Clock
How long the server thinks the session has been bound
[docs/spec/04-notifications.md §5.2].
Comparing it with your own elapsed time detects a client falling behind the update flow, or a machine that was suspended. This crate reports it and acts on it in no way.
Trait Implementations§
Source§impl Clone for ServerInfo
impl Clone for ServerInfo
Source§fn clone(&self) -> ServerInfo
fn clone(&self) -> ServerInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more