pub struct BitsError { /* private fields */ }Expand description
Error returned from the various Bits methods.
This used to be a no-std 1:1 swap out with std::io::Error, but it become more ergonomic to
simply use this error type everywhere.
Implementations§
source§impl BitsError
impl BitsError
sourcepub fn new(kind: BitsErrorKind, msg: &'static str) -> Self
pub fn new(kind: BitsErrorKind, msg: &'static str) -> Self
Creates a new error
sourcepub fn kind(&self) -> BitsErrorKind
pub fn kind(&self) -> BitsErrorKind
Returns the error type/kind of this error
sourcepub fn err<T>(kind: BitsErrorKind, msg: &'static str) -> Result<T, Self>
pub fn err<T>(kind: BitsErrorKind, msg: &'static str) -> Result<T, Self>
Creates an error variant of this type
Trait Implementations§
source§impl Error for BitsError
impl Error for BitsError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<BitsErrorKind> for BitsError
impl From<BitsErrorKind> for BitsError
source§fn from(kind: BitsErrorKind) -> Self
fn from(kind: BitsErrorKind) -> Self
Converts to this type from the input type.
source§impl PartialEq for BitsError
impl PartialEq for BitsError
impl Copy for BitsError
impl Eq for BitsError
impl StructuralPartialEq for BitsError
Auto Trait Implementations§
impl Freeze for BitsError
impl RefUnwindSafe for BitsError
impl Send for BitsError
impl Sync for BitsError
impl Unpin for BitsError
impl UnwindSafe for BitsError
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)