#[non_exhaustive]pub struct Function<'ctx> {
pub name: &'ctx str,
pub ty: &'ctx Type,
pub calling_convention: CallingConvention,
pub is_declaration: bool,
pub linkage: Linkage,
pub attributes: Option<&'ctx AttributeEntry>,
pub alignment: MaybeAlign,
pub section: Option<&'ctx str>,
pub visibility: Visibility,
pub gc_name: Option<&'ctx str>,
pub unnamed_addr: UnnamedAddr,
pub storage_class: DllStorageClass,
}
Expand description
Models the MODULE_CODE_FUNCTION
record.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: &'ctx str
The function’s name.
ty: &'ctx Type
A reference to the function’s type in the type table.
calling_convention: CallingConvention
The function’s calling convention.
is_declaration: bool
Whether the function is a declaration, or a full definition (with body).
linkage: Linkage
The function’s linkage.
attributes: Option<&'ctx AttributeEntry>
The function’s attributes, if it has any.
alignment: MaybeAlign
The function’s alignment.
section: Option<&'ctx str>
The function’s custom section, if it has one.
visibility: Visibility
The function’s visibility.
gc_name: Option<&'ctx str>
The function’s garbage collector, if it has one.
unnamed_addr: UnnamedAddr
The function’s unnamed_addr
specifier.
storage_class: DllStorageClass
The function’s DLL storage class.
Trait Implementations§
Auto Trait Implementations§
impl<'ctx> Freeze for Function<'ctx>
impl<'ctx> RefUnwindSafe for Function<'ctx>
impl<'ctx> Send for Function<'ctx>
impl<'ctx> Sync for Function<'ctx>
impl<'ctx> Unpin for Function<'ctx>
impl<'ctx> UnwindSafe for Function<'ctx>
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