Files
sakurac/core/traits/extendable.sakura
T

20 lines
681 B
Plaintext
Raw Normal View History

2026-10-26 10:14:11 -05:00
#! @file extendable.sakura
#! @author John Christman (sorakatadzuma@gmail.com)
#! @copyright Malunal Studios, LLC.
#! @license MIT
#!
#! Contains the extendable trait, which a container implements to have values
#! appended to it, as an iterator's `into` appends each element it gives.
module core;
#! A container values are appended to one at a time, as a `vector` takes its
#! elements and a `string` its text.
#! @tparam T The type of what is appended.
pub trait extendable<T> {
#! Appends a value, after those the container holds.
#! @param this The container.
#! @param value The value, which the container then owns.
def append(&mut this, value: T): void;
}