Returns true if an extension of type `T` is set.
(&self)
| 127 | |
| 128 | /// Returns true if an extension of type `T` is set. |
| 129 | pub fn contains<T: Any + Send + Sync>(&self) -> bool { |
| 130 | self.inner.contains_key(&TypeId::of::<T>()) |
| 131 | } |
| 132 | |
| 133 | /// Merge entries from `other` into `self`. Entries in `other` take |
| 134 | /// precedence over existing entries with the same type. |