pub struct LazySinkSource<Fut, St, Si, Item, Error> { /* private fields */ }Expand description
A lazy sink-source that can be split into a sink and a source. The internal state is initialized when the first item is attempted to be pulled from the source half, or when the first item is sent to the sink half.
Implementations§
Source§impl<Fut, St, Si, Item, Error> LazySinkSource<Fut, St, Si, Item, Error>
impl<Fut, St, Si, Item, Error> LazySinkSource<Fut, St, Si, Item, Error>
Sourcepub fn new(future: Fut) -> Self
pub fn new(future: Fut) -> Self
Creates a new LazySinkSource with the given initialization future.
Sourcepub fn split(
self,
) -> (LazySinkHalf<Fut, St, Si, Item, Error>, LazySourceHalf<Fut, St, Si, Item, Error>)
pub fn split( self, ) -> (LazySinkHalf<Fut, St, Si, Item, Error>, LazySourceHalf<Fut, St, Si, Item, Error>)
Splits into a sink and stream that share the same underlying connection.
Auto Trait Implementations§
impl<Fut, St, Si, Item, Error> Freeze for LazySinkSource<Fut, St, Si, Item, Error>
impl<Fut, St, Si, Item, Error> !RefUnwindSafe for LazySinkSource<Fut, St, Si, Item, Error>
impl<Fut, St, Si, Item, Error> !Send for LazySinkSource<Fut, St, Si, Item, Error>
impl<Fut, St, Si, Item, Error> !Sync for LazySinkSource<Fut, St, Si, Item, Error>
impl<Fut, St, Si, Item, Error> Unpin for LazySinkSource<Fut, St, Si, Item, Error>where
Error: Unpin,
impl<Fut, St, Si, Item, Error> !UnwindSafe for LazySinkSource<Fut, St, Si, Item, Error>
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