pub struct PageDef {
pub pattern: &'static str,
pub source: &'static str,
pub body: PageBody,
pub segments: Vec<SegmentDef>,
pub metadata: Option<fn(Arc<RequestContext>) -> Pin<Box<dyn Future<Output = Result<Metadata, Error>> + Send>>>,
pub rendering: Rendering,
pub revalidate: Option<u64>,
pub generate_params: Option<fn() -> Pin<Box<dyn Future<Output = Result<Vec<Params>, Error>> + Send>>>,
pub dynamic_params: bool,
pub tags: &'static [&'static str],
pub intercept_from: Option<&'static str>,
}Fields§
§pattern: &'static strFilesystem-style pattern, e.g. /blog/[slug].
source: &'static str§body: PageBody§segments: Vec<SegmentDef>Root → leaf segments.
metadata: Option<fn(Arc<RequestContext>) -> Pin<Box<dyn Future<Output = Result<Metadata, Error>> + Send>>>§rendering: RenderingResolved by the build (Auto is treated as Dynamic).
revalidate: Option<u64>§generate_params: Option<fn() -> Pin<Box<dyn Future<Output = Result<Vec<Params>, Error>> + Send>>>§dynamic_params: boolRender params not returned by generate_params on demand.
Cache tags for revalidate_tag.
intercept_from: Option<&'static str>Set for intercepting routes: the URL pattern they intercept from.
Auto Trait Implementations§
impl Forget for PageDef
impl Freeze for PageDef
impl Move for PageDef
impl RefUnwindSafe for PageDef
impl Send for PageDef
impl Sync for PageDef
impl Unpin for PageDef
impl UnsafeUnpin for PageDef
impl UnwindSafe for PageDef
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