Expand description
Common imports for Forge applications.
Stability contract: all pub use items here are part of Forge’s stable
surface. Removing or renaming an item is a breaking change.
Upstream crates: axum is re-exported so custom_routes factories
compile against the same version the runtime uses. A breaking axum change
requires a Forge minor or major bump.
Re-exports§
pub use crate::Forge;pub use crate::ForgeBuilder;pub use serde_json;pub use axum;
Structs§
- Auth
Context - Authentication context available to all functions.
- Cron
Context - Context available to cron handlers.
- Daemon
Context - Context available to daemon handlers.
- Date
Time - ISO 8601 combined date and time with time zone.
- Delta
- Delta format for subscription updates.
- Forge
Config - Root configuration. Loaded from
forge.tomlwith${ENV_VAR}/${VAR-default}substitution. Onlydatabase.urlis required. - JobContext
- Context available to job handlers.
- McpTool
Context - Context for MCP tool execution.
- Mutation
Context - Context for mutation functions (transactional database access).
- Query
Context - Context for query functions (read-only database access).
- Test
Cron Context - Test context for cron functions.
- Test
Daemon Context - Test context for daemon functions.
- Test
JobContext - Test context for job functions.
- Test
McpTool Context - Test context for MCP tool functions.
- Test
Mutation Context - Test context for mutation functions with mock dispatch and optional DB access.
- Test
Query Context - Test context for query functions with optional DB access.
- Test
Webhook Context - Test context for webhook functions.
- Test
Workflow Context - Test context for workflow functions.
- Token
Pair - An access token + refresh token pair.
- Upload
- A file upload from a multipart form.
- Utc
- The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
- Uuid
- A Universally Unique Identifier (UUID).
- Webhook
Context - Context available to webhook handlers.
- Webhook
Signature - Helper for constructing signature configurations.
- Workflow
Context - Context available to workflow handlers.
Enums§
- DbConn
- Abstraction over pool and transaction connections.
- Forge
Error - Core error type mapping variants to HTTP status codes.
- JobPriority
- Value
- Represents any valid JSON value.
- Webhook
Result
Traits§
- Deserialize
- A data structure that can be deserialized from any data format supported by Serde.
- EnvAccess
- Extension methods for environment variable access on contexts.
- Forge
Cron - Trait for scheduled cron handlers.
- Forge
Daemon - Trait for long-running daemon handlers.
- Forge
Job - Trait for background job handlers.
- Forge
McpTool - Trait implemented by all MCP tools.
- Forge
Mutation - A transactional write function.
- Forge
Query - A read-only, cacheable, subscribable query function.
- Forge
Webhook - Trait for inbound webhook handlers.
- Forge
Workflow - Trait for durable workflow handlers.
- Json
Schema - A type which can be described as a JSON Schema document.
- Serialize
- A data structure that can be serialized into any data format supported by Serde.