pub struct BounceClassifierBuilder { /* private fields */ }Expand description
Holds state for compiling rules files into a classifier
Implementations§
Source§impl BounceClassifierBuilder
impl BounceClassifierBuilder
pub fn new() -> Self
pub fn add_rule(&mut self, class: BounceClass, rule: String)
pub fn merge(&mut self, decoded_file: BounceClassifierFile)
pub fn merge_json_file(&mut self, file_name: &str) -> Result<(), String>
pub fn merge_toml_file(&mut self, file_name: &str) -> Result<(), String>
pub fn build(self) -> Result<BounceClassifier, String>
Trait Implementations§
Source§impl Default for BounceClassifierBuilder
impl Default for BounceClassifierBuilder
Source§fn default() -> BounceClassifierBuilder
fn default() -> BounceClassifierBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BounceClassifierBuilder
impl RefUnwindSafe for BounceClassifierBuilder
impl Send for BounceClassifierBuilder
impl Sync for BounceClassifierBuilder
impl Unpin for BounceClassifierBuilder
impl UnwindSafe for BounceClassifierBuilder
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
§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