#! @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 { #! 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; }