Initial Commit
This commit is contained in:
1625 files changed
+43221
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#! @file flushable.sakura
|
||||
#! @author John Christman (sorakatadzuma@gmail.com)
|
||||
#! @copyright Malunal Studios, LLC.
|
||||
#! @license MIT
|
||||
#!
|
||||
#! Contains the flushable trait, which a stream holding bytes back implements.
|
||||
import system;
|
||||
module std::io;
|
||||
|
||||
|
||||
#! A stream that holds back what it is given, and passes it on when flushed.
|
||||
#!
|
||||
#! Only what holds bytes back is flushable: a string, or a file, passes on what
|
||||
#! it is given at once, and has nothing to flush.
|
||||
pub trait flushable {
|
||||
#! Passes on everything held.
|
||||
#! @param this The stream to flush.
|
||||
#! @returns Why it could not all be passed on, where it could not.
|
||||
def flush(&mut this): result<void, io_error>;
|
||||
}
|
||||
Reference in new issue
Block a user