aboutsummaryrefslogtreecommitdiff
path: root/mingling_pathf/test/src/test_files/test_metadata.rs
blob: 52a2d4c5f05383bc4a85e3806f3c946f0513306e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Root-level metadata functions
#[mingling::macros::metadata(EntryGreet1)]
pub fn get_desc1() -> Description1 {
    Description1 {}
}

#[metadata(EntryGreet2)]
fn get_desc2() -> Description2 {
    Description2 {}
}

// Local DataType (defined in-crate) + foreign DataType
#[metadata(EntryGreet3)]
pub fn get_desc3() -> LocalType3 {
    LocalType3 {}
}

use std::collections::HashMap;

#[metadata(EntryGreet4)]
fn get_desc4() -> HashMap<String, String> {
    HashMap::new()
}

#[metadata(EntryGreet5)]
pub fn get_desc5() -> crate::fully::Qualified5 {
    crate::fully::Qualified5 {}
}

pub mod sub {
    #[mingling::macros::metadata(EntrySub1)]
    pub fn get_sub1() -> SubType1 {
        SubType1 {}
    }

    #[metadata(EntrySub2)]
    fn get_sub2() -> SubType2 {
        SubType2 {}
    }
}