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
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>
Creates a shared type from an unshared type.