pub struct ClientEntry {
pub id: ClientId,
pub remote: SocketAddr,
pub state: ClientState,
pub accepted_at: Instant,
pub state_since: Instant,
pub database: Option<String>,
pub user: Option<String>,
pub waiting_for: Option<WaitTarget>,
}Expand description
Snapshot of one client’s state at a point in time. Returned by
ClientRegistry::snapshot; consumers serialize it themselves
(admin JSON, metrics attributes) rather than relying on this crate
pulling in serde.
Fields§
§id: ClientId§remote: SocketAddr§state: ClientState§accepted_at: Instant§state_since: Instant§database: Option<String>§user: Option<String>§waiting_for: Option<WaitTarget>Populated only while state == Waiting and cleared on wake.
Trait Implementations§
Source§impl Clone for ClientEntry
impl Clone for ClientEntry
Source§fn clone(&self) -> ClientEntry
fn clone(&self) -> ClientEntry
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 moreAuto Trait Implementations§
impl Freeze for ClientEntry
impl RefUnwindSafe for ClientEntry
impl Send for ClientEntry
impl Sync for ClientEntry
impl Unpin for ClientEntry
impl UnsafeUnpin for ClientEntry
impl UnwindSafe for ClientEntry
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