pub struct UnitFeatures {
pub name: Option<Lexeme>,
pub shape_tag: u8,
pub range: ByteRange,
pub windows: Vec<WindowFeature>,
pub subtrees: Vec<SubtreeFeature>,
pub vector: CharacteristicVector,
pub cfg: CfgFeature,
pub api: ApiCallFeature,
}Expand description
The candidate-extraction features of one unit.
A unit’s features are computed over its full subtree, nested closures and local functions included, while each nested unit also gets an entry of its own. This double counting is deliberate v0 granularity: the outer unit stays comparable as a whole, and the nested unit remains independently discoverable.
Fields§
§name: Option<Lexeme>The unit’s declared name, when the frontend recovered one.
shape_tag: u8Shape tag of the unit node (see Shape::tag).
range: ByteRangeSource bytes the unit covers; reporting only.
windows: Vec<WindowFeature>Statement-window hashes over every block in the unit subtree.
subtrees: Vec<SubtreeFeature>Merkle subtree fingerprints of size MIN_SUBTREE_NODES and up,
emitted in post-order.
vector: CharacteristicVectorThe unit’s characteristic vector.
cfg: CfgFeatureThe unit’s approximate control-flow profile.
api: ApiCallFeatureThe unit’s API-call profile.
Trait Implementations§
Source§impl Clone for UnitFeatures
impl Clone for UnitFeatures
Source§fn clone(&self) -> UnitFeatures
fn clone(&self) -> UnitFeatures
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UnitFeatures
impl Debug for UnitFeatures
impl Eq for UnitFeatures
Source§impl PartialEq for UnitFeatures
impl PartialEq for UnitFeatures
impl StructuralPartialEq for UnitFeatures
Auto Trait Implementations§
impl Freeze for UnitFeatures
impl RefUnwindSafe for UnitFeatures
impl Send for UnitFeatures
impl Sync for UnitFeatures
impl Unpin for UnitFeatures
impl UnsafeUnpin for UnitFeatures
impl UnwindSafe for UnitFeatures
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.