Struct aldrin::DiscovererStream
source · pub struct DiscovererStream<Key, const N: usize> { /* private fields */ }Expand description
Stream adapter for Discoverer.
Methods from Deref<Target = Discoverer<Key>>§
sourcepub fn client(&self) -> &Handle
pub fn client(&self) -> &Handle
Returns a handle to the client that was used to create the discoverer.
sourcepub async fn restart(&mut self) -> Result<(), Error>
pub async fn restart(&mut self) -> Result<(), Error>
Restarts the discoverer.
All pending events will be discarded. The discoverer will be configured to consider all
objects and services on the bus, as if it was built again with DiscovererBuilder::build.
sourcepub async fn restart_current_only(&mut self) -> Result<(), Error>
pub async fn restart_current_only(&mut self) -> Result<(), Error>
Restarts the discoverer and configures it to consider only current objects and services.
All pending events will be discarded. The discoverer will be configured to consider only
current objects and services on the bus, as if it was built again with
DiscovererBuilder::build_current_only.
sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Indicates whether the discoverer can return more events.
Discoverers can only finish if they are considering only current objects and services,
i.e. built with build_current_only or restarted
with restart_current_only.
sourcepub fn poll_next_event_ref(
&mut self,
cx: &mut Context<'_>
) -> Poll<Option<DiscovererEventRef<'_, Key>>>
pub fn poll_next_event_ref( &mut self, cx: &mut Context<'_> ) -> Poll<Option<DiscovererEventRef<'_, Key>>>
Poll the discoverer for an event.
sourcepub async fn next_event_ref(&mut self) -> Option<DiscovererEventRef<'_, Key>>
pub async fn next_event_ref(&mut self) -> Option<DiscovererEventRef<'_, Key>>
Awaits an event from the discoverer.
sourcepub fn poll_next_event<const N: usize>(
&mut self,
cx: &mut Context<'_>
) -> Poll<Option<DiscovererEvent<Key, N>>>
pub fn poll_next_event<const N: usize>( &mut self, cx: &mut Context<'_> ) -> Poll<Option<DiscovererEvent<Key, N>>>
Poll the discoverer for an event.
sourcepub async fn next_event<const N: usize>(
&mut self
) -> Option<DiscovererEvent<Key, N>>
pub async fn next_event<const N: usize>( &mut self ) -> Option<DiscovererEvent<Key, N>>
Awaits an event from the discoverer.
Trait Implementations§
source§impl<Key, const N: usize> Deref for DiscovererStream<Key, N>
impl<Key, const N: usize> Deref for DiscovererStream<Key, N>
source§impl<Key, const N: usize> DerefMut for DiscovererStream<Key, N>
impl<Key, const N: usize> DerefMut for DiscovererStream<Key, N>
source§impl<Key, const N: usize> FusedStream for DiscovererStream<Key, N>where
Key: Clone,
impl<Key, const N: usize> FusedStream for DiscovererStream<Key, N>where
Key: Clone,
source§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
true if the stream should no longer be polled.source§impl<Key, const N: usize> Stream for DiscovererStream<Key, N>where
Key: Clone,
impl<Key, const N: usize> Stream for DiscovererStream<Key, N>where
Key: Clone,
§type Item = DiscovererEvent<Key, N>
type Item = DiscovererEvent<Key, N>
Auto Trait Implementations§
impl<Key, const N: usize> Freeze for DiscovererStream<Key, N>
impl<Key, const N: usize> !RefUnwindSafe for DiscovererStream<Key, N>
impl<Key, const N: usize> Send for DiscovererStream<Key, N>where
Key: Send,
impl<Key, const N: usize> Sync for DiscovererStream<Key, N>where
Key: Sync,
impl<Key, const N: usize> Unpin for DiscovererStream<Key, N>
impl<Key, const N: usize> !UnwindSafe for DiscovererStream<Key, N>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> StreamExt for T
impl<T> StreamExt for T
source§fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
source§fn into_future(self) -> StreamFuture<Self>
fn into_future(self) -> StreamFuture<Self>
source§fn map<T, F>(self, f: F) -> Map<Self, F>
fn map<T, F>(self, f: F) -> Map<Self, F>
source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
source§fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
source§fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
source§fn collect<C>(self) -> Collect<Self, C>
fn collect<C>(self) -> Collect<Self, C>
source§fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB>
fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB>
source§fn concat(self) -> Concat<Self>
fn concat(self) -> Concat<Self>
source§fn count(self) -> Count<Self>where
Self: Sized,
fn count(self) -> Count<Self>where
Self: Sized,
source§fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F>
fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F>
source§fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>
true if any element in stream satisfied a predicate. Read moresource§fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>
fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>
true if all element in stream satisfied a predicate. Read moresource§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
source§fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
StreamExt::fold that holds internal state
and produces a new stream. Read moresource§fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
true. Read moresource§fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
true. Read moresource§fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
source§fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F>
fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F>
source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n items of the underlying stream. Read moresource§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n items of the underlying stream. Read moresource§fn zip<St>(self, other: St) -> Zip<Self, St>
fn zip<St>(self, other: St) -> Zip<Self, St>
source§fn peekable(self) -> Peekable<Self>where
Self: Sized,
fn peekable(self) -> Peekable<Self>where
Self: Sized,
peek method. Read moresource§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
source§fn left_stream<B>(self) -> Either<Self, B>
fn left_stream<B>(self) -> Either<Self, B>
source§fn right_stream<B>(self) -> Either<B, Self>
fn right_stream<B>(self) -> Either<B, Self>
source§fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
Stream::poll_next on Unpin
stream types.