pub struct Pages { /* private fields */ }Expand description
Strictly loaded pages. Bind each server-rendered handler before opening a listener. Browser-only routes cannot produce a typed SSR handle.
Implementations§
Source§impl Pages
impl Pages
Sourcepub fn bind<P: PageProps>(
&self,
page: &str,
) -> Result<PageHandle<P>, Vec<PropsError>>
pub fn bind<P: PageProps>( &self, page: &str, ) -> Result<PageHandle<P>, Vec<PropsError>>
Bind a route pattern or a logical page name (home resolves the manifest’s
home.ir alias). Names matching multiple routes are refused: bind the exact
route in that case. Comparison and root-slot validation happen here, once.
Sourcepub fn bind_with<P: PageProps>(
&self,
page: &str,
limits: Limits,
) -> Result<PageHandle<P>, Vec<PropsError>>
pub fn bind_with<P: PageProps>( &self, page: &str, limits: Limits, ) -> Result<PageHandle<P>, Vec<PropsError>>
Bind this page with immutable defaults inherited by each request.
Sourcepub fn finalize(&self) -> Result<(), Vec<PropsError>>
pub fn finalize(&self) -> Result<(), Vec<PropsError>>
Complete startup after every SSR route has a verified handler. Call this before the application opens its listener. A refusal leaves registration open so missing handlers can be bound; success seals every clone together. Browser routes require no binding. Repeated successful calls are harmless.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Pages
impl !UnwindSafe for Pages
impl Freeze for Pages
impl Send for Pages
impl Sync for Pages
impl Unpin for Pages
impl UnsafeUnpin for Pages
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