futures_signals::signal

Trait Signal

Source
pub trait Signal {
    type Item;

    // Required method
    fn poll_change(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
    ) -> Poll<Option<Self::Item>>;
}

Required Associated Types§

Required Methods§

Source

fn poll_change( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>

Implementations on Foreign Types§

Source§

impl<'a, A> Signal for &'a mut A
where A: ?Sized + Signal + Unpin,

Source§

type Item = <A as Signal>::Item

Source§

fn poll_change( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>

Source§

impl<A> Signal for Box<A>
where A: ?Sized + Signal + Unpin,

Source§

type Item = <A as Signal>::Item

Source§

fn poll_change( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>

Source§

impl<A> Signal for Pin<A>
where A: Unpin + DerefMut, A::Target: Signal,

Source§

type Item = <<A as Deref>::Target as Signal>::Item

Source§

fn poll_change( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>

Implementors§

Source§

impl<A> Signal for IsEmpty<A>
where A: SignalVec,

Source§

impl<A> Signal for Len<A>
where A: SignalVec,

Source§

impl<A> Signal for SumSignal<A>
where A: SignalVec, A::Item: for<'a> Sum<&'a A::Item>,

Source§

type Item = <A as SignalVec>::Item

Source§

impl<A> Signal for ToSignalCloned<A>
where A: SignalVec,

Source§

type Item = Vec<<A as SignalVec>::Item>

Source§

impl<A> Signal for Always<A>

Source§

type Item = A

Source§

impl<A> Signal for BroadcasterSignal<A>
where A: Signal, A::Item: Copy,

Source§

type Item = <A as Signal>::Item

Source§

impl<A> Signal for BroadcasterSignalCloned<A>
where A: Signal, A::Item: Clone,

Source§

type Item = <A as Signal>::Item

Source§

impl<A> Signal for Dedupe<A>
where A: Signal, A::Item: PartialEq + Copy,

Source§

type Item = <A as Signal>::Item

Source§

impl<A> Signal for DedupeCloned<A>
where A: Signal, A::Item: PartialEq + Clone,

Source§

type Item = <A as Signal>::Item

Source§

impl<A> Signal for Eq<A>
where A: Signal, A::Item: PartialEq,

Source§

impl<A> Signal for First<A>
where A: Signal,

Source§

type Item = <A as Signal>::Item

Source§

impl<A> Signal for Flatten<A>
where A: Signal, A::Item: Signal,

Source§

type Item = <<A as Signal>::Item as Signal>::Item

Source§

impl<A> Signal for FromFuture<A>
where A: Future,

Source§

impl<A> Signal for FromStream<A>
where A: Stream,

Source§

type Item = Option<<A as Stream>::Item>

Source§

impl<A> Signal for Neq<A>
where A: Signal, A::Item: PartialEq,

Source§

impl<A> Signal for Receiver<A>

Source§

type Item = A

Source§

impl<A> Signal for SignalDebug<A>
where A: Signal, A::Item: Debug,

Source§

type Item = <A as Signal>::Item

Source§

impl<A, B> Signal for Inspect<A, B>
where A: Signal, B: FnMut(&A::Item),

Source§

type Item = <A as Signal>::Item

Source§

impl<A, B> Signal for StopIf<A, B>
where A: Signal, B: FnMut(&A::Item) -> bool,

Source§

type Item = <A as Signal>::Item

Source§

impl<A, B, C> Signal for DedupeMap<A, B>
where A: Signal, A::Item: PartialEq, B: FnMut(&mut A::Item) -> C,

Source§

type Item = C

Source§

impl<A, B, C> Signal for FilterMap<A, B>
where A: Signal, B: FnMut(A::Item) -> Option<C>,

Source§

impl<A, B, C> Signal for Map<A, B>
where A: Signal, B: FnMut(A::Item) -> C,

Source§

type Item = C

Source§

impl<A, B, C> Signal for MapFuture<A, B, C>
where A: Signal, B: Future, C: FnMut(A::Item) -> B,

Source§

impl<A, B, C> Signal for Switch<A, B, C>
where A: Signal, B: Signal, C: FnMut(A::Item) -> B,

Source§

type Item = <B as Signal>::Item

Source§

impl<A, B, C> Signal for Throttle<A, B, C>
where A: Signal, B: Future<Output = ()>, C: FnMut() -> B,

Source§

type Item = <A as Signal>::Item

Source§

impl<A, B, F> Signal for ToSignalMap<A, F>
where A: SignalVec, F: FnMut(&[A::Item]) -> B,

Source§

type Item = B

Source§

impl<A, B, F> Signal for BroadcasterSignalRef<A, F>
where A: Signal, F: FnMut(&A::Item) -> B,

Source§

type Item = B

Source§

impl<A, B, F> Signal for MutableSignalRef<A, F>
where F: FnMut(&A) -> B,

Source§

type Item = B

Source§

impl<A: Clone> Signal for MutableSignalCloned<A>

Source§

type Item = A

Source§

impl<A: Copy> Signal for MutableSignal<A>

Source§

type Item = A

Source§

impl<M> Signal for MapWatchKeySignal<M>
where M: SignalMap, M::Key: PartialEq, M::Value: Clone,

Source§

impl<S> Signal for OptionSignal<S>
where S: Signal,

Source§

type Item = Option<<S as Signal>::Item>

Source§

impl<S, E> Signal for ResultSignal<S, E>
where S: Signal,

Source§

type Item = Result<<S as Signal>::Item, E>