Skip to main content

ExternAbi

Enum ExternAbi 

pub enum ExternAbi {
Show 29 variants C { unwind: bool, }, System { unwind: bool, }, Rust, RustCall, RustCold, RustInvalid, RustPreserveNone, Unadjusted, Custom, EfiApi, Swift, Aapcs { unwind: bool, }, CmseNonSecureCall, CmseNonSecureEntry, GpuKernel, PtxKernel, AvrInterrupt, AvrNonBlockingInterrupt, Msp430Interrupt, RiscvInterruptM, RiscvInterruptS, X86Interrupt, Cdecl { unwind: bool, }, Stdcall { unwind: bool, }, Fastcall { unwind: bool, }, Thiscall { unwind: bool, }, Vectorcall { unwind: bool, }, SysV64 { unwind: bool, }, Win64 { unwind: bool, },
}
Expand description

ABI we expect to see within extern "{abi}"

Variants§

§

C

presumed C ABI for the platform

Fields

§unwind: bool
§

System

ABI of the “system” interface, e.g. the Win32 API, always “aliasing”

Fields

§unwind: bool
§

Rust

that’s us!

§

RustCall

the mostly-unused unboxed_closures ABI, effectively now an impl detail unless someone puts in the work to make it viable again… but would we need a special ABI?

§

RustCold

For things unlikely to be called, where reducing register pressure in extern "Rust" callers is worth paying extra cost in the callee. Stronger than just #[cold] because fn pointers might be incompatible.

§

RustInvalid

An always-invalid ABI that’s used to test “this ABI is not supported by this platform” in a platform-agnostic way.

§

RustPreserveNone

Preserves no registers.

Note, that this ABI is not stable in the registers it uses, is intended as an optimization and may fall-back to a more conservative calling convention if the backend does not support forcing callers to save all registers.

§

Unadjusted

Unstable impl detail that directly uses Rust types to describe the ABI to LLVM. Even normally-compatible Rust types can become ABI-incompatible with this ABI!

§

Custom

An ABI that rustc does not know how to call or define. Functions with this ABI can only be created using #[naked] functions or extern "custom" blocks, and can only be called from inline assembly.

§

EfiApi

UEFI ABI, usually an alias of C, but sometimes an arch-specific alias and only valid on platforms that have a UEFI standard

§

Swift

Swift’s calling convention, used to interoperate with Swift code without going through C as an intermediary.

§

Aapcs

Arm Architecture Procedure Call Standard, sometimes ExternAbi::C is an alias for this

Fields

§unwind: bool
§

CmseNonSecureCall

extremely constrained barely-C ABI for TrustZone

§

CmseNonSecureEntry

extremely constrained barely-C ABI for TrustZone

§

GpuKernel

An entry-point function called by the GPU’s host

§

PtxKernel

An entry-point function called by the GPU’s host

§

AvrInterrupt

§

AvrNonBlockingInterrupt

§

Msp430Interrupt

§

RiscvInterruptM

§

RiscvInterruptS

§

X86Interrupt

§

Cdecl

ExternAbi::C but spelled funny because x86

Fields

§unwind: bool
§

Stdcall

gnu-stdcall on “unix” and win-stdcall on “windows”

Fields

§unwind: bool
§

Fastcall

gnu-fastcall on “unix” and win-fastcall on “windows”

Fields

§unwind: bool
§

Thiscall

windows C++ ABI

Fields

§unwind: bool
§

Vectorcall

uses AVX and stuff

Fields

§unwind: bool
§

SysV64

Fields

§unwind: bool
§

Win64

Fields

§unwind: bool

Trait Implementations§

Source§

impl<S> SInto<S, ExternAbi> for ExternAbi

Source§

fn sinto(&self, _s: &S) -> ExternAbi

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
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<I, T> ExtractContext<I, ()> for T

§

fn extract_context(self, _original_input: I)

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Indentable for T
where T: Display,

§

fn indented(self, indent: &str) -> Indented<'_, Self>

Wrap this object so that its Display representation is indented with the given indent. Each non-empty line of the formatted output will be prefixed with the indent. Read more
§

fn indented_skip_initial(self, indent: &str) -> IndentedSkipIntial<'_, Self>

Wrap this object so that its Display representation is indented with the given indent. Each non-empty line except for the first of the formatted output will be prefixed with the indent. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
§

impl<I> RecreateContext<I> for I

§

fn recreate_context(_original_input: I, tail: I) -> I

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> HashConsable for T
where T: Hash + PartialEq + Eq + Clone + Mappable,

Source§

impl<T> Mappable for T
where T: Any + Send + Sync,

Source§

impl<N> NodeTrait for N
where N: Copy + Ord + Hash,