docs: add session/multi

This commit is contained in:
Victor Brekenfeld 2018-12-03 23:28:01 +01:00
parent 2bc45d4053
commit aa2090c079
1 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,11 @@ impl SessionNotifier for MultiNotifier {
}
}
/// Create a pair of a linked [`SessionObserver`](../trait.SessionObserver.html) and a
/// [`SessionNotifier`](../trait.SessionNotifier.html).
///
/// Observers added to the returned notifier are notified,
/// when the returned observer is notified.
pub fn notify_multiplexer() -> (impl SessionObserver, impl SessionNotifier<Id = Id>) {
let observer = Arc::new(Mutex::new(HashMap::new()));