pub trait PipeObject: StreamIpcOps + CloneOps {
// Required methods
fn has_readers(&self) -> bool;
fn has_writers(&self) -> bool;
fn buffer_size(&self) -> usize;
fn available_bytes(&self) -> usize;
fn is_readable(&self) -> bool;
fn is_writable(&self) -> bool;
// Provided method
fn as_selectable(&self) -> Option<&dyn Selectable> { ... }
}Expand description
Pipe-specific operations
This trait extends StreamIpcOps with pipe-specific functionality.
Required Methods§
Sourcefn has_readers(&self) -> bool
fn has_readers(&self) -> bool
Check if there are readers on the other end
Sourcefn has_writers(&self) -> bool
fn has_writers(&self) -> bool
Check if there are writers on the other end
Sourcefn buffer_size(&self) -> usize
fn buffer_size(&self) -> usize
Get the buffer size of the pipe
Sourcefn available_bytes(&self) -> usize
fn available_bytes(&self) -> usize
Get the number of bytes currently in the pipe buffer
Sourcefn is_readable(&self) -> bool
fn is_readable(&self) -> bool
Check if this end of the pipe is readable
Sourcefn is_writable(&self) -> bool
fn is_writable(&self) -> bool
Check if this end of the pipe is writable
Provided Methods§
Sourcefn as_selectable(&self) -> Option<&dyn Selectable>
fn as_selectable(&self) -> Option<&dyn Selectable>
Optional capability: expose select/pselect readiness/wait interface.
By default, pipes are not exposed via this hook unless the implementation
also implements Selectable and overrides this to return Some(self).