Lines Matching full:unaligned
34 /// - (where `T: Unaligned`) infallibly by reference, using [`Deref::deref`] or
49 /// and thus implement [`Unaligned`]. `EtherType` is `#[repr(u16)]` and so
50 /// cannot implement `Unaligned`. We use `Unalign` to relax `EtherType`'s
52 /// and can implement `Unaligned`.
57 /// # #[derive(FromBytes, KnownLayout, Immutable, Unaligned)] #[repr(C)] struct Mac([u8; 6]);
71 /// #[derive(TryFromBytes, KnownLayout, Immutable, Unaligned)]
116 #[cfg_attr(any(feature = "derive", test), derive(Immutable, FromBytes, IntoBytes, Unaligned))]
140 // Unaligned`.
150 impl_or_verify!(T => Unaligned for Unalign<T>);
199 /// If `T: Unaligned`, then `Unalign<T>` implements [`Deref`], and callers
219 /// If `T: Unaligned`, then `Unalign<T>` implements [`DerefMut`], and
232 /// If `T: Unaligned`, then `Unalign<T>` implements[ `Deref`], and callers
255 /// If `T: Unaligned`, then `Unalign<T>` implements[ `DerefMut`], and
271 /// Gets an unaligned raw pointer to the inner `T`.
281 /// explicitly documented as being sound to use with an unaligned pointer,
296 /// Gets an unaligned mutable raw pointer to the inner `T`.
306 /// explicitly documented as being sound to use with an unaligned pointer,
325 /// If [`T: Unaligned`], then `Unalign<T>` implements [`DerefMut`], and that
337 /// [`T: Unaligned`]: Unaligned
341 // While we advise callers to use `DerefMut` when `T: Unaligned`, in update()
342 // not all callers will be able to guarantee `T: Unaligned` in all in update()
407 impl<T: Unaligned> Deref for Unalign<T> {
416 impl<T: Unaligned> DerefMut for Unalign<T> {
423 impl<T: Unaligned + PartialOrd> PartialOrd<Unalign<T>> for Unalign<T> {
430 impl<T: Unaligned + Ord> Ord for Unalign<T> {
437 impl<T: Unaligned + PartialEq> PartialEq<Unalign<T>> for Unalign<T> {
444 impl<T: Unaligned + Eq> Eq for Unalign<T> {}
446 impl<T: Unaligned + Hash> Hash for Unalign<T> {
456 impl<T: Unaligned + Debug> Debug for Unalign<T> {
463 impl<T: Unaligned + Display> Display for Unalign<T> {
666 // - `ReadOnly<T>` has the same alignment as `T`, and so it is `Unaligned`
673 unsafe_impl!(T: ?Sized + Unaligned => Unaligned for ReadOnly<T>);
883 // Test methods that depend on `T: Unaligned`. in test_unalign()