pub struct WebsocketConfig {
pub connection_timeout: Duration,
}Expand description
Configuration for WebSocket connection behavior.
§Example
use bullet_rust_sdk::Client;
use bullet_rust_sdk::ws::WebsocketConfig;
use web_time::Duration;
let api = Client::mainnet().await?;
// Use a longer connection timeout
let config = WebsocketConfig { connection_timeout: Duration::from_secs(30) };
let mut ws = api.connect_ws().config(config).call().await?;Fields§
§connection_timeout: DurationHow long to wait for the server’s “connected” message during handshake.
Default: 10 seconds
Implementations§
Source§impl WebsocketConfig
impl WebsocketConfig
Sourcepub fn builder() -> WebsocketConfigBuilder
pub fn builder() -> WebsocketConfigBuilder
Create an instance of WebsocketConfig using the builder syntax
Trait Implementations§
Source§impl Clone for WebsocketConfig
impl Clone for WebsocketConfig
Source§fn clone(&self) -> WebsocketConfig
fn clone(&self) -> WebsocketConfig
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 moreSource§impl Debug for WebsocketConfig
impl Debug for WebsocketConfig
Auto Trait Implementations§
impl Freeze for WebsocketConfig
impl RefUnwindSafe for WebsocketConfig
impl Send for WebsocketConfig
impl Sync for WebsocketConfig
impl Unpin for WebsocketConfig
impl UnsafeUnpin for WebsocketConfig
impl UnwindSafe for WebsocketConfig
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