pub struct ValidationEngine { /* private fields */ }Expand description
Validation engine
Implementations§
Source§impl ValidationEngine
impl ValidationEngine
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), MLError>
Sourcepub fn register_validator(&mut self, validator: Validator)
pub fn register_validator(&mut self, validator: Validator)
Register a validator under the given id.
Sourcepub fn get_validator(&self, validator_id: &str) -> Option<&Validator>
pub fn get_validator(&self, validator_id: &str) -> Option<&Validator>
Get a registered validator by id.
Sourcepub fn list_validators(&self) -> Vec<String>
pub fn list_validators(&self) -> Vec<String>
List the ids of all registered validators.
Sourcepub fn add_validation_rule(&mut self, rule: ValidationRule)
pub fn add_validation_rule(&mut self, rule: ValidationRule)
Add a validation rule to the engine.
Sourcepub fn validation_rules(&self) -> &[ValidationRule]
pub fn validation_rules(&self) -> &[ValidationRule]
Return a reference to all validation rules.
Sourcepub fn test_suite(&self) -> &TestSuite
pub fn test_suite(&self) -> &TestSuite
Return a reference to the test suite.
Sourcepub fn test_suite_mut(&mut self) -> &mut TestSuite
pub fn test_suite_mut(&mut self) -> &mut TestSuite
Return a mutable reference to the test suite.
Auto Trait Implementations§
impl Freeze for ValidationEngine
impl RefUnwindSafe for ValidationEngine
impl Send for ValidationEngine
impl Sync for ValidationEngine
impl Unpin for ValidationEngine
impl UnsafeUnpin for ValidationEngine
impl UnwindSafe for ValidationEngine
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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