1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use Brewery;
use Event;
use FoodTruck;
use ;
use WebService;
async
// /// Experimental: Launches an egui application for managing the items by calling hte API.
// /// Commented out since the GUI features are not yet released.
// async fn run_gui() {
// let provider =
// RestApiDataProvider::<Brewery>::from_endpoint("http://localhost:8081".to_string());
// // Uncomment to run without the web service (e.g. if Postgres isn't set up)
// // let provider = InMemoryDataProvider::<Brewery>::default();
// let app = MultiItemManager::default()
// .add("Breweries", ItemManager::from_data_provider(provider.clone()))
// .add("Food Trucks", ItemManager::from_data_provider(provider));
// // Standard egui shit
// let native_options = NativeOptions {
// initial_window_size: Some(Vec2::new(640.0, 480.0)),
// ..Default::default()
// };
// run_native("Breweries", native_options, Box::new(|_| Box::new(app)))
// .expect("Application crashed.");
// }