#[repr(C)]pub struct AbiErrorMsg {
pub error_msg_utf8: *const u8,
pub len: usize,
}Expand description
Helper struct carrying a pointer and length to an utf8 message. We use this instead of &str, to guard against the hypothetical possibility that the layout of &str would ever change.
Fields§
§error_msg_utf8: *const u8Pointer to utf8 error message
len: usizeThe length of the message, in bytes
Implementations§
Source§impl AbiErrorMsg
impl AbiErrorMsg
Sourcepub fn convert_to_string(&self) -> String
pub fn convert_to_string(&self) -> String
Attempt to convert the given data to a String. Any invalid UTF8-chars are replaced.
Auto Trait Implementations§
impl Freeze for AbiErrorMsg
impl RefUnwindSafe for AbiErrorMsg
impl !Send for AbiErrorMsg
impl !Sync for AbiErrorMsg
impl Unpin for AbiErrorMsg
impl UnwindSafe for AbiErrorMsg
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