[−][src]Struct gf::support::bitvec::BitSlice
An immutable bit slice.
Implementations
impl<'a> BitSlice<'a>
[src]
pub fn from_byte_slice(slice: &'a [u8]) -> Self
[src]
Wrap a little endian byte slice into a bit slice.
pub fn from_byte_slice_range<R: RangeBounds<usize>>(
slice: &'a [u8],
bit_range: R
) -> Self
[src]
slice: &'a [u8],
bit_range: R
) -> Self
Wrap a bit range of a little endian byte slice into a bit slice.
Errors
- Panics on out-of-bound indexing.
pub fn is_empty(&self) -> bool
[src]
Return whether the slice is empty.
pub fn len(&self) -> usize
[src]
Return bit length of the slice.
pub fn get(&self, bit_index: usize) -> bool
[src]
pub fn subslice<R: RangeBounds<usize>>(self, bit_range: R) -> Self
[src]
pub fn to_bit_vec(self) -> BitVec
[src]
Convert a slice to a vector.
Trait Implementations
impl<'a> BitSeq for BitSlice<'a>
[src]
fn bit_len(&self) -> usize
[src]
fn get_bit(&self, bit_index: usize) -> bool
[src]
fn lsb(&self) -> Option<bool>
[src]
fn msb(&self) -> Option<bool>
[src]
impl<'a> Clone for BitSlice<'a>
[src]
impl<'a> Copy for BitSlice<'a>
[src]
impl<'a> Debug for BitSlice<'a>
[src]
impl<'a> From<BitSlice<'a>> for BitVec
[src]
impl<'a> Index<usize> for BitSlice<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for BitSlice<'a>
impl<'a> Send for BitSlice<'a>
impl<'a> Sync for BitSlice<'a>
impl<'a> Unpin for BitSlice<'a>
impl<'a> UnwindSafe for BitSlice<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,