When working with data pipes it is often necessary to distinguish between EOF on the reader side caused by writer thread finishing write and writer panicking. This crate provides fused reader type that if writer thread dies while holding armed fuse the reader will get BrokenPipe error.
Fuses can also be blown with custom error that is passed to the reader end.
Example usage
Writer panics and reader gets BrokenPipe error.
use pipe;
use fuse;
use ;
use thread;
let = pipe;
let = fuse;
spawn;
let mut data = Vecnew;
assert_eq!;
assert_eq!; // data that was written before panic
Writer fails with error passed to reader.
use pipe;
use fuse;
use ;
use thread;
let = pipe;
let = fuse;
spawn;
let mut data = Vecnew;
assert_eq!;
assert_eq!; // data that was written before error