pub struct InliningOpportunity {
pub function_name: String,
pub call_frequency: usize,
pub function_size: usize,
pub benefit_score: f64,
pub call_sites: Vec<CodeLocation>,
pub benefits: Vec<String>,
}Expand description
Inlining opportunity
Fields§
§function_name: StringFunction or closure that could be inlined
call_frequency: usizeCall frequency estimate
function_size: usizeFunction size in nodes
benefit_score: f64Inlining benefit score (0.0-1.0)
call_sites: Vec<CodeLocation>Location of calls
benefits: Vec<String>Reasons why inlining would help
Trait Implementations§
Source§impl Clone for InliningOpportunity
impl Clone for InliningOpportunity
Source§fn clone(&self) -> InliningOpportunity
fn clone(&self) -> InliningOpportunity
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 InliningOpportunity
impl Debug for InliningOpportunity
Source§impl<'de> Deserialize<'de> for InliningOpportunity
impl<'de> Deserialize<'de> for InliningOpportunity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InliningOpportunity
impl RefUnwindSafe for InliningOpportunity
impl Send for InliningOpportunity
impl Sync for InliningOpportunity
impl Unpin for InliningOpportunity
impl UnwindSafe for InliningOpportunity
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