pub struct UserClient { /* private fields */ }Implementations§
Source§impl UserClient
impl UserClient
Sourcepub async fn connect(
identity_provider: Box<dyn IdentityProvider>,
session_store: Box<dyn SessionStore>,
proxy_client: Box<dyn ProxyClient>,
audit_log: Option<Box<dyn AuditLog>>,
) -> Result<UserClientHandle, ClientError>
pub async fn connect( identity_provider: Box<dyn IdentityProvider>, session_store: Box<dyn SessionStore>, proxy_client: Box<dyn ProxyClient>, audit_log: Option<Box<dyn AuditLog>>, ) -> Result<UserClientHandle, ClientError>
Connect to the proxy server, spawn the event loop, and return a handle.
This is the single entry point. After connect() returns, the client is
already listening for incoming connections. Use get_psk_token() or
get_rendezvous_token() to set up pairings, and receive events through
the returned handle’s notification/request channels.
Pass None for audit_log to use a no-op logger.
Sourcepub async fn get_psk_token(
&self,
name: Option<String>,
) -> Result<String, ClientError>
pub async fn get_psk_token( &self, name: Option<String>, ) -> Result<String, ClientError>
Generate a PSK token for a new pairing.
Returns the formatted token string (<psk_hex>_<fingerprint_hex>).
Multiple PSK pairings are supported concurrently (each matched by psk_id).
Sourcepub async fn get_rendezvous_token(
&self,
name: Option<String>,
) -> Result<RendezvousCode, ClientError>
pub async fn get_rendezvous_token( &self, name: Option<String>, ) -> Result<RendezvousCode, ClientError>
Request a rendezvous code from the proxy for a new pairing.
Only one rendezvous pairing at a time — there’s no way to distinguish incoming rendezvous handshakes.
Trait Implementations§
Source§impl Clone for UserClient
impl Clone for UserClient
Source§fn clone(&self) -> UserClient
fn clone(&self) -> UserClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UserClient
impl RefUnwindSafe for UserClient
impl Send for UserClient
impl Sync for UserClient
impl Unpin for UserClient
impl UnsafeUnpin for UserClient
impl UnwindSafe for UserClient
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