[][src]Trait syscall::scheme::SchemeBlock

pub trait SchemeBlock {
    fn handle(&self, packet: &Packet) -> Option<usize> { ... }
fn open(
        &self,
        path: &[u8],
        flags: usize,
        uid: u32,
        gid: u32
    ) -> Result<Option<usize>> { ... }
fn chmod(
        &self,
        path: &[u8],
        mode: u16,
        uid: u32,
        gid: u32
    ) -> Result<Option<usize>> { ... }
fn rmdir(&self, path: &[u8], uid: u32, gid: u32) -> Result<Option<usize>> { ... }
fn unlink(&self, path: &[u8], uid: u32, gid: u32) -> Result<Option<usize>> { ... }
fn dup(&self, old_id: usize, buf: &[u8]) -> Result<Option<usize>> { ... }
fn read(&self, id: usize, buf: &mut [u8]) -> Result<Option<usize>> { ... }
fn write(&self, id: usize, buf: &[u8]) -> Result<Option<usize>> { ... }
fn seek(
        &self,
        id: usize,
        pos: usize,
        whence: usize
    ) -> Result<Option<usize>> { ... }
fn fchmod(&self, id: usize, mode: u16) -> Result<Option<usize>> { ... }
fn fchown(&self, id: usize, uid: u32, gid: u32) -> Result<Option<usize>> { ... }
fn fcntl(&self, id: usize, cmd: usize, arg: usize) -> Result<Option<usize>> { ... }
fn fevent(&self, id: usize, flags: EventFlags) -> Result<Option<EventFlags>> { ... }
fn fmap(&self, id: usize, map: &Map) -> Result<Option<usize>> { ... }
fn funmap(&self, address: usize) -> Result<Option<usize>> { ... }
fn fpath(&self, id: usize, buf: &mut [u8]) -> Result<Option<usize>> { ... }
fn frename(
        &self,
        id: usize,
        path: &[u8],
        uid: u32,
        gid: u32
    ) -> Result<Option<usize>> { ... }
fn fstat(&self, id: usize, stat: &mut Stat) -> Result<Option<usize>> { ... }
fn fstatvfs(&self, id: usize, stat: &mut StatVfs) -> Result<Option<usize>> { ... }
fn fsync(&self, id: usize) -> Result<Option<usize>> { ... }
fn ftruncate(&self, id: usize, len: usize) -> Result<Option<usize>> { ... }
fn futimens(&self, id: usize, times: &[TimeSpec]) -> Result<Option<usize>> { ... }
fn recv_io_uring_raw(
        &self,
        ctx: Ctx,
        info_buf: &[u8]
    ) -> Result<Option<usize>> { ... }
fn recv_io_uring(
        &self,
        ctx: Ctx,
        info: &IoUringRecvInfo
    ) -> Result<Option<usize>> { ... }
fn close(&self, id: usize) -> Result<Option<usize>> { ... } }

Provided methods

fn handle(&self, packet: &Packet) -> Option<usize>

fn open(
    &self,
    path: &[u8],
    flags: usize,
    uid: u32,
    gid: u32
) -> Result<Option<usize>>

fn chmod(
    &self,
    path: &[u8],
    mode: u16,
    uid: u32,
    gid: u32
) -> Result<Option<usize>>

fn rmdir(&self, path: &[u8], uid: u32, gid: u32) -> Result<Option<usize>>

fn dup(&self, old_id: usize, buf: &[u8]) -> Result<Option<usize>>

fn read(&self, id: usize, buf: &mut [u8]) -> Result<Option<usize>>

fn write(&self, id: usize, buf: &[u8]) -> Result<Option<usize>>

fn seek(&self, id: usize, pos: usize, whence: usize) -> Result<Option<usize>>

fn fchmod(&self, id: usize, mode: u16) -> Result<Option<usize>>

fn fchown(&self, id: usize, uid: u32, gid: u32) -> Result<Option<usize>>

fn fcntl(&self, id: usize, cmd: usize, arg: usize) -> Result<Option<usize>>

fn fevent(&self, id: usize, flags: EventFlags) -> Result<Option<EventFlags>>

fn fmap(&self, id: usize, map: &Map) -> Result<Option<usize>>

fn funmap(&self, address: usize) -> Result<Option<usize>>

fn fpath(&self, id: usize, buf: &mut [u8]) -> Result<Option<usize>>

fn frename(
    &self,
    id: usize,
    path: &[u8],
    uid: u32,
    gid: u32
) -> Result<Option<usize>>

fn fstat(&self, id: usize, stat: &mut Stat) -> Result<Option<usize>>

fn fstatvfs(&self, id: usize, stat: &mut StatVfs) -> Result<Option<usize>>

fn fsync(&self, id: usize) -> Result<Option<usize>>

fn ftruncate(&self, id: usize, len: usize) -> Result<Option<usize>>

fn futimens(&self, id: usize, times: &[TimeSpec]) -> Result<Option<usize>>

fn recv_io_uring_raw(&self, ctx: Ctx, info_buf: &[u8]) -> Result<Option<usize>>

The raw syscall invoked by the kernel when the scheme is requested to have an io_uring attached. This function will most likely not be needed directly, but rather the convenience wrapper recv_io_uring.

fn recv_io_uring(
    &self,
    ctx: Ctx,
    info: &IoUringRecvInfo
) -> Result<Option<usize>>

Called by the kernel when a userspace program has invoked attach_iouring onto an fd owned by this scheme. The return value is expected to be zero in case the scheme accepted the io_uring, or one otherwise.

fn close(&self, id: usize) -> Result<Option<usize>>

Loading content...

Implementors

Loading content...