#[non_exhaustive]pub struct OnlineConfig {
pub path: PathBuf,
pub concurrency: usize,
pub queue: usize,
pub evaluators: Vec<EvaluatorSpec>,
}Expand description
A parsed evaluator config.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: PathBufWhere the config was loaded from (judge paths are relative to its directory).
concurrency: usize§queue: usize§evaluators: Vec<EvaluatorSpec>Implementations§
Source§impl OnlineConfig
impl OnlineConfig
Sourcepub fn load(path: &Path) -> Result<Self, EvalError>
pub fn load(path: &Path) -> Result<Self, EvalError>
Load an evaluator config (YAML or JSON).
@throws EvalError - When the file cannot be read or is invalid.
Sourcepub fn parse(text: &str) -> Result<Self, EvalError>
pub fn parse(text: &str) -> Result<Self, EvalError>
Parse evaluator config text.
@throws EvalError - On unknown keys, duplicate names, a sample rate
outside 0..=1, or an assertion type that needs an expected answer.
Sourcepub fn unmatched_workflows<'a>(&'a self, served: &[&str]) -> Vec<&'a str>
pub fn unmatched_workflows<'a>(&'a self, served: &[&str]) -> Vec<&'a str>
Workflow patterns that match none of served (likely typos).
Trait Implementations§
Source§impl Clone for OnlineConfig
impl Clone for OnlineConfig
Source§impl Debug for OnlineConfig
impl Debug for OnlineConfig
Source§impl PartialEq for OnlineConfig
impl PartialEq for OnlineConfig
impl StructuralPartialEq for OnlineConfig
Auto Trait Implementations§
impl Forget for OnlineConfig
impl Freeze for OnlineConfig
impl Move for OnlineConfig
impl RefUnwindSafe for OnlineConfig
impl Send for OnlineConfig
impl Sync for OnlineConfig
impl Unpin for OnlineConfig
impl UnsafeUnpin for OnlineConfig
impl UnwindSafe for OnlineConfig
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