pub struct InlineHeuristic {
pub call_count_threshold: u64,
pub size_limit: usize,
pub depth_limit: u32,
pub benefit_multiplier: f64,
}Fields§
§call_count_threshold: u64§size_limit: usize§depth_limit: u32§benefit_multiplier: f64Implementations§
Source§impl InlineHeuristic
impl InlineHeuristic
pub fn aggressive() -> Self
pub fn conservative() -> Self
pub fn default_heuristic() -> Self
pub fn should_inline( &self, call_count: u64, callee_size: usize, current_depth: u32, ) -> bool
pub fn compute_benefit(&self, call_count: u64, callee_size: usize) -> f64
Trait Implementations§
Source§impl Clone for InlineHeuristic
impl Clone for InlineHeuristic
Source§fn clone(&self) -> InlineHeuristic
fn clone(&self) -> InlineHeuristic
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 moreAuto Trait Implementations§
impl Freeze for InlineHeuristic
impl RefUnwindSafe for InlineHeuristic
impl Send for InlineHeuristic
impl Sync for InlineHeuristic
impl Unpin for InlineHeuristic
impl UnsafeUnpin for InlineHeuristic
impl UnwindSafe for InlineHeuristic
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