pub struct PathHeuristics { /* private fields */ }Expand description
@acp:summary “Infers annotations from file path patterns” @acp:lock normal
Implementations§
Source§impl PathHeuristics
impl PathHeuristics
Sourcepub fn with_domain_mappings(self, mappings: HashMap<String, String>) -> Self
pub fn with_domain_mappings(self, mappings: HashMap<String, String>) -> Self
@acp:summary “Adds custom domain mappings”
Sourcepub fn suggest(
&self,
file_path: &str,
target: &str,
line: usize,
) -> Vec<Suggestion>
pub fn suggest( &self, file_path: &str, target: &str, line: usize, ) -> Vec<Suggestion>
@acp:summary “Generates suggestions based on file path”
Sourcepub fn infer_module_name(&self, file_path: &str) -> Option<String>
pub fn infer_module_name(&self, file_path: &str) -> Option<String>
@acp:summary “Infers a module name from file path”
Uses directory name + file name to generate a human-readable module name.
Sourcepub fn is_test_path(&self, file_path: &str) -> bool
pub fn is_test_path(&self, file_path: &str) -> bool
@acp:summary “Checks if a path is in a test directory”
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PathHeuristics
impl RefUnwindSafe for PathHeuristics
impl Send for PathHeuristics
impl Sync for PathHeuristics
impl Unpin for PathHeuristics
impl UnwindSafe for PathHeuristics
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> 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