pub struct GraphBlockInfo {
pub name: String,
pub kind: String,
pub file_path: Option<String>,
pub source_code: Option<String>,
pub node: GraphNode,
pub unit_index: usize,
pub start_line: usize,
pub end_line: usize,
}Expand description
Query API for semantic code questions built on top of ProjectGraph:
- given a function name, find all related code
- given a struct name, find all related code
- given a module/folder, find related modules
- given a file name, extract important structures (functions, types, etc.)
Output format: plain text suitable for LLM ingestion Represents a semantic code block from the project graph
Fields§
§name: String§kind: String§file_path: Option<String>§source_code: Option<String>§node: GraphNode§unit_index: usize§start_line: usize§end_line: usizeImplementations§
Source§impl GraphBlockInfo
impl GraphBlockInfo
pub fn format_for_llm(&self) -> String
Trait Implementations§
Source§impl Clone for GraphBlockInfo
impl Clone for GraphBlockInfo
Source§fn clone(&self) -> GraphBlockInfo
fn clone(&self) -> GraphBlockInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphBlockInfo
impl RefUnwindSafe for GraphBlockInfo
impl Send for GraphBlockInfo
impl Sync for GraphBlockInfo
impl Unpin for GraphBlockInfo
impl UnwindSafe for GraphBlockInfo
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> 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