gearbox 3.0.0

Excessive tooling for Rust, boosting productivity and operations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::RwArcInner;
use crate::externs::{ops::Deref, sync::Arc};

pub struct HyperReadArc<T: ?Sized + Clone, R> {
    pub(super) inner: Arc<RwArcInner<T, R>>,
    pub(super) data: T,
}

impl<T: ?Sized + Clone, R> Deref for HyperReadArc<T, R> {
    type Target = T;

    fn deref(&self) -> &T {
        // Safety: We know statically that only we are referencing data
        &self.data
    }
}