pub struct MacroKey {
pub name: MacroName,
pub arity: Option<Arity>,
}Expand description
Erlang treats NAME and NAME(Args) as different macros, and macros of
different arities as different macros, so the arity is part of the key.
Fields§
§name: MacroName§arity: Option<Arity>Implementations§
Source§impl MacroKey
impl MacroKey
pub fn object_like(name: MacroName) -> Self
pub fn function_like(name: MacroName, arity: Arity) -> Self
pub fn parse_define(body: &str) -> Option<(Self, &str)>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MacroKey
impl<'de> Deserialize<'de> for MacroKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MacroKey
Source§impl Ord for MacroKey
impl Ord for MacroKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for MacroKey
impl PartialOrd for MacroKey
impl StructuralPartialEq for MacroKey
Auto Trait Implementations§
impl Forget for MacroKey
impl Freeze for MacroKey
impl Move for MacroKey
impl RefUnwindSafe for MacroKey
impl Send for MacroKey
impl Sync for MacroKey
impl Unpin for MacroKey
impl UnsafeUnpin for MacroKey
impl UnwindSafe for MacroKey
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