pub struct WrappingMiddleware { /* private fields */ }
Expand description
A middleware that has been configured but has not yet been registered with a Blueprint
.
§Guide
Check out Blueprint::wrap
for an introduction to wrapping middlewares in Pavex.
§Use cases
crate::blueprint::middleware::WrappingMiddleware
is primarily used by
kits
to allow users to customize (or disable!)
the bundled middlewares before registering them with a Blueprint
.
Implementations§
source§impl WrappingMiddleware
impl WrappingMiddleware
sourcepub fn new(callable: RawIdentifiers) -> Self
pub fn new(callable: RawIdentifiers) -> Self
Create a new (unregistered) wrapping middleware.
Check out the documentation of Blueprint::wrap
for more details
on middleware.
sourcepub fn error_handler(self, error_handler: RawIdentifiers) -> Self
pub fn error_handler(self, error_handler: RawIdentifiers) -> Self
Register an error handler for this middleware.
Check out the documentation of RegisteredWrappingMiddleware::error_handler
for more details.
sourcepub fn register(self, bp: &mut Blueprint) -> RegisteredWrappingMiddleware<'_>
pub fn register(self, bp: &mut Blueprint) -> RegisteredWrappingMiddleware<'_>
Register this middleware with a Blueprint
.
Check out the documentation of Blueprint::wrap
for more details.
Trait Implementations§
source§impl Clone for WrappingMiddleware
impl Clone for WrappingMiddleware
source§fn clone(&self) -> WrappingMiddleware
fn clone(&self) -> WrappingMiddleware
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 moreAuto Trait Implementations§
impl Freeze for WrappingMiddleware
impl RefUnwindSafe for WrappingMiddleware
impl Send for WrappingMiddleware
impl Sync for WrappingMiddleware
impl Unpin for WrappingMiddleware
impl UnwindSafe for WrappingMiddleware
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)