usecrate::stream::{Fuse, StreamExt}; use core::cmp; use core::pin::Pin; use futures_core::stream::{FusedStream, Stream}; use futures_core::task::{Context, Poll}; use pin_project_lite::pin_project;
/// Acquires a reference to the underlying streams that this combinator is /// pulling from. pubfn get_ref(&self) -> (&St1, &St2) {
(self.stream1.get_ref(), self.stream2.get_ref())
}
/// Acquires a mutable reference to the underlying streams 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. pubfn get_mut(&mutself) -> (&mut St1, & style='color:red'>mut St2) {
(self.stream1.get_mut(), self.stream2.get_mut())
}
/// Acquires a pinned mutable reference to the underlying streams 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. pubfn get_pin_mut(self: Pin<&mutSelf>) -> (Pin<&mut St1>, Pin<&mut St2>) { let this = self.project();
(this.stream1.get_pin_mut(), this.stream2.get_pin_mut())
}
/// Consumes this combinator, returning the underlying streams. /// /// Note that this may discard intermediate state of this combinator, so /// care should be taken to avoid losing resources when this is called. pubfn into_inner(self) -> (St1, St2) {
(self.stream1.into_inner(), self.stream2.into_inner())
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.