Expand description
Core traits for the rust-webx framework (package rust-webx-core, imported
as webx_core).
This crate defines the framework’s contracts — IRequest, IRequestHandler,
IMiddleware, IHttpContext, IMediator, IHostedService, Error,
AppMode — with no HTTP engine dependency. Custom middleware and tests
can depend on webx_core alone.
Re-exports§
pub use cache::cache_ext::DistributedCacheExtensions;pub use cache::options::DistributedCacheEntryOptions;pub use cache::trait_def::CacheError;pub use cache::trait_def::IDistributedCache;pub use dispatch_runtime::DispatchRuntime;pub use app::*;pub use auth::*;pub use config::*;pub use error::*;pub use form::*;pub use handler::*;pub use http::*;pub use localization::*;pub use mediator::*;pub use middleware::*;pub use mode::*;pub use operation::*;pub use pagination::*;pub use paths::*;pub use pipeline::*;pub use problem::*;pub use request_context::*;pub use route::*;pub use routing::*;
Modules§
- app
- Application layer trait: IHost.
- auth
- Authentication and authorization traits for the rust-webx framework.
- cache
- Unified caching abstraction —
IDistributedCachetrait +MemoryCacheimplementation. - config
- Built-in configuration support: appsettings.json + AppOptions pattern.
- dispatch_
runtime - Host-level DI handles: the service provider and the handler registry.
- error
- Unified error type for the rust-webx framework.
- form
- Multipart form binding — typed access to
multipart/form-datauploads. - handler
- Handler traits: IRequestHandler and IEventHandler.
- http
- HTTP abstraction traits: IHttpContext, IHttpRequest, IHttpResponse.
- localization
- Localized endpoint text: resource references resolved against the host’s configured culture.
- mediator
- Mediator traits: IMediator, IRequest, IEventRequest.
- middleware
- Middleware trait: IMiddleware.
- mode
- Application mode: Development vs Production.
- operation
- Business result envelope for command-style endpoints.
- pagination
- Pagination types for list endpoints.
- paths
- Application base directory resolution.
- pipeline
- Typed pipeline behaviors:
IPipelineBehavior<Req, Rsp>. - problem
- RFC 7807 / RFC 9457 Problem Details for HTTP APIs.
- request_
context - Per-request ambient context for handler and persistence layers.
- route
- routing
- Routing traits: IRouter and IEndpoint.