Skip to main content

OwnedClassNode

Struct OwnedClassNode 

Source
pub struct OwnedClassNode {
Show 21 fields pub id: String, pub name: String, pub namespace: String, pub line_count: u32, pub method_count: u32, pub halstead_eta1: u32, pub halstead_eta2: u32, pub halstead_n1: u32, pub halstead_n2: u32, pub method_connectivity: Option<MethodConnectivity>, pub method_fingerprints: Option<Value>, pub method_tokens: Option<Value>, pub call_sequences: Option<Value>, pub cyclomatic_complexity: Option<Value>, pub path_conditions: Option<Value>, pub invariants: Option<Value>, pub error_messages: Option<Value>, pub magic_numbers: Option<Value>, pub dead_code: Option<Value>, pub tenant_branches: Option<Value>, pub state_transitions: Option<Value>,
}
Expand description

A class node with all attributes from the GraphML schema.

Required fields (id, name, namespace, lineCount, methodCount) are always present. Halstead and semantic-mode fields are optional — they are None when the GraphML was exported in syntax-only mode.

Fields§

§id: String

Fully-qualified class name used as the GraphML node id.

§name: String§namespace: String§line_count: u32§method_count: u32§halstead_eta1: u32§halstead_eta2: u32§halstead_n1: u32§halstead_n2: u32§method_connectivity: Option<MethodConnectivity>§method_fingerprints: Option<Value>§method_tokens: Option<Value>§call_sequences: Option<Value>§cyclomatic_complexity: Option<Value>§path_conditions: Option<Value>§invariants: Option<Value>§error_messages: Option<Value>§magic_numbers: Option<Value>§dead_code: Option<Value>§tenant_branches: Option<Value>§state_transitions: Option<Value>

Trait Implementations§

Source§

impl ClassNode for OwnedClassNode

Source§

fn id(&self) -> &str

Source§

fn namespace(&self) -> &str

Source§

fn line_count(&self) -> u32

Source§

fn method_count(&self) -> u32

Source§

fn method_connectivity(&self) -> Option<&MethodConnectivity>

Source§

fn cyclomatic_complexity(&self) -> Option<&Value>

Raw cyclomaticComplexity JSON blob — shape {"methods": [{"name": str, "complexity": int}, …]}. Default None for nodes from extractors that omit it.
Source§

fn halstead_eta1(&self) -> u32

Halstead raw counts. Default 0 for nodes without the attribute — η = 0 short-circuits V to 0, so a missing-data class produces the same answer as a class with no operators or operands.
Source§

fn halstead_eta2(&self) -> u32

Source§

fn halstead_n1(&self) -> u32

Source§

fn halstead_n2(&self) -> u32

Source§

fn method_tokens(&self) -> Option<&Value>

Raw methodTokens JSON blob — shape {"methods": [{"name": str, "tokens": [str]}, …]}.
Source§

fn method_fingerprints(&self) -> Option<&Value>

Raw methodFingerprints JSON blob — shape {"methods": [{"name": str, "tokens": "TOK TOK TOK", "line": int, …}, …]}. Distinct from methodTokens: fingerprint tokens are space-separated normalised token-class strings used for clone detection.
Source§

fn call_sequences(&self) -> Option<&Value>

Raw callSequences JSON blob — shape {"sequences": [{"method": str, "calls": [str], …}, …]}. Each sequence is the ordered list of method names a single method invokes; used as a transaction for association-rule mining and as a trace log for process mining.
Source§

impl Clone for OwnedClassNode

Source§

fn clone(&self) -> OwnedClassNode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OwnedClassNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.