[−][src]Struct pigeon::UnalignedSlice
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]
fn clone(&self) -> UnalignedSlice<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,