Closed
Description
A decent chunk of libstd::io
looks like it could be moved over to libcore
, which would be really handy for low level systems. While this would ultimately be convenient, there'd be some transitional pain making this move. The biggest source would be that'd we'd have to parameterize the Reader
/Writer
types on the error. We'd also have to convert a couple of the default methods over into generic functions to make this work.
Here are the things that I believe could be moved over:
- Without modification:
RefReader
,Writer
,RefWriter
,Stream
,Buffer
,Seek
,Listener
,Acceptor
,IncomingConnection
- All of
std::io::extensions
std::io::mem::BufWriter
andstd::io::mem::BufReader
std::io::util::LimitReader
,std::io::util::NullWriter
,std::io::util::ZeroReader
,std::io::util::NullReader
,std::io::util::ChainedReader
,std::io::util::TeeReader
,std::io::util::IterReader
.
With some modification:
Reader
andBuffer
with these methods converted into generic functions:Reader::push
,Reader::push_at_least
,Reader::read_exact
,Reader::read_to_end
, andReader::read_to_string
,Buffer::read_line
,Buffer::read_until
- We could also move
FileMode
,FileAccess
,FileType
,FileStat
, andUnstableFileStat
, but it might be better to leave os-specific stuff inlibstd
.
There are a couple that we could probably rewrite to not use things like Vec
, such as std::io::util::MultiWriter
.
Metadata
Metadata
Assignees
Labels
No labels