Struct reverse_proxy_service::rewrite::TrimSuffix
source · pub struct TrimSuffix<'a>(pub &'a str);
Expand description
Trims a suffix if exists.
assert_eq!(TrimSuffix("foo").rewrite("foobarfoo"), "foobar");
assert_eq!(TrimSuffix("bar").rewrite("foobarfoo"), "foobarfoo");
Tuple Fields§
§0: &'a str
Trait Implementations§
source§impl<'a> Clone for TrimSuffix<'a>
impl<'a> Clone for TrimSuffix<'a>
source§fn clone(&self) -> TrimSuffix<'a>
fn clone(&self) -> TrimSuffix<'a>
Returns a copy 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 moresource§impl<'a> Debug for TrimSuffix<'a>
impl<'a> Debug for TrimSuffix<'a>
source§impl<'a> PartialEq<TrimSuffix<'a>> for TrimSuffix<'a>
impl<'a> PartialEq<TrimSuffix<'a>> for TrimSuffix<'a>
source§fn eq(&self, other: &TrimSuffix<'a>) -> bool
fn eq(&self, other: &TrimSuffix<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PathRewriter for TrimSuffix<'_>
impl PathRewriter for TrimSuffix<'_>
impl<'a> Copy for TrimSuffix<'a>
impl<'a> Eq for TrimSuffix<'a>
impl<'a> StructuralEq for TrimSuffix<'a>
impl<'a> StructuralPartialEq for TrimSuffix<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for TrimSuffix<'a>
impl<'a> Send for TrimSuffix<'a>
impl<'a> Sync for TrimSuffix<'a>
impl<'a> Unpin for TrimSuffix<'a>
impl<'a> UnwindSafe for TrimSuffix<'a>
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.