pub struct EventText { /* private fields */ }Expand description
Original SDK event bytes, retaining invalid UTF-8 and truncation evidence.
Implementations§
Source§impl EventText
impl EventText
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
Original bytes up to a bounded NUL search, excluding the terminator.
Sourcepub fn to_str(&self) -> Result<&str, Utf8Error>
pub fn to_str(&self) -> Result<&str, Utf8Error>
Strict text decoding; failure does not discard the original event bytes.
Sourcepub fn to_string_lossy(&self) -> Cow<'_, str>
pub fn to_string_lossy(&self) -> Cow<'_, str>
Text suitable for diagnostics, replacing malformed UTF-8 explicitly.
Sourcepub fn is_terminated(&self) -> bool
pub fn is_terminated(&self) -> bool
Whether the native fixed-size buffer contained a NUL terminator.
Sourcepub fn is_possibly_truncated(&self) -> bool
pub fn is_possibly_truncated(&self) -> bool
Whether the string filled the available payload and might be truncated.
Trait Implementations§
impl Eq for EventText
impl StructuralPartialEq for EventText
Auto Trait Implementations§
impl Freeze for EventText
impl RefUnwindSafe for EventText
impl Send for EventText
impl Sync for EventText
impl Unpin for EventText
impl UnsafeUnpin for EventText
impl UnwindSafe for EventText
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