Struct vm_memory::guest_memory::FileOffset[][src]

pub struct FileOffset { /* fields omitted */ }

Represents the start point within a File that backs a GuestMemoryRegion.

Implementations

impl FileOffset[src]

pub fn new(file: File, start: u64) -> Self[src]

Creates a new FileOffset object.

pub fn from_arc(file: Arc<File>, start: u64) -> Self[src]

Creates a new FileOffset object based on an exiting Arc<File>.

pub fn file(&self) -> &File[src]

Returns a reference to the inner File object.

pub fn arc(&self) -> &Arc<File>[src]

Return a reference to the inner Arc<File> object.

pub fn start(&self) -> u64[src]

Returns the start offset within the file.

Trait Implementations

impl Clone for FileOffset[src]

impl Debug for FileOffset[src]

Auto Trait Implementations

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.