Lines Matching refs:TryFromBytes
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);
78 unsafe_impl!(i128: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes);
79 unsafe_impl!(usize: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes);
80 unsafe_impl!(isize: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes);
81 unsafe_impl!(f32: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes);
82 unsafe_impl!(f64: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes);
84 …g_attr(doc_cfg, doc(cfg(feature = "float-nightly")))] f16: Immutable, TryFromBytes, FromZeros, Fro…
86 …_attr(doc_cfg, doc(cfg(feature = "float-nightly")))] f128: Immutable, TryFromBytes, FromZeros, Fro…
113 unsafe_impl!(=> TryFromBytes for bool; |byte| {
142 unsafe_impl!(=> TryFromBytes for char; |c| {
175 unsafe_impl!(=> TryFromBytes for str; |c| {
185 unsafe_impl!(=> TryFromBytes for $nonzero; |n| {
282 unsafe_impl!(Option<NonZeroU8>: TryFromBytes, FromZeros, FromBytes, IntoBytes, Unaligned);
283 unsafe_impl!(Option<NonZeroI8>: TryFromBytes, FromZeros, FromBytes, IntoBytes, Unaligned);
285 unsafe_impl!(Option<NonZeroU16>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
286 unsafe_impl!(Option<NonZeroI16>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
287 unsafe_impl!(Option<NonZeroU32>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
288 unsafe_impl!(Option<NonZeroI32>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
289 unsafe_impl!(Option<NonZeroU64>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
290 unsafe_impl!(Option<NonZeroI64>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
291 unsafe_impl!(Option<NonZeroU128>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
292 unsafe_impl!(Option<NonZeroI128>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
293 unsafe_impl!(Option<NonZeroUsize>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
294 unsafe_impl!(Option<NonZeroIsize>: TryFromBytes, FromZeros, FromBytes, IntoBytes);
336 T => TryFromBytes for Option<Box<T>>; |c| pointer::is_zeroed(c)
344 T => TryFromBytes for Option<&'_ T>; |c| pointer::is_zeroed(c)
348 T => TryFromBytes for Option<&'_ mut T>; |c| pointer::is_zeroed(c)
352 T => TryFromBytes for Option<NonNull<T>>; |c| pointer::is_zeroed(c)
357 A, B, C, D, E, F, G, H, I, J, K, L -> M => TryFromBytes for opt_fn!(...);
362 A, B, C, D, E, F, G, H, I, J, K, L -> M => TryFromBytes for opt_unsafe_fn!(...);
367 A, B, C, D, E, F, G, H, I, J, K, L -> M => TryFromBytes for opt_extern_c_fn!(...);
372 A, B, C, D, E, F, G, H, I, J, K, L -> M => TryFromBytes for opt_unsafe_extern_c_fn!(...);
408 impl_for_transmute_from!(=> TryFromBytes for $atomics [$primitives]);
465 impl_for_transmute_from!(=> TryFromBytes for AtomicBool [bool]);
613 impl_for_transmute_from!(T => TryFromBytes for AtomicPtr<T> [*mut T]);
655 unsafe_impl!(T: ?Sized => TryFromBytes for PhantomData<T>);
663 impl_for_transmute_from!(T: TryFromBytes => TryFromBytes for Wrapping<T>[T]);
689 unsafe_impl!(T => TryFromBytes for CoreMaybeUninit<T>);
737 impl_for_transmute_from!(T: ?Sized + TryFromBytes => TryFromBytes for ManuallyDrop<T>[T]);
827 impl_for_transmute_from!(T: ?Sized + TryFromBytes => TryFromBytes for Cell<T>[T]);
853 unsafe impl<T: TryFromBytes + ?Sized> TryFromBytes for UnsafeCell<T> {
894 unsafe_impl!(const N: usize, T: TryFromBytes => TryFromBytes for [T; N]; |c| {
903 <[T] as TryFromBytes>::is_bit_valid(c)
911 unsafe_impl!(T: TryFromBytes => TryFromBytes for [T]; |c| {
934 c.iter().all(<T as TryFromBytes>::is_bit_valid)
968 unsafe_impl!(T => TryFromBytes for *const T; |c| pointer::is_zeroed(c));
970 unsafe_impl!(T => TryFromBytes for *mut T; |c| pointer::is_zeroed(c));
1016 …unsafe_impl!($($head_T: TryFromBytes,)* $next_T: TryFromBytes => TryFromBytes for ($($head_T,)* $n…
1018 …$(TryFromBytes::is_bit_valid(into_inner!(c.reborrow().project::<_, { crate::STRUCT_VARIANT_ID }, {…
1019 …TryFromBytes::is_bit_valid(into_inner!(c.reborrow().project::<_, { crate::STRUCT_VARIANT_ID }, { c…
1315 … $( unsafe_impl!($typ: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); )*
1583 … impl<T: TryFromBytes + Immutable + ?Sized> TestIsBitValidShared<T> for AutorefWrapper<T> { in test_impls()
1601 … impl<T: TryFromBytes + Immutable + KnownLayout + ?Sized> TestTryFromRef<T> for AutorefWrapper<T> { in test_impls()
1619 … impl<T: TryFromBytes + IntoBytes + KnownLayout + ?Sized> TestTryFromMut<T> for AutorefWrapper<T> { in test_impls()
1633 impl<T: TryFromBytes> TestTryReadFrom<T> for AutorefWrapper<T> { in test_impls()
1687 ($ty:ty: TryFromBytes) => { in test_impls()
1813 let res = <$ty as TryFromBytes>::is_bit_valid(c.reborrow_shared()); in test_impls()
1883 const _: () = { static_assertions::assert_impl_all!($ty: TryFromBytes); }; in test_impls()
1913 TryFromBytes, in test_impls()
1922 TryFromBytes, in test_impls()
1931 TryFromBytes, in test_impls()
1940 TryFromBytes, in test_impls()
1949 TryFromBytes, in test_impls()
1958 TryFromBytes, in test_impls()
1967 TryFromBytes, in test_impls()
1976 TryFromBytes, in test_impls()
1985 TryFromBytes, in test_impls()
1994 TryFromBytes, in test_impls()
2003 TryFromBytes, in test_impls()
2012 TryFromBytes, in test_impls()
2021 TryFromBytes, in test_impls()
2031 TryFromBytes, in test_impls()
2040 TryFromBytes, in test_impls()
2049 TryFromBytes, in test_impls()
2059 TryFromBytes, in test_impls()
2068 TryFromBytes, in test_impls()
2077 TryFromBytes, in test_impls()
2086 TryFromBytes, in test_impls()
2096 TryFromBytes, in test_impls()
2105 TryFromBytes, in test_impls()
2114 TryFromBytes, in test_impls()
2122 TryFromBytes, in test_impls()
2130 TryFromBytes, in test_impls()
2138 TryFromBytes, in test_impls()
2146 TryFromBytes, in test_impls()
2154 TryFromBytes, in test_impls()
2162 TryFromBytes, in test_impls()
2170 TryFromBytes, in test_impls()
2178 TryFromBytes, in test_impls()
2186 TryFromBytes, in test_impls()
2192 …assert_impls!(Option<NonZeroU8>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, IntoB… in test_impls()
2193 …assert_impls!(Option<NonZeroI8>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, IntoB… in test_impls()
2194 …assert_impls!(Option<NonZeroU16>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Into… in test_impls()
2195 …assert_impls!(Option<NonZeroI16>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Into… in test_impls()
2196 …assert_impls!(Option<NonZeroU32>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Into… in test_impls()
2197 …assert_impls!(Option<NonZeroI32>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Into… in test_impls()
2198 …assert_impls!(Option<NonZeroU64>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Into… in test_impls()
2199 …assert_impls!(Option<NonZeroI64>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Into… in test_impls()
2200 …assert_impls!(Option<NonZeroU128>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Int… in test_impls()
2201 …assert_impls!(Option<NonZeroI128>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Int… in test_impls()
2202 …assert_impls!(Option<NonZeroUsize>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, In… in test_impls()
2203 …assert_impls!(Option<NonZeroIsize>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, In… in test_impls()
2221 …assert_impls!(Option<Box<UnsafeCell<NotZerocopy>>>: KnownLayout, Immutable, TryFromBytes, FromZero… in test_impls()
2222 …ls!(Option<Box<[UnsafeCell<NotZerocopy>]>>: KnownLayout, !Immutable, !TryFromBytes, !FromZeros, !F… in test_impls()
2223 …ls!(Option<&'static UnsafeCell<NotZerocopy>>: KnownLayout, Immutable, TryFromBytes, FromZeros, !Fr… in test_impls()
2224 …(Option<&'static [UnsafeCell<NotZerocopy>]>: KnownLayout, Immutable, !TryFromBytes, !FromZeros, !F… in test_impls()
2225 …Option<&'static mut UnsafeCell<NotZerocopy>>: KnownLayout, Immutable, TryFromBytes, FromZeros, !Fr… in test_impls()
2226 …ion<&'static mut [UnsafeCell<NotZerocopy>]>: KnownLayout, Immutable, !TryFromBytes, !FromZeros, !F… in test_impls()
2227 …assert_impls!(Option<NonNull<UnsafeCell<NotZerocopy>>>: KnownLayout, TryFromBytes, FromZeros, Immu… in test_impls()
2228 …(Option<NonNull<[UnsafeCell<NotZerocopy>]>>: KnownLayout, Immutable, !TryFromBytes, !FromZeros, !F… in test_impls()
2229 …assert_impls!(Option<fn()>: KnownLayout, Immutable, TryFromBytes, FromZeros, !FromBytes, !IntoByte… in test_impls()
2230 …assert_impls!(Option<FnManyArgs>: KnownLayout, Immutable, TryFromBytes, FromZeros, !FromBytes, !In… in test_impls()
2231 …assert_impls!(Option<extern "C" fn()>: KnownLayout, Immutable, TryFromBytes, FromZeros, !FromBytes… in test_impls()
2232 …assert_impls!(Option<ECFnManyArgs>: KnownLayout, Immutable, TryFromBytes, FromZeros, !FromBytes, !… in test_impls()
2234 …assert_impls!(PhantomData<NotZerocopy>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes… in test_impls()
2235 …assert_impls!(PhantomData<UnsafeCell<()>>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBy… in test_impls()
2236 …assert_impls!(PhantomData<[u8]>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, IntoB… in test_impls()
2238 …assert_impls!(ManuallyDrop<u8>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, IntoBy… in test_impls()
2241 …assert_impls!(ManuallyDrop<bool>: KnownLayout, Immutable, TryFromBytes, FromZeros, IntoBytes, Unal… in test_impls()
2242 …assert_impls!(ManuallyDrop<[u8]>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Into… in test_impls()
2245 …assert_impls!(ManuallyDrop<[bool]>: KnownLayout, Immutable, TryFromBytes, FromZeros, IntoBytes, Un… in test_impls()
2246 …assert_impls!(ManuallyDrop<NotZerocopy>: !Immutable, !TryFromBytes, !KnownLayout, !FromZeros, !Fro… in test_impls()
2247 …assert_impls!(ManuallyDrop<[NotZerocopy]>: KnownLayout, !Immutable, !TryFromBytes, !FromZeros, !Fr… in test_impls()
2248 …assert_impls!(ManuallyDrop<UnsafeCell<()>>: KnownLayout, TryFromBytes, FromZeros, FromBytes, IntoB… in test_impls()
2249 …assert_impls!(ManuallyDrop<[UnsafeCell<u8>]>: KnownLayout, TryFromBytes, FromZeros, FromBytes, Int… in test_impls()
2250 …assert_impls!(ManuallyDrop<[UnsafeCell<bool>]>: KnownLayout, TryFromBytes, FromZeros, IntoBytes, U… in test_impls()
2252 …assert_impls!(CoreMaybeUninit<u8>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, Una… in test_impls()
2253 …assert_impls!(CoreMaybeUninit<NotZerocopy>: KnownLayout, TryFromBytes, FromZeros, FromBytes, !Immu… in test_impls()
2254 …assert_impls!(CoreMaybeUninit<UnsafeCell<()>>: KnownLayout, TryFromBytes, FromZeros, FromBytes, Un… in test_impls()
2256 …assert_impls!(Wrapping<u8>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes,… in test_impls()
2259 …assert_impls!(Wrapping<bool>: KnownLayout, Immutable, TryFromBytes, FromZeros, IntoBytes, Unaligne… in test_impls()
2260 …assert_impls!(Wrapping<NotZerocopy>: KnownLayout, !Immutable, !TryFromBytes, !FromZeros, !FromByte… in test_impls()
2261 …assert_impls!(Wrapping<UnsafeCell<()>>: KnownLayout, TryFromBytes, FromZeros, FromBytes, IntoBytes… in test_impls()
2263 …assert_impls!(Unalign<u8>: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes, … in test_impls()
2266 …assert_impls!(Unalign<bool>: KnownLayout, Immutable, TryFromBytes, FromZeros, IntoBytes, Unaligned… in test_impls()
2267 …assert_impls!(Unalign<NotZerocopy>: KnownLayout, Unaligned, !Immutable, !TryFromBytes, !FromZeros,… in test_impls()
2272 TryFromBytes, in test_impls()
2281 TryFromBytes, in test_impls()
2287 …assert_impls!([NotZerocopy]: KnownLayout, !Immutable, !TryFromBytes, !FromZeros, !FromBytes, !Into… in test_impls()
2291 TryFromBytes, in test_impls()
2300 !TryFromBytes, in test_impls()
2309 TryFromBytes, in test_impls()
2318 !TryFromBytes, in test_impls()
2325 …assert_impls!(*const NotZerocopy: KnownLayout, Immutable, TryFromBytes, FromZeros, !FromBytes, !In… in test_impls()
2326 …assert_impls!(*mut NotZerocopy: KnownLayout, Immutable, TryFromBytes, FromZeros, !FromBytes, !Into… in test_impls()
2327 …assert_impls!(*const [NotZerocopy]: KnownLayout, Immutable, !TryFromBytes, !FromZeros, !FromBytes,… in test_impls()
2328 …assert_impls!(*mut [NotZerocopy]: KnownLayout, Immutable, !TryFromBytes, !FromZeros, !FromBytes, !… in test_impls()
2329 …assert_impls!(*const dyn Debug: KnownLayout, Immutable, !TryFromBytes, !FromZeros, !FromBytes, !In… in test_impls()
2330 …assert_impls!(*mut dyn Debug: KnownLayout, Immutable, !TryFromBytes, !FromZeros, !FromBytes, !Into… in test_impls()
2340 …$( assert_impls!($typ: KnownLayout, Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes, !Una… in test_impls()