[][src]Trait sunrise_libuser::fs::IStorageAsync

pub trait IStorageAsync {
    fn read<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        offset: u64,
        length: u64,
        out_buf: &'a mut [u8]
    ) -> FutureObj<'a, Result<(), Error>>;
fn write<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        offset: u64,
        length: u64,
        in_buf: &'a [u8]
    ) -> FutureObj<'a, Result<(), Error>>;
fn flush<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>
    ) -> FutureObj<'a, Result<(), Error>>;
fn set_size<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        size: u64
    ) -> FutureObj<'a, Result<(), Error>>;
fn get_size<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>
    ) -> FutureObj<'a, Result<u64, Error>>; fn dispatch<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        cmdid: u32,
        buf: &'a mut [u8]
    ) -> FutureObj<Result<(), Error>> { ... } }

This is the interface for a raw device, usually a block device.

Required methods

fn read<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    offset: u64,
    length: u64,
    out_buf: &'a mut [u8]
) -> FutureObj<'a, Result<(), Error>>

Read the content of a storage at a given offset in out_buf.

fn write<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    offset: u64,
    length: u64,
    in_buf: &'a [u8]
) -> FutureObj<'a, Result<(), Error>>

Write the content given in_buf at the given offset in the file.

fn flush<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>
) -> FutureObj<'a, Result<(), Error>>

Flush any data not written on the storage.

fn set_size<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    size: u64
) -> FutureObj<'a, Result<(), Error>>

Resize the storage with the given size.

fn get_size<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>
) -> FutureObj<'a, Result<u64, Error>>

Return the current storage size.

Loading content...

Provided methods

fn dispatch<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    cmdid: u32,
    buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>

Handle an incoming IPC request.

Loading content...

Implementors

Loading content...