Ioctl

Struct Ioctl 

Source
pub struct Ioctl<'a> { /* private fields */ }
Expand description

IOCTL request wrapper

Implementations§

Source§

impl<'a> Ioctl<'a>

Source

pub fn from_irp(irp: &'a mut Irp) -> Option<Self>

create from IRP

Source

pub fn code(&self) -> IoctlCode

get IOCTL code

Source

pub fn function(&self) -> u32

get function number

Source

pub fn method(&self) -> IoctlMethod

get transfer method

Source

pub fn input_length(&self) -> usize

get input buffer length

Source

pub fn output_length(&self) -> usize

get output buffer length

Source

pub fn input<T>(&self) -> Option<&T>

get input buffer as typed reference

Source

pub fn output_mut<T>(&mut self) -> Option<&mut T>

get output buffer as typed mutable reference

Source

pub fn input_bytes(&self) -> Option<&[u8]>

get input as byte slice

Source

pub fn output_bytes_mut(&mut self) -> Option<&mut [u8]>

get output as mutable byte slice

Source

pub fn complete_success(self)

complete with success

Source

pub fn complete_with_output(self, output_size: usize)

complete with output size

Source

pub fn complete_error(self, error: KmError)

complete with error

Source

pub fn complete_with_info(self, status: NtStatus, information: usize)

complete with status and information

Auto Trait Implementations§

§

impl<'a> Freeze for Ioctl<'a>

§

impl<'a> RefUnwindSafe for Ioctl<'a>

§

impl<'a> !Send for Ioctl<'a>

§

impl<'a> !Sync for Ioctl<'a>

§

impl<'a> Unpin for Ioctl<'a>

§

impl<'a> !UnwindSafe for Ioctl<'a>

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.