Crates.io | async_ui_web |
lib.rs | async_ui_web |
version | 0.2.1 |
source | src |
created_at | 2022-10-04 04:49:56.804171 |
updated_at | 2023-10-10 23:44:14.606722 |
description | Async UI for the Browser |
homepage | |
repository | https://github.com/wishawa/async_ui |
max_upload_size | |
id | 679626 |
size | 77,148 |
A web UI framework where Futures are components.
Async UI is...
async fn hello_world() {
"Hello World".render().await;
}
async fn app() {
let resource = loading_indicator(
fetch_resource()
).await;
show_resource(&resource).await;
}
async fn counter() {
let mut count = 0;
let value_text = Text::new();
let incr_button = Button::new();
join((
value_text.render(),
incr_button.render("Increment".render()),
async {
loop {
value_text.set_data(&count.to_string());
incr_button.until_click().await;
count += 1;
}
},
))
.await;
}