http-type 5.5.1

A comprehensive Rust library providing essential types for HTTP operations. Includes core HTTP abstractions (request/response, methods, status codes, versions), content types, cookies, WebSocket support, and thread-safe concurrent types (ArcMutex, ArcRwLock). Also provides convenient Option-wrapped primitive types for flexible HTTP handling.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::*;

/// Creates a new `ArcMutex` from the given data.
///
/// # Arguments
///
/// - `T` - The data to be wrapped in an `Arc<Mutex>`.
///
/// # Returns
///
/// An `ArcMutex<T>` containing the provided data.
#[inline]
pub fn arc_mutex<T>(data: T) -> ArcMutex<T> {
    Arc::new(Mutex::new(data))
}