pub struct Setter<Opcode, Input> {
input: Input,
_opcode: PhantomData<Opcode>,
}
Expand description
Implements the pattern for ioctl
s where a pointer argument is given to
the ioctl
.
The opcode must be read-only.
Fields§
§input: Input
The input data.
_opcode: PhantomData<Opcode>
The opcode.
Implementations§
Trait Implementations§
source§impl<Opcode: CompileTimeOpcode, Input> Ioctl for Setter<Opcode, Input>
impl<Opcode: CompileTimeOpcode, Input> Ioctl for Setter<Opcode, Input>
source§const IS_MUTATING: bool = false
const IS_MUTATING: bool = false
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,
_: *mut c_void,
) -> Result<Self::Output>
unsafe fn output_from_ptr( _: IoctlOutput, _: *mut c_void, ) -> Result<Self::Output>
Cast the output data to the correct type. Read more
Auto Trait Implementations§
impl<Opcode, Input> Freeze for Setter<Opcode, Input>where
Input: Freeze,
impl<Opcode, Input> RefUnwindSafe for Setter<Opcode, Input>where
Input: RefUnwindSafe,
Opcode: RefUnwindSafe,
impl<Opcode, Input> Send for Setter<Opcode, Input>
impl<Opcode, Input> Sync for Setter<Opcode, Input>
impl<Opcode, Input> Unpin for Setter<Opcode, Input>
impl<Opcode, Input> UnwindSafe for Setter<Opcode, Input>where
Input: UnwindSafe,
Opcode: 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