- Take
selfrather than&mut selfforUniqueMmioPointer::split. The old behaviour can be achieved by callingreborrowfirst. - Take
selfrather than&selfforSharedMmioPointer::split.SharedMmioPointerisCopyso this should make no difference in most cases.
- Added
modifyandmodify_mutmethods toUniqueMmioPointer<ReadWrite<T>>andUniqueMmioPointer<ReadPureWrite<T>>. - Added
get_range()methods toUniqueMmioPointer<[T]>,UniqueMmioPointer<[T; LEN]>,SharedMmioPointer<[T]>,SharedMmioPointer<[T; LEN]>. These methods return a pointer to the subset of elements, specified by aRange. - Added
iter()methods toUniqueMmioPointer<[T]>,UniqueMmioPointer<[T; LEN]>,SharedMmioPointer<[T]>,SharedMmioPointer<[T; LEN]>. These methods return an iterator to the items of the pointer slices or arrays.
- Added
UniqueMmioPointer::split_somefor arrays and slices.
- Optimised implementation of
From<UniqueMmioPointer<[T; LEN]>>for[UniqueMmioPointer<T>; LEN].
- Added
UniqueMmioPointer::takefor arrays and slices, similar togetbut taking ownership of the original pointer rather than borrowing it. - Added implementation of
Fromto convert from pointer to array to array of pointers. - Implemented
CopyforSharedMmioPointer. - Extended lifetimes of values returned from
SharedMmioPointer::as_slice,SharedMmioPointer::get,SharedMmioPointer::splitandfield_shared!. They are now tied only to the lifetime parameter of the originalSharedMmioPointer, not the lifetime of the reference.
- Added
UniqueMmioPointer::as_mut_sliceandSharedMmioPointer::as_sliceto convert from array pointer to slice pointer. - Added implementations of
Fromto convert from array pointers to slice pointers. - Added implementations of
Fromto convert from pointers toTto pointers to[T; 1]or[T]. - Added
split_fields!macro to split aUniqueMmioPointerto a struct into severalUniqueMmioPointers to its fields.
- Made many methods
const, in particular:PhysicalInstance::newPhysicalInstance::paSharedMmioPointer::childSharedMmioPointer::getSharedMmioPointer::newSharedMmioPointer::ptrUniqueMmioPointer::childUniqueMmioPointer::getUniqueMmioPointer::newUniqueMmioPointer::ptr_mutUniqueMmioPointer::ptr_nonnull
- Fixed
field!andfield_shared!to allow getting unsized fields (e.g. slices) of structs. - Added
UniqueMmioPointer::reborrow.
- Implemented
KnownLayoutforReadPureWrite. This was missed accidentally before.
- Added
getmethod toUniqueMmioPointer<[T; N]>andSharedMmioPointer<[T; N]>.
- Renamed
OwnedMmioPointertoUniqueMmioPointer.
- Added
SharedMmioPointerfor an MMIO pointer that is not necessarily unique. Unlike aUniqueMmioPointer, aSharedMmioPointercan be cloned.UniqueMmioPointerderefs toSharedMmioPointerand can also be converted to it. - Added
getandsplitmethods onUniqueMmioPointer<[T]>andUniqueMmioPointer<[T; _]>respectively, to go from a pointer to a slice or field to pointers to the individual elements. - Added
field!andfield_shared!macros to go from a pointer to a struct to a pointer to an individual field. - Added
write_unsafeandread_unsafemethods onUniqueMmioPointerandSharedMmioPointer. These callwrite_volatileandread_volatileon most platforms, but on aarch64 are implemented with inline assembly instead to work around a bug with how volatile writes and reads are implemented. - Added wrapper types
ReadOnly,ReadPure,WriteOnly,ReadWriteandReadPureWriteto indicate whether a field can safely be written or read (with or without side-effects). Added safewriteandreadmethods onUniqueMmioPointerorSharedMmioPointerfor these.
Initial release.