pub struct ContentCheckConfig {
pub timeout: Duration,
pub failure_policy: FailurePolicy,
/* private fields */
}Expand description
The configured external scanner: a command line (program + args), a per-fact timeout, and the failure policy.
Fields§
§timeout: DurationPer-candidate-fact wall-clock budget; past it the scanner is killed and the run counts as a scanner failure.
failure_policy: FailurePolicyImplementations§
Source§impl ContentCheckConfig
impl ContentCheckConfig
Sourcepub const DEFAULT_TIMEOUT: Duration
pub const DEFAULT_TIMEOUT: Duration
The default per-fact timeout (5 seconds).
Sourcepub fn new(command: Vec<String>) -> Result<Self, String>
pub fn new(command: Vec<String>) -> Result<Self, String>
A config for command (program + args) with the default timeout and the default
fail-closed policy. Errors on an empty command.
Sourcepub fn scanner_name(&self) -> &str
pub fn scanner_name(&self) -> &str
The scanner’s name as recorded in content flags: the configured program.
Trait Implementations§
Source§impl Clone for ContentCheckConfig
impl Clone for ContentCheckConfig
Source§fn clone(&self) -> ContentCheckConfig
fn clone(&self) -> ContentCheckConfig
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 ContentCheckConfig
impl RefUnwindSafe for ContentCheckConfig
impl Send for ContentCheckConfig
impl Sync for ContentCheckConfig
impl Unpin for ContentCheckConfig
impl UnsafeUnpin for ContentCheckConfig
impl UnwindSafe for ContentCheckConfig
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