Struct object::read::Segment[][src]

pub struct Segment<'data, 'file, R: ReadRef<'data> = &'data [u8]> where
    'data: 'file, 
{ /* fields omitted */ }
Expand description

A segment of a File.

Trait Implementations

impl<'data, 'file, R: ReadRef<'data>> Debug for Segment<'data, 'file, R>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'data, 'file, R: ReadRef<'data>> ObjectSegment<'data> for Segment<'data, 'file, R>[src]

fn address(&self) -> u64[src]

Returns the virtual address of the segment.

fn size(&self) -> u64[src]

Returns the size of the segment in memory.

fn align(&self) -> u64[src]

Returns the alignment of the segment in memory.

fn file_range(&self) -> (u64, u64)[src]

Returns the offset and size of the segment in the file.

fn data(&self) -> Result<&'data [u8]>[src]

Returns a reference to the file contents of the segment. Read more

fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>[src]

Return the segment data in the given range. Read more

fn name(&self) -> Result<Option<&str>>[src]

Returns the name of the segment.

Auto Trait Implementations

impl<'data, 'file, R> RefUnwindSafe for Segment<'data, 'file, R> where
    R: RefUnwindSafe

impl<'data, 'file, R> Send for Segment<'data, 'file, R> where
    R: Sync

impl<'data, 'file, R> Sync for Segment<'data, 'file, R> where
    R: Sync

impl<'data, 'file, R> Unpin for Segment<'data, 'file, R> where
    'data: 'file, 

impl<'data, 'file, R> UnwindSafe for Segment<'data, 'file, R> where
    R: RefUnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.