pub struct ModelPolicyCommand {
pub scope: ModelScope,
pub harness: String,
pub model: Option<String>,
pub reasoning: Option<String>,
pub dry_run: bool,
}Expand description
A model-policy mutation to be executed as a subprocess:
node scripts/model-policy.mjs set <args>.
Fields§
§scope: ModelScope§harness: String§model: Option<String>Model name or “auto”; None leaves the model field of the rule untouched.
reasoning: Option<String>Reasoning effort or “auto”; None leaves the field untouched.
dry_run: boolImplementations§
Source§impl ModelPolicyCommand
impl ModelPolicyCommand
Sourcepub fn validate(&self) -> Result<(), TuiError>
pub fn validate(&self) -> Result<(), TuiError>
Validate all user-provided arguments against shell metacharacters. Semantic validation (per-harness model patterns, capability checks) stays in scripts/model-policy.mjs — the single source of truth.
Sourcepub fn to_args(&self) -> Vec<String>
pub fn to_args(&self) -> Vec<String>
Build the argument array for subprocess invocation (after the script path).
Sourcepub fn display_command(&self) -> String
pub fn display_command(&self) -> String
Render the full command string for display/preview.
Trait Implementations§
Source§impl Clone for ModelPolicyCommand
impl Clone for ModelPolicyCommand
Source§fn clone(&self) -> ModelPolicyCommand
fn clone(&self) -> ModelPolicyCommand
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 ModelPolicyCommand
impl RefUnwindSafe for ModelPolicyCommand
impl Send for ModelPolicyCommand
impl Sync for ModelPolicyCommand
impl Unpin for ModelPolicyCommand
impl UnsafeUnpin for ModelPolicyCommand
impl UnwindSafe for ModelPolicyCommand
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