pub struct DartFormatter;Trait Implementations§
Source§impl DiagnosticMessages for DartFormatter
impl DiagnosticMessages for DartFormatter
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 deprecated_message(&self) -> &'static str
fn deprecated_message(&self) -> &'static str
Message for a package-level deprecation/abandonment diagnostic (issue #205). Read more
Source§fn deprecated_label(&self) -> &'static str
fn deprecated_label(&self) -> &'static str
Label for a deprecated package in hover.
Source§impl DiagnosticPolicy for DartFormatter
impl DiagnosticPolicy for DartFormatter
Source§fn strict_semver_prerelease_exclusion(&self) -> bool
fn strict_semver_prerelease_exclusion(&self) -> bool
Whether this ecosystem’s requirement/version syntax follows strict SemVer 2.0.0
pre-release semantics: a pre-release version (
X.Y.Z-pre) is excluded from matching
requirement unless requirement itself pins to the same X.Y.Z tuple with a
pre-release tag — the rule Cargo’s semver crate and npm’s node-semver both
implement, and that compile_requirement’s matcher inherits from its underlying
comparator. Read moreSource§fn supports_package_rename(&self) -> bool
fn supports_package_rename(&self) -> bool
Whether this ecosystem’s deprecation payload (
crate::Deprecation::replacement)
is safe to offer as a “Replace with X” rename quickfix. Read moreSource§fn yanked_diagnostic_applies_to(
&self,
_dep: &dyn Dependency,
_requirement: &VersionReq,
) -> bool
fn yanked_diagnostic_applies_to( &self, _dep: &dyn Dependency, _requirement: &VersionReq, ) -> bool
Whether the “requirement satisfiable only by a yanked version” diagnostic
(
crate::lsp_helpers::requirement_matches_only_yanked) should evaluate requirement
at all for this ecosystem. Read moreSource§impl OsvNaming for DartFormatter
impl OsvNaming for DartFormatter
Source§fn osv_package_name(&self, dep: &dyn Dependency) -> Option<String>
fn osv_package_name(&self, dep: &dyn Dependency) -> Option<String>
OSV.dev’s canonical spelling for
dep’s package name, or None if
this dependency cannot be mapped (e.g. a non-GitHub Swift package). Read moreSource§fn osv_version_to_native(&self, version: &str) -> String
fn osv_version_to_native(&self, version: &str) -> String
Converts a version string as it appears in an OSV advisory record
(e.g.
crate::osv::Advisory::fixed_versions) into this ecosystem’s
own version namespace, as used in manifests and by the registry. Read moreSource§impl PackageNaming for DartFormatter
impl PackageNaming for DartFormatter
Source§fn validate_package_name(&self, name: &str) -> Result<(), InvalidPackageName>
fn validate_package_name(&self, name: &str) -> Result<(), InvalidPackageName>
Lints name against pub.dev’s rule that every package name must be a valid Dart
identifier (see is_valid_dart_identifier), so a structurally invalid name is
reported as “Invalid package name” instead of falling through to a registry lookup
and rendering the generic “Registry lookup failed” diagnostic (#402).
§Errors
Returns InvalidPackageName if name is empty, starts with a digit, or contains a
character other than an ASCII letter, digit, or _.
Source§fn normalize_package_name(&self, name: &PackageName) -> String
fn normalize_package_name(&self, name: &PackageName) -> String
Normalize package name for lookup (default: identity).
Source§impl PackageRendering for DartFormatter
impl PackageRendering for DartFormatter
Source§fn format_version_for_text_edit(&self, version: &ConcreteVersion) -> String
fn format_version_for_text_edit(&self, version: &ConcreteVersion) -> String
Format version string for code action text edit.
Source§fn package_url(&self, name: &PackageName) -> String
fn package_url(&self, name: &PackageName) -> String
Get package URL for hover markdown.
Source§fn format_version_replacing(
&self,
version: &ConcreteVersion,
_current: &str,
) -> String
fn format_version_replacing( &self, version: &ConcreteVersion, _current: &str, ) -> String
Format
version as a replacement for the existing requirement text
current, preserving current’s operator/pin style where the
ecosystem supports more than one. Read moreSource§fn format_version_replacing_for(
&self,
_dep: &dyn Dependency,
version: &ConcreteVersion,
current: &str,
) -> String
fn format_version_replacing_for( &self, _dep: &dyn Dependency, version: &ConcreteVersion, current: &str, ) -> String
Like
format_version_replacing, but also
carries the dependency identity version/current apply to. Read moreSource§fn suppress_package_url(&self, source: &DependencySource) -> bool
fn suppress_package_url(&self, source: &DependencySource) -> bool
Whether hover should omit
Self::package_url’s heading link for a dependency
resolved against source. Read moreSource§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.
Source§impl RequirementResolution for DartFormatter
impl RequirementResolution for DartFormatter
Source§fn compile_requirement(
&self,
requirement: &VersionReq,
) -> Option<Box<dyn RequirementMatcher>>
fn compile_requirement( &self, requirement: &VersionReq, ) -> Option<Box<dyn RequirementMatcher>>
Compiles requirement into a PubDevMatcher using the same comparator as
version_satisfies_requirement — Dart constraints have no separate “loose” vs.
“precise” form to distinguish. Spaced-operator normalization runs once here, not
per candidate version.
Source§fn version_satisfies_requirement(
&self,
version: &ConcreteVersion,
requirement: &str,
) -> bool
fn version_satisfies_requirement( &self, version: &ConcreteVersion, requirement: &str, ) -> bool
Check if a version satisfies a requirement string. Read more
Source§fn is_requirement_up_to_date(
&self,
requirement: &VersionReq,
latest: &ConcreteVersion,
) -> bool
fn is_requirement_up_to_date( &self, requirement: &VersionReq, latest: &ConcreteVersion, ) -> bool
Whether an unresolved dependency (no lock-file version) should be reported as
up to date against
latest, given its declared requirement. Read moreSource§fn requirement_is_unresolved(&self, _requirement: &VersionReq) -> bool
fn requirement_is_unresolved(&self, _requirement: &VersionReq) -> bool
Whether
requirement could not be resolved to a concrete version constraint (e.g. an
unexpanded property/variable placeholder rather than a real version or range). Read moreSource§fn requirement_status(
&self,
requirement: &VersionReq,
latest: &ConcreteVersion,
) -> RequirementStatus
fn requirement_status( &self, requirement: &VersionReq, latest: &ConcreteVersion, ) -> RequirementStatus
Tri-state variant of
is_requirement_up_to_date that distinguishes “confirmed up to
date” from “could not be resolved, so we don’t know.” Read moreSource§fn requirement_status_for(
&self,
dep: &dyn Dependency,
requirement: &VersionReq,
latest: &ConcreteVersion,
) -> RequirementStatus
fn requirement_status_for( &self, dep: &dyn Dependency, requirement: &VersionReq, latest: &ConcreteVersion, ) -> RequirementStatus
Like
requirement_status, but also hands the ecosystem
the dependency itself — for an ecosystem whose requirement text alone is ambiguous
between two shapes with different resolution rules, and which already computed the
disambiguating classification once, at parse time, onto the dependency (deps-gitlab-ci’s
PinStyle, #466 review M-c: a bare "1.2" is Partial under its component: pin
grammar but Branch under its simpler project: ref grammar — indistinguishable from
the text alone). Read moreSource§fn requirement_is_undecidable_given_available(
&self,
_requirement: &VersionReq,
_available: &[ConcreteVersion],
) -> bool
fn requirement_is_undecidable_given_available( &self, _requirement: &VersionReq, _available: &[ConcreteVersion], ) -> bool
Whether this ecosystem’s registry can silently omit a published version from
available in a way indistinguishable from “never published” — and, if so, whether
requirement names a version-space region that specific omission could explain, given
the versions actually observed in available. Read moreSource§fn manifest_requirement_is_resolved_version(&self, dep: &dyn Dependency) -> bool
fn manifest_requirement_is_resolved_version(&self, dep: &dyn Dependency) -> bool
Whether
dep’s manifest version-requirement line is itself the exact
version already selected — never a range. Read moreSource§impl SourcePolicy for DartFormatter
impl SourcePolicy for DartFormatter
Source§fn can_resolve_source(&self, source: &DependencySource) -> bool
fn can_resolve_source(&self, source: &DependencySource) -> bool
Whether this ecosystem’s registry can resolve version data for
source. Read moreSource§fn source_is_public_registry_content(&self, source: &DependencySource) -> bool
fn source_is_public_registry_content(&self, source: &DependencySource) -> bool
Whether
source’s content is exactly the default public registry’s — safe to treat
as such for OSV vulnerability scanning, cache-key signature construction, and hover
heading links. Read moreAuto Trait Implementations§
impl Freeze for DartFormatter
impl RefUnwindSafe for DartFormatter
impl Send for DartFormatter
impl Sync for DartFormatter
impl Unpin for DartFormatter
impl UnsafeUnpin for DartFormatter
impl UnwindSafe for DartFormatter
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