pub(crate) unsafe fn take(&'_ self) -> Cow<'_, D> {
        let val = &mut *self.val.get();
        debug_assert_ne!(val.tokens, 0);
        val.tokens -= 1;
        if val.tokens == 0 {
            Cow::Owned(val.val.take().unwrap())
        } else {
            Cow::Borrowed(val.val.as_ref().unwrap())
        }
    }
/// Consume a value from the stream.
///
/// This function is invoked exactly once per clock cycle by each
/// consumer connected to the stream.  The last consumer receives
/// an owned value (`Cow::Owned`).
///
/// # Safety
///
/// The caller must have exclusive access to the current stream.
Consume a value from the stream.
This function is invoked exactly once per clock cycle by each
consumer connected to the stream.  The last consumer receives
an owned value (`Cow::Owned`).
Consume a value from the stream . This function is invoked exactly once per clock cycle by each consumer connected to the stream . The last consumer receives an owned value ( ` Cow :: Owned ` ) .
pub(crate) unsafe fn take(&'_ self) -> Cow<'_, D> {
        let val = &mut *self.val.get();
        debug_assert_ne!(val.tokens, 0);
        val.tokens -= 1;
        if val.tokens == 0 {
            Cow::Owned(val.val.take().unwrap())
        } else {
            Cow::Borrowed(val.val.as_ref().unwrap())
        }
    }
pub ( crate ) unsafe fn take ( & ' _ self ) -> Cow < ' _ , D > { let val = & mut * self . val . get ( ) ; debug_assert_ne ! ( val tokens 0 ) ; val . tokens -= 1 ; if val . tokens == 0 { Cow :: Owned ( val . val . take ( ) . unwrap ( ) ) } else { Cow :: Borrowed ( val . val . as_ref ( ) . unwrap ( ) ) } }
Consume a value from the stream.
Consume a value from the stream .
&'_ self
safety
The caller must have exclusive access to the current stream.
The caller must have exclusive access to the current stream .