Provide alignment
function on crate types to get the alignment size.
#29
Labels
enhancement
New feature or request
go ahead
Reviewed, implementation can start
good first issue
Good for newcomers
help wanted
Extra attention is needed
Is your feature request related to a problem? Please describe.
Sometimes one wants to use the alignment size of a given slice as a constant.
Currently that requires duplicating
A::size()
for the givenA
.Describe the solution you'd like
AlignedBytes
,AlignedSlice
andAlignedBlock
should all have analignment
function thatreturns the alignment size. It must be noted in the docs that this might not reflect the actual alignment (it might be lower than the actual alignment).
The text was updated successfully, but these errors were encountered: