SAFETY: T must not have any padding or otherwise uninitialized bytes inside of it
(mem: &T)
| 518 | |
| 519 | /// SAFETY: T must not have any padding or otherwise uninitialized bytes inside of it |
| 520 | pub(crate) unsafe fn cast_to_bytes<T: ?Sized>(mem: &T) -> &[u8] { |
| 521 | std::slice::from_raw_parts(mem as *const T as *const u8, std::mem::size_of_val(mem)) |
| 522 | } |
| 523 | |
| 524 | /// An error type for the `FromStr` implementation for enum-like types in this crate. |
| 525 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
no outgoing calls
no test coverage detected
searching dependent graphs…