http_type/rc_rwlock/
fn.rs

1use crate::*;
2
3/// Creates a new `RcRwLock` instance.
4///
5/// This function wraps a given data of type T in an `Rc` and `RwLock` to provide shared mutable access.
6///
7/// # Arguments
8///
9/// - `data` - The data of type T to be wrapped.
10///
11/// # Returns
12///
13/// A new `RcRwLock<T>` instance.
14#[inline(always)]
15pub fn rc_rwlock<T>(data: T) -> RcRwLock<T> {
16    Rc::new(RwLock::new(data))
17}