Expand description
Utilities used by macros and by zerocopy-derive.
These are defined here zerocopy rather than in code generated by macros or
by zerocopy-derive so that they can be compiled once rather than
recompiled for every invocation (e.g., if they were defined in generated
code, then deriving IntoBytes and FromBytes on three different types
would result in the code in question being emitted and compiled six
different times).
Re-exports§
pub use __size_of::size_of;
Modules§
Structs§
Traits§
- Dynamic
Padding Free - Field
- Projects the type of the field at
IndexinSelfwithout regard for field privacy. - Padding
Free - Transmute
MutDst - Transmute
RefDst
Functions§
- hash_
name - Computes the hash of a string.
- must_
use - A function which emits a warning if its return value is not used.
- try_
transmute - Attempts to transmute
SrcintoDst. - try_
transmute_ mut - Attempts to transmute
&mut Srcinto&mut Dst. - try_
transmute_ ref - Attempts to transmute
&Srcinto&Dst.
Type Aliases§
- Size
ToTag 👻 - An alias for the unsigned integer of the given size in bytes.
Unions§
- MaxAligns
Of - A type whose size is equal to
max(align_of::<T>(), align_of::<U>()).