pub struct InlineConfig {
pub max_statements: usize,
pub max_statements_aggressive: usize,
pub inline_single_call: bool,
pub loop_inline_multiplier: f32,
pub max_inline_depth: usize,
}Expand description
Configuration for function inlining.
Fields§
§max_statements: usizeMaximum number of statements in a function to consider for inlining. Functions with more statements than this are not inlined.
max_statements_aggressive: usizeMaximum number of statements for aggressive inlining.
inline_single_call: boolAlways inline functions called only once.
loop_inline_multiplier: f32Inline threshold multiplier for functions called in loops.
max_inline_depth: usizeMaximum inline depth (to prevent excessive code bloat).
Implementations§
Source§impl InlineConfig
impl InlineConfig
Sourcepub fn for_opt_level(level: OptLevel) -> InlineConfig
pub fn for_opt_level(level: OptLevel) -> InlineConfig
Creates an inline configuration for the given optimization level.
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Returns true if inlining is disabled.
Trait Implementations§
Source§impl Clone for InlineConfig
impl Clone for InlineConfig
Source§fn clone(&self) -> InlineConfig
fn clone(&self) -> InlineConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InlineConfig
impl Debug for InlineConfig
Source§impl Default for InlineConfig
impl Default for InlineConfig
Source§fn default() -> InlineConfig
fn default() -> InlineConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InlineConfig
impl RefUnwindSafe for InlineConfig
impl Send for InlineConfig
impl Sync for InlineConfig
impl Unpin for InlineConfig
impl UnsafeUnpin for InlineConfig
impl UnwindSafe for InlineConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more