pub struct ManagedClient;Expand description
Entry point for running a client session on a worker thread.
The managed API owns the lower-level Client loop: it
opens the session, sends probes at the negotiated interval, receives
datagrams, publishes ClientEvent values, and closes the session when the
run completes or is cancelled.
Implementations§
Source§impl ManagedClient
impl ManagedClient
Sourcepub fn start(config: ClientConfig) -> Result<ManagedClientSession, ClientError>
pub fn start(config: ClientConfig) -> Result<ManagedClientSession, ClientError>
Start a managed session without creating an initial event subscription.
The returned ManagedClientSession can still create subscriptions via
ManagedClientSession::subscribe, but events emitted before a
subscriber is registered are not replayed.
Sourcepub fn start_with_subscription(
config: ClientConfig,
subscriber_config: SubscriberConfig,
) -> Result<(ManagedClientSession, EventSubscription), ClientError>
pub fn start_with_subscription( config: ClientConfig, subscriber_config: SubscriberConfig, ) -> Result<(ManagedClientSession, EventSubscription), ClientError>
Start a managed session and subscribe to events before the worker runs.
The initial subscription receives the open lifecycle event and subsequent session events, subject to its queue capacity and overflow policy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ManagedClient
impl RefUnwindSafe for ManagedClient
impl Send for ManagedClient
impl Sync for ManagedClient
impl Unpin for ManagedClient
impl UnsafeUnpin for ManagedClient
impl UnwindSafe for ManagedClient
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