pub struct WebSocketProperties { /* private fields */ }
Expand description
WebSocket配置属性,用于配置WebSocket连接的相关参数
Implementations§
Source§impl WebSocketProperties
impl WebSocketProperties
Sourcepub fn max_msg_size(&self) -> Option<usize>
pub fn max_msg_size(&self) -> Option<usize>
最大消息大小
Sourcepub fn max_write_buffer_size(&self) -> Option<usize>
pub fn max_write_buffer_size(&self) -> Option<usize>
最大二写入 buff 容量大小
Sourcepub fn max_session_idle_timeout(&self) -> Option<u64>
pub fn max_session_idle_timeout(&self) -> Option<u64>
最大 Session 空闲超时时间
Trait Implementations§
Source§impl AutoRegister for WebSocketProperties
impl AutoRegister for WebSocketProperties
Source§fn register<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut ApplicationContext,
properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut ApplicationContext,
properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Register the singleton to the application context. Read more
Source§fn singleton_name(&self) -> &'static str
fn singleton_name(&self) -> &'static str
Get the name of the module as a singleton. Read more
Source§impl Clone for WebSocketProperties
impl Clone for WebSocketProperties
Source§fn clone(&self) -> WebSocketProperties
fn clone(&self) -> WebSocketProperties
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 WebSocketProperties
impl Debug for WebSocketProperties
Source§impl Default for WebSocketProperties
impl Default for WebSocketProperties
Source§fn default() -> WebSocketProperties
fn default() -> WebSocketProperties
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WebSocketProperties
impl<'de> Deserialize<'de> for WebSocketProperties
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
impl Properties for WebSocketProperties
Auto Trait Implementations§
impl Freeze for WebSocketProperties
impl RefUnwindSafe for WebSocketProperties
impl Send for WebSocketProperties
impl Sync for WebSocketProperties
impl Unpin for WebSocketProperties
impl UnwindSafe for WebSocketProperties
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