Lines Matching full:immutable

195 /// Safely transmutes a mutable or immutable reference of one type to an
196 /// immutable reference of another type of the same size and compatible
205 /// Src: IntoBytes + Immutable + ?Sized,
206 /// Dst: FromBytes + Immutable + ?Sized,
248 /// # use zerocopy::{transmute_ref, FromBytes, IntoBytes, Immutable};
251 /// Src: IntoBytes + Immutable,
252 /// Dst: FromBytes + Immutable,
262 /// # use zerocopy::{transmute_ref, FromBytes, IntoBytes, Immutable};
266 /// # Src: IntoBytes + Immutable,
267 /// # Dst: FromBytes + Immutable,
298 /// #[derive(KnownLayout, FromBytes, IntoBytes, Immutable)]
355 // `&T` where `T: IntoBytes + Immutable`, and that the type of this
356 // macro expression is `&U` where `U: FromBytes + Immutable`.
359 struct AssertSrcIsImmutable<'a, T: ?::core::marker::Sized + $crate::Immutable>(&'a T);
361 struct AssertDstIsImmutable<'a, T: ?::core::marker::Sized + $crate::Immutable>(&'a T);
399 // - `Src: IntoBytes + Immutable`
400 // - `Dst: FromBytes + Immutable`
462 /// # use zerocopy::{transmute_mut, FromBytes, IntoBytes, Immutable};
476 /// # use zerocopy::{transmute_mut, FromBytes, IntoBytes, Immutable};
517 /// #[derive(KnownLayout, FromBytes, IntoBytes, Immutable)]
653 /// Conditionally transmutes a mutable or immutable reference of one type to an
654 /// immutable reference of another type of the same size and compatible
667 /// Src: IntoBytes + Immutable + ?Sized,
668 /// Dst: TryFromBytes + Immutable + ?Sized,
728 /// #[derive(KnownLayout, FromBytes, IntoBytes, Immutable)]
878 /// #[derive(KnownLayout, FromBytes, IntoBytes, Immutable)]
1113 // field types to be `Immutable`.
1114 unsafe impl $(<$($tyvar),*>)? $crate::Immutable for $name$(<$($tyvar),*>)?
1117 $($tuple_field_ty: $crate::Immutable,)*
1121 $($field_ty: $crate::Immutable,)*
1244 // block requires all field types to be `Immutable`.
1245 unsafe impl $crate::Immutable for $name
1248 $field_ty: $crate::Immutable,
1264 #[derive(KnownLayout, Immutable, FromBytes, IntoBytes, PartialEq, Debug)]
1308 // Test that `transmute!` works with `!Immutable` types. in test_transmute()
1325 #[derive(FromBytes, IntoBytes, Immutable, PartialEq, Eq, Debug)]
1371 T: IntoBytes + Immutable, in test_transmute_ref() argument
1372 U: FromBytes + Immutable, in test_transmute_ref() argument
1425 // Test that a mutable reference can be turned into an immutable one. in test_transmute_ref()
1442 // Test that `try_transmute!` works with `!Immutable` types. in test_try_transmute()
1499 // Test that a mutable reference can be turned into an immutable one. in test_try_transmute_ref()
1555 // Test that a mutable reference can be turned into an immutable one. in test_try_transmute_mut()
1614 // Test that a mutable reference can be turned into an immutable one. in test_transmute_mut()
1701 fn assert_impls<T: FromBytes + IntoBytes + Immutable>() {} in test_cryptocorrosion_derive_traits() argument