[][src]Struct symbolic::symcache::format::Seg

#[repr(C, packed)]pub struct Seg<T, L = u32> {
    pub offset: u32,
    pub len: L,
    // some fields omitted
}

A reference to a segment in the SymCache.

Fields

offset: u32

Absolute file offset of this segment.

len: L

Number of items in this segment.

Implementations

impl<T, L> Seg<T, L>[src]

pub fn new(offset: u32, len: L) -> Seg<T, L>[src]

Creates a segment with specified offset and length.

impl<T, L> Seg<T, L> where
    L: Copy + Into<u64>, 
[src]

pub fn read(&self, data: &'a [u8]) -> Result<&'a [T], SymCacheError>[src]

Reads data for this segment from the SymCache buffer.

pub fn get<U>(
    &self,
    data: &'a [u8],
    index: U
) -> Result<Option<&'a T>, SymCacheError> where
    U: Into<u64>, 
[src]

Reads a single element within a segment from the SymCache buffer.

impl<L> Seg<u8, L> where
    L: Copy + Into<u64>, 
[src]

pub fn read_str(&self, data: &'a [u8]) -> Result<&'a str, SymCacheError>[src]

Reads an entire binary segment as string.

Trait Implementations

impl<T, L> Clone for Seg<T, L> where
    L: Copy
[src]

impl<T, L> Copy for Seg<T, L> where
    L: Copy
[src]

impl<T, L> Debug for Seg<T, L> where
    L: Copy + Debug
[src]

impl<T, L> Default for Seg<T, L> where
    L: Default
[src]

impl<T, L> Eq for Seg<T, L>[src]

impl<T, L> Hash for Seg<T, L>[src]

impl<T, L> Ord for Seg<T, L>[src]

impl<T, L> PartialEq<Seg<T, L>> for Seg<T, L>[src]

impl<T, L> PartialOrd<Seg<T, L>> for Seg<T, L>[src]

Auto Trait Implementations

impl<T, L> RefUnwindSafe for Seg<T, L> where
    L: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<T, L> Send for Seg<T, L> where
    L: Send,
    T: Send
[src]

impl<T, L> Sync for Seg<T, L> where
    L: Sync,
    T: Sync
[src]

impl<T, L> Unpin for Seg<T, L> where
    L: Unpin,
    T: Unpin
[src]

impl<T, L> UnwindSafe for Seg<T, L> where
    L: UnwindSafe,
    T: UnwindSafe
[src]

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> RuleType for T where
    T: Eq + Ord + Copy + Debug + Hash
[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.