Expand description
§Nexus Toolkit
The Nexus Toolkit is a Rust library that provides a trait to define a Nexus Tool. A Nexus Tool is a service that can be invoked over HTTP. The Toolkit automatically generates the necessary endpoints for the Tool.
See more documentation at https://github.com/Talus-Network/gitbook-docs/blob/production/nexus-sdk/toolkit-rust.md
Re-exports§
pub use env_logger;pub use warp;
Macros§
- bootstrap
- Macro to bootstrap the runtime for a set of tools. The macro generates the necessary routes for each tool and serves them on the provided address.
- debug
- Logs a message at the debug level.
Structs§
- Status
Code - An HTTP status code (
status-codein RFC 9110 et al.). - Toolkit
Runtime Config - Fully loaded toolkit runtime config (validated + ready to use).
- With
Serde Error Path - A generic wrapper type that transparently serializes and deserializes the inner type
T. Deserialization usesserde_path_to_errorto track errors and report the exact JSON path.
Enums§
- Signed
Http Mode - Signed HTTP mode for the toolkit runtime.
Constants§
- ENV_
TOOLKIT_ CONFIG_ PATH - Env var read by the toolkit runtime to locate its JSON config file.
Traits§
- Nexus
Tool - This trait defines the interface for a Nexus Tool. It forces implementation of the following methods:
Type Aliases§
- AnyResult
Result<T, Error>- Auth
Context - Authenticated request context available to tools when signed HTTP is enabled.