1pub use rust_webx_core::app::IHost;
6pub use rust_webx_core::auth::{
7 IAuthenticationHandler, IAuthorizationPolicy, IClaims, IDynamicAuthorizer,
8};
9pub use rust_webx_core::cache::{
10 cache_ext::DistributedCacheExtensions,
11 options::DistributedCacheEntryOptions,
12 trait_def::{CacheError, IDistributedCache},
13};
14pub use rust_webx_core::config::{
15 bind_config, bind_root, load_appsettings, AppOptions, AppSection, CorsSection, IAppOptions,
16 JwtSection, MetricsSection, RateLimitSection, TlsSection,
17};
18pub use rust_webx_core::error::{Error, Result};
19pub use rust_webx_core::handler::{IClaimsCarrier, IEventHandler, IHostedService, IRequestHandler};
20pub use rust_webx_core::http::{
21 read_json_body, write_json_response, FromHttpContext, HttpStatus, IClaimsExt, IHttpContext,
22 IHttpRequest, IHttpResponse, Json,
23};
24pub use rust_webx_core::mediator::{IEventRequest, IMediator, IRequest};
25pub use rust_webx_core::middleware::IMiddleware;
26pub use rust_webx_core::mode::AppMode;
27pub use rust_webx_core::pagination::{PagedRequest, PagedResponse};
28pub use rust_webx_core::paths::{app_base, framework_root, looks_like_app_base, looks_like_framework_root};
29pub use rust_webx_core::mediator::build_pipeline_chain;
30pub use rust_webx_core::pipeline::{BoxedNextFn, BoxedPipelineFuture, IPipelineBehavior};
31pub use rust_webx_core::problem::{FieldError, ProblemDetails};
32pub use rust_webx_core::route::diagnostics::{
33 duplicate_handlers, format_route_diagnostics, orphan_handlers, orphan_route_details,
34 orphan_routes, route_snapshots,
35};
36pub use rust_webx_core::dispatch_runtime::{dispatch_provider, DispatchRuntime};
37pub use rust_webx_core::request_context::RequestContext;
38pub use rust_webx_core::routing::{HttpMethod, IEndpoint, IRouter, RouteMeta};
39
40pub use rust_webx_core::route::ext::{is_mediator_active, should_scan_endpoints, IServiceCollectionExt};
42pub use rust_webx_core::route::params::try_deserialize_from_params;
43#[allow(deprecated)]
44pub use rust_webx_core::route::scan::{
45 global_provider, set_global_provider, HandlerCache, HandlerEntry, HandlerRegistration,
46 HandlerRegistry, ParamMeta, RequestParamEntry, ResponseData, RouteDispatch, RouteEntry,
47};
48
49pub use rust_webx_host::auth_jwt::{init_jwt_secret, jwt_middleware, jwt_secret, JwtAuth, JwtClaims};
51pub use rust_webx_host::authz::{
52 build_resource_policy_from_routes, collect_authorizers, resource_auth_middleware, AuthorizerSet,
53 ResourceAuthorization,
54};
55pub use rust_webx_host::compression::{compress_gzip, CompressionConfig, CompressionMiddleware};
56pub use rust_webx_host::context::{HttpContext, HttpRequest, HttpResponse};
57pub use rust_webx_host::cors::{CorsConfig, CorsMiddleware};
58pub use rust_webx_host::endpoint::{
59 ControllerEndpoint, RequestEndpoint, StaticHtmlEndpoint, StaticJsonEndpoint,
60};
61pub use rust_webx_host::health::{HealthCheckEntry, HealthCheckFn, HealthCheckRegistry, HealthStatus};
62pub use rust_webx_host::memory_cache::MemoryCache;
63pub use rust_webx_host::pipeline::{HandlerFn, MiddlewarePipeline};
64pub use rust_webx_host::rate_limit::{RateLimitMiddleware, RateLimiter};
65pub use rust_webx_host::request_id::RequestIdMiddleware;
66pub use rust_webx_host::request_tracing::RequestTracing;
67pub use rust_webx_host::router::Router;
68pub use rust_webx_host::security_headers::SecurityHeadersMiddleware;
69pub use rust_webx_host::diagnostics::log_startup_diagnostics;
70pub use rust_webx_host::server::{Host, HostAppBuilder, HostBuilder, Server, ServerHandle};
71pub use rust_webx_host::timing::TimingMiddleware;
72#[cfg(feature = "testing")]
73pub use rust_webx_host::testing::{free_port, spawn, spawn_with_health, wait_until_ready, TestServer};
74
75pub use rust_webx_core::mediator::Mediator;
77
78pub use rust_webx_spa::SpaMiddleware;
80
81pub use rust_webx_openapi::{generate_openapi_spec, APIUI_HTML};
83
84pub use rust_webx_macros::{
86 authorize, claims, delete, endpoint, get, handler, post, put, WebxRequestMeta,
87};
88
89pub use rust_dix;
91pub use rust_dix::inject;
92pub use rust_dix::ScopeFactory;
93pub use rust_dix_macros;
94pub use rust_dix_macros::{module, Inject};
95
96pub use async_trait::async_trait;
98pub use hyper;
99pub use serde;
100pub use serde_json;
101pub use tokio;
102
103#[deprecated(
121 since = "0.2.0",
122 note = "HTTP handlers should use `#[handler]` / `#[handler(inject)]` (inventory). \
123 register_handlers! remains for non-HTTP Mediator scenarios only."
124)]
125#[macro_export]
126macro_rules! register_handlers {
127 ($svc:ident, $($req:ty => $rsp:ty => $handler:ty),+ $(,)?) => {
128 $svc
129 $(
130 .singleton::<dyn $crate::IRequestHandler<$req, $rsp>>(
131 |_| ::std::sync::Arc::new(<$handler>::default())
132 )
133 )+
134 };
135}