pub struct PipedProducer { /* private fields */ }
Expand description
Same as Producer
, but will not be closed when dropped.
The idea here is that ProducerId
of both original Producer
and PipedProducer
is the
same and lifetime of piped producer is also tied to original producer, so you may not need to
store PipedProducer
at all.
Use PipedProducer::into_inner()
method to get regular Producer
instead and restore
regular behavior of Drop
implementation.
Implementations§
Source§impl PipedProducer
impl PipedProducer
Sourcepub fn into_inner(self) -> Producer
pub fn into_inner(self) -> Producer
Get inner Producer
(which will close on drop in contrast to PipedProducer
).
Trait Implementations§
Source§impl Debug for PipedProducer
impl Debug for PipedProducer
Auto Trait Implementations§
impl Freeze for PipedProducer
impl !RefUnwindSafe for PipedProducer
impl Send for PipedProducer
impl !Sync for PipedProducer
impl Unpin for PipedProducer
impl !UnwindSafe for PipedProducer
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