pub struct FrameConfig {
pub check_rsv: bool,
pub mask_send_frame: bool,
pub renew_buf_on_write: bool,
pub auto_unmask: bool,
pub max_frame_payload_size: usize,
pub auto_fragment_size: usize,
pub merge_frame: bool,
pub validate_utf8: ValidateUtf8Policy,
pub resize_size: usize,
pub resize_thresh: usize,
}
Expand description
frame send/recv config
Fields§
§check_rsv: bool
check rsv1 bits
mask_send_frame: bool
auto mask send frame payload, for client, it must be true
renew_buf_on_write: bool
allocate new buf for every frame
auto_unmask: bool
auto unmask a masked frame payload
max_frame_payload_size: usize
limit max payload size
auto_fragment_size: usize
auto split size, if set 0, do not split frame
merge_frame: bool
auto merge fragmented frames into one frame
validate_utf8: ValidateUtf8Policy
utf8 check policy
resize_size: usize
resize size of read buf, default 4K
resize_thresh: usize
if available len < resize, resize read buf, default 1K
Trait Implementations§
Source§impl Clone for FrameConfig
impl Clone for FrameConfig
Source§fn clone(&self) -> FrameConfig
fn clone(&self) -> FrameConfig
Returns a copy 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 FrameConfig
impl Debug for FrameConfig
Auto Trait Implementations§
impl Freeze for FrameConfig
impl RefUnwindSafe for FrameConfig
impl Send for FrameConfig
impl Sync for FrameConfig
impl Unpin for FrameConfig
impl UnwindSafe for FrameConfig
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