Struct rustix::backend::reg::ArgReg

source ·
#[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> From<&'a CStr> for ArgReg<'a, Num>

source§

fn from(c: &'a CStr) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber, T> From<&'a mut [MaybeUninit<T>]> for ArgReg<'a, Num>

source§

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>

source§

fn from(t: &'a mut MaybeUninit<T>) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<(Mode, FileType)> for ArgReg<'a, Num>

source§

fn from(pair: (Mode, FileType)) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<(Operation, Flags)> for ArgReg<'a, Num>

source§

fn from(pair: (Operation, Flags)) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<(SocketType, SocketFlags)> for ArgReg<'a, Num>

source§

fn from(pair: (SocketType, SocketFlags)) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber, T> From<*const T> for ArgReg<'a, Num>

source§

fn from(c: *const T) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber, T> From<*mut T> for ArgReg<'a, Num>

source§

fn from(c: *mut T) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Access> for ArgReg<'a, Num>

source§

fn from(access: Access) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<AddressFamily> for ArgReg<'a, Num>

source§

fn from(family: AddressFamily) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Advice> for ArgReg<'a, Num>

source§

fn from(advice: Advice) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<AtFlags> for ArgReg<'a, Num>

source§

fn from(flags: AtFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<BorrowedFd<'a>> for ArgReg<'a, Num>

Pass a borrowed file-descriptor argument.

source§

fn from(fd: BorrowedFd<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<ClockId> for ArgReg<'a, Num>

source§

fn from(i: ClockId) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Cpuid> for ArgReg<'a, Num>

source§

fn from(cpuid: Cpuid) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<CreateFlags> for ArgReg<'a, Num>

source§

fn from(flags: CreateFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<CreateFlags> for ArgReg<'a, Num>

source§

fn from(flags: CreateFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<DupFlags> for ArgReg<'a, Num>

source§

fn from(flags: DupFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<EventfdFlags> for ArgReg<'a, Num>

source§

fn from(flags: EventfdFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<FallocateFlags> for ArgReg<'a, Num>

source§

fn from(flags: FallocateFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<FdFlags> for ArgReg<'a, Num>

source§

fn from(flags: FdFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Gid> for ArgReg<'a, Num>

source§

fn from(t: Gid) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<MembarrierCommand> for ArgReg<'a, Num>

source§

fn from(cmd: MembarrierCommand) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<MemfdFlags> for ArgReg<'a, Num>

source§

fn from(flags: MemfdFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Mode> for ArgReg<'a, Num>

source§

fn from(mode: Mode) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<MountFlagsArg> for ArgReg<'a, Num>

source§

fn from(flags: MountFlagsArg) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<OFlags> for ArgReg<'a, Num>

source§

fn from(oflags: OFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Option<&'a CStr>> for ArgReg<'a, Num>

source§

fn from(t: Option<&'a CStr>) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Option<Protocol>> for ArgReg<'a, Num>

source§

fn from(protocol: Option<Protocol>) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Pid> for ArgReg<'a, Num>

source§

fn from(pid: Pid) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<PidfdFlags> for ArgReg<'a, Num>

source§

fn from(flags: PidfdFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<PipeFlags> for ArgReg<'a, Num>

source§

fn from(flags: PipeFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<ReadWriteFlags> for ArgReg<'a, Num>

source§

fn from(flags: ReadWriteFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<RecvFlags> for ArgReg<'a, Num>

source§

fn from(flags: RecvFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<RenameFlags> for ArgReg<'a, Num>

source§

fn from(flags: RenameFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Resource> for ArgReg<'a, Num>

Convert a Resource into a syscall argument.

source§

fn from(resource: Resource) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<SealFlags> for ArgReg<'a, Num>

source§

fn from(flags: SealFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<SendFlags> for ArgReg<'a, Num>

source§

fn from(flags: SendFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Signal> for ArgReg<'a, Num>

source§

fn from(sig: Signal) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<SocketFlags> for ArgReg<'a, Num>

source§

fn from(flags: SocketFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<SocketType> for ArgReg<'a, Num>

source§

fn from(type_: SocketType) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<SpliceFlags> for ArgReg<'a, Num>

source§

fn from(flags: SpliceFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<StatxFlags> for ArgReg<'a, Num>

source§

fn from(flags: StatxFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<TimerfdClockId> for ArgReg<'a, Num>

source§

fn from(i: TimerfdClockId) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<TimerfdFlags> for ArgReg<'a, Num>

source§

fn from(flags: TimerfdFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<TimerfdTimerFlags> for ArgReg<'a, Num>

source§

fn from(flags: TimerfdTimerFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<Uid> for ArgReg<'a, Num>

source§

fn from(t: Uid) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<UnmountFlags> for ArgReg<'a, Num>

source§

fn from(flags: UnmountFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<UnshareFlags> for ArgReg<'a, Num>

source§

fn from(flags: UnshareFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<WatchFlags> for ArgReg<'a, Num>

source§

fn from(flags: WatchFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> From<XattrFlags> for ArgReg<'a, Num>

source§

fn from(flags: XattrFlags) -> Self

Converts to this type from the input type.
source§

impl<'a, Num: ArgNumber> ToAsm for ArgReg<'a, Num>

source§

unsafe fn to_asm(self) -> *mut Opaque

Convert self to a usize ready to be passed to a syscall machine instruction. Read more
source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.