Trait Complexity

Source
pub trait Complexity: Sealed {
    // Required method
    fn complexity(&self) -> u32;
}
Expand description

A trait for calculating the cognitive complexity of a Rust type.

This is a sealed trait so only this crate can implement it.

Required Methods§

Source

fn complexity(&self) -> u32

Returns the cognitive complexity index for the implementor.

Implementations on Foreign Types§

Source§

impl Complexity for Expr

Source§

fn complexity(&self) -> u32

Source§

impl Complexity for ImplItemMethod

Source§

fn complexity(&self) -> u32

Source§

impl Complexity for ItemFn

Source§

fn complexity(&self) -> u32

Implementors§