File: enums_struct.rs

package info (click to toggle)
rust-darling 0.20.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 396 kB
  • sloc: makefile: 2; sh: 1
file content (15 lines) | stat: -rw-r--r-- 293 bytes parent folder | download | duplicates (47)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(dead_code)]

//! Test expansion of enums which have struct variants.

use darling::FromMeta;
#[derive(Debug, FromMeta)]
#[darling(rename_all = "snake_case")]
enum Message {
    Hello { user: String, silent: bool },
    Ping,
    Goodbye { user: String },
}

#[test]
fn expansion() {}