#[non_exhaustive]pub struct ExtractionRule {
pub source: Option<Source>,
pub extraction_regex: String,
/* private fields */
}Expand description
Extraction Rule.
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.source: Option<Source>Source on which the rule is applied.
extraction_regex: StringRegex used to extract backend details from source. If empty, whole source value will be used.
Implementations§
Source§impl ExtractionRule
impl ExtractionRule
pub fn new() -> Self
Sourcepub fn set_source<T>(self, v: T) -> Self
pub fn set_source<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_source<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_source<T>(self, v: Option<T>) -> Self
Sourcepub fn set_extraction_regex<T: Into<String>>(self, v: T) -> Self
pub fn set_extraction_regex<T: Into<String>>(self, v: T) -> Self
Sets the value of extraction_regex.
§Example
ⓘ
let x = ExtractionRule::new().set_extraction_regex("example");Trait Implementations§
Source§impl Clone for ExtractionRule
impl Clone for ExtractionRule
Source§fn clone(&self) -> ExtractionRule
fn clone(&self) -> ExtractionRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtractionRule
impl Debug for ExtractionRule
Source§impl Default for ExtractionRule
impl Default for ExtractionRule
Source§fn default() -> ExtractionRule
fn default() -> ExtractionRule
Returns the “default value” for a type. Read more
Source§impl Message for ExtractionRule
impl Message for ExtractionRule
Source§impl PartialEq for ExtractionRule
impl PartialEq for ExtractionRule
impl StructuralPartialEq for ExtractionRule
Auto Trait Implementations§
impl Freeze for ExtractionRule
impl RefUnwindSafe for ExtractionRule
impl Send for ExtractionRule
impl Sync for ExtractionRule
impl Unpin for ExtractionRule
impl UnsafeUnpin for ExtractionRule
impl UnwindSafe for ExtractionRule
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