macro_rules! name_type {
(
$(#[$meta:meta])*
$vis:vis struct $Name:ident {
kind: $kind:literal
$(, max_len: $max_len:expr )?
$(,)?
}
) => { ... };
}Expand description
Declare a validated name newtype that implements Name.
Used across the crate wherever a validated ASCII-identifier newtype is needed (parameter names, element names, label keys, port names, …). Each invocation produces a newtype with:
new,as_str,into_innerDisplay,Debug,PartialEq/Eq/Hash/Ord/PartialOrd- serde
Serialize/Deserializeas a transparent string FromStr,TryFrom<&str>,TryFrom<String>