zerocopy

Module macros

Source

Macros§

  • Uses align_of to confirm that a type or set of types have alignment 1.
  • Implements KnownLayout for a sized type.
  • Implements trait(s) for a type or verifies the given implementation by referencing an existing (derived) implementation.
  • Expands to an Option<extern "C" fn> type with the given argument types and return type. Designed for use with unsafe_impl_for_power_set.
  • opt_fn 🔒
    Expands to a Option<fn> type with the given argument types and return type. Designed for use with unsafe_impl_for_power_set.
  • Documents multiple unsafe blocks with a single safety comment.
  • Unsafely implements trait(s) for a type.
  • Implements a trait for a type, bounding on each memeber of the power set of a set of type variables. This is useful for implementing traits for tuples or fn types.
  • Implements KnownLayout for a type in terms of the implementation of another type with the same representation.