(item: Item<T>)
| 47 | } |
| 48 | |
| 49 | pub fn new_with_lock(item: Item<T>) -> Self { |
| 50 | LazyItemRef { |
| 51 | item: Arc::new(RwLock::new(LazyItem { |
| 52 | data: Some(item), |
| 53 | offset: None, |
| 54 | decay_counter: 0, |
| 55 | })), |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | pub fn get_data(&self) -> Option<Item<T>> { |
| 60 | self.item.read().unwrap().data.clone() |
nothing calls this directly
no outgoing calls
no test coverage detected