pub struct Fallback { /* private fields */ }
Expand description
A fallback that has been configured but has not yet been registered with a Blueprint
.
§Guide
Check out Blueprint::fallback
for an introduction to fallback routes in Pavex.
§Use cases
Fallback
is primarily used by
kits
to allow users to customize (or disable!)
the bundled fallbacks before registering them with a Blueprint
.
Implementations§
source§impl Fallback
impl Fallback
sourcepub fn new(callable: RawIdentifiers) -> Self
pub fn new(callable: RawIdentifiers) -> Self
Create a new (unregistered) fallback route.
Check out the documentation of Blueprint::fallback
for more details
on fallback routes.
sourcepub fn error_handler(self, error_handler: RawIdentifiers) -> Self
pub fn error_handler(self, error_handler: RawIdentifiers) -> Self
Register an error handler for this fallback route.
Check out the documentation of RegisteredFallback::error_handler
for more details.
sourcepub fn register(self, bp: &mut Blueprint) -> RegisteredFallback<'_>
pub fn register(self, bp: &mut Blueprint) -> RegisteredFallback<'_>
Register this fallback route with a Blueprint
.
Check out the documentation of Blueprint::fallback
for more details.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fallback
impl RefUnwindSafe for Fallback
impl Send for Fallback
impl Sync for Fallback
impl Unpin for Fallback
impl UnwindSafe for Fallback
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
)