@@ -226,10 +226,12 @@ use core::slice;
226
226
/// The alignment of all Multiboot2 data structures.
227
227
pub const ALIGNMENT : usize = 8 ;
228
228
229
- /// A sized header type for [`DynSizedStructure`]. Note that `header` refers to
230
- /// the header pattern. Thus, depending on the use case, this is not just a
231
- /// tag header. Instead, it refers to all bytes that are fixed and not part of
232
- /// any optional terminating dynamic `[u8]` slice in a [`DynSizedStructure`].
229
+ /// A sized header type for [`DynSizedStructure`].
230
+ ///
231
+ /// Note that `header` refers to the header pattern. Thus, depending on the use
232
+ /// case, this is not just a tag header. Instead, it refers to all bytes that
233
+ /// are fixed and not part of any optional terminating dynamic `[u8]` slice in a
234
+ /// [`DynSizedStructure`].
233
235
///
234
236
/// The alignment of implementors **must** be the compatible with the demands
235
237
/// for the corresponding structure, which typically is [`ALIGNMENT`].
@@ -251,9 +253,11 @@ pub trait Header: Clone + Sized + PartialEq + Eq + Debug {
251
253
}
252
254
253
255
/// An C ABI-compatible dynamically sized type with a common sized [`Header`]
254
- /// and a dynamic amount of bytes. This structures owns all its bytes, unlike
255
- /// [`Header`]. Instances guarantees that the memory requirements promised in
256
- /// the crates description are respected.
256
+ /// and a dynamic amount of bytes.
257
+ ///
258
+ /// This structures owns all its bytes, unlike [`Header`]. Instances guarantees
259
+ /// that the memory requirements promised in the crates description are
260
+ /// respected.
257
261
///
258
262
/// This can be a Multiboot2 header tag, information tag, boot information, or
259
263
/// a Multiboot2 header. Depending on the context, the [`Header`] is different.
@@ -386,9 +390,10 @@ pub enum MemoryError {
386
390
impl core:: error:: Error for MemoryError { }
387
391
388
392
/// Increases the given size to the next alignment boundary, if it is not a
389
- /// multiple of the alignment yet. This is relevant as in Rust's [type layout],
390
- /// the allocated size of a type is always a multiple of the alignment, even
391
- /// if the type is smaller.
393
+ /// multiple of the alignment yet.
394
+ ///
395
+ /// This is relevant as in Rust's [type layout], the allocated size of a type is
396
+ /// always a multiple of the alignment, even if the type is smaller.
392
397
///
393
398
/// [type layout]: https://doc.rust-lang.org/reference/type-layout.html
394
399
#[ must_use]
0 commit comments