Struct MemoryMappedRouter
pub struct MemoryMappedRouter { /* private fields */ }Expand description
Memory-mapped message handling for large payloads
Uses memory mapping to handle large messages without copying between user space and kernel space.
Implementations§
§impl MemoryMappedRouter
impl MemoryMappedRouter
pub fn new() -> MemoryMappedRouter
pub fn new() -> MemoryMappedRouter
Create a new memory-mapped router
pub fn should_use_mapping(&self, message_size: usize) -> bool
pub fn should_use_mapping(&self, message_size: usize) -> bool
Check if a message should use memory mapping
pub fn create_mapping(
&self,
topic: &str,
data: &[u8],
) -> Result<MappedMessage, NerveError>
pub fn create_mapping( &self, topic: &str, data: &[u8], ) -> Result<MappedMessage, NerveError>
Create a memory mapping for a large message
pub fn mapping_statistics(&self) -> MappingStatistics
pub fn mapping_statistics(&self) -> MappingStatistics
Get mapping statistics
Auto Trait Implementations§
impl !Freeze for MemoryMappedRouter
impl RefUnwindSafe for MemoryMappedRouter
impl Send for MemoryMappedRouter
impl Sync for MemoryMappedRouter
impl Unpin for MemoryMappedRouter
impl UnwindSafe for MemoryMappedRouter
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