Lines Matching refs:cast
47 pub mod cast {
52 /// A pointer cast or projection.
74 /// cast.
89 /// A no-op pointer cast.
110 /// A pointer cast which preserves or shrinks the set of referent bytes of
129 src.as_ptr().cast::<Dst>()
136 /// A pointer cast which preserves the set of referent bytes of a
156 src.as_ptr().cast::<Dst>()
167 /// A pointer cast which preserves or shrinks the set of referent bytes of
173 /// guarantee that the cast preserves the set of referent bytes. Thus,
209 Dst::raw_from_ptr_len(src.as_non_null().cast::<u8>(), metadata).as_ptr()
261 // and so any union projection is actually a cast (ie, preserves address).
359 /// A cast from `T` to `[u8]`.
383 core::ptr::slice_from_raw_parts_mut(src.as_ptr().cast::<u8>(), bytes)
393 /// A cast from any type to `()`.
402 src.as_ptr().cast::<()>()