pub struct OptimizedRespDecoder { /* private fields */ }Expand description
Optimized RESP2 decoder with streaming support and reduced allocations
Implementations§
Source§impl OptimizedRespDecoder
impl OptimizedRespDecoder
Sourcepub fn with_config(buffer_capacity: usize, max_cache_size: usize) -> Self
pub fn with_config(buffer_capacity: usize, max_cache_size: usize) -> Self
Create a new decoder with specific buffer capacity and cache size
Sourcepub fn decode_streaming(&mut self, data: &[u8]) -> RedisResult<Vec<RespValue>>
pub fn decode_streaming(&mut self, data: &[u8]) -> RedisResult<Vec<RespValue>>
Decode data with streaming support
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the string cache
Sourcepub fn cache_stats(&self) -> (usize, usize)
pub fn cache_stats(&self) -> (usize, usize)
Get cache statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OptimizedRespDecoder
impl RefUnwindSafe for OptimizedRespDecoder
impl Send for OptimizedRespDecoder
impl Sync for OptimizedRespDecoder
impl Unpin for OptimizedRespDecoder
impl UnwindSafe for OptimizedRespDecoder
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