pub struct ConnectOptionsBuilder { /* private fields */ }Expand description
Builder for ConnectOptions. Obtain one with ConnectOptions::builder,
chain setters, and finish with ConnectOptionsBuilder::build.
Implementations§
Source§impl ConnectOptionsBuilder
impl ConnectOptionsBuilder
Sourcepub fn keepalive_interval(self, interval: Option<Duration>) -> Self
pub fn keepalive_interval(self, interval: Option<Duration>) -> Self
Set the idle timeout before a keepalive is sent. None disables keepalives.
Sourcepub fn header<K: IntoHeaderName>(self, name: K, value: HeaderValue) -> Self
pub fn header<K: IntoHeaderName>(self, name: K, value: HeaderValue) -> Self
Set a single HTTP header on the WebSocket upgrade request. If a header with the same name was already set, its previous value is replaced.
Sourcepub fn custom_keepalive_message(self, message: Option<Message>) -> Self
pub fn custom_keepalive_message(self, message: Option<Message>) -> Self
Send this message as the keepalive instead of a WebSocket Ping frame.
Sourcepub fn build(self) -> ConnectOptions
pub fn build(self) -> ConnectOptions
Finish building, producing the configured ConnectOptions.
Trait Implementations§
Source§impl Clone for ConnectOptionsBuilder
impl Clone for ConnectOptionsBuilder
Source§fn clone(&self) -> ConnectOptionsBuilder
fn clone(&self) -> ConnectOptionsBuilder
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 ConnectOptionsBuilder
impl RefUnwindSafe for ConnectOptionsBuilder
impl Send for ConnectOptionsBuilder
impl Sync for ConnectOptionsBuilder
impl Unpin for ConnectOptionsBuilder
impl UnsafeUnpin for ConnectOptionsBuilder
impl UnwindSafe for ConnectOptionsBuilder
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