[][src]Struct fancy_slice::FancySlice

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

Methods

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

pub fn new(data: &[u8]) -> FancySlice[src]

pub fn relative_fancy_slice<T: RangeBounds<usize>>(
    &self,
    range: T
) -> FancySlice
[src]

pub fn absolute_fancy_slice<T: RangeBounds<usize>>(
    &self,
    range: T
) -> FancySlice
[src]

Requires debug feature.

pub fn relative_slice<I: SliceIndex<[u8], Output = [u8]>>(
    &self,
    range: I
) -> &[u8]
[src]

pub fn absolute_slice<I: SliceIndex<[u8], Output = [u8]>>(
    &self,
    range: I
) -> &[u8]
[src]

Requires debug feature.

pub fn u8(&self, offset: usize) -> u8[src]

pub fn i16_be(&self, offset: usize) -> i16[src]

pub fn u16_be(&self, offset: usize) -> u16[src]

pub fn i32_be(&self, offset: usize) -> i32[src]

pub fn u32_be(&self, offset: usize) -> u32[src]

pub fn f32_be(&self, offset: usize) -> f32[src]

pub fn str(&self, offset: usize) -> Result<&str, String>[src]

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

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

Requires debug feature. Returns the offset into the original slice.

pub fn hex<I: SliceIndex<[u8], Output = [u8]>>(&self, range: I) -> String[src]

Debug display each byte in hex

pub fn ascii<I: SliceIndex<[u8], Output = [u8]>>(&self, range: I) -> String[src]

Debug display each byte as an ascii character if valid, otherwise display as '.'

pub fn find_i8(&self, search_for: i8) -> Vec<usize>[src]

Requires debug feature.

pub fn find_u8(&self, search_for: u8) -> Vec<usize>[src]

Requires debug feature.

pub fn find_i16(&self, search_for: i16) -> Vec<usize>[src]

Requires debug feature.

pub fn find_u16(&self, search_for: u16) -> Vec<usize>[src]

Requires debug feature.

pub fn find_i32(&self, search_for: i32) -> Vec<usize>[src]

Requires debug feature.

pub fn find_u32(&self, search_for: u32) -> Vec<usize>[src]

Requires debug feature.

pub fn find_offset_pointers(&self, search_for_address: usize) -> Vec<usize>[src]

Requires debug feature.

Trait Implementations

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

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

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'a> Send for FancySlice<'a>

impl<'a> Sync for FancySlice<'a>

Blanket Implementations

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

type Owned = T

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.