#[repr(C)]pub struct WebRule {
pub rule_id: WebRuleId,
pub rule_type: WebRuleType,
pub context_id: u64,
pub predicate_hash: u64,
pub min_confidence: f32,
pub required_domain: u64,
}Expand description
A validation rule applied by the WebValidator to incoming NQuins.
Fields§
§rule_id: WebRuleId§rule_type: WebRuleType§context_id: u64Context this rule applies to; 0 means all contexts.
predicate_hash: u64Predicate this rule applies to; 0 means all predicates.
min_confidence: f32§required_domain: u64Implementations§
Source§impl WebRule
impl WebRule
pub fn new(rule_id: WebRuleId, rule_type: WebRuleType) -> Self
pub fn with_context(self, context_id: u64) -> Self
pub fn with_predicate(self, predicate_hash: u64) -> Self
pub fn with_confidence(self, min_confidence: f32) -> Self
pub fn with_domain(self, required_domain: u64) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebRule
impl RefUnwindSafe for WebRule
impl Send for WebRule
impl Sync for WebRule
impl Unpin for WebRule
impl UnsafeUnpin for WebRule
impl UnwindSafe for WebRule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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