RotatingStream structv0.1.0
A stored borrow of a RotatingFile that speaks Writer, for a Logger to keep.
pub struct RotatingStream {
// private fields
}
The address is private, and RotatingFile::Stream is the only way to obtain one.
Implements Writer
RotatingStream conforms to Writer.
Write
pub func Write(
self: &var RotatingStream,
bytes: char8[..]
) -> uint ! IoError
Writes through the borrowed file, which may move its current file aside first.
| Name | Type | Description |
|---|---|---|
bytes | char8[..] | the bytes to write |
Returns: how many bytes were taken
Flush
pub func Flush(self: &var RotatingStream) -> ! IoError
Flushes the borrowed file.
Returns: success when everything written reached the system