http-type 4.55.3

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
16
use crate::*;

/// Creates a new `RcRwLock` instance.
///
/// This function wraps a given data of type T in an `Rc` and `RwLock` to provide shared mutable access.
///
/// # Arguments
///
/// - `data` - The data of type T to be wrapped.
///
/// # Returns
///
/// A new `RcRwLock<T>` instance.
pub fn rc_rwlock<T>(data: T) -> RcRwLock<T> {
    Rc::new(RwLock::new(data))
}