Borrow the extension of type `T`, if one is attached.
(&self)
| 293 | |
| 294 | /// Borrow the extension of type `T`, if one is attached. |
| 295 | pub fn extension<T: Any + Send + Sync>(&self) -> Option<&T> { |
| 296 | self.extensions.get::<T>() |
| 297 | } |
| 298 | |
| 299 | /// Attach a type-erased extension to this file. |
| 300 | /// |
no outgoing calls