pub struct LiveSessionBuilder { /* private fields */ }Expand description
Builder for Live WebSocket sessions initiated from a Client.
Implementations§
Source§impl LiveSessionBuilder
impl LiveSessionBuilder
Sourcepub fn transport_config(self, config: TransportConfig) -> Self
pub fn transport_config(self, config: TransportConfig) -> Self
Set transport configuration (timeouts, reconnection, etc.).
Sourcepub fn configure(
self,
f: impl FnOnce(SessionConfig) -> SessionConfig + 'static,
) -> Self
pub fn configure( self, f: impl FnOnce(SessionConfig) -> SessionConfig + 'static, ) -> Self
Apply a customization function to the session config before connecting.
Sourcepub async fn connect(self) -> Result<SessionHandle, SessionError>
pub async fn connect(self) -> Result<SessionHandle, SessionError>
Connect and return a SessionHandle.
Auto Trait Implementations§
impl Freeze for LiveSessionBuilder
impl !RefUnwindSafe for LiveSessionBuilder
impl !Send for LiveSessionBuilder
impl !Sync for LiveSessionBuilder
impl Unpin for LiveSessionBuilder
impl !UnwindSafe for LiveSessionBuilder
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