Struct aws_smithy_http_server::instrumentation::sensitivity::uri::Label
source · pub struct Label<'a, F> { /* private fields */ }
Expand description
A wrapper around a path &str
which modifies the behavior of Display
. Specific path segments are marked
as sensitive by providing predicate over the segment index. This accommodates the httpLabel trait with
non-greedy labels.
The Display
implementation will respect the unredacted-logging
flag.
§Example
// Path segment 2 is redacted and a trailing greedy label
let uri = Label::new(&path, |x| x == 2, None);
println!("{uri}");
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, F> Freeze for Label<'a, F>where
F: Freeze,
impl<'a, F> RefUnwindSafe for Label<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for Label<'a, F>where
F: Send,
impl<'a, F> Sync for Label<'a, F>where
F: Sync,
impl<'a, F> Unpin for Label<'a, F>where
F: Unpin,
impl<'a, F> UnwindSafe for Label<'a, 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreCreates a shared type from an unshared type.