Struct positioned_io::SizeCursor [] [src]

pub struct SizeCursor<I: Size>(_);

Adapts a ReadAt or WriteAt into a Read or Write, with better seeking.

This is just like Cursor, except that it requires an object that implements Size, and that it can seek from the end of the I/O object.

Eventually it will be legal to specialize Cursor for types that implement Size, see RFC 1210.

Methods

impl<I> SizeCursor<I> where
    I: Size
[src]

Create a new SizeCursor which starts reading at a specified offset.

Pass in a ReadAt or WriteAt as io.

Create a new SizeCursor which starts reading at offset zero.

Pass in a ReadAt or WriteAt as io.

Methods from Deref<Target = Cursor<I>>

Consume self and yield the inner ReadAt or WriteAt.

Borrow the inner ReadAt or WriteAt.

Borrow the inner ReadAt or WriteAt mutably.

Get the current read/write position.

Set the current read/write position.

Trait Implementations

impl<I> Deref for SizeCursor<I> where
    I: Size
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<I> DerefMut for SizeCursor<I> where
    I: Size
[src]

The method called to mutably dereference a value

impl<I> Seek for SizeCursor<I> where
    I: Size
[src]

Seek to an offset, in bytes, in a stream. Read more