Releases: google/safe-mmio
Releases · google/safe-mmio
0.3.0
Breaking changes
- 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.
Improvements
- Added
modifyandmodify_mutmethods toUniqueMmioPointer<ReadWrite<T>>and
UniqueMmioPointer<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.
0.2.7
0.2.6
0.2.5
Improvements
- 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.
0.2.4
Improvements
- 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 several
UniqueMmioPointers to its fields.
0.2.3
Improvements
- 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.
0.2.2
0.2.1
0.2.0
Breaking changes
- Renamed
OwnedMmioPointertoUniqueMmioPointer.
New features
- Added
SharedMmioPointerfor an MMIO pointer that is not necessarily unique. Unlike a
UniqueMmioPointer, aSharedMmioPointercan be cloned.UniqueMmioPointerderefs to
SharedMmioPointerand 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 safe
writeandreadmethods onUniqueMmioPointerorSharedMmioPointerfor these.