Struct gcj_helper::IoHelper
[−]
[src]
pub struct IoHelper { /* fields omitted */ }
Provides I/O support for problem solving code.
The IoHelper
type allows reading from an input file and writing to an output file.
IoHelper::read_line()
reads the next line of text from the input file, and io::Write
is
implemented for IoHelper
such that data is written to the output file.
Methods
impl IoHelper
[src]
fn read_line(&mut self) -> String
Reads a line of text from the input file.
Panics
This method panics if reading fails for any reason, such as having reached the end of the input file.
fn current_case(&self) -> usize
Returns the current test case number.
fn case_count(&self) -> usize
Returns the total number of test cases in the input file.
Trait Implementations
impl Debug for IoHelper
[src]
impl Write for IoHelper
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this object, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this write. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<()>
Writes a formatted string into this writer, returning any error encountered. Read more
fn by_ref(&mut self) -> &mut Self
1.0.0
Creates a "by reference" adaptor for this instance of Write
. Read more