#![expect(
missing_debug_implementations,
clippy::empty_structs_with_brackets,
clippy::must_use_candidate,
reason = "Unit tests"
)]
pub struct Logger {}
pub struct Database {}
impl Database {
pub fn new(_: impl AsRef<Logger>) -> Self {
Self {}
}
}
#[fundle::bundle]
pub struct AppState {
logger: Logger,
database: Database,
}
fn main() {
let _ = AppState::builder()
.logger(|_| Logger {})
.database(|x| Database::new(x))
.build();
}