| /linux/rust/zerocopy/src/ |
| H A D | impls.rs | 32 unsafe_impl!((): Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes, Unaligned); 68 unsafe_impl!(u8: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes, Unaligned); 69 unsafe_impl!(i8: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes, Unaligned); 71 unsafe_impl!(u16: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); 72 unsafe_impl!(i16: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); 73 unsafe_impl!(u32: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); 74 unsafe_impl!(i32: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); 75 unsafe_impl!(u64: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); 76 unsafe_impl!(i64: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); 77 unsafe_impl!(u128: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); [all …]
|
| H A D | macros.rs | 87 Dst: $crate::FromBytes, 171 Dst: $crate::FromBytes, 360 struct AssertDstIsFromBytes<'a, U: ?::core::marker::Sized + $crate::FromBytes>(&'a U); 1028 $($tuple_field_ty: $crate::FromBytes,)* 1032 $($field_ty: $crate::FromBytes,)* 1057 $($tuple_field_ty: $crate::FromBytes,)* 1061 $($field_ty: $crate::FromBytes,)* 1070 unsafe impl $(<$($tyvar),*>)? $crate::FromBytes for $name$(<$($tyvar),*>)? 1073 $($tuple_field_ty: $crate::FromBytes,)* 1077 $($field_ty: $crate::FromBytes,)* [all …]
|
| H A D | split_at.rs | 958 use crate::{FromBytes, Immutable, IntoBytes, KnownLayout, SplitAt}; in test_split_at() 960 #[derive(FromBytes, KnownLayout, SplitAt, IntoBytes, Immutable, Debug)] in test_split_at() 1005 use crate::{FromBytes, Immutable, IntoBytes, KnownLayout, SplitAt}; in test_split_at_overlapping() 1007 #[derive(FromBytes, KnownLayout, SplitAt, Immutable)] in test_split_at_overlapping() 1051 use crate::{FromBytes, Immutable, IntoBytes, KnownLayout, SplitAt}; in test_split_at_via_methods() 1052 #[derive(FromBytes, KnownLayout, SplitAt, IntoBytes, Immutable, Debug)] in test_split_at_via_methods() 1074 use crate::{FromBytes, Immutable, IntoBytes, KnownLayout, SplitAt, Unaligned}; in test_split_at_via_unaligned() 1075 #[derive(FromBytes, KnownLayout, SplitAt, IntoBytes, Immutable, Unaligned)] in test_split_at_via_unaligned()
|
| H A D | ref.rs | 612 T: FromBytes + KnownLayout + Immutable + ?Sized, 660 T: FromBytes + IntoBytes + KnownLayout + ?Sized, 751 T: FromBytes, 801 T: FromBytes + KnownLayout + Immutable + ?Sized, 844 T: FromBytes + IntoBytes + KnownLayout + Immutable + ?Sized, 891 T: FromBytes + Display + KnownLayout + Immutable + ?Sized, 903 T: FromBytes + Debug + KnownLayout + Immutable + ?Sized, 915 T: FromBytes + Eq + KnownLayout + Immutable + ?Sized, 922 T: FromBytes + PartialEq + KnownLayout + Immutable + ?Sized, 933 T: FromBytes + Ord + KnownLayout + Immutable + ?Sized, [all …]
|
| H A D | wrappers.rs | 116 #[cfg_attr(any(feature = "derive", test), derive(Immutable, FromBytes, IntoBytes, Unaligned))] 157 impl_or_verify!(T: FromBytes => FromBytes for Unalign<T>); 679 unsafe_impl!(T: ?Sized + FromBytes => FromBytes for ReadOnly<T>);
|
| H A D | deprecated.rs | 142 T: FromBytes + Immutable, 155 T: FromBytes + IntoBytes + Immutable,
|
| H A D | lib.rs | 3936 pub use zerocopy_derive::FromBytes; 4053 pub unsafe trait FromBytes: FromZeros { interface 5475 fn ref_from_prefix_suffix<T: FromBytes + KnownLayout + Immutable + ?Sized>( in ref_from_prefix_suffix() 5495 fn mut_from_prefix_suffix<T: FromBytes + IntoBytes + KnownLayout + ?Sized>( in mut_from_prefix_suffix() 5824 Self: FromBytes, in as_mut_bytes() 6187 Self: FromBytes, in as_bytes_mut() 6479 #[derive(Debug, Eq, PartialEq, FromBytes, IntoBytes, Unaligned, Immutable)] 7047 #[derive(FromBytes)] in test_read_io_with_padding_soundness() 7240 fn test<T: FromBytes + IntoBytes + Immutable + Debug + Eq + ?Sized, const N: usize>( in test_to_methods() 7297 #[derive(Debug, Eq, PartialEq, FromBytes, IntoBytes, Immutable)] in test_to_methods() [all …]
|
| H A D | byteorder.rs | 525 …#[cfg_attr(any(feature = "derive", test), derive(KnownLayout, Immutable, FromBytes, IntoBytes, Una… 543 impl_or_verify!(O => FromBytes for $name<O>); 1057 trait Native: Arbitrary + FromBytes + IntoBytes + Immutable + Copy + PartialEq + Debug { 1102 FromBytes + IntoBytes + Immutable + Copy + AsRef<[u8]> + AsMut<[u8]> + Debug + Default + Eq 1109 FromBytes + IntoBytes + Unaligned + Copy + Eq + Debug + Hash + From<Self::Native>
|
| H A D | error.rs | 132 use crate::{FromBytes, Ref};
|
| /linux/rust/kernel/ |
| H A D | dma.rs | 30 FromBytes, // 420 impl<T: AsBytes + FromBytes> CoherentBox<[T]> { in zeroed_slice_with_attrs() 457 // - `T: AsBytes + FromBytes` guarantees all bit patterns are valid, so partial writes on 526 impl<T: AsBytes + FromBytes> CoherentBox<T> { in zeroed_with_attrs() 557 impl<T: AsBytes + FromBytes + KnownSize + ?Sized> DerefMut for CoherentBox<T> { in deref_mut() 568 impl<T: AsBytes + FromBytes + KnownSize + ?Sized> From<CoherentBox<T>> for Coherent<T> { 666 impl<T: AsBytes + FromBytes> Coherent<T> { 756 // `Coherent`'s DMA memory. `T: AsBytes + FromBytes` ensures there are no complex `Drop` 951 unsafe impl<T: KnownSize + ?Sized + AsBytes + FromBytes + Sync> Sync for Coherent<T> {} 1219 fn copy_read<T: zerocopy::FromBytes>(vie [all...] |
| H A D | prelude.rs | 65 FromBytes, 71 FromBytes,
|
| H A D | io.rs | 54 #[derive(FromBytes)] 300 fn copy_read<T: FromBytes>(view: Self::View<'_, T>) -> T { in copy_read() 467 Self::Target: FromBytes + IntoBytes, in try_cast() 468 U: FromBytes + IntoBytes, in try_cast() 551 Self::Target: Sized + FromBytes, in copy_read() argument 1405 fn copy_read<T: FromBytes>(view: Self::View<'_, T>) -> T { in copy_read() 1599 fn copy_read<T: FromBytes>(view: Self::View<'_, T>) -> T { in copy_read()
|
| H A D | uaccess.rs | 16 transmute::{AsBytes, FromBytes}, 339 pub fn read<T: FromBytes>(&mut self) -> Result<T> { in read()
|
| /linux/rust/zerocopy-derive/derive/ |
| H A D | from_bytes.rs | 170 ImplBlockBuilder::new(ctx, strct, Trait::FromBytes, FieldBounds::ALL_SELF).build() in derive_from_bytes_struct() 187 Ok(ImplBlockBuilder::new(ctx, enm, Trait::FromBytes, FieldBounds::ALL_SELF).build()) in derive_from_bytes_enum() 191 ImplBlockBuilder::new(ctx, unn, Trait::FromBytes, field_type_trait_bounds).build() in derive_from_bytes_union()
|
| H A D | try_from_bytes.rs | 709 if matches!(top_level, Trait::FromBytes) in try_gen_trivial_is_bit_valid() 727 T: #zerocopy_crate::FromBytes, in try_gen_trivial_is_bit_valid()
|
| /linux/rust/kernel/debugfs/ |
| H A D | traits.rs | 224 // Base implementation for any `T: FromBytes + IntoBytes`. 225 impl<T: FromBytes + IntoBytes> BinaryReaderMut for T { in read_from_slice_mut() 249 T: FromBytes + IntoBytes, in read_from_slice_mut()
|
| /linux/rust/zerocopy/src/util/ |
| H A D | macro_util.rs | 35 FromBytes, Immutable, IntoBytes, KnownLayout, Ptr, ReadOnly, TryFromBytes, ValidityError, 646 Src: FromBytes + IntoBytes + KnownLayout + ?Sized, 813 Src: FromBytes + IntoBytes, in transmute_mut() 814 Dst: FromBytes + IntoBytes, in transmute_mut() 836 Src: FromBytes + IntoBytes, in try_transmute_mut() 872 Dst: KnownLayout<PointerMetadata = usize> + FromBytes + Immutable, 904 Src: KnownLayout + FromBytes + IntoBytes, 905 Dst: KnownLayout<PointerMetadata = usize> + FromBytes + IntoBytes, 990 Immutable, FromBytes, Eq, PartialEq, Ord, PartialOrd, Default, Debug, Copy, Clone, in test_trailing_field_offset()
|
| H A D | mod.rs | 860 FromBytes,
|
| H A D | macros.rs | 224 (@assert_is_supported_trait FromBytes) => {};
|
| /linux/rust/zerocopy-derive/ |
| H A D | lib.rs | 125 derive!(FromBytes => derive_from_bytes => crate::derive::from_bytes::derive_from_bytes); 146 (crate::derive::from_bytes::derive_from_bytes, Trait::FromBytes), in most_traits()
|
| H A D | util.rs | 319 FromBytes, enumerator 347 Trait::FromBytes => "FromBytes", in to_tokens() 368 | Trait::FromBytes in to_tokens()
|
| /linux/rust/zerocopy/src/pointer/ |
| H A D | transmute.rs | 24 FromBytes, Immutable, IntoBytes, Unalign, 349 Dst: FromBytes + ?Sized,
|
| H A D | inner.rs | 651 #[derive(FromBytes, KnownLayout, SplitAt, Immutable)] in test_split_at() 703 #[derive(FromBytes, KnownLayout, SplitAt, Immutable)] in test_trailing_slice()
|
| H A D | ptr.rs | 1334 use crate::{pointer::BecauseImmutable, util::testutil::AU64, FromBytes, Immutable}; 1348 T: ?Sized + KnownLayout + Immutable + FromBytes, in test() argument 1378 T: ?Sized + KnownLayout + FromBytes + Immutable, in test() 1457 #[derive(FromBytes, KnownLayout, Immutable)]
|
| /linux/samples/rust/ |
| H A D | rust_dma.rs | 46 #[derive(FromBytes, IntoBytes)] 60 unsafe impl kernel::transmute::FromBytes for MyStruct {}
|