Skip to main content

Module macro_util

Module macro_util 

Source
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§

core_reexport

Structs§

Wrap

Traits§

DynamicPaddingFree
Field
Projects the type of the field at Index in Self without regard for field privacy.
PaddingFree
TransmuteMutDst
TransmuteRefDst
TryTransmuteMutDst
TryTransmuteMutSrc
TryTransmuteRefDst
See try_transmute_ref! documentation.
TryTransmuteRefSrc

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 Src into Dst.

Type Aliases§

SizeToTag 👻
An alias for the unsigned integer of the given size in bytes.