pub struct Updater<'a, const OPCODE: Opcode, Value> { /* private fields */ }
Expand description
Implements an “updater” pattern for ioctl
s.
The ioctl takes a reference to a struct that it reads its input from, then writes output to the same struct.
To compute a value for the OPCODE
argument, see the functions in the
opcode
module.
Implementations§
Trait Implementations§
Source§impl<'a, const OPCODE: Opcode, T> Ioctl for Updater<'a, OPCODE, T>
impl<'a, const OPCODE: Opcode, T> Ioctl for Updater<'a, OPCODE, T>
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(_output: IoctlOutput, _ptr: *mut c_void) -> Result<()>
unsafe fn output_from_ptr(_output: IoctlOutput, _ptr: *mut c_void) -> Result<()>
Cast the output data to the correct type. Read more
Auto Trait Implementations§
impl<'a, const OPCODE: u32, Value> Freeze for Updater<'a, OPCODE, Value>
impl<'a, const OPCODE: u32, Value> RefUnwindSafe for Updater<'a, OPCODE, Value>where
Value: RefUnwindSafe,
impl<'a, const OPCODE: u32, Value> Send for Updater<'a, OPCODE, Value>where
Value: Send,
impl<'a, const OPCODE: u32, Value> Sync for Updater<'a, OPCODE, Value>where
Value: Sync,
impl<'a, const OPCODE: u32, Value> Unpin for Updater<'a, OPCODE, Value>
impl<'a, const OPCODE: u32, Value> !UnwindSafe for Updater<'a, OPCODE, Value>
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