Initial Commit
This commit is contained in:
1625 files changed
+43449
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#! @file seekable.sakura
|
||||
#! @author John Christman (sorakatadzuma@gmail.com)
|
||||
#! @copyright Malunal Studios, LLC.
|
||||
#! @license MIT
|
||||
#!
|
||||
#! Contains the seekable trait, which a stream whose position can be moved
|
||||
#! implements, as a file does.
|
||||
import system;
|
||||
module std::io;
|
||||
|
||||
|
||||
#! A stream whose position, where the next read or write happens, can be moved.
|
||||
pub trait seekable {
|
||||
#! Moves the position.
|
||||
#! @param this The stream whose position to move.
|
||||
#! @param offset The offset to move to.
|
||||
#! @param from Where the offset is measured from.
|
||||
#! @returns The new position, from the start, or why it could not be moved.
|
||||
def seek(&mut this, offset: i64, from: whence): result<u64, io_error>;
|
||||
}
|
||||
Reference in new issue
Block a user