pub struct WebSocketBridgeConfig {
pub mode: WsMode,
pub url: String,
pub path: Option<String>,
pub format: WsMessageFormat,
pub ping_interval_secs: u32,
pub auto_reconnect: bool,
pub reconnect_delay_secs: u32,
pub headers: HashMap<String, String>,
pub namespace: String,
}Expand description
WebSocket Bridge configuration
Fields§
§mode: WsModeMode: client or server
url: StringURL for client mode (ws://…) or bind address for server mode (0.0.0.0:8080)
path: Option<String>Path for server mode (e.g., “/ws”)
format: WsMessageFormatMessage format
ping_interval_secs: u32Ping interval in seconds (0 to disable)
auto_reconnect: boolAuto-reconnect on disconnect (client mode only)
reconnect_delay_secs: u32Reconnect delay in seconds
headers: HashMap<String, String>Custom headers for client mode
namespace: StringCLASP namespace prefix for incoming messages
Trait Implementations§
Source§impl Clone for WebSocketBridgeConfig
impl Clone for WebSocketBridgeConfig
Source§fn clone(&self) -> WebSocketBridgeConfig
fn clone(&self) -> WebSocketBridgeConfig
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 WebSocketBridgeConfig
impl Debug for WebSocketBridgeConfig
Source§impl Default for WebSocketBridgeConfig
impl Default for WebSocketBridgeConfig
Source§impl<'de> Deserialize<'de> for WebSocketBridgeConfig
impl<'de> Deserialize<'de> for WebSocketBridgeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WebSocketBridgeConfig
impl RefUnwindSafe for WebSocketBridgeConfig
impl Send for WebSocketBridgeConfig
impl Sync for WebSocketBridgeConfig
impl Unpin for WebSocketBridgeConfig
impl UnsafeUnpin for WebSocketBridgeConfig
impl UnwindSafe for WebSocketBridgeConfig
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