For AI agents: the complete documentation index is available at https://a3s-lab.github.io/Boot/v0.1.4/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/Boot/v0.1.4/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/Boot/v0.1.4/reference/features-and-api.md.
  • 简体中文
  • v0.1.4
  • Feature 与 API 地图

    本页是 crate 公共表面的导航。精确 trait bound、方法签名与 Rustdoc 请以 docs.rs 为准。

    默认与核心

    Feature默认主要导出
    axum是AxumAdapter
    macros是Module、Provider、HTTP、WebSocket、message 与技术模块宏
    shutdown-hooks是wait_for_shutdown_signal, ShutdownSignal
    core总是应用、Module、DI、HTTP、Pipeline、OpenAPI、Validation、View、Testing、Discovery

    应用与 DI

    领域主要类型
    应用创建BootFactory, BootApplication, BootApplicationBuilder
    非 HTTP 外壳BootApplicationContext, BootMicroservice, BootApplicationHandle
    ModuleModule, DynamicModule, LazyModuleLoader, LazyLoadedModule
    ProviderProviderDefinition, ProviderToken, ProviderScope, ProviderDependency
    解析ModuleRef, ProviderRef, FromModuleRef, ContextId, ContextIdFactory
    生命周期ProviderOnModuleInit, ProviderOnApplicationBootstrap, ProviderOnModuleDestroy, ProviderBeforeApplicationShutdown, ProviderOnApplicationShutdown
    检查DiscoveryService, Reflector, ApplicationGraph 及 discovered 类型

    HTTP 与 Pipeline

    领域主要类型
    AdapterHttpAdapter, AxumAdapter
    RouteControllerDefinition, RouteDefinition, RouteHandler, HttpMethod
    Request / ResponseBootRequest, BootResponse, ResponsePassthrough
    提取与 PipeRequestExtractor, RequestValuePipe, ParseIntPipe, ParseBoolPipe, ParseFloatPipe, ParseArrayPipe, ParseEnumPipe, ParseUuidPipe, DefaultValuePipe
    PipelineMiddleware, Guard, Interceptor, ExecutionInterceptor, Pipe, ExceptionFilter, CallHandler, ExecutionContext
    Middleware 路由MiddlewareConsumer, MiddlewareConsumerBuilder, MiddlewareRoute, MiddlewareOutcome
    错误BootError, BootErrorKind, Result<T>, catch_errors
    StreamingSseEvent, SseStream, StreamableFile, StreamableFileStream
    CookieCookieOptions, CookieSameSite
    API 版本ApiVersioning, ApiVersioningStrategy, RouteVersioning

    Validation、OpenAPI 与 View

    领域主要类型
    ValidationValidate, ValidationSchema, ValidationOptions
    SerializationSerializationInterceptor, SerializationOptions
    OpenAPIOpenApiDocument, OpenApiInfo, OpenApiOperation, OpenApiPathItem, OpenApiSchema, OpenApiComponents
    OpenAPI securityOpenApiSecurityScheme, OpenApiSecurityRequirement, OpenApiOAuthFlow, OpenApiOAuthFlows
    ViewViewModule, ViewEngine, ViewRenderer, StringTemplateViewEngine
    TestingTestingModule, TestingModuleBuilder

    可选应用模块

    Feature主要 Module 与接口
    authAuthModule, AuthService, AuthGuard, AuthPrincipal, AuthStrategy
    cacheCacheModule, Cache, CacheStore, CacheInterceptor, InMemoryCacheStore
    compressionCompressionInterceptor, CompressionOptions
    configConfigModule, ACL parse helper
    cqrsCqrsModule, CommandBus, QueryBus, EventBus, CqrsContext
    databaseDatabaseModule, Database, DatabaseBackend, DatabaseTransaction
    eventsEventModule, EventEmitter, A3sEventBus, A3sEventProvider
    file-uploadMultipartForm, MultipartField, UploadedFile, MultipartOptions
    healthHealthModule, HealthCheckService, HealthIndicator, HealthReport
    http-clientHttpModule, HttpService, HttpClientBackend, HttpClientOptions
    loggingLoggingModule, Logger, LogSink, LogRecord, request logging enhancer
    queueQueueModule, Queue, QueueBackend, QueueJob, QueueOptions, QueueProcessor
    queue-postgresPostgresQueueBackend
    request-contextRequestContext
    scheduleScheduleModule, Scheduler, ScheduledJob, ScheduleContext
    securityCORS、CSRF、限流与安全 header 类型
    sessionSessionModule, SessionManager, SessionStore, SessionOptions
    staticStaticModule, StaticFileService, StaticFileOptions
    ilinka3s_boot::ilink 中的 Module、client、auth、login、message 与 update 类型

    WebSocket 与消息传输

    领域主要类型
    WebSocket 定义WebSocketGatewayDefinition, WebSocketSubscriptionDefinition
    连接与消息WebSocketConnection, WebSocketMessage, WebSocketOutbound, WebSocketGatewayServer
    WebSocket 管线WebSocketContext, WebSocketGuard, WebSocketPipe, WebSocketInterceptor, WebSocketExceptionFilter
    消息模式MessagePatternDefinition, MessagePatternKind, TransportMessage, TransportReply
    Transport 契约MessageTransport, TransportContext, TransportGuard, TransportPipe, TransportInterceptor, TransportExceptionFilter
    默认 transportInProcessTransport, InProcessTransportClient
    网络 transportTCP、Redis、NATS、MQTT、RabbitMQ、Kafka 与 gRPC 类型由对应 feature 导出

    属性宏索引

    应用声明

    module, injectable, controller, websocket_gateway, message_controller, event_listener, schedule。

    HTTP 方法与提取

    all, get, post, put, patch, delete, head, options, 对应 JSON 变体,sse, body, request, param, params, query, header, headers, cookie, cookies, host_param, ip, extract, res, uploaded_file, uploaded_files。

    路由与响应

    host, http_code, redirect, render, serialize, version, versions, version_neutral, validate, skip_validation, metadata, cache_key, cache_ttl。

    Pipeline

    use_guard, use_interceptor, use_pipe, use_filter, catch, apply_decorators。

    OpenAPI 与认证

    operation, tag, request_body, api_param, api_query, api_header, api_response_header, api_extension, api_extra_model, hide_from_openapi, bearer_auth, api_security, api_cookie_auth, api_key_auth, oauth2_auth, open_id_connect_auth。

    WebSocket、消息、事件与调度

    subscribe_message, message_body, payload, message_pattern, event_pattern, on_gateway_init, on_gateway_connection, on_gateway_disconnect, on_event, cron, interval, timeout。

    Feature 选择规则

    • 从默认 feature 开始,只有存在真实边界时才加入模块。
    • library crate 不应强迫下游启用所有 Boot feature。
    • 使用 cargo tree -e features -p a3s-boot 检查 feature 合并。
    • 为生产使用的组合运行 focused test,再为 release 运行 cargo check --all-features。
    • 外部 transport feature 的编译成功不代表 broker 已正确配置。