pub struct CodeSandbox {
pub max_risk: f64,
pub forbidden_keywords: Vec<String>,
}Expand description
Data structure representing code sandbox.
Fields§
§max_risk: f64Maximum risk permitted by the active policy.
forbidden_keywords: Vec<String>Collection of forbidden keywords.
Implementations§
Source§impl CodeSandbox
impl CodeSandbox
Sourcepub fn validate(&self, patch: &CognitivePatch) -> Result<ValidationReport>
pub fn validate(&self, patch: &CognitivePatch) -> Result<ValidationReport>
Validates this value and reports any violated constraints.
Trait Implementations§
Auto Trait Implementations§
impl Forget for CodeSandbox
impl Freeze for CodeSandbox
impl Move for CodeSandbox
impl RefUnwindSafe for CodeSandbox
impl Send for CodeSandboxwhere
RawVecInner: Send,
impl Sync for CodeSandboxwhere
RawVecInner: Sync,
impl Unpin for CodeSandbox
impl UnsafeUnpin for CodeSandbox
impl UnwindSafe for CodeSandboxwhere
RawVecInner: UnwindSafe,
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