pub struct VulnerabilityManagerBuilder { /* private fields */ }Expand description
Builder for configuring VulnerabilityManager.
Implementations§
Source§impl VulnerabilityManagerBuilder
impl VulnerabilityManagerBuilder
Sourcepub fn store_config(self, config: StoreConfig) -> Self
pub fn store_config(self, config: StoreConfig) -> Self
Set the store configuration.
Sourcepub fn store(self, store: Arc<dyn AdvisoryStore + Send + Sync>) -> Self
pub fn store(self, store: Arc<dyn AdvisoryStore + Send + Sync>) -> Self
Use a custom store implementation.
Sourcepub fn add_source(self, source: Arc<dyn AdvisorySource + Send + Sync>) -> Self
pub fn add_source(self, source: Arc<dyn AdvisorySource + Send + Sync>) -> Self
Add a vulnerability source.
Sourcepub fn with_ghsa(self, token: impl Into<String>) -> Self
pub fn with_ghsa(self, token: impl Into<String>) -> Self
Add the GHSA source with the given token.
Sourcepub fn with_nvd(self, api_key: Option<String>) -> Self
pub fn with_nvd(self, api_key: Option<String>) -> Self
Add the NVD source with optional API key.
Sourcepub fn with_osv(self, ecosystems: Vec<String>) -> Self
pub fn with_osv(self, ecosystems: Vec<String>) -> Self
Add the OSV source for specified ecosystems.
Sourcepub fn with_osv_defaults(self) -> Self
pub fn with_osv_defaults(self) -> Self
Add default OSV ecosystems.
Sourcepub fn with_ossindex(self, config: Option<OssIndexConfig>) -> Self
pub fn with_ossindex(self, config: Option<OssIndexConfig>) -> Self
Add the OSS Index source with optional configuration.
OSS Index provides on-demand vulnerability queries by PURL. If no config is provided, credentials are loaded from environment variables.
Sourcepub fn with_observer(self, observer: Arc<dyn SyncObserver>) -> Self
pub fn with_observer(self, observer: Arc<dyn SyncObserver>) -> Self
Set a custom sync observer.
Sourcepub fn build(self) -> Result<VulnerabilityManager>
pub fn build(self) -> Result<VulnerabilityManager>
Build the VulnerabilityManager.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VulnerabilityManagerBuilder
impl !RefUnwindSafe for VulnerabilityManagerBuilder
impl Send for VulnerabilityManagerBuilder
impl Sync for VulnerabilityManagerBuilder
impl Unpin for VulnerabilityManagerBuilder
impl !UnwindSafe for VulnerabilityManagerBuilder
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