Struct aws_smithy_http_server::plugin::Scoped
source · pub struct Scoped<Scope, Pl> { /* private fields */ }
Expand description
A Plugin
which scopes the application of an inner Plugin
.
In cases where operation selection must be performed at runtime filter_by_operation
can be used.
Operations within the scope will have the inner Plugin
applied.
§Example
// Define a scope over a service with 3 operations
scope! {
struct OnlyAB {
includes: [OperationA, OperationB],
excludes: [OperationC]
}
}
// Create a scoped plugin
let scoped_plugin = Scoped::new::<OnlyAB>(plugin);
Implementations§
Trait Implementations§
source§impl<Ser, Op, T, Scope, Pl> Plugin<Ser, Op, T> for Scoped<Scope, Pl>where
Scope: Membership<Op>,
Scope::Contains: ConditionalApply<Ser, Op, Pl, T>,
impl<Ser, Op, T, Scope, Pl> Plugin<Ser, Op, T> for Scoped<Scope, Pl>where
Scope: Membership<Op>,
Scope::Contains: ConditionalApply<Ser, Op, Pl, T>,
impl<Scope, Pl> HttpMarker for Scoped<Scope, Pl>where
Pl: HttpMarker,
impl<Scope, Pl> ModelMarker for Scoped<Scope, Pl>where
Pl: ModelMarker,
Auto Trait Implementations§
impl<Scope, Pl> Freeze for Scoped<Scope, Pl>where
Pl: Freeze,
impl<Scope, Pl> RefUnwindSafe for Scoped<Scope, Pl>where
Pl: RefUnwindSafe,
Scope: RefUnwindSafe,
impl<Scope, Pl> Send for Scoped<Scope, Pl>
impl<Scope, Pl> Sync for Scoped<Scope, Pl>
impl<Scope, Pl> Unpin for Scoped<Scope, Pl>
impl<Scope, Pl> UnwindSafe for Scoped<Scope, Pl>where
Pl: UnwindSafe,
Scope: 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
§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.