Skip to main content

Crate onyums

Crate onyums 

Source
Expand description

§Onyums

Onyums is a simple axum wrapper for serving tor onion services.

§Example

use onyums::{serve, routing::get, Router};

#[tokio::main]
async fn main() {
    let app = Router::new().route("/", get(|| async { "Hello, World!" }));

    serve(app, "my_onion").await.unwrap();
}

Modules§

body
HTTP body utilities.
error_handling
Error handling model and utilities
extract
Types and traits for extracting data from requests.
handler
Async functions that can be used to handle requests.
http
A general purpose library of common HTTP types
middleware
Utilities for writing middleware
response
Types and traits for generating responses.
routing
Routing between Services and handlers.
serve
Serve services.

Structs§

ConnectionInfo
Error
Errors that can happen when using axum.
Extension
Extractor and response for extensions.
Form
URL encoded extractor and response.
Json
JSON Extractor / Response.
Router
The router type for composing handlers and services.

Traits§

RequestExt
Extension trait that adds additional methods to Request.
RequestPartsExt
Extension trait that adds additional methods to Parts.
ServiceExt
Extension trait that adds additional methods to any Service.

Functions§

get_onion_name
serve
Serve a web application over an onion service.

Type Aliases§

BoxError
Alias for a type-erased error type.