pub enum CanonAbi {
C,
Rust,
RustCold,
Custom,
Arm(ArmCall),
GpuKernel,
Interrupt(InterruptKind),
X86(X86Call),
}
Expand description
Calling convention to determine codegen
CanonAbi erases certain distinctions ExternAbi preserves, but remains target-dependent. There are still both target-specific variants and aliasing variants, though much fewer. The reason for this step is the frontend may wish to show an ExternAbi but implement that ABI using a different ABI than the string per se, or describe irrelevant differences, e.g.
- extern “system”
- extern “cdecl”
- extern “C-unwind” In that sense, this erases mere syntactic distinctions to create a canonical directive, rather than picking the “actual” ABI.
Variants§
C
Rust
RustCold
Custom
An ABI that rustc does not know how to call or define.
Arm(ArmCall)
ABIs relevant to 32-bit Arm targets
GpuKernel
ABI relevant to GPUs: the entry point for a GPU kernel
Interrupt(InterruptKind)
ABIs relevant to bare-metal interrupt targets
X86(X86Call)
ABIs relevant to Windows or x86 targets
Trait Implementations§
Source§impl<__CTX> HashStable<__CTX> for CanonAbiwhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for CanonAbiwhere
__CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
Source§impl Ord for CanonAbi
impl Ord for CanonAbi
Source§impl PartialOrd for CanonAbi
impl PartialOrd for CanonAbi
impl Copy for CanonAbi
impl Eq for CanonAbi
impl StructuralPartialEq for CanonAbi
Auto Trait Implementations§
impl DynSend for CanonAbi
impl DynSync for CanonAbi
impl Freeze for CanonAbi
impl RefUnwindSafe for CanonAbi
impl Send for CanonAbi
impl Sync for CanonAbi
impl Unpin for CanonAbi
impl UnwindSafe for CanonAbi
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes
Size for each variant:
C
: 0 bytesRust
: 0 bytesRustCold
: 0 bytesCustom
: 0 bytesArm
: 1 byteGpuKernel
: 0 bytesInterrupt
: 1 byteX86
: 1 byte