pub struct FunctionAttributes {
pub is_gpu_kernel: bool,
pub is_thermal_aware: bool,
pub target: Option<ProcessorTarget>,
pub inline: InlineHint,
pub is_cold: bool,
pub is_test: bool,
pub is_bench: bool,
pub is_ignored: bool,
pub raw: Vec<(String, Vec<(String, String)>)>,
}Expand description
Parsed function attributes for code generation decisions
Fields§
§is_gpu_kernel: boolFunction is a GPU kernel (marked with #[gpu_kernel] or #[gpu])
is_thermal_aware: boolFunction should have thermal-aware code generation (#[thermal_aware])
target: Option<ProcessorTarget>Function targets a specific processor (#[target(cpu|gpu|tpu|npu)])
inline: InlineHintFunction should be inlined (#[inline] or #[inline(always)])
is_cold: boolFunction is marked as cold/unlikely to be called (#[cold])
is_test: boolFunction is a test (#[test]) — included only in --test mode
is_bench: boolFunction is a benchmark (#[bench]) — included only in --bench mode
is_ignored: boolFunction should be ignored in test/bench mode (#[ignore])
raw: Vec<(String, Vec<(String, String)>)>Raw attributes for extensions
Trait Implementations§
Source§impl Clone for FunctionAttributes
impl Clone for FunctionAttributes
Source§fn clone(&self) -> FunctionAttributes
fn clone(&self) -> FunctionAttributes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FunctionAttributes
impl Debug for FunctionAttributes
Source§impl Default for FunctionAttributes
impl Default for FunctionAttributes
Source§fn default() -> FunctionAttributes
fn default() -> FunctionAttributes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FunctionAttributes
impl RefUnwindSafe for FunctionAttributes
impl Send for FunctionAttributes
impl Sync for FunctionAttributes
impl Unpin for FunctionAttributes
impl UnwindSafe for FunctionAttributes
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