pub struct RealtimeClientBuilder { /* private fields */ }Expand description
Builder for RealtimeClient.
Implementations§
Source§impl RealtimeClientBuilder
impl RealtimeClientBuilder
Sourcepub fn new(url: impl Into<String>, token: impl Into<String>) -> Self
pub fn new(url: impl Into<String>, token: impl Into<String>) -> Self
Creates a realtime client builder with the default SDK identity.
Sourcepub fn identity(self, identity: ClientIdentity) -> Self
pub fn identity(self, identity: ClientIdentity) -> Self
Sets the client identity used in realtime headers and connection init.
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Sets the timeout for opening the WebSocket and receiving ConnectionOpen.
Sourcepub fn without_connect_timeout(self) -> Self
pub fn without_connect_timeout(self) -> Self
Disables the connect timeout.
Sourcepub fn rpc_timeout(self, timeout: Duration) -> Self
pub fn rpc_timeout(self, timeout: Duration) -> Self
Sets the timeout for each RPC invocation.
Sourcepub fn without_rpc_timeout(self) -> Self
pub fn without_rpc_timeout(self) -> Self
Disables the per-RPC timeout.
Sourcepub async fn connect(self) -> Result<RealtimeClient, RealtimeError>
pub async fn connect(self) -> Result<RealtimeClient, RealtimeError>
Opens the WebSocket connection and waits for ConnectionOpen.
Trait Implementations§
Source§impl Clone for RealtimeClientBuilder
impl Clone for RealtimeClientBuilder
Source§fn clone(&self) -> RealtimeClientBuilder
fn clone(&self) -> RealtimeClientBuilder
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 moreAuto Trait Implementations§
impl Freeze for RealtimeClientBuilder
impl RefUnwindSafe for RealtimeClientBuilder
impl Send for RealtimeClientBuilder
impl Sync for RealtimeClientBuilder
impl Unpin for RealtimeClientBuilder
impl UnsafeUnpin for RealtimeClientBuilder
impl UnwindSafe for RealtimeClientBuilder
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