#[repr(transparent)]pub(super) struct ArgReg<'a, Num: ArgNumber> {
raw: *mut Opaque,
_phantom: PhantomData<(&'a (), Num)>,
}
Expand description
Syscall arguments use register-sized types. We use a newtype to discourage accidental misuse of the raw integer values.
This type doesn’t implement Clone
or Copy
; it should be used exactly
once. And it has a lifetime to ensure that it doesn’t outlive any resources
it might be pointing to.
Fields§
§raw: *mut Opaque
§_phantom: PhantomData<(&'a (), Num)>
Trait Implementations§
source§impl<'a, Num: ArgNumber, T> From<&'a mut [MaybeUninit<T>]> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber, T> From<&'a mut [MaybeUninit<T>]> for ArgReg<'a, Num>
source§fn from(t: &'a mut [MaybeUninit<T>]) -> Self
fn from(t: &'a mut [MaybeUninit<T>]) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber, T> From<&'a mut MaybeUninit<T>> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber, T> From<&'a mut MaybeUninit<T>> for ArgReg<'a, Num>
source§fn from(t: &'a mut MaybeUninit<T>) -> Self
fn from(t: &'a mut MaybeUninit<T>) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<(SocketType, SocketFlags)> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<(SocketType, SocketFlags)> for ArgReg<'a, Num>
source§fn from(pair: (SocketType, SocketFlags)) -> Self
fn from(pair: (SocketType, SocketFlags)) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<AddressFamily> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<AddressFamily> for ArgReg<'a, Num>
source§fn from(family: AddressFamily) -> Self
fn from(family: AddressFamily) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<BorrowedFd<'a>> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<BorrowedFd<'a>> for ArgReg<'a, Num>
Pass a borrowed file-descriptor argument.
source§fn from(fd: BorrowedFd<'a>) -> Self
fn from(fd: BorrowedFd<'a>) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<CreateFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<CreateFlags> for ArgReg<'a, Num>
source§fn from(flags: CreateFlags) -> Self
fn from(flags: CreateFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<CreateFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<CreateFlags> for ArgReg<'a, Num>
source§fn from(flags: CreateFlags) -> Self
fn from(flags: CreateFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<EventfdFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<EventfdFlags> for ArgReg<'a, Num>
source§fn from(flags: EventfdFlags) -> Self
fn from(flags: EventfdFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<FallocateFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<FallocateFlags> for ArgReg<'a, Num>
source§fn from(flags: FallocateFlags) -> Self
fn from(flags: FallocateFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<MembarrierCommand> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<MembarrierCommand> for ArgReg<'a, Num>
source§fn from(cmd: MembarrierCommand) -> Self
fn from(cmd: MembarrierCommand) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<MemfdFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<MemfdFlags> for ArgReg<'a, Num>
source§fn from(flags: MemfdFlags) -> Self
fn from(flags: MemfdFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<MountFlagsArg> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<MountFlagsArg> for ArgReg<'a, Num>
source§fn from(flags: MountFlagsArg) -> Self
fn from(flags: MountFlagsArg) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<PidfdFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<PidfdFlags> for ArgReg<'a, Num>
source§fn from(flags: PidfdFlags) -> Self
fn from(flags: PidfdFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<ReadWriteFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<ReadWriteFlags> for ArgReg<'a, Num>
source§fn from(flags: ReadWriteFlags) -> Self
fn from(flags: ReadWriteFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<RenameFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<RenameFlags> for ArgReg<'a, Num>
source§fn from(flags: RenameFlags) -> Self
fn from(flags: RenameFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<Resource> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<Resource> for ArgReg<'a, Num>
Convert a Resource
into a syscall argument.
source§impl<'a, Num: ArgNumber> From<SocketFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<SocketFlags> for ArgReg<'a, Num>
source§fn from(flags: SocketFlags) -> Self
fn from(flags: SocketFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<SocketType> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<SocketType> for ArgReg<'a, Num>
source§fn from(type_: SocketType) -> Self
fn from(type_: SocketType) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<SpliceFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<SpliceFlags> for ArgReg<'a, Num>
source§fn from(flags: SpliceFlags) -> Self
fn from(flags: SpliceFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<StatxFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<StatxFlags> for ArgReg<'a, Num>
source§fn from(flags: StatxFlags) -> Self
fn from(flags: StatxFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<TimerfdClockId> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<TimerfdClockId> for ArgReg<'a, Num>
source§fn from(i: TimerfdClockId) -> Self
fn from(i: TimerfdClockId) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<TimerfdFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<TimerfdFlags> for ArgReg<'a, Num>
source§fn from(flags: TimerfdFlags) -> Self
fn from(flags: TimerfdFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<TimerfdTimerFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<TimerfdTimerFlags> for ArgReg<'a, Num>
source§fn from(flags: TimerfdTimerFlags) -> Self
fn from(flags: TimerfdTimerFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<UnmountFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<UnmountFlags> for ArgReg<'a, Num>
source§fn from(flags: UnmountFlags) -> Self
fn from(flags: UnmountFlags) -> Self
Converts to this type from the input type.
source§fn from(flags: UnshareFlags) -> Self
fn from(flags: UnshareFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<WatchFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<WatchFlags> for ArgReg<'a, Num>
source§fn from(flags: WatchFlags) -> Self
fn from(flags: WatchFlags) -> Self
Converts to this type from the input type.
source§impl<'a, Num: ArgNumber> From<XattrFlags> for ArgReg<'a, Num>
impl<'a, Num: ArgNumber> From<XattrFlags> for ArgReg<'a, Num>
source§fn from(flags: XattrFlags) -> Self
fn from(flags: XattrFlags) -> Self
Converts to this type from the input type.
impl<'a, Num: ArgNumber> Sealed for ArgReg<'a, Num>
Auto Trait Implementations§
impl<'a, Num> Freeze for ArgReg<'a, Num>
impl<'a, Num> RefUnwindSafe for ArgReg<'a, Num>where
Num: RefUnwindSafe,
impl<'a, Num> !Send for ArgReg<'a, Num>
impl<'a, Num> !Sync for ArgReg<'a, Num>
impl<'a, Num> Unpin for ArgReg<'a, Num>where
Num: Unpin,
impl<'a, Num> UnwindSafe for ArgReg<'a, Num>where
Num: 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