pub struct PolicyConfig {
pub enabled: bool,
pub advisories: AdvisoriesPolicy,
pub malware: MalwarePolicy,
pub abandoned: AbandonedPolicy,
pub custom_lists: Vec<String>,
pub ignore_unreachable: IgnoreUnreachable,
}Fields§
§enabled: boolpolicy: false (or COMPOSER_POLICY=0): everything is disabled.
advisories: AdvisoriesPolicy§malware: MalwarePolicy§abandoned: AbandonedPolicy§custom_lists: Vec<String>Names of the declared custom lists (not ported).
ignore_unreachable: IgnoreUnreachableImplementations§
Source§impl PolicyConfig
impl PolicyConfig
Sourcepub fn from_raw(raw: &RawPolicyConfig) -> Result<PolicyConfig, PolicyError>
pub fn from_raw(raw: &RawPolicyConfig) -> Result<PolicyConfig, PolicyError>
PolicyConfig::fromConfig + the environment variables.
Sourcepub fn apply_no_blocking(&mut self, option: bool) -> Result<(), PolicyError>
pub fn apply_no_blocking(&mut self, option: bool) -> Result<(), PolicyError>
BaseCommand::createPolicyConfig: --no-blocking,
--no-security-blocking, COMPOSER_NO_BLOCKING,
COMPOSER_NO_SECURITY_BLOCKING -> withBlockingDisabled.
Sourcepub fn malware_blocks(&self, scope: &str) -> bool
pub fn malware_blocks(&self, scope: &str) -> bool
ListPolicyConfig::shouldBlock for the malware list.
Trait Implementations§
Source§impl Clone for PolicyConfig
impl Clone for PolicyConfig
Source§fn clone(&self) -> PolicyConfig
fn clone(&self) -> PolicyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PolicyConfig
impl RefUnwindSafe for PolicyConfig
impl Send for PolicyConfig
impl Sync for PolicyConfig
impl Unpin for PolicyConfig
impl UnsafeUnpin for PolicyConfig
impl UnwindSafe for PolicyConfig
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