pub struct ManagedAccountTransport { /* private fields */ }Expand description
SDK-owned WSS/Noise executor for one crate::SoftchatAccount.
Each instance owns one named OS thread with a current-thread Tokio runtime. It drives the same correlated account transport actions exposed by the low-level API, so protocol, delivery, retry, authentication, and sync truth remain in one Rust state machine.
Implementations§
Source§impl ManagedAccountTransport
impl ManagedAccountTransport
Sourcepub fn new(account: Arc<AccountRuntimeHandle>) -> Result<Self, SoftchatError>
pub fn new(account: Arc<AccountRuntimeHandle>) -> Result<Self, SoftchatError>
Start the only active managed or low-level transport for this account.
§Errors
Returns a stable account, relay, persistence, or worker-start error.
Sourcepub fn snapshot(&self) -> ManagedTransportSnapshot
pub fn snapshot(&self) -> ManagedTransportSnapshot
Return the latest non-blocking state snapshot.
Sourcepub fn wait_for_update(
&self,
after_sequence: u64,
timeout_millis: u64,
) -> ManagedTransportSnapshot
pub fn wait_for_update( &self, after_sequence: u64, timeout_millis: u64, ) -> ManagedTransportSnapshot
Block for a newer snapshot or the bounded timeout.
This is intended for authored language facades to adapt to Flow or an
equivalent async stream on a background dispatcher.
Sourcepub fn wake(&self)
pub fn wake(&self)
Coalesce an immediate durable-revision wake hint.
The worker also checks revision-backed work every 250 ms, so direct Rust consumers do not need to implement a notifier for correctness.
Sourcepub fn set_network_available(&self, available: bool)
pub fn set_network_available(&self, available: bool)
Update the host reachability hint.
Sourcepub fn force_resync(&self) -> Result<(), SoftchatError>
pub fn force_resync(&self) -> Result<(), SoftchatError>
Forget synchronization checkpoints and reconnect from retained truth.
§Errors
Returns a stable account/synchronization error or a redacted worker failure when the command cannot be completed within 30 seconds.
Trait Implementations§
Source§impl Debug for ManagedAccountTransport
impl Debug for ManagedAccountTransport
Source§impl Drop for ManagedAccountTransport
impl Drop for ManagedAccountTransport
Source§impl<UT> LiftRef<UT> for ManagedAccountTransport
impl<UT> LiftRef<UT> for ManagedAccountTransport
Source§impl<UT> LowerError<UT> for ManagedAccountTransport
impl<UT> LowerError<UT> for ManagedAccountTransport
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for ManagedAccountTransport
impl<UT> LowerReturn<UT> for ManagedAccountTransport
Source§type ReturnType = <Arc<ManagedAccountTransport> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<ManagedAccountTransport> as LowerReturn<UniFfiTag>>::ReturnType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl<UT> TypeId<UT> for ManagedAccountTransport
impl<UT> TypeId<UT> for ManagedAccountTransport
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl !Freeze for ManagedAccountTransport
impl RefUnwindSafe for ManagedAccountTransport
impl Send for ManagedAccountTransport
impl Sync for ManagedAccountTransport
impl Unpin for ManagedAccountTransport
impl UnsafeUnpin for ManagedAccountTransport
impl UnwindSafe for ManagedAccountTransport
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more