pub struct CodeUnit {Show 19 fields
pub name: String,
pub qualified_name: String,
pub file: PathBuf,
pub line: usize,
pub language: Language,
pub unit_type: UnitType,
pub signature: String,
pub docstring: Option<String>,
pub parameters: Vec<String>,
pub return_type: Option<String>,
pub calls: Vec<String>,
pub called_by: Vec<String>,
pub complexity: usize,
pub has_loops: bool,
pub has_branches: bool,
pub has_error_handling: bool,
pub variables: Vec<String>,
pub imports: Vec<String>,
pub code_preview: String,
}Expand description
A code unit with all 5 analysis layers for rich embeddings
Fields§
§name: String§qualified_name: String§file: PathBuf§line: usize§language: Language§unit_type: UnitType§signature: String§docstring: Option<String>§parameters: Vec<String>§return_type: Option<String>§calls: Vec<String>§called_by: Vec<String>§complexity: usize§has_loops: bool§has_branches: bool§has_error_handling: bool§variables: Vec<String>§imports: Vec<String>§code_preview: StringImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeUnit
impl<'de> Deserialize<'de> for CodeUnit
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 CodeUnit
impl RefUnwindSafe for CodeUnit
impl Send for CodeUnit
impl Sync for CodeUnit
impl Unpin for CodeUnit
impl UnwindSafe for CodeUnit
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more