pub struct BrinyError { /* private fields */ }Expand description
A general error for anything that goes wrong internally.
§Examples
Common examples include:
- Raw data is invalid
- Memory is unaligned
- Types have incorrect sizes
To find out what specifically happened, match the code with each constant descriptor.
Implementations§
Source§impl BrinyError
impl BrinyError
Sourcepub const INVALID_BITPATTERN: Self
pub const INVALID_BITPATTERN: Self
An error representing that a typed cast has invalid bitpatterns.
Sourcepub const SIZE_BOUND_FAILURE: Self
pub const SIZE_BOUND_FAILURE: Self
An error indicating that two sizes are incompatible.
Sourcepub const UNALIGNED_ACCESS: Self
pub const UNALIGNED_ACCESS: Self
An error indicating that an unaligned access is imminent.
Sourcepub const BAD_BUFFER: Self
pub const BAD_BUFFER: Self
An error indicating that a provided buffer is incorrect for it’s use case.
Sourcepub const fn add(self, rhs: Self) -> Self
pub const fn add(self, rhs: Self) -> Self
Adds the two errors into a combination of multiple error codes.
Sourcepub const fn is_err(self) -> bool
pub const fn is_err(self) -> bool
Checks if the error is even an error.
This returns false if and only if self IS Self::RESERVED.
Sourcepub const fn is_unaligned_access(self) -> bool
pub const fn is_unaligned_access(self) -> bool
Checks if the error includes an unaligned access code.
Sourcepub const fn is_bad_buffer(self) -> bool
pub const fn is_bad_buffer(self) -> bool
Checks if the error includes an bad buffer code.
Sourcepub const fn is_invalid_bitpattern(self) -> bool
pub const fn is_invalid_bitpattern(self) -> bool
Checks if the error includes an invalid bitpattern code.
Sourcepub const fn is_size_bound_failure(self) -> bool
pub const fn is_size_bound_failure(self) -> bool
Checks if the error includes an size bound failure code.
Trait Implementations§
Source§impl BitOr for BrinyError
impl BitOr for BrinyError
Source§impl Clone for BrinyError
impl Clone for BrinyError
Source§fn clone(&self) -> BrinyError
fn clone(&self) -> BrinyError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more