enum Source! { ... }
What an Input! reads: standard input, which it holds until its end (read_to_end or finish), or a file it owns and closes then.
Methods
method descriptorsource
fn descriptor(&self) -> i32 { ... }
The descriptor read: 0 for standard input, or the file's.
method roomsource
fn room(&self) -> Result[usize, Error] { ... }
The room to read the rest of the source into without growing the buffer, beyond what was read ahead: for a file, its size and 4096 bytes for the read that finds the end (only those bytes for a pipe, device or socket, whose size says nothing); nothing for standard input, read as it comes. A directory is EISDIR.
method finishsource
fn finish(self) -> Result[(), Error] { ... }
Gives standard input back, or closes the file and reports a failed close(2).