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: boolcheck rsv1 bits
mask_send_frame: boolauto mask send frame payload, for client, it must be true
renew_buf_on_write: boolallocate new buf for every frame
auto_unmask: boolauto unmask a masked frame payload
max_frame_payload_size: usizelimit max payload size
auto_fragment_size: usizeauto split size, if set 0, do not split frame
merge_frame: boolauto merge fragmented frames into one frame
validate_utf8: ValidateUtf8Policyutf8 check policy
resize_size: usizeresize size of read buf, default 4K
resize_thresh: usizeif 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 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 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