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