Trait SharedObservable

Source
pub trait SharedObservable: Observable {
    type Unsub: SubscriptionLike + 'static;

    // Required method
    fn actual_subscribe<O: Observer<Item = Self::Item, Err = Self::Err> + Sync + Send + 'static>(
        self,
        subscriber: Subscriber<O, SharedSubscription>,
    ) -> Self::Unsub;

    // Provided method
    fn into_shared(self) -> Shared<Self>
       where Self: Sized { ... }
}

Required Associated Types§

Required Methods§

Source

fn actual_subscribe<O: Observer<Item = Self::Item, Err = Self::Err> + Sync + Send + 'static>( self, subscriber: Subscriber<O, SharedSubscription>, ) -> Self::Unsub

Provided Methods§

Source

fn into_shared(self) -> Shared<Self>
where Self: Sized,

Convert to a thread-safe mode.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, S, SD> SharedObservable for SubscribeOnOP<S, SD>
where S: SharedObservable + Send + 'static, SD: SharedScheduler + Send + 'static, S::Unsub: Send + Sync,

Source§

impl<'a, Source, Discr, Key> SharedObservable for GroupByOp<Source, Discr>
where Source: SharedObservable + Clone + Send + Sync + 'static, Source::Item: Send + Sync + 'static, Discr: FnMut(&Source::Item) -> Key + Clone + Send + Sync + 'static, Key: 'a + Hash + Clone + Eq + Send + Sync + 'static,

Source§

impl<A, B> SharedObservable for ZipOp<A, B>
where A: SharedObservable, B: SharedObservable<Err = A::Err>, A::Item: Send + Sync + 'static, B::Item: Send + Sync + 'static, A::Unsub: Send + Sync, B::Unsub: Send + Sync,

Source§

impl<B, S> SharedObservable for MapToOp<S, B>
where S: SharedObservable, B: Clone + Send + Sync + 'static, S::Item: 'static,

Source§

impl<Emit> SharedObservable for ObservableBase<Emit>
where Emit: SharedEmitter,

Source§

impl<Item, Err> SharedObservable for SharedBoxOp<Item, Err>

Source§

impl<Item, Err> SharedObservable for SharedCloneBoxOp<Item, Err>

Source§

impl<Item, Err> SharedObservable for SharedBehaviorSubject<Item, Err>

Source§

impl<Item, Err> SharedObservable for SharedSubject<Item, Err>

Source§

impl<Item, Err, S> SharedObservable for SharedRefCount<S, Item, Err>
where S: SharedObservable<Item = Item, Err = Err> + Clone, S::Unsub: Clone, Item: Clone + Send + Sync + 'static, Err: Clone + Send + Sync + 'static,

Source§

impl<Item, S> SharedObservable for ContainsOp<S, Item>
where S: SharedObservable<Item = Item>, Item: Send + Sync + 'static + Clone + Eq,

Source§

impl<Item, S> SharedObservable for LastOp<S, Item>
where S: SharedObservable<Item = Item>, Item: Send + Sync + 'static + Clone,

Source§

impl<Item, S, F> SharedObservable for FilterMapOp<S, F>
where S: SharedObservable, F: FnMut(S::Item) -> Option<Item> + Send + Sync + 'static, S::Item: 'static,

Source§

impl<Item, S, M> SharedObservable for MapOp<S, M>
where S: SharedObservable, M: FnMut(S::Item) -> Item + Send + Sync + 'static, S::Item: 'static,

Source§

impl<Outer, Inner, Item, Err> SharedObservable for FlattenOp<Outer, Inner>
where Outer: SharedObservable<Item = Inner, Err = Err>, Outer::Unsub: Send + Sync, Inner: SharedObservable<Item = Item, Err = Err, Unsub = SharedSubscription> + Send + Sync + 'static,

Source§

impl<OutputItem, Source, BinaryOp> SharedObservable for ScanOp<Source, BinaryOp, OutputItem>
where Source: SharedObservable, OutputItem: Clone + Send + Sync + 'static, Source::Item: 'static, BinaryOp: FnMut(OutputItem, Source::Item) -> OutputItem + Send + Sync + 'static,

Source§

impl<S1, S2> SharedObservable for MergeOp<S1, S2>
where S1: SharedObservable, S2: SharedObservable<Item = S1::Item, Err = S1::Err, Unsub = S1::Unsub>, S1::Unsub: Send + Sync,

Source§

