protobuf/reflect/oneof/
generated.rs

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
use crate::OneofFull;

#[doc(hidden)]
pub struct GeneratedOneofDescriptorData {
    pub(crate) name: &'static str,
}

impl GeneratedOneofDescriptorData {
    #[doc(hidden)]
    pub fn new<O>(name: &'static str) -> GeneratedOneofDescriptorData
    where
        O: OneofFull,
    {
        GeneratedOneofDescriptorData { name }
    }
}

#[derive(Debug)]
pub(crate) struct GeneratedOneofDescriptor {}

impl GeneratedOneofDescriptor {
    /// Synthetic oneof for proto3 optional field.
    pub(crate) fn new_synthetic() -> GeneratedOneofDescriptor {
        GeneratedOneofDescriptor {}
    }

    pub(crate) fn new(_data: &GeneratedOneofDescriptorData) -> GeneratedOneofDescriptor {
        GeneratedOneofDescriptor {}
    }
}