pub struct ExecPolicyCheckRequest {
pub policies: Vec<PathBuf>,
pub pretty: bool,
pub command: Vec<OsString>,
pub overrides: CliOverridesPatch,
}Expand description
Request to evaluate a command against Starlark execpolicy files.
Fields§
§policies: Vec<PathBuf>One or more .codexpolicy files to merge with repeatable --policy flags.
pretty: boolPretty-print JSON output (--pretty).
command: Vec<OsString>Command argv forwarded after --. Must not be empty.
overrides: CliOverridesPatchPer-call CLI overrides layered on top of the builder.
Implementations§
Source§impl ExecPolicyCheckRequest
impl ExecPolicyCheckRequest
pub fn new<I, S>(command: I) -> Self
Sourcepub fn with_overrides(self, overrides: CliOverridesPatch) -> Self
pub fn with_overrides(self, overrides: CliOverridesPatch) -> Self
Replaces the default CLI overrides for this request.
Sourcepub fn config_override(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn config_override( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Adds a --config key=value override for this request.
Sourcepub fn config_override_raw(self, raw: impl Into<String>) -> Self
pub fn config_override_raw(self, raw: impl Into<String>) -> Self
Adds a raw --config key=value override without validation.
Sourcepub fn profile(self, profile: impl Into<String>) -> Self
pub fn profile(self, profile: impl Into<String>) -> Self
Sets the config profile (--profile) for this request.
Sourcepub fn enable_feature(self, name: impl Into<String>) -> Self
pub fn enable_feature(self, name: impl Into<String>) -> Self
Adds a --enable <feature> toggle for this call.
Sourcepub fn disable_feature(self, name: impl Into<String>) -> Self
pub fn disable_feature(self, name: impl Into<String>) -> Self
Adds a --disable <feature> toggle for this call.
Trait Implementations§
Source§impl Clone for ExecPolicyCheckRequest
impl Clone for ExecPolicyCheckRequest
Source§fn clone(&self) -> ExecPolicyCheckRequest
fn clone(&self) -> ExecPolicyCheckRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecPolicyCheckRequest
impl Debug for ExecPolicyCheckRequest
Source§impl PartialEq for ExecPolicyCheckRequest
impl PartialEq for ExecPolicyCheckRequest
impl Eq for ExecPolicyCheckRequest
impl StructuralPartialEq for ExecPolicyCheckRequest
Auto Trait Implementations§
impl Freeze for ExecPolicyCheckRequest
impl RefUnwindSafe for ExecPolicyCheckRequest
impl Send for ExecPolicyCheckRequest
impl Sync for ExecPolicyCheckRequest
impl Unpin for ExecPolicyCheckRequest
impl UnsafeUnpin for ExecPolicyCheckRequest
impl UnwindSafe for ExecPolicyCheckRequest
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.