[][src]Struct pigeon::UnalignedSlice

pub struct UnalignedSlice<'a> { /* fields omitted */ }

A byte slice which is not aligned, but does contain a whole number of bytes.

Implementations

impl<'a> UnalignedSlice<'a>[src]

pub fn new(bytes: &'a [u8], bit_offset: u32) -> Self[src]

Create a new UnalignedSlice from a byte slice and a bit offset.

pub fn len(&self) -> usize[src]

Get the length of this unaligned slice.

pub fn copy_to_slice(&self, buf: &mut [u8])[src]

Copy the contents to an aligned slice.

pub fn iter(&self) -> Iter<'a>[src]

Get an iterator over the bytes.

Trait Implementations

impl<'a> Clone for UnalignedSlice<'a>[src]

impl<'a> Copy for UnalignedSlice<'a>[src]

impl<'a> Debug for UnalignedSlice<'a>[src]

impl<'a> Eq for UnalignedSlice<'a>[src]

impl<'a> PartialEq<&'a [u8]> for UnalignedSlice<'a>[src]

impl<'a> PartialEq<UnalignedSlice<'a>> for UnalignedSlice<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for UnalignedSlice<'a>

impl<'a> Send for UnalignedSlice<'a>

impl<'a> Sync for UnalignedSlice<'a>

impl<'a> Unpin for UnalignedSlice<'a>

impl<'a> UnwindSafe for UnalignedSlice<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.