pub struct Getter<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.
Implementations§
Trait Implementations§
source§impl<Opcode: CompileTimeOpcode, Output> Debug for Getter<Opcode, Output>
impl<Opcode: CompileTimeOpcode, Output> Debug for Getter<Opcode, Output>
source§impl<Opcode: CompileTimeOpcode, Output> Ioctl for Getter<Opcode, Output>
impl<Opcode: CompileTimeOpcode, 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<Opcode, Output> RefUnwindSafe for Getter<Opcode, Output>where Opcode: RefUnwindSafe, Output: RefUnwindSafe,
impl<Opcode, Output> Send for Getter<Opcode, Output>where Opcode: Send, Output: Send,
impl<Opcode, Output> Sync for Getter<Opcode, Output>where Opcode: Sync, Output: Sync,
impl<Opcode, Output> Unpin for Getter<Opcode, Output>where Opcode: Unpin, Output: Unpin,
impl<Opcode, Output> UnwindSafe for Getter<Opcode, Output>where Opcode: UnwindSafe, 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