fn index(&self, index: usize) -> &Self::Output {
		match *index.index(self) {
			true => &true,
			false => &false,
		}
	}
/// Looks up a single bit by its semantic index.
///
/// ## Examples
///
/// ```rust
/// use bitvec::prelude::*;
///
/// let bits = bits![u8, Msb0; 0, 1, 0];
/// assert!(!bits[0]); // -----^  |  |
/// assert!( bits[1]); // --------^  |
/// assert!(!bits[2]); // -----------^
/// ```
///
/// If the index is greater than or equal to the length, indexing will
/// panic.
///
/// The below test will panic when accessing index 1, as only index 0 is
/// valid.
///
/// ```rust,should_panic
/// use bitvec::prelude::*;
///
/// let bits = bits![0,  ];
/// bits[1]; // --------^
/// ```
Looks up a single bit by its semantic index.
Looks up a single bit by its semantic index .
fn index(&self, index: usize) -> &Self::Output {
		match *index.index(self) {
			true => &true,
			false => &false,
		}
	}
fn index ( & self , index : usize ) -> & Self :: Output { match * index . index ( self ) { true => & true , false => & false , } }
Looks up a single bit by its semantic index.
Looks up a single bit by its semantic index .
&self
index
usize
&self
index
usize
examples
```rust
use bitvec::prelude::*.



If the index is greater than or equal to the length, indexing will
panic.

The below test will panic when accessing index 1, as only index 0 is
valid.

```rust,should_panic
use bitvec::prelude::*.


` ` ` rust use bitvec :: prelude :: * . If the index is greater than or equal to the length indexing will panic . The below test will panic when accessing index 1 as only index 0 is valid . ` ` ` rust should_panic use bitvec :: prelude :: * .