aboutsummaryrefslogtreecommitdiff
path: root/src/ptr.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-07-31 17:27:33 +0200
committerHampusM <hampus@hampusmat.com>2022-08-01 15:26:43 +0200
commit7a6575220c6d9db564514bcbee552faa29095738 (patch)
tree19a97692bde26f994892830f0ff6f8cc23f611e1 /src/ptr.rs
parente20e442ee84918f8f06794ebb1a389a3a04bcdcc (diff)
docs: add doc comments & deny missing docs
Diffstat (limited to 'src/ptr.rs')
-rw-r--r--src/ptr.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ptr.rs b/src/ptr.rs
index 00c74f4..082edf2 100644
--- a/src/ptr.rs
+++ b/src/ptr.rs
@@ -1,8 +1,13 @@
#![allow(clippy::module_name_repetitions)]
+
+//! Smart pointer type aliases.
use std::rc::Rc;
+/// A smart pointer unique to the holder.
pub type TransientPtr<Interface> = Box<Interface>;
+/// A smart pointer to a shared resource.
pub type SingletonPtr<Interface> = Rc<Interface>;
+/// A smart pointer to a factory.
pub type FactoryPtr<FactoryInterface> = Rc<FactoryInterface>;