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
Auto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 more