pub struct ZeroCopyMessage<'a> { /* private fields */ }Expand description
Zero-copy message wrapper for efficient processing
Implementations§
Source§impl<'a> ZeroCopyMessage<'a>
impl<'a> ZeroCopyMessage<'a>
Sourcepub const fn as_str(&self) -> Result<&'a str, Utf8Error>
pub const fn as_str(&self) -> Result<&'a str, Utf8Error>
Get the payload as string slice if valid UTF-8
Sourcepub const fn mark_processed(&mut self)
pub const fn mark_processed(&mut self)
Mark the message as processed
Sourcepub const fn is_processed(&self) -> bool
pub const fn is_processed(&self) -> bool
Check if the message has been processed
Auto Trait Implementations§
impl<'a> Freeze for ZeroCopyMessage<'a>
impl<'a> RefUnwindSafe for ZeroCopyMessage<'a>
impl<'a> Send for ZeroCopyMessage<'a>
impl<'a> Sync for ZeroCopyMessage<'a>
impl<'a> Unpin for ZeroCopyMessage<'a>
impl<'a> UnwindSafe for ZeroCopyMessage<'a>
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