Lines Matching full:two
14 /// Type representing an alignment, which is always a power of two.
26 /// An alignment is always a power of two.
32 /// Validates that `ALIGN` is a power of two at build-time, and returns an [`Alignment`] of the
35 /// A build error is triggered if `ALIGN` is not a power of two.
50 "Provided alignment is not a power of two." in new()
54 // INVARIANT: `align` is a power of two. in new()
55 // SAFETY: `align` is a power of two, and thus non-zero. in new()
59 /// Validates that `align` is a power of two at runtime, and returns an
62 /// Returns [`None`] if `align` is not a power of two.
77 // INVARIANT: `align` is a power of two. in new_checked()
78 // SAFETY: `align` is a power of two, and thus non-zero. in new_checked()
91 // This cannot panic since alignments are always powers of two. in of()
99 /// It is guaranteed to be a power of two.
115 /// It is guaranteed to be a power of two.
126 // Allow the compiler to know that the value is indeed a power of two. This can help in as_nonzero()
129 // SAFETY: Per the invariants, `self.0` is always a power of two so this block will in as_nonzero()
164 // No underflow can occur as the alignment is guaranteed to be a power of two, and thus is in mask()