pub struct Error {
pub message: String,
}Expand description
A LevelDB error, just containing the error string provided by LevelDB.
Fields§
§message: StringImplementations§
Source§impl Error
impl Error
Sourcepub unsafe fn new_from_char(message: *const c_char) -> Error
pub unsafe fn new_from_char(message: *const c_char) -> Error
create an error from a c-string buffer.
This method is unsafe because the pointer must be valid and point to heap.
The pointer will be passed to free!
§Safety
The caller must ensure that:
messageis a valid pointer to a null-terminated C string- The C string is valid UTF-8
- The memory pointed to by
messagewas allocated by LevelDB and can be safely freed
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for 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