File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -131,16 +131,22 @@ impl<T: Copy + 'static> AlignedVec<T> {
131
131
}
132
132
}
133
133
134
+ ///! Converts the aligned buffer into an [`AlignedSpace`](crate::space::AlignedSpace).
135
+ ///
136
+ /// This is similar in spirit to [`Vec::into_boxed_slice`], but keeps the alignment invariants
137
+ /// enforced.
134
138
#[ inline]
135
139
pub fn into_boxed_space ( self ) -> Box < AlignedSpace < T > > {
136
140
AlignedSpace :: from_boxed_uninit_slice ( self . inner . into_boxed_slice ( ) )
137
141
}
138
142
143
+ /// Converts the aligned buffer into the inner `Vec<MaybeUninit<T>>`.
139
144
#[ inline]
140
145
pub fn into_vec ( self ) -> Vec < MaybeUninit < T > > {
141
146
self . inner
142
147
}
143
148
149
+ /// Creates a new aligned buffer by wrapping an existing `Vec<MaybeUninit<T>>`.
144
150
#[ inline]
145
151
pub fn from_vec ( vec : Vec < MaybeUninit < T > > ) -> Self {
146
152
Self { inner : vec }
You can’t perform that action at this time.
0 commit comments