pub struct RawPolicyConfig {
pub policy: Value,
pub audit: Value,
}Expand description
The merged value of config.policy and config.audit (Config
defaults, then the global config, then the project: Config::merge).
Fields§
§policy: Valuetrue, false or an object.
audit: ValueImplementations§
Source§impl RawPolicyConfig
impl RawPolicyConfig
Sourcepub fn merge(&mut self, config: &Map<String, Value>)
pub fn merge(&mut self, config: &Map<String, Value>)
Config::merge for the audit and policy keys of a config.
Sourcepub fn effective_policy(&self) -> Result<Value, PolicyError>
pub fn effective_policy(&self) -> Result<Value, PolicyError>
Config::get('policy'): COMPOSER_POLICY=0 disables, =1
re-enables a false.
Trait Implementations§
Source§impl Clone for RawPolicyConfig
impl Clone for RawPolicyConfig
Source§impl Debug for RawPolicyConfig
impl Debug for RawPolicyConfig
Auto Trait Implementations§
impl Freeze for RawPolicyConfig
impl RefUnwindSafe for RawPolicyConfig
impl Send for RawPolicyConfig
impl Sync for RawPolicyConfig
impl Unpin for RawPolicyConfig
impl UnsafeUnpin for RawPolicyConfig
impl UnwindSafe for RawPolicyConfig
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