pub struct Getter<const OPCODE: Opcode, Output> { /* private fields */ }
Expand description
Implements the traditional “getter” pattern for ioctl
s.
Some ioctl
s just read data into the userspace. As this is a popular
pattern, this structure implements it.
To compute a value for the OPCODE
argument, see the functions in the
opcode
module.
Implementations§
Trait Implementations§
Source§impl<const OPCODE: Opcode, Output> Ioctl for Getter<OPCODE, Output>
impl<const OPCODE: Opcode, Output> Ioctl for Getter<OPCODE, Output>
Source§const IS_MUTATING: bool = true
const IS_MUTATING: bool = true
Does the
ioctl
mutate any data in the userspace? Read moreSource§fn as_ptr(&mut self) -> *mut c_void
fn as_ptr(&mut self) -> *mut c_void
Get a pointer to the data to be passed to the
ioctl
command. Read moreSource§unsafe fn output_from_ptr(
_: IoctlOutput,
ptr: *mut c_void,
) -> Result<Self::Output>
unsafe fn output_from_ptr( _: IoctlOutput, ptr: *mut c_void, ) -> Result<Self::Output>
Cast the output data to the correct type. Read more
Auto Trait Implementations§
impl<const OPCODE: u32, Output> Freeze for Getter<OPCODE, Output>where
Output: Freeze,
impl<const OPCODE: u32, Output> RefUnwindSafe for Getter<OPCODE, Output>where
Output: RefUnwindSafe,
impl<const OPCODE: u32, Output> Send for Getter<OPCODE, Output>where
Output: Send,
impl<const OPCODE: u32, Output> Sync for Getter<OPCODE, Output>where
Output: Sync,
impl<const OPCODE: u32, Output> Unpin for Getter<OPCODE, Output>where
Output: Unpin,
impl<const OPCODE: u32, Output> UnwindSafe for Getter<OPCODE, Output>where
Output: UnwindSafe,
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