浏览代码

Add oneliner docs for the crate and both structs.

Jing Yang 4 年之前
父节点
当前提交
0a865f0e70
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 3 0
      src/carrier/mod.rs
  2. 1 0
      src/lib.rs

+ 3 - 0
src/carrier/mod.rs

@@ -125,6 +125,9 @@ impl<T> CarrierTarget<T> {
     }
 }
 
+/// A reference to an object owned by a [`Carrier`](`Carrier`).
+///
+/// The target will be alive for as long as this reference is alive.
 #[derive(Default)]
 pub struct CarrierRef<T> {
     inner: Arc<CarrierTarget<T>>,

+ 1 - 0
src/lib.rs

@@ -1,3 +1,4 @@
+//! A collection of synchronization utils for concurrent programming.
 mod carrier;
 
 pub use carrier::{Carrier, CarrierRef};