Expand description
Re-exports§
pub use akari;pub use hotaru_core;pub use hotaru_http;pub use hotaru_trans as hrt;pub use ahttpm;pub use hotaru_lib;
Modules§
- http
- HTTP-specific re-exports — request/response types, the
HTTPprotocol alias, and (with thehttpsfeature) the TLS variants. HTTP-specific re-exports for standard Hotaru HTTP implementation - prelude
- Curated re-exports for typical user code:
Server,Client,endpoint!/outpoint!macros, theLazy-wrappedS*aliases, and the core protocol traits. Curated prelude —use hotaru::prelude::*;brings inServer,Client, theendpoint!/outpoint!/middleware!macros, the lazy-staticS*aliases, and the core protocol traits.
Macros§
- LClient
LClient!- Creates a lazy static Client instance.- LPattern
LPattern!- Creates a lazy static PathPattern instance- LServer
LServer!- Creates a lazy static Server instance.- LUrl
LUrl!- Creates a lazy static Url instance- call
- Spawn a persistent outpoint call. Two forms:
- endpoint
- middleware
- object
- A macro to create an Value from a literal or expression. It can handle dictionaries, lists, booleans, strings, and numeric values.
- outpoint
- run
- One-shot outpoint request:
- run_
server run_server!(APP)— blocking entry, for syncfn main().- run_
server_ no_ block run_server_no_block!(APP)— fire-and-forget inside an async context.- run_
server_ no_ block_ until run_server_no_block_until!(APP, stop)— fire-and-forget with stop.- run_
server_ until run_server_until!(APP, stop)— blocking with user-supplied stop future.
Structs§
- AppIn
Use - Returned by
try_combinewhen an appArcis still shared; gives both apps back so the caller can retry or fall back. - Empty
Error - Template error type for
RequestContext::Error. - Locals
- String-based extension storage, typically used by application code Multiple values of the same type can be stored with different keys
- Locals
Clone - String-based extension storage, typically used by application code.
- Params
- Type-based extension storage, typically used by middleware Each type can have exactly one value
- Params
Clone - Type-based extension storage, typically used by middleware.
- Protocol
Registry Builder - Builder for protocol registries assembled from neutral protocol entries.
- TcpAccepter
- Plain TCP accepter that wraps accepted Tokio streams.
- TcpConnector
- Plain TCP outbound connector.
- TcpConnector
Addr - TCP connector that accepts a resolved socket address.
- TcpInbound
- Bound plain TCP inbound runtime.
- TcpMeta
- Connection metadata for plain TCP.
- TcpOutbound
- TCP outbound runtime using normal
TcpStream::connect. - TcpStream
- Tokio TCP stream wrapper owned by
hotaru_io_tokio. - TcpTransport
- Plain Tokio TCP transport.
- Template
Manager - Manages template loading, caching, and rendering
- TokioIo
- Local Tokio IO adapter owned by
hotaru_io_tokio. - Tokio
Runtime - Tokio-backed runtime. Spawn forwards to
tokio::spawn; time/select/sync forward to the matchingtokio::*primitives. - Walk
Cursor - Unstable Version: 0.8.1
- Walk
Frame - Unstable Version: 0.8.1
Enums§
- Connection
Error - Frame
Node - Unstable Version: 0.8.1
- Path
Pattern - A single URL path-segment matcher.
- Protocol
Registry Kind - Optimization for single-protocol apps, which are common in practice.
- Protocol
Role - Role of the protocol handler - server or client.
- RunMode
- Run mode for framework runtimes.
- Timeout
Setting - Controls how long a timeout is, or whether it is active at all.
- Tokio
Backend - Backend tag for Tokio IO values.
- Value
Traits§
- Async
Middleware - Conn
Stream - Stream abstraction for protocol-specific transports.
- Default
Protocol Error - Marker so the blanket impl above does not conflict with hand-written impls
that want custom
can_continuebehaviour. Implement this on types that should get the defaultcan_continue() = false. - Endpoint
Outcome - Normalizes whatever an
endpoint!body evaluates to into an effect on the context. Endpoint’s type-directed counterpart toProtocol::send: implementations are per(context, body-return-type)pair, so each protocol decides which endpoint return values it accepts. - Inbound
- Bound inbound runtime that accepts final wire streams.
- Message
- Protocol-defined message format.
- Outbound
- Outbound runtime that opens final wire streams.
- Param
Value - Object-safe supertrait for stored values.
- Protocol
- User-defined protocol handler.
- Protocol
Error - Protocol-defined error. Each protocol owns its own concrete error type.
- Request
Context - Context that flows through request handlers.
- Stream
- Protocol-defined stream abstraction.
Functions§
- AnyPath
- Creates a any path pattern. This is useful for matching any path. This is faster then regex when any path should be passed into the same endpoint
- AnyUrl
- Creates a any pattern. You may use this to match any string. This is faster then regex when any string should be passed into the same endpoint
- LitUrl
- Creates a literal path pattern. This is a wrapper around the literal_path function. This is useful for creating path patterns that are not regex.
- RegUrl
- Creates a regex path pattern. This is a wrapper around the regex_path function. This is useful for creating path patterns that are regex.
- Trailing
Slash - Creates a literal empty segment used for trailing slash registration.
- combine_
hashmap - Helper function to merge two
HashMap<K, V>without overwriting existing entries ina.
Type Aliases§
- BoxProtocol
Error - Client
- Tokio-backed client alias used by the umbrella crate.
- Protocol
Handler Builder - Umbrella alias for building protocol handler registries.
- Result
- Server
- Tokio-backed server alias used by the umbrella crate.
- Url
- Umbrella alias for Hotaru’s URL routing tree.
Attribute Macros§
- hrt_
ctor - Our own constructor attribute - works like #[ctor::ctor] but built-in Generates platform-specific linker sections for automatic initialization