Expand description
Official SDK for building powhttp extensions in Rust.
An extension is started via run, which provides an ExtensionHandle for
interacting with powhttp by registering context-menu items, overview
fields, inspector tabs, connect handlers and querying session data.
§Quick start
use powhttp_sdk::{run, Error, ExtensionHandle};
#[tokio::main]
async fn main() -> Result<(), Error> {
run(async |handle: ExtensionHandle| {
// register handlers, query sessions, etc.
Ok(())
}).await
}Re-exports§
pub use overview::OverviewField;pub use overview::OverviewSection;pub use inspector::Language;pub use inspector::MessageTab;pub use inspector::TabContent;pub use context_menu::ContextMenuItemSingle;pub use context_menu::ContextMenuItemMulti;pub use sessions::Headers;
Modules§
- context_
menu - Context-menu items and submenus for single and multi-entry selections.
- http2
- HTTP/2 frames.
- inspector
- Request and response tabs displayed in the Inspector.
- overview
- Overview fields and sections.
- proxy_
server - Proxy server connection handling and upstream proxy configuration.
- sessions
- Session entries and related data types (requests, responses, headers, timings).
- shared
- Small shared types used across multiple modules.
- tls
- TLS record-layer messages.
- websocket
- WebSocket messages.
Structs§
- Extension
Handle - Handle used to communicate with powhttp.
- Multi
Entry Context - Context provided to handlers that operate on multiple session entries at once.
- Single
Entry Context - Context provided to handlers that operate on a single session entry.
Enums§
- Error
- Error type returned by extension handlers and SDK operations.
Functions§
- run
- Starts the extension runtime, calling
initwith anExtensionHandle.