Owned
struct Owned (
)
if (
needsOwnership!Container
) {
pragma(inline) @safe pure nothrow @nogc @property
Container _container;
pragma(inline) @safe pure nothrow @nogc @property
bool _writeBorrowed;
pragma(inline) @safe pure nothrow @nogc @property
uint _readBorrowCount;
pragma(inline) @safe pure nothrow @nogc @property
enum readBorrowCountMax;
}
A destructor is present on this object, but not explicitly documented in the source.
- Range
alias Range = typeof(Container.init[])
Type of range of Container.
- isBorrowed
bool isBorrowed()
- isWriteBorrowed
bool isWriteBorrowed()
- move
typeof(this) move()
Move this into a returned r-value.
- move
void move(typeof(this) dst)
Checked overload for std.algorithm.mutation.move.
- moveEmplace
void moveEmplace(typeof(this) dst)
Checked overload for std.algorithm.mutation.moveEmplace.
- opSlice
auto opSlice(size_t i, size_t j)
Get read-only slice in range i .. j.
- opSlice
auto opSlice(size_t i, size_t j)
Get read-write slice in range i .. j.
- opSlice
auto opSlice()
Get read-only full slice.
- opSlice
auto opSlice()
Get read-write full slice.
- readBorrowCount
uint readBorrowCount()
- sliceRO
ReadBorrowed!(Range, Owned) sliceRO()
Get full read-only slice.
- sliceRO
ReadBorrowed!(Range, Owned) sliceRO(size_t i, size_t j)
Get read-only slice in range i .. j.
- sliceRW
WriteBorrowed!(Range, Owned) sliceRW()
Get full read-write slice.
- sliceRW
WriteBorrowed!(Range, Owned) sliceRW(size_t i, size_t j)
Get read-write slice in range i .. j.
Return wrapper around container Container that can be safely sliced, by tracking number of read borrowed ranges and whether it's currently write borrowed.
Only relevant when Container implements referenced access over <ul> <li> opSlice and <li> opIndex </ul>
TODO Iterate and wrap all @unsafe accessors () and wrapped borrow checks for all modifying members of Container?