pub struct SemanticContext {
pub current_file: PathBuf,
pub base_dir: PathBuf,
pub current_depth: usize,
pub max_depth: usize,
pub visited_files: HashSet<PathBuf>,
}Expand description
Context information for semantic analysis
Fields§
§current_file: PathBufCurrent file being analyzed
base_dir: PathBufBase directory for the project
current_depth: usizeCurrent depth in dependency traversal
max_depth: usizeMaximum allowed depth
visited_files: HashSet<PathBuf>Files already visited (for cycle detection)
Implementations§
Source§impl SemanticContext
impl SemanticContext
Sourcepub fn new(current_file: PathBuf, base_dir: PathBuf, max_depth: usize) -> Self
pub fn new(current_file: PathBuf, base_dir: PathBuf, max_depth: usize) -> Self
Create a new semantic context
Sourcepub fn at_max_depth(&self) -> bool
pub fn at_max_depth(&self) -> bool
Check if we’ve reached maximum depth
Sourcepub fn child_context(&self, file: PathBuf) -> Option<Self>
pub fn child_context(&self, file: PathBuf) -> Option<Self>
Create a child context for analyzing a dependency
Trait Implementations§
Source§impl Clone for SemanticContext
impl Clone for SemanticContext
Source§fn clone(&self) -> SemanticContext
fn clone(&self) -> SemanticContext
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 SemanticContext
impl RefUnwindSafe for SemanticContext
impl Send for SemanticContext
impl Sync for SemanticContext
impl Unpin for SemanticContext
impl UnwindSafe for SemanticContext
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