1use crate::*;
2
3pub type RwLockWriteContext<'a> = RwLockWriteGuard<'a, InnerContext>;
4pub type RwLockReadContext<'a> = RwLockReadGuard<'a, InnerContext>;
5pub type ArcAnySendSync = Arc<dyn Any + Send + Sync>;
6pub type HashMapArcAnySendSync = HashMap<String, ArcAnySendSync>;
7
8#[derive(Clone, Lombok)]
9pub struct InnerContext {
10 pub(super) stream: OptionArcRwLockStream,
11 pub(super) request: Request,
12 pub(super) response: Response,
13 pub(super) log: Log,
14 pub(super) data: HashMapArcAnySendSync,
15}
16
17#[derive(Clone)]
18pub struct Context(pub(super) ArcRwLock<InnerContext>);