pub struct CodeLensProvider { /* private fields */ }Expand description
Code lens provider
Implementations§
Source§impl CodeLensProvider
impl CodeLensProvider
Sourcepub fn new() -> CodeLensProvider
pub fn new() -> CodeLensProvider
Create a new code lens provider with an empty source.
Retained for migration compatibility and Default derivation. New callers should
prefer Self::with_source so the source is set at construction time.
Sourcepub fn with_source(source: String) -> CodeLensProvider
pub fn with_source(source: String) -> CodeLensProvider
Create a new code lens provider with source content.
Sourcepub fn with_file_path(self, path: String) -> CodeLensProvider
pub fn with_file_path(self, path: String) -> CodeLensProvider
Set the file path for test file detection
Sourcepub fn extract_subtest_lenses(source: &str) -> Vec<CodeLens>
pub fn extract_subtest_lenses(source: &str) -> Vec<CodeLens>
Detect subtest patterns using text-based scanning
Since the parser may represent subtest "name" => sub { ... } as an
identifier + hash rather than a FunctionCall, we use text-based scanning
to reliably detect subtest blocks.
Trait Implementations§
Source§impl Default for CodeLensProvider
impl Default for CodeLensProvider
Source§fn default() -> CodeLensProvider
fn default() -> CodeLensProvider
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CodeLensProvider
impl RefUnwindSafe for CodeLensProvider
impl Send for CodeLensProvider
impl Sync for CodeLensProvider
impl Unpin for CodeLensProvider
impl UnsafeUnpin for CodeLensProvider
impl UnwindSafe for CodeLensProvider
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