pub enum BuffError {
EmptyInput,
InvalidPrecision(i32),
InvalidData(String),
BufferOverflow {
attempted: usize,
available: usize,
},
BitWidthExceeded(usize),
SpecialValueConversion(String),
PrecisionLoss {
original: String,
converted: String,
},
}Expand description
Errors that can occur during BUFF operations.
Variants§
EmptyInput
The input data is empty.
InvalidPrecision(i32)
Invalid precision value (must be >= 0).
InvalidData(String)
The encoded data is corrupted or invalid.
BufferOverflow
Buffer overflow during bit packing operations.
Fields
BitWidthExceeded(usize)
The bit width exceeds the maximum supported (32 bits).
SpecialValueConversion(String)
Special float values (Infinity, NaN) cannot be converted to decimal.
PrecisionLoss
Precision loss during decimal conversion exceeds acceptable threshold.
Trait Implementations§
Source§impl Error for BuffError
impl Error for BuffError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
impl StructuralPartialEq for BuffError
Auto Trait Implementations§
impl Freeze for BuffError
impl RefUnwindSafe for BuffError
impl Send for BuffError
impl Sync for BuffError
impl Unpin for BuffError
impl UnwindSafe for BuffError
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