pub enum MacroKind {
TypeAlias,
Attribute,
FunctionWrapper,
ModuleDeclaration,
LockingPrimitive,
MemoryOperation,
ConditionalMarker,
Generic,
}Expand description
Known macro patterns and their semantic meaning
Variants§
TypeAlias
Type-like macro (expands to a type): u8, u16, size_t, etc.
Attribute
Attribute macro: __init, __exit, __user, __packed, etc.
FunctionWrapper
Function-like macro that wraps a function definition
ModuleDeclaration
Module/export macro: MODULE_LICENSE, EXPORT_SYMBOL, etc.
LockingPrimitive
Locking primitive: DEFINE_MUTEX, spin_lock, etc.
MemoryOperation
Memory allocation: kmalloc, kfree, etc.
ConditionalMarker
Conditional compilation marker
Generic
Generic macro call
Trait Implementations§
impl StructuralPartialEq for MacroKind
Auto Trait Implementations§
impl Freeze for MacroKind
impl RefUnwindSafe for MacroKind
impl Send for MacroKind
impl Sync for MacroKind
impl Unpin for MacroKind
impl UnwindSafe for MacroKind
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more