#[non_exhaustive]pub struct ConnectionInfo {
pub app_name: String,
pub app_version: String,
pub transport: String,
pub protocol: String,
pub user: String,
pub state: Option<ConnectionState>,
pub connected_at_ms: i64,
pub ping_pong_latency_ms: i64,
pub labels: BTreeMap<String, String>,
}Expand description
ConnectionInfo is information about a client connection. Centrifugo PRO only.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.app_name: StringThe client application name, if provided by the client.
app_version: StringThe client application version, if provided by the client.
transport: StringThe name of the connection transport.
protocol: StringThe connection protocol: json or protobuf.
user: StringThe user ID of the connection.
state: Option<ConnectionState>The connection state.
connected_at_ms: i64The Unix time in milliseconds when the connection was established.
ping_pong_latency_ms: i64The last measured client ping/pong round-trip latency in milliseconds. Can be -1 if not available.
labels: BTreeMap<String, String>The client labels attached to the connection.
Trait Implementations§
Source§impl Clone for ConnectionInfo
impl Clone for ConnectionInfo
Source§impl Debug for ConnectionInfo
impl Debug for ConnectionInfo
Source§impl Default for ConnectionInfo
impl Default for ConnectionInfo
Source§impl<'de> Deserialize<'de> for ConnectionInfo
impl<'de> Deserialize<'de> for ConnectionInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConnectionInfo
impl RefUnwindSafe for ConnectionInfo
impl Send for ConnectionInfo
impl Sync for ConnectionInfo
impl Unpin for ConnectionInfo
impl UnsafeUnpin for ConnectionInfo
impl UnwindSafe for ConnectionInfo
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