Module macros

Module macros 

Source

MacrosΒ§

__item πŸ”’
c_enum πŸ”’
Represent a C enum as Rust constants and a type.
cfg_if πŸ”’
A macro for defining #cfg if-else statements.
deprecated_mach πŸ”’
e πŸ”’
Implement Clone and Copy for an enum, as well as Debug, Eq, Hash, and PartialEq if the extra_traits feature is enabled.
extern_ty πŸ”’
Create an uninhabited type that can’t be constructed. It implements Debug, Clone, and Copy, but these aren’t meaningful for extern types so they should eventually be removed.
f πŸ”’
Define a unsafe function.
offset_of πŸ”’
Polyfill for std’s offset_of.
prelude πŸ”’
Create an internal crate prelude with core reexports and common types.
s πŸ”’
Implement Clone and Copy for a struct, as well as Debug, Eq, Hash, and PartialEq if the extra_traits feature is enabled.
s_no_extra_traits πŸ”’
Implement Clone, Copy, and Debug since those can be derived, but exclude PartialEq, Eq, and Hash.
s_paren πŸ”’
Implement Clone and Copy for a tuple struct, as well as Debug, Eq, Hash, and PartialEq if the extra_traits feature is enabled.
safe_f πŸ”’
Define a safe function.