http-type 4.37.0

A library providing essential types for HTTP, including request bodies, response headers, and other core HTTP abstractions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::*;

/// A wrapper around `Arc<RwLock<TcpStream>>`.
///
/// `ArcRwLockStream` provides shared, thread-safe access to a `TcpStream`
/// using an atomic reference counter (`Arc`) combined with a read-write lock (`RwLock`).
/// It is primarily used to safely share the stream across asynchronous tasks.
///
/// # Fields
/// - `0`: The inner `Arc<RwLock<TcpStream>>` stream.
#[derive(Clone, Debug)]
pub struct ArcRwLockStream(pub(super) ArcRwLock<TcpStream>);