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.
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.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).