Module zerocopy::macros

source ยท

Macrosยง

  • assert_unaligned ๐Ÿ”’
    Uses align_of to confirm that a type or set of types have alignment 1.
  • impl_known_layout ๐Ÿ”’
    Implements KnownLayout for a sized type.
  • impl_or_verify ๐Ÿ”’
    Implements trait(s) for a type or verifies the given implementation by referencing an existing (derived) implementation.
  • opt_extern_c_fn ๐Ÿ”’
    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.
  • safety_comment ๐Ÿ”’
    Documents multiple unsafe blocks with a single safety comment.
  • unsafe_impl ๐Ÿ”’
    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.