pub struct Incoming<'a> { /* private fields */ }
Expand description
A stream of incoming Unix connections.
This stream is infinite, i.e awaiting the next connection will never result in None
. It is
created by the UnixListener::incoming()
method.
Trait Implementations§
source§impl Stream for Incoming<'_>
impl Stream for Incoming<'_>
§type Item = Result<UnixStream, Error>
type Item = Result<UnixStream, Error>
Values yielded by the stream.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Incoming<'a>
impl<'a> Send for Incoming<'a>
impl<'a> Sync for Incoming<'a>
impl<'a> Unpin for Incoming<'a>
impl<'a> !UnwindSafe for Incoming<'a>
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<S> StreamExt for Swhere
S: Stream + ?Sized,
impl<S> StreamExt for Swhere S: Stream + ?Sized,
source§fn next(&mut self) -> NextFuture<'_, Self>where
Self: Unpin,
fn next(&mut self) -> NextFuture<'_, Self>where Self: Unpin,
Retrieves the next item in the stream. Read more
source§fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self>where
Self: Stream<Item = Result<T, E>> + Unpin,
fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self>where Self: Stream<Item = Result<T, E>> + Unpin,
Retrieves the next item in the stream. Read more
source§fn count(self) -> CountFuture<Self>where
Self: Sized,
fn count(self) -> CountFuture<Self>where Self: Sized,
Counts the number of items in the stream. Read more
source§fn map<T, F>(self, f: F) -> Map<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> T,
fn map<T, F>(self, f: F) -> Map<Self, F>where Self: Sized, F: FnMut(Self::Item) -> T,
Maps items of the stream to new values using a closure. Read more
source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where
Self: Sized,
U: Stream,
F: FnMut(Self::Item) -> U,
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where Self: Sized, U: Stream, F: FnMut(Self::Item) -> U,
Maps items to streams and then concatenates them. Read more
source§fn flatten(self) -> Flatten<Self>where
Self: Sized,
Self::Item: Stream,
fn flatten(self) -> Flatten<Self>where Self: Sized, Self::Item: Stream,
Concatenates inner streams. Read more
source§fn then<F, Fut>(self, f: F) -> Then<Self, F, Fut>where
Self: Sized,
F: FnMut(Self::Item) -> Fut,
Fut: Future,
fn then<F, Fut>(self, f: F) -> Then<Self, F, Fut>where Self: Sized, F: FnMut(Self::Item) -> Fut, Fut: Future,
Maps items of the stream to new values using an async closure. Read more
source§fn filter<P>(self, predicate: P) -> Filter<Self, P>where
Self: Sized,
P: FnMut(&Self::Item) -> bool,
fn filter<P>(self, predicate: P) -> Filter<Self, P>where Self: Sized, P: FnMut(&Self::Item) -> bool,
source§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> Option<T>,
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where Self: Sized, F: FnMut(Self::Item) -> Option<T>,
Filters and maps items of the stream using a closure. Read more
source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where Self: Sized,
Takes only the first
n
items of the stream. Read moresource§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where
Self: Sized,
P: FnMut(&Self::Item) -> bool,
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where Self: Sized, P: FnMut(&Self::Item) -> bool,
source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where Self: Sized,
Skips the first
n
items of the stream. Read moresource§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where
Self: Sized,
P: FnMut(&Self::Item) -> bool,
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where Self: Sized, P: FnMut(&Self::Item) -> bool,
source§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where Self: Sized,
Yields every
step
th item. Read moresource§fn chain<U>(self, other: U) -> Chain<Self, U>where
Self: Sized,
U: Stream<Item = Self::Item>,
fn chain<U>(self, other: U) -> Chain<Self, U>where Self: Sized, U: Stream<Item = Self::Item>,
Appends another stream to the end of this one. Read more
source§fn cloned<'a, T>(self) -> Cloned<Self>where
Self: Stream<Item = &'a T> + Sized,
T: Clone + 'a,
fn cloned<'a, T>(self) -> Cloned<Self>where Self: Stream<Item = &'a T> + Sized, T: Clone + 'a,
Clones all items. Read more
source§fn copied<'a, T>(self) -> Copied<Self>where
Self: Stream<Item = &'a T> + Sized,
T: Copy + 'a,
fn copied<'a, T>(self) -> Copied<Self>where Self: Stream<Item = &'a T> + Sized, T: Copy + 'a,
Copies all items. Read more
source§fn collect<C>(self) -> CollectFuture<Self, C>where
Self: Sized,
C: Default + Extend<Self::Item>,
fn collect<C>(self) -> CollectFuture<Self, C>where Self: Sized, C: Default + Extend<Self::Item>,
Collects all items in the stream into a collection. Read more
source§fn try_collect<T, E, C>(self) -> TryCollectFuture<Self, C>where
Self: Stream<Item = Result<T, E>> + Sized,
C: Default + Extend<T>,
fn try_collect<T, E, C>(self) -> TryCollectFuture<Self, C>where Self: Stream<Item = Result<T, E>> + Sized, C: Default + Extend<T>,
Collects all items in the fallible stream into a collection. Read more
source§fn partition<B, P>(self, predicate: P) -> PartitionFuture<Self, P, B>where
Self: Sized,
B: Default + Extend<Self::Item>,
P: FnMut(&Self::Item) -> bool,
fn partition<B, P>(self, predicate: P) -> PartitionFuture<Self, P, B>where Self: Sized, B: Default + Extend<Self::Item>, P: FnMut(&Self::Item) -> bool,
Partitions items into those for which
predicate
is true
and those for which it is
false
, and then collects them into two collections. Read moresource§fn fold<T, F>(self, init: T, f: F) -> FoldFuture<Self, F, T>where
Self: Sized,
F: FnMut(T, Self::Item) -> T,
fn fold<T, F>(self, init: T, f: F) -> FoldFuture<Self, F, T>where Self: Sized, F: FnMut(T, Self::Item) -> T,
Accumulates a computation over the stream. Read more
source§fn try_fold<T, E, F, B>(
&mut self,
init: B,
f: F
) -> TryFoldFuture<'_, Self, F, B>where
Self: Stream<Item = Result<T, E>> + Unpin + Sized,
F: FnMut(B, T) -> Result<B, E>,
fn try_fold<T, E, F, B>( &mut self, init: B, f: F ) -> TryFoldFuture<'_, Self, F, B>where Self: Stream<Item = Result<T, E>> + Unpin + Sized, F: FnMut(B, T) -> Result<B, E>,
Accumulates a fallible computation over the stream. Read more
source§fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where
Self: Sized,
F: FnMut(&mut St, Self::Item) -> Option<B>,
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,
Maps items of the stream to new values using a state value and a closure. Read more
source§fn cycle(self) -> Cycle<Self>where
Self: Clone + Sized,
fn cycle(self) -> Cycle<Self>where Self: Clone + Sized,
Repeats the stream from beginning to end, forever. Read more
source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where Self: Sized,
Enumerates items, mapping them to
(index, item)
. Read moresource§fn inspect<F>(self, f: F) -> Inspect<Self, F>where
Self: Sized,
F: FnMut(&Self::Item),
fn inspect<F>(self, f: F) -> Inspect<Self, F>where Self: Sized, F: FnMut(&Self::Item),
Calls a closure on each item and passes it on. Read more
source§fn nth(&mut self, n: usize) -> NthFuture<'_, Self>where
Self: Unpin,
fn nth(&mut self, n: usize) -> NthFuture<'_, Self>where Self: Unpin,
Gets the
n
th item of the stream. Read moresource§fn last(self) -> LastFuture<Self>where
Self: Sized,
fn last(self) -> LastFuture<Self>where Self: Sized,
Returns the last item in the stream. Read more
source§fn find<P>(&mut self, predicate: P) -> FindFuture<'_, Self, P>where
Self: Unpin,
P: FnMut(&Self::Item) -> bool,
fn find<P>(&mut self, predicate: P) -> FindFuture<'_, Self, P>where Self: Unpin, P: FnMut(&Self::Item) -> bool,
source§fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F>where
Self: Unpin,
F: FnMut(Self::Item) -> Option<B>,
fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F>where Self: Unpin, F: FnMut(Self::Item) -> Option<B>,
source§fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P>where
Self: Unpin,
P: FnMut(Self::Item) -> bool,
fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P>where Self: Unpin, P: FnMut(Self::Item) -> bool,
source§fn all<P>(&mut self, predicate: P) -> AllFuture<'_, Self, P>where
Self: Unpin,
P: FnMut(Self::Item) -> bool,
fn all<P>(&mut self, predicate: P) -> AllFuture<'_, Self, P>where Self: Unpin, P: FnMut(Self::Item) -> bool,
source§fn any<P>(&mut self, predicate: P) -> AnyFuture<'_, Self, P>where
Self: Unpin,
P: FnMut(Self::Item) -> bool,
fn any<P>(&mut self, predicate: P) -> AnyFuture<'_, Self, P>where Self: Unpin, P: FnMut(Self::Item) -> bool,
source§fn for_each<F>(self, f: F) -> ForEachFuture<Self, F>where
Self: Sized,
F: FnMut(Self::Item),
fn for_each<F>(self, f: F) -> ForEachFuture<Self, F>where Self: Sized, F: FnMut(Self::Item),
Calls a closure on each item of the stream. Read more
source§fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F>where
Self: Unpin,
F: FnMut(Self::Item) -> Result<(), E>,
fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F>where Self: Unpin, F: FnMut(Self::Item) -> Result<(), E>,
Calls a fallible closure on each item of the stream, stopping on first error. Read more
source§fn zip<U>(self, other: U) -> Zip<Self, U>where
Self: Sized,
U: Stream,
fn zip<U>(self, other: U) -> Zip<Self, U>where Self: Sized, U: Stream,
Zips up two streams into a single stream of pairs. Read more
source§fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB>where
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Self: Stream<Item = (A, B)> + Sized,
fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB>where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Stream<Item = (A, B)> + Sized,
Collects a stream of pairs into a pair of collections. Read more
source§fn race<S>(self, other: S) -> Race<Self, S>where
Self: Sized,
S: Stream<Item = Self::Item>,
fn race<S>(self, other: S) -> Race<Self, S>where Self: Sized, S: Stream<Item = Self::Item>,
Merges with
other
stream, with no preference for either stream when both are ready. Read more