[−][src]Struct streamson_extra_matchers::regex_matcher::Regex
Regex path matcher
It uses regex to match path
Examples
use streamson_lib::{handler, strategy}; use streamson_extra_matchers::Regex; use std::{str::FromStr, sync::{Arc, Mutex}}; let handler = Arc::new(Mutex::new(handler::PrintLn::new())); let matcher = Regex::from_str(r#"\{"[Uu]ser"\}\[\]"#).unwrap(); let mut trigger = strategy::Trigger::new(); trigger.add_matcher( Box::new(matcher), &[handler], ); for input in vec![ br#"{"Users": [1,2]"#.to_vec(), br#", "users": [3, 4]}"#.to_vec(), ] { trigger.process(&input).unwrap(); }
Implementations
impl Regex
[src]
Trait Implementations
impl Clone for Regex
[src]
impl Debug for Regex
[src]
impl FromStr for Regex
[src]
type Err = RegexError
The associated error which can be returned from parsing.
fn from_str(path: &str) -> Result<Self, Self::Err>
[src]
impl MatchMaker for Regex
[src]
fn match_path(&self, path: &Path) -> bool
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Regex
impl Send for Regex
impl Sync for Regex
impl Unpin for Regex
impl UnwindSafe for Regex
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,