aro 1.0.0

Aro — a Rust web framework using hexagonal architecture
Documentation
//! Compile-time tests for the prelude module.

use aro::prelude::*;

/// Verify that `use aro::prelude::*` brings all expected types into scope
/// and does not conflict with the standard library prelude.
#[test]
#[expect(
    clippy::no_effect_underscore_binding,
    reason = "compile-time type assertions use _ bindings"
)]
fn prelude_imports_compile_without_conflicts() {
    // Route macros are attribute macros — their presence is verified by the
    // compiler accepting `use aro::prelude::*` without errors.

    // Core domain types
    fn _assert_entity<T: Entity>() {}
    fn _assert_repo<R: Repository<T>, T: Entity>() {}
    fn _assert_repo_error(_e: RepoError) {}
    fn _assert_page<T>(_p: Page<T>) {}
    fn _assert_page_request(_pr: PageRequest) {}
    fn _assert_dep_type<T: ?Sized + 'static>(_d: Dep<T>) {}
    fn _assert_json_body<T>(_j: JsonBody<T>) {}
    fn _assert_aro_error(_e: AroError) {}
    fn _assert_aro_state(_s: AroState) {}
    fn _assert_json<T>(_j: Json<T>) {}
    fn _assert_path<T>(_p: Path<T>) {}
    fn _assert_query<T>(_q: Query<T>) {}
    fn _assert_state<T>(_s: State<T>) {}
    fn _assert_into_response<T: IntoResponse>() {}

    // App builder
    let _app: fn() -> App = App::new;

    // std::sync::Arc
    let _arc: Arc<String> = Arc::new("test".to_string());

    // Axum re-exports
    let _status: StatusCode = StatusCode::OK;
}

/// Verify a realistic action signature compiles using only prelude imports.
#[expect(
    dead_code,
    reason = "compile-time check that action signature is valid with prelude imports"
)]
#[expect(
    clippy::unused_async,
    reason = "verifying async action signature compiles with prelude imports"
)]
async fn example_action(
    Path(id): Path<u64>,
    Query(_params): Query<std::collections::HashMap<String, String>>,
) -> Result<Json<String>, AroError> {
    let _ = id;
    Ok(Json("ok".to_string()))
}