bitref 0.0.0

Reference types for bitstrings with bit-level slicing support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Error types.

use core::fmt::{self, Display};

/// Index is out-of-bounds.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct IndexOutOfBounds;

impl core::error::Error for IndexOutOfBounds {}

impl Display for IndexOutOfBounds {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.write_str("index out of bounds")
    }
}