#[repr(C)]
pub enum Attribute {
Show 33 variants
AlwaysInline,
ByVal,
Cold,
InlineHint,
MinSize,
Naked,
NoAlias,
NoCapture,
NoInline,
NonNull,
NoRedZone,
NoReturn,
NoUnwind,
OptimizeForSize,
ReadOnly,
SExt,
StructRet,
UWTable,
ZExt,
InReg,
SanitizeThread,
SanitizeAddress,
SanitizeMemory,
NonLazyBind,
OptimizeNone,
ReturnsTwice,
ReadNone,
InaccessibleMemOnly,
SanitizeHWAddress,
WillReturn,
StackProtectReq,
StackProtectStrong,
StackProtect,
}Expand description
Matches LLVMRustAttribute in LLVMWrapper.h Semantically a subset of the C++ enum llvm::Attribute::AttrKind, though it is not ABI compatible (since it’s a C++ enum)
Variants
AlwaysInline
ByVal
Cold
InlineHint
MinSize
Naked
NoAlias
NoCapture
NoInline
NonNull
NoRedZone
NoReturn
NoUnwind
OptimizeForSize
ReadOnly
SExt
StructRet
UWTable
ZExt
InReg
SanitizeThread
SanitizeAddress
SanitizeMemory
NonLazyBind
OptimizeNone
ReturnsTwice
ReadNone
InaccessibleMemOnly
SanitizeHWAddress
WillReturn
StackProtectReq
StackProtectStrong
StackProtect
Implementations
sourceimpl Attribute
impl Attribute
pub fn apply_llfn(&self, idx: AttributePlace, llfn: &Value)
pub fn apply_callsite(&self, idx: AttributePlace, callsite: &Value)
pub fn unapply_llfn(&self, idx: AttributePlace, llfn: &Value)
pub fn toggle_llfn(&self, idx: AttributePlace, llfn: &Value, set: bool)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes
Size for each variant:
AlwaysInline: 0 bytesByVal: 0 bytesCold: 0 bytesInlineHint: 0 bytesMinSize: 0 bytesNaked: 0 bytesNoAlias: 0 bytesNoCapture: 0 bytesNoInline: 0 bytesNonNull: 0 bytesNoRedZone: 0 bytesNoReturn: 0 bytesNoUnwind: 0 bytesOptimizeForSize: 0 bytesReadOnly: 0 bytesSExt: 0 bytesStructRet: 0 bytesUWTable: 0 bytesZExt: 0 bytesInReg: 0 bytesSanitizeThread: 0 bytesSanitizeAddress: 0 bytesSanitizeMemory: 0 bytesNonLazyBind: 0 bytesOptimizeNone: 0 bytesReturnsTwice: 0 bytesReadNone: 0 bytesInaccessibleMemOnly: 0 bytesSanitizeHWAddress: 0 bytesWillReturn: 0 bytesStackProtectReq: 0 bytesStackProtectStrong: 0 bytesStackProtect: 0 bytes