#[non_exhaustive]pub enum Op {
Show 24 variants
Open(OpPathLike<usize>),
OpenAt(OpFdPathLike<usize>),
Rmdir(OpPathLike<()>),
Unlink(OpPathLike<()>),
Dup(OpQueryWrite<[u8]>),
Read(OpRead),
Write(OpWrite),
Fsize {
req: Tag,
fd: usize,
},
Fchmod {
req: Tag,
fd: usize,
new_mode: u16,
},
Fchown {
req: Tag,
fd: usize,
new_uid: u32,
new_gid: u32,
},
Fcntl {
req: Tag,
fd: usize,
cmd: usize,
arg: usize,
},
Fevent {
req: Tag,
fd: usize,
req_flags: EventFlags,
},
Flink(OpQueryWrite<str>),
Fpath(OpQueryRead<[u8]>),
Frename(OpQueryWrite<str>),
Fstat(OpQueryRead<Stat>),
FstatVfs(OpQueryRead<StatVfs>),
Fsync {
req: Tag,
fd: usize,
},
Ftruncate {
req: Tag,
fd: usize,
new_sz: u64,
},
Futimens(OpQueryWrite<[TimeSpec]>),
MmapPrep {
req: Tag,
fd: usize,
offset: u64,
len: usize,
flags: MapFlags,
},
Munmap {
req: Tag,
fd: usize,
offset: u64,
len: usize,
flags: MunmapFlags,
},
Call(OpCall),
Getdents(OpGetdents),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Open(OpPathLike<usize>)
OpenAt(OpFdPathLike<usize>)
Rmdir(OpPathLike<()>)
Unlink(OpPathLike<()>)
Dup(OpQueryWrite<[u8]>)
Read(OpRead)
Write(OpWrite)
Fsize
Fchmod
Fchown
Fcntl
Fevent
Flink(OpQueryWrite<str>)
Fpath(OpQueryRead<[u8]>)
Frename(OpQueryWrite<str>)
Fstat(OpQueryRead<Stat>)
FstatVfs(OpQueryRead<StatVfs>)
Fsync
Ftruncate
Futimens(OpQueryWrite<[TimeSpec]>)
MmapPrep
Munmap
Call(OpCall)
Getdents(OpGetdents)
Implementations§
Source§impl Op
impl Op
Sourcepub unsafe fn from_sqe_unchecked(sqe: &Sqe) -> Option<Op>
pub unsafe fn from_sqe_unchecked(sqe: &Sqe) -> Option<Op>
Decode the raw SQE into an Op with borrowed buffers passed as slices.
§Safety
Any borrowed buffers will be unmapped whenever a response is sent, which unlike the move-based CallRequest API, needs to be managed manually by the caller.
pub fn is_explicitly_nonblock(&self) -> bool
pub fn file_id(&self) -> Option<usize>
Source§impl Op
impl Op
pub fn handle_sync(self, caller: CallerCtx, s: &mut impl SchemeSync) -> Response
pub fn handle_sync_dont_consume( &mut self, caller: &CallerCtx, s: &mut impl SchemeSync, ) -> SchemeResponse
pub async fn handle_async( self, caller: CallerCtx, s: &mut impl SchemeAsync, ) -> Response
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl !Send for Op
impl !Sync for Op
impl Unpin for Op
impl UnwindSafe for Op
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more