pub struct CodeEdge {
pub from: String,
pub to: String,
pub relation: EdgeRelation,
pub weight: f32,
pub call_count: u32,
pub in_error_path: bool,
pub confidence: f32,
}Expand description
An edge in the code graph.
Fields§
§from: String§to: String§relation: EdgeRelation§weight: f32§call_count: u32§in_error_path: bool§confidence: f32Implementations§
Source§impl CodeEdge
impl CodeEdge
pub fn new(from: &str, to: &str, relation: EdgeRelation) -> Self
pub fn imports(from: &str, to: &str) -> Self
pub fn calls(from: &str, to: &str) -> Self
pub fn inherits(from: &str, to: &str) -> Self
pub fn defined_in(from: &str, to: &str) -> Self
Sourcepub fn compute_weight(&mut self)
pub fn compute_weight(&mut self)
Compute composite weight from call_count, in_error_path, and confidence.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeEdge
impl<'de> Deserialize<'de> for CodeEdge
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
Auto Trait Implementations§
impl Freeze for CodeEdge
impl RefUnwindSafe for CodeEdge
impl Send for CodeEdge
impl Sync for CodeEdge
impl Unpin for CodeEdge
impl UnsafeUnpin for CodeEdge
impl UnwindSafe for CodeEdge
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