Struct reverse_proxy_service::rewrite::Func
source · pub struct Func<F>(pub F);
Expand description
Converts the path
by a function.
The type of the function must be for<'a> FnMut(&'a str) -> String
.
let f = |path: &str| path.len().to_string();
assert_eq!(Func(f).rewrite("abc"), "3");
Tuple Fields§
§0: F
Trait Implementations§
Auto Trait Implementations§
impl<F> RefUnwindSafe for Func<F>where F: RefUnwindSafe,
impl<F> Send for Func<F>where F: Send,
impl<F> Sync for Func<F>where F: Sync,
impl<F> Unpin for Func<F>where F: Unpin,
impl<F> UnwindSafe for Func<F>where F: UnwindSafe,
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