cometd-client 0.3.0-alpha.4

Client for LongPolling CometD connections
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use arc_swap::ArcSwapOption;
use std::sync::Arc;

pub(crate) trait ArcSwapOptionExt<T> {
    fn store_value(&self, value: T);
}

impl<T> ArcSwapOptionExt<T> for ArcSwapOption<T> {
    #[inline(always)]
    fn store_value(&self, value: T) {
        self.store(Some(Arc::new(value)));
    }
}