Initial Commit
This commit is contained in:
706 files changed
+135430
No files matched your search
@@ -0,0 +1,21 @@
|
||||
#! @file sliceable.sakura
|
||||
#! @author John Christman (sorakatadzuma@gmail.com)
|
||||
#! @copyright Malunal Studios, LLC.
|
||||
#! @license MIT
|
||||
#!
|
||||
#! Contains the sliceable trait, which a type implements to lend a writable view
|
||||
#! of the elements it holds.
|
||||
|
||||
module core;
|
||||
|
||||
|
||||
#! A type that lends a writable view of the elements it holds, as a container
|
||||
#! lends one of its elements.
|
||||
#! @tparam T The type of the elements.
|
||||
pub trait sliceable<T> {
|
||||
#! Lends a writable view of the elements, without copying them.
|
||||
#! @param this The value to view.
|
||||
#! @returns The view, which writes the elements where they are, and is only
|
||||
#! good until the value changes or closes.
|
||||
def slice(&mut this): slice<T>;
|
||||
}
|
||||
Reference in new issue
Block a user