Skip to main content

Crate nexus_toolkit

Crate nexus_toolkit 

Source
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§

StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
ToolkitRuntimeConfig
Fully loaded toolkit runtime config (validated + ready to use).
WithSerdeErrorPath
A generic wrapper type that transparently serializes and deserializes the inner type T. Deserialization uses serde_path_to_error to track errors and report the exact JSON path.

Enums§

SignedHttpMode
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§

NexusTool
This trait defines the interface for a Nexus Tool. It forces implementation of the following methods:

Type Aliases§

AnyResult
Result<T, Error>
AuthContext
Authenticated request context available to tools when signed HTTP is enabled.