pub struct ClientConfig { /* private fields */ }Expand description
Options one can set when connecting to a WAMP server
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn set_agent<T: AsRef<str>>(self, agent: T) -> Self
pub fn set_agent<T: AsRef<str>>(self, agent: T) -> Self
Replaces the default user agent string. Set to a zero length string to disable
Sourcepub fn set_max_msg_size(self, msg_size: u32) -> Self
pub fn set_max_msg_size(self, msg_size: u32) -> Self
Sets the maximum payload size which can be sent over the transport Set to 0 to use default
Sourcepub fn get_max_msg_size(&self) -> Option<u32>
pub fn get_max_msg_size(&self) -> Option<u32>
Returns the maximum message size for the transport
Sourcepub fn set_serializers(self, serializers: Vec<SerializerType>) -> Self
pub fn set_serializers(self, serializers: Vec<SerializerType>) -> Self
Sets the serializers that will be used in order of preference (serializers[0] will be attempted first)
Sourcepub fn get_serializers(&self) -> &Vec<SerializerType>
pub fn get_serializers(&self) -> &Vec<SerializerType>
Returns the priority list of serializers
Sourcepub fn set_roles(self, roles: Vec<ClientRole>) -> Self
pub fn set_roles(self, roles: Vec<ClientRole>) -> Self
Sets the roles that are intended to be used by the client
Sourcepub fn set_ssl_verify(self, val: bool) -> Self
pub fn set_ssl_verify(self, val: bool) -> Self
Enables (default) or disables TLS certificate validation
Sourcepub fn get_ssl_verify(&self) -> bool
pub fn get_ssl_verify(&self) -> bool
Returns whether certificate validation is enabled
pub fn add_websocket_header(self, key: String, val: String) -> Self
pub fn get_websocket_headers(&self) -> &HashMap<String, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
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