On 4/25/13 3:46 PM, Brian Anderson wrote:
enum FileStream { RtFileStream(rtio::FileStream), // Not an fd_t, a boxed wrapper around uv/rt handles FileSimulation(~Stream), NullFileStream }With this factoring though you are going to be duplicating a lot of logic for FileStream, TcpStream, etc. - they all have to define this enum, handle the pass-through, and null cases.
I'm not crazy about the Option thing either. Why not just have a "closed/in-error" flag on the stream? Seems like the worse-is-better solution, and the OS is doing that anyway...
Patrick _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
