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§
Source§impl Clone for NotFoundDetector
impl Clone for NotFoundDetector
Source§fn clone(&self) -> NotFoundDetector
fn clone(&self) -> NotFoundDetector
Returns a duplicate 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 NotFoundDetector
impl !RefUnwindSafe for NotFoundDetector
impl Send for NotFoundDetector
impl Sync for NotFoundDetector
impl Unpin for NotFoundDetector
impl !UnwindSafe 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