topcoat-view 0.1.2

A modular, batteries-included Rust web framework for server-rendered apps.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use topcoat_core::{context::Cx, error::Error};

use crate::{Props, View};

pub trait Component {
    type Props: Props;

    #[must_use]
    fn props_builder() -> <Self::Props as Props>::Builder {
        Self::Props::builder()
    }

    fn render(
        self,
        cx: &Cx,
        props: Self::Props,
    ) -> impl Future<Output = Result<View, Error>> + Send;
}