Struct io_at::Take [] [src]

pub struct Take<T> {
    // some fields omitted
}

Limit the maximum offset of a WriteAt and/or ReadAt.

This can be useful when trying to simulate a fixed size item (like a block device) with a normal file.

Methods

impl<T> Take<T>
[src]

fn new(v: T, max_offs: u64) -> Self

fn len(&self) -> u64

Trait Implementations

impl<T: PartialEq> PartialEq for Take<T>
[src]

fn eq(&self, __arg_0: &Take<T>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Take<T>) -> bool

This method tests for !=.

impl<T: Eq> Eq for Take<T>
[src]

impl<T: Debug> Debug for Take<T>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: ReadAt> ReadAt for Take<T>
[src]

fn read_at(&self, buf: &mut [u8], offs: u64) -> Result<usize>

impl<T: WriteAt> WriteAt for Take<T>
[src]

fn write_at(&mut self, buf: &[u8], offs: u64) -> Result<usize>

fn write_all_at(&mut self, buf: &[u8], offs: u64) -> Result<()>

impl<T> Deref for Take<T>
[src]

type Target = T

The resulting type after dereferencing

fn deref<'a>(&'a self) -> &'a T

The method called to dereference a value

impl<T> DerefMut for Take<T>
[src]

fn deref_mut<'a>(&'a mut self) -> &'a mut T

The method called to mutably dereference a value