Struct rustc_target::abi::call::FnAbi

source ·
pub struct FnAbi<'a, Ty> {
    pub args: Box<[ArgAbi<'a, Ty>]>,
    pub ret: ArgAbi<'a, Ty>,
    pub c_variadic: bool,
    pub fixed_count: u32,
    pub conv: Conv,
    pub can_unwind: bool,
}
Expand description

Metadata describing how the arguments to a native function should be passed in order to respect the native ABI.

I will do my best to describe this structure, but these comments are reverse-engineered and may be inaccurate. -NDM

Fields

args: Box<[ArgAbi<'a, Ty>]>

The LLVM types of each argument.

ret: ArgAbi<'a, Ty>

LLVM return type.

c_variadic: boolfixed_count: u32

The count of non-variadic arguments.

Should only be different from args.len() when c_variadic is true. This can be used to know whether an argument is variadic or not.

conv: Convcan_unwind: bool

Implementations

Trait Implementations

Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.