[][src]Function spsc_bip_buffer::bip_buffer_from

pub fn bip_buffer_from<B: DerefMut<Target = [u8]> + 'static>(
    from: B
) -> (BipBufferWriter, BipBufferReader)

Creates a new BipBufferWriter/BipBufferReader pair using the provided underlying storage.

BipBufferWriter and BipBufferReader represent the send and receive side of the single-producer single-consumer circular buffer respectively.


This method takes ownership of the storage which can be recovered with try_unwrap on BipBufferWriter or BipBufferReader. If both sides of the channel have been dropped (not using try_unwrap), the storage is dropped.