Function read [src]

Consume a byte from the ring buffer and return it. Returns null if the ring buffer is empty.

Prototype

pub fn read(self: *RingBuffer) ?u8

Parameters

self: *RingBuffer

Source

pub fn read(self: *RingBuffer) ?u8 { if (self.isEmpty()) return null; return self.readAssumeLength(); }