impl<S> SharedObservable for BufferWithCountOp<S>
where S: SharedObservable, S::Item: Send + Sync + 'static,

Source§

impl<S> SharedObservable for DefaultIfEmptyOp<S>
where S: SharedObservable, S::Item: Clone + Send + Sync + 'static,

Source§

impl<S> SharedObservable for MergeAllOp<S>
where S: SharedObservable, S::Err: Send + Sync + 'static, S::Item: SharedObservable<Err = S::Err> + Send + Sync + 'static, <S::Item as SharedObservable>::Unsub: Send + Sync + 'static, Self::Item: Send + Sync + 'static,

Source§

impl<S> SharedObservable for SkipOp<S>

Source§

impl<S> SharedObservable for SkipLastOp<S>
where S: SharedObservable, S::Item: Send + Sync + 'static,

Source§

impl<S> SharedObservable for TakeOp<S>

Source§

impl<S> SharedObservable for TakeLastOp<S>
where S: SharedObservable, S::Item: Send + Sync + 'static,

Source§

impl<S> SharedObservable for Shared<S>

Source§

impl<S, F> SharedObservable for FilterOp<S, F>
where S: SharedObservable, F: FnMut(&S::Item) -> bool + Send + Sync + 'static,

Source§

impl<S, F> SharedObservable for FinalizeOp<S, F>
where S: SharedObservable, F: FnMut() + Send + Sync + 'static, S::Unsub: Send + Sync,

Source§

impl<S, F> SharedObservable for SkipWhileOp<S, F>
where S: SharedObservable, F: FnMut(&S::Item) -> bool + Send + Sync + 'static,

Source§

impl<S, F> SharedObservable for TakeWhileOp<S, F>
where S: SharedObservable, F: FnMut(&S::Item) -> bool + Send + Sync + 'static,

Source§

impl<S, Item> SharedObservable for DistinctOp<S>
where S: SharedObservable<Item = Item>, Item: Hash + Eq + Clone + Send + Sync + 'static,

Source§

impl<S, Item, Err> SharedObservable for SharedConnectableObservable<S, Item, Err>
where S: SharedObservable<Item = Item, Err = Err>,

Source§

impl<S, N> SharedObservable for TakeUntilOp<S, N>
where S: SharedObservable, N: SharedObservable<Err = S::Err>, S::Item: Send + Sync + 'static, N::Item: Send + Sync + 'static, S::Unsub: Send + Sync, N::Unsub: Send + Sync,

Source§

impl<S, SD> SharedObservable for DebounceOp<S, SD>
where S: SharedObservable, S::Item: Clone + Send + 'static, SD: SharedScheduler + Send + 'static,

Source§

impl<S, SD> SharedObservable for DelayOp<S, SD>
where S: SharedObservable + Send + Sync + 'static, S::Unsub: Send + Sync, SD: SharedScheduler,

Source§

impl<S, SD> SharedObservable for ObserveOnOp<S, SD>
where S: SharedObservable, S::Item: Clone + Send + 'static, S::Err: Clone + Send + 'static, SD: SharedScheduler + Send + Sync + 'static,

Source§

impl<S, SD> SharedObservable for ThrottleTimeOp<S, SD>
where S: SharedObservable, S::Item: Clone + Send + 'static, SD: SharedScheduler + Send + 'static,

Source§

impl<Source, Discr, Key> SharedObservable for GroupObservable<Source, Discr, Key>
where Source: SharedObservable, Source::Item: Send + Sync + 'static, Discr: FnMut(&Source::Item) -> Key + Clone + Send + Sync + 'static, Key: Hash + Clone + Eq + Send + Sync + 'static,

Source§

impl<Source, Sampling> SharedObservable for SampleOp<Source, Sampling>
where Source: SharedObservable, Source::Item: Send + Sync + 'static + Clone, Source::Unsub: Send + Sync, Source::Err: Send + Sync + 'static, Sampling: SharedObservable<Err = Source::Err>, Sampling::Item: Send + Sync + 'static + Clone, Sampling::Unsub: Send + Sync,

Source§

impl<Source, Scheduler> SharedObservable for BufferWithCountOrTimerOp<Source, Scheduler>
where Source: SharedObservable, Source::Item: Send + Sync + 'static, Scheduler: SharedScheduler,

Source§

impl<Source, Scheduler> SharedObservable for BufferWithTimeOp<Source, Scheduler>
where Source: SharedObservable, <Source as Observable>::Item: Send + Sync + 'static, Scheduler: SharedScheduler,