pub struct NativeErrorMessage { /* private fields */ }Expand description
Raw bytes produced by QuickJS’s stack-local char buf[256] native-error
formatter. The payload silently stops at 255 bytes; JavaScript String
construction observes only the prefix before the first formatted NUL.
Implementations§
Source§impl NativeErrorMessage
impl NativeErrorMessage
pub fn new() -> Self
pub fn from_utf8(value: &str) -> Self
pub fn push_bytes(&mut self, bytes: impl IntoIterator<Item = u8>)
pub fn push_c_string_bytes(&mut self, bytes: impl IntoIterator<Item = u8>)
pub fn push_utf8(&mut self, value: &str)
pub fn visible_bytes(&self) -> &[u8] ⓘ
Source§impl NativeErrorMessage
impl NativeErrorMessage
pub fn to_js_string(&self) -> Result<JsString, JsStringError>
pub fn to_utf8_lossy(&self) -> String
Trait Implementations§
Source§impl Clone for NativeErrorMessage
impl Clone for NativeErrorMessage
Source§impl Debug for NativeErrorMessage
impl Debug for NativeErrorMessage
Source§impl Default for NativeErrorMessage
impl Default for NativeErrorMessage
impl Eq for NativeErrorMessage
Source§impl PartialEq for NativeErrorMessage
impl PartialEq for NativeErrorMessage
impl StructuralPartialEq for NativeErrorMessage
Auto Trait Implementations§
impl Freeze for NativeErrorMessage
impl RefUnwindSafe for NativeErrorMessage
impl Send for NativeErrorMessage
impl Sync for NativeErrorMessage
impl Unpin for NativeErrorMessage
impl UnsafeUnpin for NativeErrorMessage
impl UnwindSafe for NativeErrorMessage
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