pub struct PBufRdWr<'a, T: 'static = u8> {
pub rd: PBufRd<'a, T>,
pub wr: PBufWr<'a, T>,
}
Expand description
Pair of consumer and producer references
Create this using the PipeBufPair::upper
or
PipeBufPair::lower
calls, or equivalently
PipeBufPair::left
and PipeBufPair::right
. Reborrow it
using PBufRdWr::reborrow
, or by reborrowing the members
individually.
Fields§
§rd: PBufRd<'a, T>
Consumer reference for the incoming pipe
wr: PBufWr<'a, T>
Producer reference for the outgoing pipe
Implementations§
source§impl<'a, T: Copy + Default + 'static> PBufRdWr<'a, T>
impl<'a, T: Copy + Default + 'static> PBufRdWr<'a, T>
sourcepub fn reborrow<'b, 'r>(&'r mut self) -> PBufRdWr<'b, T>where
'a: 'b,
'r: 'b,
pub fn reborrow<'b, 'r>(&'r mut self) -> PBufRdWr<'b, T>where
'a: 'b,
'r: 'b,
Create new references from these, reborrowing them. Thanks to
the borrow checker, the original references will be
inaccessible until the returned references’ lifetimes end.
The cost is just a couple of pointer copies, just as for
&mut
reborrowing.
Auto Trait Implementations§
impl<'a, T> Freeze for PBufRdWr<'a, T>
impl<'a, T> RefUnwindSafe for PBufRdWr<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for PBufRdWr<'a, T>where
T: Send,
impl<'a, T> Sync for PBufRdWr<'a, T>where
T: Sync,
impl<'a, T> Unpin for PBufRdWr<'a, T>
impl<'a, T = u8> !UnwindSafe for PBufRdWr<'a, T>
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