pub struct NpmAttestationClient { /* private fields */ }Implementations§
Source§impl NpmAttestationClient
impl NpmAttestationClient
pub fn new() -> Result<Self>
Sourcepub fn fetch_provenance(
&self,
name: &str,
version: &str,
) -> Result<Option<NpmProvenance>>
pub fn fetch_provenance( &self, name: &str, version: &str, ) -> Result<Option<NpmProvenance>>
Fetch provenance for a single package version.
Returns None if the package has no SLSA provenance attestation.
Sourcepub fn enrich_npm_deps(&self, deps: &mut [DependencySignatureEvidence])
pub fn enrich_npm_deps(&self, deps: &mut [DependencySignatureEvidence])
Enrich npm dependencies in-place with provenance data from the attestation API. Non-npm dependencies and dependencies that lack attestations are left unchanged.
Uses a bounded worker pool (CONCURRENCY threads) to handle large
dependency trees efficiently. Progress is reported to stderr.
Auto Trait Implementations§
impl Freeze for NpmAttestationClient
impl !RefUnwindSafe for NpmAttestationClient
impl Send for NpmAttestationClient
impl Sync for NpmAttestationClient
impl Unpin for NpmAttestationClient
impl UnsafeUnpin for NpmAttestationClient
impl !UnwindSafe for NpmAttestationClient
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