Skip to main content

IntrinsicId

Enum IntrinsicId 

Source
pub enum IntrinsicId {
Show 52 variants Dbg, Panic, Assert, CompileError, Cast, SizeOf, AlignOf, TypeName, TypeInfo, Ownership, ThreadSafety, Implements, Field, Import, EmbedFile, TargetArch, TargetOs, PtrRead, PtrWrite, PtrReadVolatile, PtrWriteVolatile, PtrOffset, PtrToInt, IntToPtr, NullPtr, IsNull, PtrCopy, Raw, RawMut, Syscall, Range, SliceLen, SliceIsEmpty, SliceIndexRead, SliceIndexWrite, SlicePtr, SlicePtrMut, PartsToSlice, PartsToMutSlice, VecLiteral, VecRepeat, PartsToVec, CStrToVec, PtrCast, Uninit, Finalize, FieldSet, VariantUninit, VariantField, Spawn, ThreadJoin, TestPreviewGate,
}
Expand description

Stable identity for every intrinsic. Stages dispatch on this rather than comparing strings, so adding an intrinsic requires updating a closed match in each consumer — the compiler enforces coverage.

Variants§

§

Dbg

§

Panic

§

Assert

§

CompileError

§

Cast

§

SizeOf

§

AlignOf

§

TypeName

§

TypeInfo

§

Ownership

§

ThreadSafety

ADR-0084: comptime classification of T on the Unsend < Send < Sync ladder.

§

Implements

§

Field

§

Import

§

EmbedFile

§

TargetArch

§

TargetOs

§

PtrRead

§

PtrWrite

§

PtrReadVolatile

§

PtrWriteVolatile

§

PtrOffset

§

PtrToInt

§

IntToPtr

§

NullPtr

§

IsNull

§

PtrCopy

§

Raw

§

RawMut

§

Syscall

§

Range

§

SliceLen

§

SliceIsEmpty

§

SliceIndexRead

§

SliceIndexWrite

§

SlicePtr

§

SlicePtrMut

§

PartsToSlice

§

PartsToMutSlice

§

VecLiteral

§

VecRepeat

§

PartsToVec

§

CStrToVec

§

PtrCast

@ptr_cast(p) -> MutPtr(T) / Ptr(T): reinterpret the pointer as the inferred target pointer type. Result type comes from HM inference (let-annotation or call context).

§

Uninit

@uninit(T) -> Uninit(T): handle to T-sized storage. Drop is suppressed on the slot until @finalize consumes it.

§

Finalize

@finalize(handle) -> T: consume the handle and hand back a real T. Sema verifies all fields written.

§

FieldSet

@field_set(handle, name, value): write a field of an in-progress @uninit / @variant_uninit handle. The write-side counterpart to read-side @field.

§

VariantUninit

@variant_uninit(Self, comptime tag) -> Uninit(Self): variant-shaped counterpart to @uninit.

§

VariantField

@variant_field(self, comptime tag, name): read the named field of variant tag from self. Symmetric counterpart to @variant_uninit + @field_set.

§

Spawn

@spawn(fn, arg) -> JoinHandle(R) — spawn a worker thread.

§

ThreadJoin

@thread_join(handle: MutPtr(u8)) -> R — internal lowering target for JoinHandle::join. Reads the runtime handle out of the prelude struct’s handle field, calls __gruel_thread_join, copies the return value into a stack slot, and returns it. Codegen consults the let-binding context for the result type. Not user-callable.

§

TestPreviewGate

Trait Implementations§

Source§

impl Clone for IntrinsicId

Source§

fn clone(&self) -> IntrinsicId

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IntrinsicId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for IntrinsicId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for IntrinsicId

Source§

fn eq(&self, other: &IntrinsicId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for IntrinsicId

Source§

impl Eq for IntrinsicId

Source§

impl StructuralPartialEq for IntrinsicId

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.