提交 641d3855 authored 作者: Serhij S's avatar Serhij S

try line

上级 62381ae1
......@@ -28,6 +28,10 @@ impl Reader {
pub fn line(&self) -> Result<String> {
self.rx.recv_blocking().map_err(Into::into)
}
/// Reads a line from the pipe (non-blocking)
pub fn try_line(&self) -> Result<String> {
self.rx.try_recv().map_err(Into::into)
}
}
/// Data pipe with a subprocess
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论