pub struct Remaps(/* private fields */);Expand description
Rules that remap matching URL patterns.
Some use-cases are:
- Testing URLs prior to production deployment.
- Testing URLs behind a proxy.
§Notes
See module level documentation of usage notes.
Implementations§
Trait Implementations§
Source§impl<'a> IntoIterator for &'a Remaps
impl<'a> IntoIterator for &'a Remaps
Source§impl TryFrom<&[String]> for Remaps
impl TryFrom<&[String]> for Remaps
Source§fn try_from(remaps: &[String]) -> Result<Self, Self::Error>
fn try_from(remaps: &[String]) -> Result<Self, Self::Error>
Try to convert a slice of Strings to remapping rules.
Each string should contain a Regex pattern and a URL, separated by whitespaces.
§Errors
Returns an Err if:
- Any string in the slice is not of the form
REGEX URL. - REGEX is not a valid regular expression.
- URL is not a valid URL.
Auto Trait Implementations§
impl Freeze for Remaps
impl RefUnwindSafe for Remaps
impl Send for Remaps
impl Sync for Remaps
impl Unpin for Remaps
impl UnwindSafe for Remaps
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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