pub struct ComplexityMetric {
pub app_weight: u32,
pub lam_weight: u32,
pub leaf_weight: u32,
}Expand description
A simple expression complexity metric.
Fields§
§app_weight: u32Weight for each application
lam_weight: u32Weight for each lambda
leaf_weight: u32Weight for each leaf
Implementations§
Source§impl ComplexityMetric
impl ComplexityMetric
Sourcepub fn default_metric() -> Self
pub fn default_metric() -> Self
Create a default metric.
Sourcepub fn compute(&self, node: &TreeNodeExt) -> u32
pub fn compute(&self, node: &TreeNodeExt) -> u32
Compute the complexity of a tree node.
Auto Trait Implementations§
impl Freeze for ComplexityMetric
impl RefUnwindSafe for ComplexityMetric
impl Send for ComplexityMetric
impl Sync for ComplexityMetric
impl Unpin for ComplexityMetric
impl UnsafeUnpin for ComplexityMetric
impl UnwindSafe for ComplexityMetric
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