Trait std::io::Writer

pub trait Writer {
    fn write(&self, v: &[u8]);
    fn seek(&self, int, SeekStyle);
    fn tell(&self) -> uint;
    fn flush(&self) -> int;
    fn get_type(&self) -> WriterType;
}

The raw underlying writer trait. All writers must implement this.

Required Methods

fn write(&self, v: &[u8])

Write all of the given bytes.

fn seek(&self, int, SeekStyle)

Move the current position within the stream. The second parameter determines the position that the first parameter is relative to.

fn tell(&self) -> uint

Return the current position within the stream.

fn flush(&self) -> int

Flush the output buffer for this stream (if there is one).

fn get_type(&self) -> WriterType

Determine if this Writer is writing to a file or not.

Implementors