Enum Op

Source
#[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<()>)

§

Dup(OpQueryWrite<[u8]>)

§

Read(OpRead)

§

Write(OpWrite)

§

Fsize

Fields

§req: Tag
§

Fchmod

Fields

§req: Tag
§new_mode: u16
§

Fchown

Fields

§req: Tag
§new_uid: u32
§new_gid: u32
§

Fcntl

Fields

§req: Tag
§cmd: usize
§arg: usize
§

Fevent

Fields

§req: Tag
§req_flags: EventFlags
§

Fpath(OpQueryRead<[u8]>)

§

Frename(OpQueryWrite<str>)

§

Fstat(OpQueryRead<Stat>)

§

FstatVfs(OpQueryRead<StatVfs>)

§

Fsync

Fields

§req: Tag
§

Ftruncate

Fields

§req: Tag
§new_sz: u64
§

Futimens(OpQueryWrite<[TimeSpec]>)

§

MmapPrep

Fields

§req: Tag
§offset: u64
§len: usize
§flags: MapFlags
§

Munmap

Fields

§req: Tag
§offset: u64
§len: usize
§

Call(OpCall)

§

Getdents(OpGetdents)

Implementations§

Source§

impl Op

Source

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.

Source

pub fn is_explicitly_nonblock(&self) -> bool

Source

pub fn file_id(&self) -> Option<usize>

Source§

impl Op

Source

pub fn handle_sync(self, caller: CallerCtx, s: &mut impl SchemeSync) -> Response

Source

pub fn handle_sync_dont_consume( &mut self, caller: &CallerCtx, s: &mut impl SchemeSync, ) -> SchemeResponse

Source

pub async fn handle_async( self, caller: CallerCtx, s: &mut impl SchemeAsync, ) -> Response

Trait Implementations§

Source§

impl Debug for Op

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl IntoTag for Op

Source§

fn into_tag(self) -> Tag

Source§

fn req_id(&self) -> Id

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.