pub struct Fetcher<Ctx: ?Sized> { /* private fields */ }
Expand description
Holds a fetcher’s required matcher type and function.
A fetcher is responsible for extracting values from the context type. Each fetcher has:
- A function that extracts values from the context
- A matcher that determines how to compare these values to the rule conditions
Implementations§
Source§impl<Ctx: ?Sized> Fetcher<Ctx>
impl<Ctx: ?Sized> Fetcher<Ctx>
Sourcepub fn with_matcher<M>(&mut self, matcher: M) -> &mut Selfwhere
M: Matcher<Ctx> + 'static,
pub fn with_matcher<M>(&mut self, matcher: M) -> &mut Selfwhere
M: Matcher<Ctx> + 'static,
Changes the fetcher’s matcher
Sourcepub fn with_raw_args(&mut self, raw_args: bool) -> &mut Self
pub fn with_raw_args(&mut self, raw_args: bool) -> &mut Self
Sets whether the fetcher should receive raw arguments instead of splitting them.
Trait Implementations§
Auto Trait Implementations§
impl<Ctx> Freeze for Fetcher<Ctx>where
Ctx: ?Sized,
impl<Ctx> !RefUnwindSafe for Fetcher<Ctx>
impl<Ctx> !Send for Fetcher<Ctx>
impl<Ctx> !Sync for Fetcher<Ctx>
impl<Ctx> Unpin for Fetcher<Ctx>where
Ctx: ?Sized,
impl<Ctx> !UnwindSafe for Fetcher<Ctx>
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