Struct ioat::AssertThreadSafe [] [src]

pub struct AssertThreadSafe<T>(pub T);

A struct for wrapping thread-safe readers or writers.

Using this struct asserts, that the contained Read + Seek or Write + Seek value can be used for ReadAt and WriteAt, without risking a seek from another thread in parallel.

The traits are implemented by first seeking to the offset, and then calling the appropriate method on the wrapped value.

Trait Implementations

impl<T: Clone> Clone for AssertThreadSafe<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter.

impl<T> ReadAt for AssertThreadSafe<T> where
    T: Read + Seek
[src]

Reads some bytes from pos bytes into the source. Read more

Reads exactly buf.len() bytes from pos bytes into the source. Read more

impl<T> WriteAt for AssertThreadSafe<T> where
    T: Write + Seek
[src]

Writes some bytes at pos bytes into self. Read more

Flushes any pending writes to the underlying sink. Read more

Writes exactly buf.len() bytes at pos bytes into self. Read more