pub struct FlowApp { /* private fields */ }Expand description
Full-stack Resuma application with pages, layouts, loads, and submits.
Implementations§
Source§impl FlowApp
impl FlowApp
pub fn new() -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_site_url(self, url: impl Into<String>) -> Self
pub fn with_og_image(self, image: impl Into<String>) -> Self
pub fn with_json_ld(self, json_ld: impl Into<String>) -> Self
Sourcepub fn with_pwa(self, config: FlowPwaConfig) -> Self
pub fn with_pwa(self, config: FlowPwaConfig) -> Self
Enable installable PWA (manifest, service worker, icons) for Android/iOS/desktop.
pub fn with_head(self, head: impl Into<String>) -> Self
pub fn with_stylesheet(self, href: impl Into<String>) -> Self
Sourcepub fn streaming(self, enabled: bool) -> Self
pub fn streaming(self, enabled: bool) -> Self
Enable chunked streaming SSR (head sent before body completes).
Sourcepub fn auto_pages<R>(self, pages_root: impl AsRef<Path>, registry: R) -> Selfwhere
R: FlowPageRegistry + 'static,
pub fn auto_pages<R>(self, pages_root: impl AsRef<Path>, registry: R) -> Selfwhere
R: FlowPageRegistry + 'static,
Register all pages under pages_root using a generated FlowPageRegistry.
pub fn page<F>(self, pattern: &str, handler: F) -> Self
pub fn page_with_layouts<F>( self, pattern: &str, layouts: Vec<String>, handler: F, ) -> Self
pub fn pages_from_registry( self, pages_root: impl AsRef<Path>, registry: Arc<dyn FlowPageRegistry>, ) -> Self
pub async fn serve(self, opts: FlowServeOptions) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlowApp
impl !RefUnwindSafe for FlowApp
impl Send for FlowApp
impl Sync for FlowApp
impl Unpin for FlowApp
impl UnsafeUnpin for FlowApp
impl !UnwindSafe for FlowApp
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