fn can_read(&self) -> bool {
        if let PipeEnd::Read = self.direction {
            // true
            let data = self.data.lock();
            !data.buf.is_empty() || data.end_cnt < 2 // other end closed
        } else {
            false
        }
    }
/// whether the pipe struct is readable
whether the pipe struct is readable
whether the pipe struct is readable
fn can_read(&self) -> bool {
        if let PipeEnd::Read = self.direction {
            // true
            let data = self.data.lock();
            !data.buf.is_empty() || data.end_cnt < 2 // other end closed
        } else {
            false
        }
    }
fn can_read ( & self ) -> bool { if let PipeEnd :: Read = self . direction { // true let data = self . data . lock ( ) ; ! data . buf . is_empty ( ) || data . end_cnt < 2 // other end closed } else { false } }
whether the pipe struct is readable
whether the pipe struct is readable
&self
&self