Struct os::fs::pipe::PipeRingBuffer
source · 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§
source§impl 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 Freeze for PipeRingBuffer
impl !RefUnwindSafe for PipeRingBuffer
impl Send for PipeRingBuffer
impl Sync for PipeRingBuffer
impl Unpin for PipeRingBuffer
impl !UnwindSafe for PipeRingBuffer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more