Expand description
Utility types and functions for HTTP operations.
This module provides convenient re-exports of commonly used types and utilities that are helpful when working with HTTP requests, responses, and async operations. These re-exports save you from having to import these dependencies directly.
§Exported Types
Bytes- Efficient byte buffer for HTTP body dataByteStr- UTF-8 validated byte string for text content- All items from
futures_lite- Async utilities and traits
§Examples
§Working with Bytes
use http_kit::utils::Bytes;
let data = Bytes::from("Hello, world!");
assert_eq!(data.len(), 13);§Working with ByteStr
use http_kit::utils::ByteStr;
let text = ByteStr::from_static("Hello, world!");
assert_eq!(text.as_str(), "Hello, world!");§Async Operations
use http_kit::utils::{AsyncReadExt, AsyncWriteExt};
// Use async I/O traits for streaming operationsModules§
- future
- Complete async runtime utilities and traits.
- io
- Complete async runtime utilities and traits.
- prelude
- Complete async runtime utilities and traits.
- stream
- Complete async runtime utilities and traits.
Macros§
Structs§
- ByteStr
- UTF-8 validated byte string optimized for text content.
- Bytes
- Efficient, reference-counted byte buffer for HTTP body data.
Traits§
- Async
BufRead - Complete async runtime utilities and traits.
- Async
BufRead Ext - Complete async runtime utilities and traits.
- Async
Read - Complete async runtime utilities and traits.
- Async
Read Ext - Complete async runtime utilities and traits.
- Async
Seek - Complete async runtime utilities and traits.
- Async
Seek Ext - Complete async runtime utilities and traits.
- Async
Write - Complete async runtime utilities and traits.
- Async
Write Ext - Complete async runtime utilities and traits.
- Future
- Complete async runtime utilities and traits.
- Future
Ext - Complete async runtime utilities and traits.
- Stream
- Complete async runtime utilities and traits.
- Stream
Ext - Complete async runtime utilities and traits.