Skip to main content

buffa_types/generated/
google.protobuf.struct.__oneof.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2// source: google/protobuf/struct.proto
3
4pub mod value {
5    #[allow(unused_imports)]
6    use super::*;
7    /// The kind of value.
8    #[derive(Clone, PartialEq, Debug)]
9    #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
10    pub enum Kind {
11        NullValue(::buffa::EnumValue<super::super::super::NullValue>),
12        NumberValue(f64),
13        StringValue(::buffa::alloc::string::String),
14        BoolValue(bool),
15        StructValue(::buffa::alloc::boxed::Box<super::super::super::Struct>),
16        ListValue(::buffa::alloc::boxed::Box<super::super::super::ListValue>),
17    }
18    impl ::buffa::Oneof for Kind {}
19    impl From<super::super::super::Struct> for Kind {
20        fn from(v: super::super::super::Struct) -> Self {
21            Self::StructValue(::buffa::alloc::boxed::Box::new(v))
22        }
23    }
24    impl From<super::super::super::Struct> for ::core::option::Option<Kind> {
25        fn from(v: super::super::super::Struct) -> Self {
26            Self::Some(Kind::from(v))
27        }
28    }
29    impl From<super::super::super::ListValue> for Kind {
30        fn from(v: super::super::super::ListValue) -> Self {
31            Self::ListValue(::buffa::alloc::boxed::Box::new(v))
32        }
33    }
34    impl From<super::super::super::ListValue> for ::core::option::Option<Kind> {
35        fn from(v: super::super::super::ListValue) -> Self {
36            Self::Some(Kind::from(v))
37        }
38    }
39}