Struct futures::stream::Fuse [−][src]
A stream which "fuse"s a stream once it's terminated.
Normally streams can behave unpredictably when used after they have already
finished, but Fuse
continues to return None
from poll
forever when
finished.
Methods
impl<St> Fuse<St> where
St: Stream,
[src]
[−]
impl<St> Fuse<St> where
St: Stream,
pub fn is_done(&self) -> bool
[src]
[−]
pub fn is_done(&self) -> bool
Returns whether the underlying stream has finished or not.
If this method returns true
, then all future calls to poll are
guaranteed to return None
. If this returns false
, then the
underlying stream is still in use.
ⓘImportant traits for &'a mut Ipub fn get_ref(&self) -> &St
[src]
[−]
pub fn get_ref(&self) -> &St
Acquires a reference to the underlying stream that this combinator is pulling from.
ⓘImportant traits for &'a mut Ipub fn get_mut(&mut self) -> &mut St
[src]
[−]
pub fn get_mut(&mut self) -> &mut St
Acquires a mutable reference to the underlying stream that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.
pub fn get_pin_mut(self: PinMut<'a, Fuse<St>>) -> PinMut<'a, St>
[src]
[−]
pub fn get_pin_mut(self: PinMut<'a, Fuse<St>>) -> PinMut<'a, St>
Acquires a mutable pinned reference to the underlying stream that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.
pub fn into_inner(self) -> St
[src]
[−]
pub fn into_inner(self) -> St
Consumes this combinator, returning the underlying stream.
Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.
Trait Implementations
impl<S> Sink for Fuse<S> where
S: Stream + Sink,
[src]
[+]
impl<S> Sink for Fuse<S> where
S: Stream + Sink,
impl<St> Unpin for Fuse<St> where
St: Unpin,
[src]
impl<St> Unpin for Fuse<St> where
St: Unpin,
impl<St> Debug for Fuse<St> where
St: Debug,
[src]
[+]
impl<St> Debug for Fuse<St> where
St: Debug,
impl<S> Stream for Fuse<S> where
S: Stream,
[src]
[+]
impl<S> Stream for Fuse<S> where
S: Stream,