pub struct PipeRingBuffer {
arr: [u8; 32],
head: usize,
tail: usize,
status: RingBufferStatus,
write_end: Option<Weak<Pipe>>,
}
Fields
arr: [u8; 32]
head: usize
tail: usize
status: RingBufferStatus
write_end: Option<Weak<Pipe>>
Implementations
sourceimpl PipeRingBuffer
impl PipeRingBuffer
pub fn new() -> Self
pub fn set_write_end(&mut self, write_end: &Arc<Pipe>)
pub fn write_byte(&mut self, byte: u8)
pub fn read_byte(&mut self) -> u8
pub fn available_read(&self) -> usize
pub fn available_write(&self) -> usize
pub fn all_write_ends_closed(&self) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for PipeRingBuffer
impl Send for PipeRingBuffer
impl Sync for PipeRingBuffer
impl Unpin for PipeRingBuffer
impl !UnwindSafe for PipeRingBuffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more