toasty_driver_integration_suite/scenarios/deferred_optional_document.rs
1use crate::prelude::*;
2
3scenario! {
4 #![id(ID)]
5
6 #[derive(Debug, toasty::Model)]
7 struct Document {
8 #[key]
9 #[auto]
10 id: ID,
11
12 title: String,
13
14 #[deferred]
15 summary: toasty::Deferred<Option<String>>,
16 }
17
18 async fn setup(test: &mut Test) -> toasty::Db {
19 test.setup_db(models!(Document)).await
20 }
21}