pub struct ManagedWsHandle { /* private fields */ }Implementations§
Source§impl ManagedWsHandle
impl ManagedWsHandle
Sourcepub fn subscribe_messages(&self) -> ManagedMessageReceiver
pub fn subscribe_messages(&self) -> ManagedMessageReceiver
Messages in connection-local wire order. The first subscriber receives the
since-spawn backlog; later subscribers start at subscription time. Lag returns
ManagedReceiveError::Gap.
pub fn subscribe_reference_changes(&self) -> ReferenceChangeReceiver
Sourcepub fn subscribe_events(&self) -> Receiver<ManagedWsEvent>
pub fn subscribe_events(&self) -> Receiver<ManagedWsEvent>
Lifecycle events, including the since-spawn backlog for the first subscriber.
Sourcepub fn subscribe_state(&self) -> Receiver<ManagedWsState>
pub fn subscribe_state(&self) -> Receiver<ManagedWsState>
Subscribe to the latest lifecycle state.
pub fn state(&self) -> ManagedWsState
Sourcepub fn vault_auth(&self) -> Option<VaultAuthSuccessData>
pub fn vault_auth(&self) -> Option<VaultAuthSuccessData>
Vault grant for the current connection, as the server saw it at auth; None on maker sessions.
Sourcepub fn subscribe_vault_auth(&self) -> Receiver<Option<VaultAuthSuccessData>>
pub fn subscribe_vault_auth(&self) -> Receiver<Option<VaultAuthSuccessData>>
Follow vault authentications and invalidation (None) across reconnects.
pub fn is_ready(&self) -> bool
pub fn ensure_ready(&self) -> Result<(), ManagedWsError>
Sourcepub async fn wait_until_ready(&self) -> Result<u64, WaitUntilReadyError>
pub async fn wait_until_ready(&self) -> Result<u64, WaitUntilReadyError>
Wait for authentication and recovery to finish.
pub async fn send(&self, message: ClientMessage) -> Result<(), ManagedWsError>
Sourcepub async fn send_in_epoch(
&self,
message: ClientMessage,
connection_epoch: u64,
) -> Result<(), ManagedWsError>
pub async fn send_in_epoch( &self, message: ClientMessage, connection_epoch: u64, ) -> Result<(), ManagedWsError>
Send only in the connection epoch whose recovery the caller applied. A reconnect before dequeue rejects this command instead of rebinding it.
pub fn try_send( &self, message: ClientMessage, ) -> Result<SendTicket, ManagedWsError>
Sourcepub fn try_send_in_epoch(
&self,
message: ClientMessage,
connection_epoch: u64,
) -> Result<SendTicket, ManagedWsError>
pub fn try_send_in_epoch( &self, message: ClientMessage, connection_epoch: u64, ) -> Result<SendTicket, ManagedWsError>
Non-blocking Self::send_in_epoch.
pub async fn send_await( &self, message: ClientMessage, timeout_duration: Duration, ) -> Result<Arc<ServerMessage>, SendAwaitError>
pub async fn close(&self) -> Result<(), ManagedWsError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ManagedWsHandle
impl !UnwindSafe for ManagedWsHandle
impl Forget for ManagedWsHandle
impl Freeze for ManagedWsHandle
impl Send for ManagedWsHandle
impl Sync for ManagedWsHandle
impl Unpin for ManagedWsHandle
impl UnsafeUnpin for ManagedWsHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more