Struct Abi

pub struct Abi { pub extern_token: Extern, pub name: Option<LitStr> }

The binary interface of a function: extern "C".

Fields

extern_token: Extern
name: Option<LitStr>

ABI name is optional, but note that extern blocks and functions with an omitted ABI name are deprecated since Rust 1.86.0. Omitting the ABI after the extern keyword has always implicitly resulted in the "C" ABI. It is now recommended to explicitly specify the "C" ABI (extern "C" {} and extern "C" fn).

Trait Implementations

impl Clone for Abi

fn clone(&self) -> Self

impl Parse for Abi

fn parse(input: ParseStream<'_>) -> Result<Self>

impl ToTokens for Abi

fn to_tokens(&self, tokens: &mut TokenStream)

Auto Trait Implementations

impl !Send for Abi

impl !Sync for Abi

impl Freeze for Abi

impl RefUnwindSafe for Abi

impl Unpin for Abi

impl UnsafeUnpin for Abi

impl UnwindSafe for Abi

Blanket Implementations

impl<T> Any for Abi where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> CloneToUninit for Abi where T: Clone,

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

impl<T> From<T> for Abi

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Spanned for Abi where T: Spanned + ?Sized,

fn span(&self) -> Span

impl<T> ToOwned for Abi where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

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

fn into(self) -> U

Calls U::from(self).

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

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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