Commit a935eb43 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

macros: add missing docstrings

parent 22d4f4d2
......@@ -38,6 +38,7 @@ macro_rules! impl_id {
macro_rules! enum_serialize {
( $name:ident -> $desc:expr, $( $value:ident => $str:expr, )+ ) => {
impl $name {
/// String representation of the variant.
pub fn as_str(&self) -> &'static str {
match *self {
$( $name::$value => $str, )*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment