[][src]Trait read_write_at::WriteAtMut

pub trait WriteAtMut {
    fn write_at(&mut self, buf: &[u8], offset: u64) -> Result<usize>;

    fn write_all_at(&mut self, buf: &[u8], offset: u64) -> Result<()> { ... }
}

Similar to WriteAt, but functions may allow to change object state, including cursor moves if the object has concept of a cursor.

Note that WriteAtMut implementations from RefCell and Mutex do not check for cursor moves.

Required methods

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

Writes a number of bytes starting from a given offset. Returns the number of bytes written. The offset is relative to the start of the (virtual) file and thus independent from the current cursor, if the object has concept of a cursor. That cursor then should not be affected by this function. Short writes are not considered as errors.

Loading content...

Provided methods

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

Similar to write_at, but without short writes. if entirety of the provided buffer cannot be written, an error is returned.

Loading content...

Implementors

impl<T: WriteAt + ?Sized> WriteAtMut for T[src]

impl<T: Write + Seek> WriteAtMut for ReadWriteSeek<T>[src]

impl<T: ?Sized, U> WriteAtMut for DerefWrapper<U> where
    T: WriteAtMut,
    U: DerefMut<Target = T>, 
[src]

Loading content...