#[repr(u8)]pub enum Abi {
Rust = 0,
C = 1,
System = 2,
Win64 = 3,
Sysv64 = 4,
Aapcs = 5,
Cdecl = 6,
Stdcall = 7,
Fastcall = 8,
Vectorcall = 9,
}Expand description
The abi or calling convention of a function pointer.
Variants§
Rust = 0
The default ABI when you write a normal fn foo() in any Rust code.
C = 1
This is the same as extern fn foo(); whatever the default your C compiler supports.
System = 2
Usually the same as extern "C", except on Win32, in which case it’s "stdcall", or what you should use to link to the Windows API itself.
Win64 = 3
The default for C code on x86_64 Windows.
Sysv64 = 4
The default for C code on non-Windows x86_64.
Aapcs = 5
The default for ARM.
Cdecl = 6
The default for x86_32 C code.
Stdcall = 7
The default for the Win32 API on x86_32.
Fastcall = 8
The fastcall ABI – corresponds to MSVC’s __fastcall and GCC and clang’s __attribute__((fastcall))
Vectorcall = 9
The vectorcall ABI – corresponds to MSVC’s __vectorcall and GCC and clang’s __attribute__((vectorcall))
Implementations§
Trait Implementations§
impl Copy for Abi
impl Eq for Abi
impl StructuralPartialEq for Abi
Auto Trait Implementations§
impl Freeze for Abi
impl RefUnwindSafe for Abi
impl Send for Abi
impl Sync for Abi
impl Unpin for Abi
impl UnwindSafe for Abi
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