#[non_exhaustive]pub enum SpiEncodeError {
InternalConsistency {
stage: &'static str,
required: usize,
capacity: usize,
attempted_len: usize,
},
}Expand description
Rare encode-time failures.
SpiCodec::encode validates required capacity up front. If
InternalConsistency appears, encoded_len and hot-path writes have
diverged —this indicates a logic bug in the codec.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for SpiEncodeError
impl Clone for SpiEncodeError
impl Copy for SpiEncodeError
Source§impl Debug for SpiEncodeError
impl Debug for SpiEncodeError
Source§impl Display for SpiEncodeError
impl Display for SpiEncodeError
impl Eq for SpiEncodeError
Source§impl Error for SpiEncodeError
impl Error for SpiEncodeError
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()
Source§impl PartialEq for SpiEncodeError
impl PartialEq for SpiEncodeError
impl StructuralPartialEq for SpiEncodeError
Auto Trait Implementations§
impl Freeze for SpiEncodeError
impl RefUnwindSafe for SpiEncodeError
impl Send for SpiEncodeError
impl Sync for SpiEncodeError
impl Unpin for SpiEncodeError
impl UnsafeUnpin for SpiEncodeError
impl UnwindSafe for SpiEncodeError
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