pub fn from_fixed_buffer(buffer: fixed_buffer::FixedBuffer) -> RingBuffer {
    return RingBuffer {
      buffer: buffer,
      write_pos: AtomicU64::new(0),
      valid_data: AtomicU64::new(0),
      read_pos: AtomicU64::new(0),
      read_waker: AtomicWaker::new(),
      write_waker: AtomicWaker::new(),
      read_shutdown: AtomicBool::new(false),
      write_shutdown: AtomicBool::new(false),
    }; 
  }
/// Create a fixed-capacity ringbuffer through a fixed-capacity buffer, and the memory occupied by the buffer is controlled by the buffer itself
Create a fixed-capacity ringbuffer through a fixed-capacity buffer, and the memory occupied by the buffer is controlled by the buffer itself
Create a fixed - capacity ringbuffer through a fixed - capacity buffer and the memory occupied by the buffer is controlled by the buffer itself
pub fn from_fixed_buffer(buffer: fixed_buffer::FixedBuffer) -> RingBuffer {
    return RingBuffer {
      buffer: buffer,
      write_pos: AtomicU64::new(0),
      valid_data: AtomicU64::new(0),
      read_pos: AtomicU64::new(0),
      read_waker: AtomicWaker::new(),
      write_waker: AtomicWaker::new(),
      read_shutdown: AtomicBool::new(false),
      write_shutdown: AtomicBool::new(false),
    }; 
  }
pub fn from_fixed_buffer ( buffer : fixed_buffer :: FixedBuffer ) -> RingBuffer { return RingBuffer { buffer : buffer , write_pos : AtomicU64 :: new ( 0 ) , valid_data : AtomicU64 :: new ( 0 ) , read_pos : AtomicU64 :: new ( 0 ) , read_waker : AtomicWaker :: new ( ) , write_waker : AtomicWaker :: new ( ) , read_shutdown : AtomicBool :: new ( false ) , write_shutdown : AtomicBool :: new ( false ) , } ; }
Create a fixed-capacity ringbuffer through a fixed-capacity buffer, and the memory occupied by the buffer is controlled by the buffer itself
Create a fixed - capacity ringbuffer through a fixed - capacity buffer and the memory occupied by the buffer is controlled by the buffer itself
buffer
fixed_buffer::FixedBuffer