pub struct SpacetimeDbConnectionStatus { /* private fields */ }Expand description
Shared connection state reported by an app-owned generated connection builder.
The app builder wires mark_disconnected into the generated SDK’s
on_disconnect callback and calls mark_connected only after its required
subscriptions have been applied. The shared client uses that state to rebuild
the complete connection without duplicating reconnect policy in each app.
Implementations§
Source§impl SpacetimeDbConnectionStatus
impl SpacetimeDbConnectionStatus
Sourcepub fn mark_connected(&self)
pub fn mark_connected(&self)
Marks the generated connection and its required subscriptions ready.
Sourcepub fn mark_disconnected(&self)
pub fn mark_disconnected(&self)
Marks the generated connection unavailable so the next access reconnects.
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Returns whether the complete app-owned connection is ready for use.
Trait Implementations§
Source§impl Clone for SpacetimeDbConnectionStatus
impl Clone for SpacetimeDbConnectionStatus
Source§fn clone(&self) -> SpacetimeDbConnectionStatus
fn clone(&self) -> SpacetimeDbConnectionStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for SpacetimeDbConnectionStatus
impl Default for SpacetimeDbConnectionStatus
Source§fn default() -> SpacetimeDbConnectionStatus
fn default() -> SpacetimeDbConnectionStatus
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpacetimeDbConnectionStatus
impl RefUnwindSafe for SpacetimeDbConnectionStatus
impl Send for SpacetimeDbConnectionStatus
impl Sync for SpacetimeDbConnectionStatus
impl Unpin for SpacetimeDbConnectionStatus
impl UnsafeUnpin for SpacetimeDbConnectionStatus
impl UnwindSafe for SpacetimeDbConnectionStatus
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
impl<T> CloneAny for T
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