diff --git a/src/kernel/shape/handle.rs b/src/kernel/shape/handle.rs index 99e8ae120..ba2b4fa21 100644 --- a/src/kernel/shape/handle.rs +++ b/src/kernel/shape/handle.rs @@ -38,14 +38,17 @@ impl Deref for Handle { } } +/// Internal type used in collections within [`Shape`] #[derive(Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub(super) struct Storage(Rc); impl Storage { + /// Create a [`Storage`] instance that wraps the provided object pub(super) fn new(value: T) -> Self { Self(Rc::new(value)) } + /// Create a handle that refers to this [`Storage`] instance pub(super) fn handle(&self) -> Handle { Handle(self.clone()) }