Browse Source

Add oneliner docs for the crate and both structs.

Jing Yang 4 years ago
parent
commit
0a865f0e70
2 changed files with 4 additions and 0 deletions
  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};