pub struct ConnectionMetadata {
pub user_id: Option<String>,
pub tags: HashMap<String, String>,
pub subscriptions: HashSet<String>,
pub rooms: HashSet<String>,
}Expand description
Connection metadata
Fields§
§user_id: Option<String>User ID (if authenticated)
Custom tags
subscriptions: HashSet<String>Subscribed topics
rooms: HashSet<String>Joined rooms
Trait Implementations§
Source§impl Clone for ConnectionMetadata
impl Clone for ConnectionMetadata
Source§fn clone(&self) -> ConnectionMetadata
fn clone(&self) -> ConnectionMetadata
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 ConnectionMetadata
impl Debug for ConnectionMetadata
Source§impl Default for ConnectionMetadata
impl Default for ConnectionMetadata
Source§fn default() -> ConnectionMetadata
fn default() -> ConnectionMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConnectionMetadata
impl RefUnwindSafe for ConnectionMetadata
impl Send for ConnectionMetadata
impl Sync for ConnectionMetadata
impl Unpin for ConnectionMetadata
impl UnsafeUnpin for ConnectionMetadata
impl UnwindSafe for ConnectionMetadata
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