#[repr(C)]pub struct MacroDefEntry {
pub def_index: u32,
pub body_offset: u32,
pub flags: u8,
pub delim: u8,
pub edition: u8,
pub _pad: u8,
}Expand description
Fixed-size 12-byte declarative macro table entry (align 4, zero wasted alignment gaps).
Entries in the macro_defs section are sorted strictly by def_index for O(log N) lookup.
Fields§
§def_index: u32§body_offset: u32§flags: u8§delim: u8§edition: u8§_pad: u8Implementations§
Source§impl MacroDefEntry
impl MacroDefEntry
pub const fn new( def_index: u32, body_offset: u32, flags: u8, delim: MacroDelim, edition: MacroEdition, ) -> Self
pub const fn def_index(self) -> u32
pub const fn body_offset(self) -> u32
pub const fn is_macro_rules(self) -> bool
pub const fn is_exported(self) -> bool
pub const fn has_local_inner_macros(self) -> bool
pub const fn is_builtin(self) -> bool
pub const fn delim_kind(self) -> MacroDelim
pub const fn edition_kind(self) -> MacroEdition
pub const fn to_le(self) -> Self
pub const fn from_le(self) -> Self
Trait Implementations§
Source§impl Clone for MacroDefEntry
impl Clone for MacroDefEntry
impl Copy for MacroDefEntry
Source§impl Debug for MacroDefEntry
impl Debug for MacroDefEntry
Source§impl Default for MacroDefEntry
impl Default for MacroDefEntry
impl Eq for MacroDefEntry
Source§impl PartialEq for MacroDefEntry
impl PartialEq for MacroDefEntry
impl StructuralPartialEq for MacroDefEntry
Auto Trait Implementations§
impl Forget for MacroDefEntry
impl Freeze for MacroDefEntry
impl Move for MacroDefEntry
impl RefUnwindSafe for MacroDefEntry
impl Send for MacroDefEntry
impl Sync for MacroDefEntry
impl Unpin for MacroDefEntry
impl UnsafeUnpin for MacroDefEntry
impl UnwindSafe for MacroDefEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more