pub struct CompiledRouterRule { /* private fields */ }Expand description
Compiled query router rule with pre-compiled regex
Implementations§
Source§impl CompiledRouterRule
impl CompiledRouterRule
Sourcepub fn new(rule: &QueryRouterRule) -> Result<Self, String>
pub fn new(rule: &QueryRouterRule) -> Result<Self, String>
Create a new compiled router rule
Sourcepub fn try_match(&self, query: &str) -> Option<RoutedQuery>
pub fn try_match(&self, query: &str) -> Option<RoutedQuery>
Try to match and transform a query
Sourcepub fn target_field(&self) -> &str
pub fn target_field(&self) -> &str
Get the target field name
Sourcepub fn mode(&self) -> RoutingMode
pub fn mode(&self) -> RoutingMode
Get the routing mode
Trait Implementations§
Source§impl Clone for CompiledRouterRule
impl Clone for CompiledRouterRule
Source§fn clone(&self) -> CompiledRouterRule
fn clone(&self) -> CompiledRouterRule
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 moreAuto Trait Implementations§
impl Freeze for CompiledRouterRule
impl RefUnwindSafe for CompiledRouterRule
impl Send for CompiledRouterRule
impl Sync for CompiledRouterRule
impl Unpin for CompiledRouterRule
impl UnwindSafe for CompiledRouterRule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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