pub struct NpmFormatter;Trait Implementations§
Source§impl EcosystemFormatter for NpmFormatter
impl EcosystemFormatter for NpmFormatter
Source§fn format_version_for_code_action(&self, version: &str) -> String
fn format_version_for_code_action(&self, version: &str) -> String
Format version string for code action text edit.
Source§fn package_url(&self, name: &str) -> String
fn package_url(&self, name: &str) -> String
Get package URL for hover markdown.
Source§fn yanked_message(&self) -> &'static str
fn yanked_message(&self) -> &'static str
Message for yanked/deprecated versions in diagnostics.
Source§fn yanked_label(&self) -> &'static str
fn yanked_label(&self) -> &'static str
Label for yanked versions in hover.
Source§fn normalize_package_name(&self, name: &str) -> String
fn normalize_package_name(&self, name: &str) -> String
Normalize package name for lookup (default: identity).
Source§fn version_satisfies_requirement(
&self,
version: &str,
requirement: &str,
) -> bool
fn version_satisfies_requirement( &self, version: &str, requirement: &str, ) -> bool
Check if a version satisfies a requirement string.
Source§fn is_position_on_dependency(
&self,
dep: &dyn Dependency,
position: Position,
) -> bool
fn is_position_on_dependency( &self, dep: &dyn Dependency, position: Position, ) -> bool
Detect if cursor position is on a dependency for code actions.
Auto Trait Implementations§
impl Freeze for NpmFormatter
impl RefUnwindSafe for NpmFormatter
impl Send for NpmFormatter
impl Sync for NpmFormatter
impl Unpin for NpmFormatter
impl UnwindSafe for NpmFormatter
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