[][src]Struct valerie::App

pub struct App { /* fields omitted */ }

The App struct for creating an App

Routing is not currently implemented.

Implementations

impl App[src]

pub fn new() -> Self[src]

Create a new App instance.

pub fn push(
    &mut self,
    route: &'static str,
    component: impl Fn() -> Node + 'static
) -> &mut Self
[src]

Push routes inside the App struct.

pub fn start(&mut self, start: &'static str) -> &mut Self[src]

Specify the starting route.

pub fn render(&mut self)[src]

Render the App.

pub fn render_single(function: Node)[src]

Render a single page.

Examples

fn ui() -> Node {
    h1!("Hello, World!")
    .into()
}
fn run() {
    App::render_single(ui());
}

Trait Implementations

impl Default for App[src]

Auto Trait Implementations

impl !RefUnwindSafe for App

impl !Send for App

impl !Sync for App

impl Unpin for App

impl !UnwindSafe for App

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.