pub struct EcosystemValidator { /* private fields */ }Expand description
Comprehensive ecosystem validator for production environments
Implementations§
Source§impl EcosystemValidator
impl EcosystemValidator
Sourcepub fn new() -> CoreResult<Self>
pub fn new() -> CoreResult<Self>
Create new ecosystem validator
Sourcepub fn global() -> CoreResult<Arc<Self>>
pub fn global() -> CoreResult<Arc<Self>>
Get global validator instance
Sourcepub fn register_module(&self, module: ModuleInfo) -> CoreResult<()>
pub fn register_module(&self, module: ModuleInfo) -> CoreResult<()>
Register a module in the ecosystem
Sourcepub fn validate_ecosystem(&self) -> CoreResult<EcosystemValidationResult>
pub fn validate_ecosystem(&self) -> CoreResult<EcosystemValidationResult>
Validate entire ecosystem compatibility
Sourcepub fn validate_module(
&self,
modulename: &str,
) -> CoreResult<ModuleValidationResult>
pub fn validate_module( &self, modulename: &str, ) -> CoreResult<ModuleValidationResult>
Validate specific module compatibility with ecosystem
Sourcepub fn updatepolicies(&self, newpolicies: ValidationPolicies) -> CoreResult<()>
pub fn updatepolicies(&self, newpolicies: ValidationPolicies) -> CoreResult<()>
Update validation policies
Sourcepub fn get_ecosystem_health(&self) -> CoreResult<EcosystemHealth>
pub fn get_ecosystem_health(&self) -> CoreResult<EcosystemHealth>
Get ecosystem health summary
Sourcepub fn has_circular_dependency(
&self,
registry: &ModuleRegistry,
module: &str,
dependency: &str,
) -> bool
pub fn has_circular_dependency( &self, registry: &ModuleRegistry, module: &str, dependency: &str, ) -> bool
Real cycle detection: would registering dependency as a dependency
of module create a circular dependency chain?
This performs a DFS over the existing declared dependency edges
starting at dependency: if module is reachable from
dependency, then adding the edge module -> dependency would close
a cycle back to module. A direct self-dependency (module == dependency) is trivially a cycle.
(A generic executable crate::distributed::task_graph::TaskGraph
exists elsewhere in this crate, but it is oriented around scheduling
closures for execution; a plain reachability walk over the
declarative ModuleRegistry data is simpler and does not require
wrapping module metadata in executable tasks.)
Sourcepub fn areversions_compatible(
&self,
version_a: &Version,
version_b: &Version,
policies: &ValidationPolicies,
) -> bool
pub fn areversions_compatible( &self, version_a: &Version, version_b: &Version, policies: &ValidationPolicies, ) -> bool
Real semver-based pairwise version compatibility: under
strict_version_matching the versions must match exactly, otherwise
modules sharing a major version are considered compatible (the
standard semver contract for a stable release; see
crate::apiversioning::Version::is_compatible_with for the
single-version analogue used elsewhere in this crate).
Sourcepub fn are_apis_compatible(&self, api_a: &ApiSurface, apib: &ApiSurface) -> bool
pub fn are_apis_compatible(&self, api_a: &ApiSurface, apib: &ApiSurface) -> bool
Real API-presence check: flags a genuine symbol conflict, i.e. two modules independently declaring a public API with the same name but a different signature. Modules that share no API names, or share names with identical signatures, are compatible.
Sourcepub fn are_features_compatible(
&self,
features_a: &[String],
featuresb: &[String],
policies: &ValidationPolicies,
) -> bool
pub fn are_features_compatible( &self, features_a: &[String], featuresb: &[String], policies: &ValidationPolicies, ) -> bool
Real feature-compatibility check: neither module may enable a
feature that ecosystem policy has blacklisted as incompatible (the
same incompatible_features policy enforced per-module by the
private is_feature_compatible method, applied here to a module
pair).
Sourcepub fn check_api_stability(
&self,
previous: Option<&ApiSurface>,
current: &ApiSurface,
) -> ApiStabilityCheck
pub fn check_api_stability( &self, previous: Option<&ApiSurface>, current: &ApiSurface, ) -> ApiStabilityCheck
Real API-stability check comparing current against previous (if
any version was previously registered for this module): detects
removed public APIs and changed signatures, both breaking changes.
A module with no prior recorded version is trivially stable (there
is nothing to have broken yet).
Sourcepub fn is_api_properly_versioned(&self, apisurface: &ApiSurface) -> bool
pub fn is_api_properly_versioned(&self, apisurface: &ApiSurface) -> bool
Real versioning-compliance check: every public API must carry a
since_version annotation.
Sourcepub fn has_known_vulnerabilities(
&self,
_dependency_name: &str,
) -> VulnerabilityStatus
pub fn has_known_vulnerabilities( &self, _dependency_name: &str, ) -> VulnerabilityStatus
Vulnerability lookup for a dependency by name.
This crate has no vulnerability-advisory database (e.g. a RustSec
feed) integrated, and none of [workspace.dependencies] provides
one; adding a live/networked lookup here would also make ecosystem
validation non-hermetic. Rather than fabricate a “no known
vulnerabilities” verdict, this honestly reports that the dependency
was never checked. See SecurityValidationResult::unchecked_dependencies.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EcosystemValidator
impl RefUnwindSafe for EcosystemValidator
impl Send for EcosystemValidator
impl Sync for EcosystemValidator
impl Unpin for EcosystemValidator
impl UnsafeUnpin for EcosystemValidator
impl UnwindSafe for EcosystemValidator
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.