pub struct PooledConn {
pub slot_id: u32,
pub session_id: String,
pub loop_id: Mutex<String>,
pub workspace_id: String,
pub client: Client,
pub event_rx: Mutex<Option<Receiver<Value>>>,
pub reader_live: AtomicBool,
pub last_used: Mutex<Instant>,
/* private fields */
}Expand description
One connection slot in the pool.
Fields§
§slot_id: u32Internal slot id.
session_id: StringApplication session id (app_key in Go).
loop_id: Mutex<String>Bound StrangeLoop id.
workspace_id: StringWorkspace id used at bootstrap.
client: ClientUnderlying protocol client.
event_rx: Mutex<Option<Receiver<Value>>>Forwarded event stream (ReceiveMessages → mpsc); None until start_reader.
reader_live: AtomicBoolWhether the forwarder task is still running.
last_used: Mutex<Instant>Last time this slot was acquired.
Implementations§
Source§impl PooledConn
impl PooledConn
Sourcepub async fn get_loop_id(&self) -> String
pub async fn get_loop_id(&self) -> String
Loop id (Go getLoopID).
Sourcepub async fn is_connected(&self) -> bool
pub async fn is_connected(&self) -> bool
Whether the underlying client is connected and has not signalled disconnect.
Sourcepub async fn event_stream_live(&self) -> bool
pub async fn event_stream_live(&self) -> bool
Whether ReceiveMessages is still feeding event_rx.
Auto Trait Implementations§
impl !Freeze for PooledConn
impl !RefUnwindSafe for PooledConn
impl !UnwindSafe for PooledConn
impl Send for PooledConn
impl Sync for PooledConn
impl Unpin for PooledConn
impl UnsafeUnpin for PooledConn
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