Allow direct access to the NodeId::label.
This commit is contained in:
parent
f17e695410
commit
8c3c834907
1 changed files with 7 additions and 0 deletions
|
@ -905,6 +905,13 @@ macro_rules! make_node_info_enum {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn label(&self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
NodeId::$v1 => stringify!($v1),
|
||||||
|
$(NodeId::$variant(_) => stringify!($variant)),+
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn name(&self) -> &'static str {
|
pub fn name(&self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
NodeId::$v1 => stringify!($s1),
|
NodeId::$v1 => stringify!($s1),
|
||||||
|
|
Loading…
Reference in a new issue