| /linux/rust/zerocopy/src/pointer/ |
| H A D | ptr.rs | 1184 |slf| match slf.try_cast_into(CastType::Prefix, meta) { in try_cast_into_no_leftover() 1185 Ok((slf, remainder)) => { in try_cast_into_no_leftover() 1187 Ok(slf) in try_cast_into_no_leftover() 1380 slf: Ptr<'_, T, (Shared, Aligned, Initialized)>, in test() 1382 let t = slf.recall_validity().as_ref(); in test() 1413 if let Ok((slf, remaining)) = Ptr::from_ref(bytes) in test() 1418 let len = unsafe { validate_and_get_len(slf) }; in test() 1433 KnownLayout::pointer_to_metadata(slf.as_inner().as_ptr()); in test() 1439 if let Ok(slf) = Ptr::from_ref(bytes) in test() 1444 let len = unsafe { validate_and_get_len(slf) }; in test() [all …]
|
| /linux/rust/zerocopy-derive/derive/ |
| H A D | try_from_bytes.rs | 259 …fn project(slf: #zerocopy_crate::pointer::PtrInner<'_, Self>) -> *mut <Self as #has_field_path>::T… in derive_is_bit_valid() 262 slf.project::<___ZerocopyRawEnum #ty_generics, CastSized>() in derive_is_bit_valid() 509 …fn project(slf: #zerocopy_crate::pointer::PtrInner<'_, Self>) -> *mut <Self as #has_field_path>::T… in derive_has_field_struct_union() 510 let slf = slf.as_ptr(); in derive_has_field_struct_union() localVariable 517 unsafe { #core::ptr::addr_of_mut!((*slf).#ident) } in derive_has_field_struct_union()
|
| H A D | known_layout.rs | 77 let slf = trailing.as_ptr() as *mut Self; in derive_known_layout_for_repr_c_struct() localVariable 79 unsafe { #core::ptr::NonNull::new_unchecked(slf) } in derive_known_layout_for_repr_c_struct()
|
| /linux/rust/zerocopy/src/ |
| H A D | byteorder.rs | 1095 let slf = (!self.is_nan()).then(|| self); in assert_eq_or_nan() localVariable 1097 assert_eq!(slf, other); in assert_eq_or_nan() 1126 let slf = (!self.get().is_nan()).then(|| self); in assert_eq_or_nan() localVariable 1128 assert_eq!(slf, other); in assert_eq_or_nan() 1524 |slf, _rhs| core::ops::$trait::$method(slf), in test_ops_impls() 1525 |slf, _rhs| core::ops::$trait::$method(slf), in test_ops_impls() 1526 |slf, _rhs| core::ops::$trait::$method(slf).into(), in test_ops_impls() 1527 |slf, _rhs| core::ops::$trait::$method(slf), in test_ops_impls()
|
| H A D | wrappers.rs | 359 slf: *mut Unalign<T>, in update() field 370 unsafe { ptr::write(self.slf, Unalign::new(copy)) }; in update() 388 let mut write_back = WriteBackOnDrop { copy: ManuallyDrop::new(copy), slf: self }; in update() 812 fn project(slf: PtrInner<'_, Self>) -> *mut ReadOnly<T::Type> { in project() 813 slf.project::<_, <T as SizeEq<ReadOnly<T>>>::CastFrom>() in project()
|
| H A D | lib.rs | 1255 fn project(slf: PtrInner<'_, Self>) -> *mut Self::Type; in project() 3214 unsafe { try_read_from(source, candidate).map(|slf| (slf, suffix)) } in try_read_from_prefix() 3293 unsafe { try_read_from(source, candidate).map(|slf| (prefix, slf)) } in try_read_from_suffix() 3536 let slf: *mut Self = self; in zero() localVariable 3547 unsafe { ptr::write_bytes(slf.cast::<u8>(), 0, len) }; in zero() 4719 Ok(slf) => Ok(slf.recall_validity().as_ref()), in ref_from_bytes_with_elems() 4993 Ok(slf) => Ok(slf.recall_validity::<_, (_, (_, BecauseExclusive))>().as_mut()), in mut_from_bytes_with_elems() 5480 let (slf, prefix_suffix) = Ptr::from_ref(source) in ref_from_prefix_suffix() 5483 Ok((slf.recall_validity().as_ref(), prefix_suffix.as_ref())) in ref_from_prefix_suffix() 5500 let (slf, prefix_suffix) = Ptr::from_mut(source) in mut_from_prefix_suffix() [all …]
|
| H A D | impls.rs | 813 fn project(slf: PtrInner<'_, Self>) -> *mut T { in project() 822 return slf.as_ptr() as *mut T; in project() 1094 fn project(slf: crate::PtrInner<'_, Self>) -> *mut Self::Type { 1095 let slf = slf.as_non_null().as_ptr(); localVariable 1101 unsafe { core::ptr::addr_of_mut!((*slf).$CurrI) } 1641 fn test_as_bytes<'slf, 't>(&'slf self, t: &'t ReadOnly<T>) -> Option<&'t [u8]>; in test_impls() argument 1646 fn test_as_bytes<'slf, 't>(&'slf self, t: &'t ReadOnly<T>) -> Option<&'t [u8]> { in test_impls() argument
|
| /linux/rust/zerocopy-derive/ |
| H A D | util.rs | 422 slf: &'a Trait, in normalize_bounds() 426 TraitBound::Slf => slf.clone(), in normalize_bounds()
|