aboutsummaryrefslogtreecommitdiff
path: root/src/ptr.rs
diff options
context:
space:
mode:
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>;