pub struct NotFoundDetector { /* private fields */ }Expand description
State for the 404 detector middleware
Implementations§
Source§impl NotFoundDetector
impl NotFoundDetector
Sourcepub fn new(config: RuntimeDaemonConfig) -> Self
pub fn new(config: RuntimeDaemonConfig) -> Self
Create a new 404 detector
Sourcepub async fn set_generator(&self, generator: Arc<AutoGenerator>)
pub async fn set_generator(&self, generator: Arc<AutoGenerator>)
Set the auto-generator
Sourcepub async fn detect_and_auto_create(
self,
request: Request,
next: Next,
) -> Response
pub async fn detect_and_auto_create( self, request: Request, next: Next, ) -> Response
Middleware function that detects 404s and triggers auto-generation
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NotFoundDetector
impl !UnwindSafe for NotFoundDetector
impl Freeze for NotFoundDetector
impl Send for NotFoundDetector
impl Sync for NotFoundDetector
impl Unpin for NotFoundDetector
impl UnsafeUnpin for NotFoundDetector
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