pub struct StrategySelector { /* private fields */ }Expand description
Strategy selector that recommends optimization configurations.
Implementations§
Source§impl StrategySelector
impl StrategySelector
Sourcepub fn new(default_level: OptimizationLevel) -> Self
pub fn new(default_level: OptimizationLevel) -> Self
Create a new strategy selector with a default optimization level.
Sourcepub fn select_level(&self, profile: &ExpressionProfile) -> OptimizationLevel
pub fn select_level(&self, profile: &ExpressionProfile) -> OptimizationLevel
Select an optimization level based on expression profile.
Sourcepub fn select_passes(
&self,
profile: &ExpressionProfile,
) -> Vec<OptimizationPass>
pub fn select_passes( &self, profile: &ExpressionProfile, ) -> Vec<OptimizationPass>
Select specific optimization passes based on expression profile.
Sourcepub fn recommend_config(&self, expr: &TLExpr) -> PipelineConfig
pub fn recommend_config(&self, expr: &TLExpr) -> PipelineConfig
Create a recommended pipeline configuration for an expression.
Sourcepub fn should_optimize_aggressively(&self, expr: &TLExpr) -> bool
pub fn should_optimize_aggressively(&self, expr: &TLExpr) -> bool
Quick optimization recommendation: returns whether aggressive optimization is recommended.
Trait Implementations§
Source§impl Clone for StrategySelector
impl Clone for StrategySelector
Source§fn clone(&self) -> StrategySelector
fn clone(&self) -> StrategySelector
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 StrategySelector
impl Debug for StrategySelector
Source§impl Default for StrategySelector
impl Default for StrategySelector
impl Copy for StrategySelector
Auto Trait Implementations§
impl Freeze for StrategySelector
impl RefUnwindSafe for StrategySelector
impl Send for StrategySelector
impl Sync for StrategySelector
impl Unpin for StrategySelector
impl UnwindSafe for StrategySelector
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