CargoHandler

Struct CargoHandler 

Source
pub struct CargoHandler { /* private fields */ }
Expand description

Cargo ecosystem handler.

Provides Cargo-specific implementations of the generic handler trait, using crates.io registry and semver version matching.

Trait Implementations§

Source§

impl EcosystemHandler for CargoHandler

Source§

type Registry = CratesIoRegistry

Registry type for this ecosystem.
Source§

type Dependency = ParsedDependency

Dependency type for this ecosystem.
Source§

type UnifiedDep = ParsedDependency

Unified dependency type (typically deps_lsp::document::UnifiedDependency). Read more
Source§

fn new(cache: Arc<HttpCache>) -> Self

Create a new handler with the given cache.
Source§

fn registry(&self) -> &Self::Registry

Get the registry instance.
Source§

fn extract_dependency(dep: &Self::UnifiedDep) -> Option<&Self::Dependency>

Extract typed dependency from a unified dependency enum. Read more
Source§

fn package_url(name: &str) -> String

Package URL for this ecosystem (e.g., crates.io, npmjs.com). Read more
Source§

fn ecosystem_display_name() -> &'static str

Display name for the ecosystem (e.g., “crates.io”, “PyPI”). Read more
Source§

fn is_version_latest(version_req: &str, latest: &str) -> bool

Check if version is latest (ecosystem-specific logic). Read more
Source§

fn format_version_for_edit(_dep: &Self::Dependency, version: &str) -> String

Format a version string for editing in the manifest. Read more
Source§

fn is_deprecated(version: &CargoVersion) -> bool

Check if a version is deprecated/yanked. Read more
Source§

fn is_valid_version_syntax(version_req: &str) -> bool

Validate version requirement syntax. Read more
Source§

fn parse_version_req(version_req: &str) -> Option<VersionReq>

Parse a version requirement string into the registry’s VersionReq type. Read more
Source§

fn lockfile_provider(&self) -> Option<Arc<dyn LockFileProvider>>

Get lock file provider for this ecosystem. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more