pub struct WebSocketMessagePool<const N: usize = 4096> { /* private fields */ }Expand description
WebSocket message pool for zero-allocation message processing with const generic threshold
Implementations§
Source§impl<const N: usize> WebSocketMessagePool<N>
impl<const N: usize> WebSocketMessagePool<N>
Sourcepub const fn new(
small_pool: Arc<ZerocopyMemoryPool>,
large_pool: Arc<ZerocopyMemoryPool>,
) -> Self
pub const fn new( small_pool: Arc<ZerocopyMemoryPool>, large_pool: Arc<ZerocopyMemoryPool>, ) -> Self
Create a new WebSocket message pool with const generic threshold
Sourcepub fn get_message_buffer(&self, estimated_size: usize) -> Option<BufferHandle>
pub fn get_message_buffer(&self, estimated_size: usize) -> Option<BufferHandle>
Get a buffer for WebSocket message processing using const generic threshold
Sourcepub fn get_binary_buffer(&self) -> Option<BufferHandle>
pub fn get_binary_buffer(&self) -> Option<BufferHandle>
Get a buffer for binary WebSocket messages
Sourcepub fn get_text_buffer(&self) -> Option<BufferHandle>
pub fn get_text_buffer(&self) -> Option<BufferHandle>
Get a buffer for text WebSocket messages
Auto Trait Implementations§
impl<const N: usize> Freeze for WebSocketMessagePool<N>
impl<const N: usize = 4096> !RefUnwindSafe for WebSocketMessagePool<N>
impl<const N: usize> Send for WebSocketMessagePool<N>
impl<const N: usize> Sync for WebSocketMessagePool<N>
impl<const N: usize> Unpin for WebSocketMessagePool<N>
impl<const N: usize = 4096> !UnwindSafe for WebSocketMessagePool<N>
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