pub struct Halstead {Show 14 fields
pub unique_operators: u64,
pub total_operators: u64,
pub unique_operands: u64,
pub total_operands: u64,
pub length: u64,
pub estimated_program_length: f64,
pub purity_ratio: f64,
pub vocabulary: u64,
pub volume: f64,
pub difficulty: f64,
pub level: f64,
pub effort: f64,
pub time: f64,
pub bugs: f64,
}Expand description
Wire form of the Halstead metric suite.
Fields§
§unique_operators: u64Number of distinct operators (n1).
total_operators: u64Total operator occurrences (N1).
unique_operands: u64Number of distinct operands (n2).
total_operands: u64Total operand occurrences (N2).
length: u64Program length (N = N1 + N2).
estimated_program_length: f64Estimated program length.
purity_ratio: f64Purity ratio (estimated length / length).
vocabulary: u64Program vocabulary (n = n1 + n2).
volume: f64Program volume.
difficulty: f64Difficulty.
level: f64Program level (inverse difficulty).
effort: f64Effort.
time: f64Estimated time to program (seconds).
bugs: f64Estimated number of delivered bugs.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Halstead
impl<'de> Deserialize<'de> for Halstead
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
impl StructuralPartialEq for Halstead
Auto Trait Implementations§
impl Freeze for Halstead
impl RefUnwindSafe for Halstead
impl Send for Halstead
impl Sync for Halstead
impl Unpin for Halstead
impl UnsafeUnpin for Halstead
impl UnwindSafe for Halstead
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