pub struct DebugAdapterRegistry { /* private fields */ }Expand description
Registry of known debug adapters.
Pre-populated with entries for common adapters (CodeLLDB, Delve,
debugpy, js-debug, java-debug). Additional entries can be registered
at runtime.
Implementations§
Source§impl DebugAdapterRegistry
impl DebugAdapterRegistry
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
Create a registry pre-populated with built-in adapter entries.
Sourcepub fn register(&mut self, entry: DebugAdapterEntry)
pub fn register(&mut self, entry: DebugAdapterEntry)
Register a custom adapter entry.
Sourcepub fn find_by_language(&self, language_id: &str) -> Vec<&DebugAdapterEntry>
pub fn find_by_language(&self, language_id: &str) -> Vec<&DebugAdapterEntry>
Look up adapters by language identifier.
Sourcepub fn find_by_name(&self, name: &str) -> Option<&DebugAdapterEntry>
pub fn find_by_name(&self, name: &str) -> Option<&DebugAdapterEntry>
Look up an adapter by name.
Sourcepub fn all(&self) -> &[DebugAdapterEntry]
pub fn all(&self) -> &[DebugAdapterEntry]
Return all registered entries.
Sourcepub fn is_available(&self, name: &str) -> bool
pub fn is_available(&self, name: &str) -> bool
Check whether a specific adapter binary is available on PATH.
Sourcepub fn detect_for_project(&self, project_root: &Path) -> Vec<&DebugAdapterEntry>
pub fn detect_for_project(&self, project_root: &Path) -> Vec<&DebugAdapterEntry>
Detect which debug adapters are available for a project directory.
Scans the project root up to 2 levels deep for file extensions, maps
them to language identifiers, then checks the registry for matching
adapters whose binary is on PATH.
Supports polyglot repos – returns multiple adapters if multiple languages are detected.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DebugAdapterRegistry
impl RefUnwindSafe for DebugAdapterRegistry
impl Send for DebugAdapterRegistry
impl Sync for DebugAdapterRegistry
impl Unpin for DebugAdapterRegistry
impl UnsafeUnpin for DebugAdapterRegistry
impl UnwindSafe for DebugAdapterRegistry
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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