[−][src]Module swim_mem::resident
Memory usage model.
Residents
A memory Resident
abstracts over the usage of a memory Lease
, which
itself abstracts over the allocation and ownership semantics of a raw,
unsized memory block.
The most commonly used Resident
implementations include:
Box
: stores a single value in a raw memory block.Buf
: stores a resizeable array of values in a raw memory block.String
: stores a resizeable Unicode string in a raw memory block.
Lease
implementations that compose a Resident
include:
Raw
: the exclusive owner of a relocatable, raw memory block, with resident metadata stored with the pointer.Ptr
: the exclusive owner of a relocatable, raw memory block, with resident metadata stored within the allocation.Mut
: a mutably dereferenceable strong owner of an unrelocatable, reference counted memory block.Ref
: an immutably dereferenceable strong owner of an unrelocatable, reference counted memory block.Hard
: an undereferenceable strong owner of a relocatable, reference counted memory block.Soft
: an undereferenceable weak owner of a relocatable, reference counted memory block.
Structs
Box | A single value, residing in a memory |
Buf | A resizeable array of values, residing in a memory |
BufDrain | |
BufHeader | The |
BufIter | |
BufLease | |
String | A resizeable array of Unicode code points, residing in a memory |
StringLease |
Traits
Resident | A type that can reside in a raw, unsized memory block. A memory |
ResidentAdd | A |
ResidentAddAssign | A |
ResidentAsMut | A mutably referenceable |
ResidentAsRef | An immutably referenceable |
ResidentClone | A cloneable |
ResidentDebug | A debug-format-able |
ResidentDeref | An immutably dereferenceable |
ResidentDerefMut | A mutably dereferenceable resident of a raw memory |
ResidentDisplay | A display-format-able |
ResidentEq | A comparable |
ResidentFromClone | A type that can initialize a new memory |
ResidentFromCloneUnchecked | A type that can initialize a new memory |
ResidentFromCopy | A type that can initialize a new memory |
ResidentFromCopyUnchecked | A type that can initialize a new memory |
ResidentFromEmpty | A type that can initialize a new memory |
ResidentFromValue | A type that can initialize a new memory |
ResidentHash | A hashable |
ResidentIndex | An immutably indexed |
ResidentIndexMut | A mutably indexed |
ResidentIntoIterator | A consuming iterable |
ResidentIntoMutIterator | A mutably iterable |
ResidentIntoRefIterator | An immutably iterable |
ResidentOrd | A totally ordered |
ResidentPartialEq | A partially comparable |
ResidentPartialOrd | A partially ordered |
ResidentStow | A relocatable |
ResidentUnwrap | An unwrappable |
ResidentWithCapacity | A type that can initialize a new memory |