#[repr(C)]pub struct weaveffi_error {
pub code: i32,
pub message: *const c_char,
}Expand description
Error struct passed across the C ABI boundary.
§Safety
messageis a NUL-terminated UTF-8 C string allocated by Rust and must be released by callingweaveffi_error_clearorweaveffi_free_string.- This struct must not be copied while it owns a message pointer, as that would lead to double-free on clear.
Fields§
§code: i32Status code. 0 means success; any non-zero value indicates failure.
message: *const c_charOwned, NUL-terminated UTF-8 message describing the failure, or null when
code is 0. Freed by weaveffi_error_clear.
Trait Implementations§
Source§impl Debug for weaveffi_error
impl Debug for weaveffi_error
Auto Trait Implementations§
impl !Send for weaveffi_error
impl !Sync for weaveffi_error
impl Freeze for weaveffi_error
impl RefUnwindSafe for weaveffi_error
impl Unpin for weaveffi_error
impl UnsafeUnpin for weaveffi_error
impl UnwindSafe for weaveffi_error
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