Lines Matching full:two
10 /// Type representing an alignment, which is always a power of two.
22 /// An alignment is always a power of two.
28 /// Validates that `ALIGN` is a power of two at build-time, and returns an [`Alignment`] of the
31 /// A build error is triggered if `ALIGN` is not a power of two.
45 "Provided alignment is not a power of two." in new()
48 // INVARIANT: `align` is a power of two. in new()
49 // SAFETY: `align` is a power of two, and thus non-zero. in new()
53 /// Validates that `align` is a power of two at runtime, and returns an
56 /// Returns [`None`] if `align` is not a power of two.
71 // INVARIANT: `align` is a power of two. in new_checked()
72 // SAFETY: `align` is a power of two, and thus non-zero. in new_checked()
85 // This cannot panic since alignments are always powers of two. in of()
93 /// It is guaranteed to be a power of two.
109 /// It is guaranteed to be a power of two.
120 // Allow the compiler to know that the value is indeed a power of two. This can help in as_nonzero()
123 // SAFETY: Per the invariants, `self.0` is always a power of two so this block will in as_nonzero()
158 // No underflow can occur as the alignment is guaranteed to be a power of two, and thus is in mask()