Struct kernel::file::IoctlCommand
source · [−]pub struct IoctlCommand { /* private fields */ }
Expand description
Represents an ioctl command.
It can use the components of an ioctl command to dispatch ioctls using
IoctlCommand::dispatch
.
Implementations
sourceimpl IoctlCommand
impl IoctlCommand
sourcepub fn dispatch<T: IoctlHandler>(
&mut self,
handler: T::Target<'_>,
file: &File
) -> Result<i32>
pub fn dispatch<T: IoctlHandler>(
&mut self,
handler: T::Target<'_>,
file: &File
) -> Result<i32>
Dispatches the given ioctl to the appropriate handler based on the value of the command. It
also creates a UserSlicePtr
, UserSlicePtrReader
, or UserSlicePtrWriter
depending on the direction of the buffer of the command.
It is meant to be used in implementations of Operations::ioctl
and
Operations::compat_ioctl
.
Auto Trait Implementations
impl RefUnwindSafe for IoctlCommand
impl !Send for IoctlCommand
impl !Sync for IoctlCommand
impl Unpin for IoctlCommand
impl UnwindSafe for IoctlCommand
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more