cyclonedx_rust/component/
scope.rs

1use serde::{Deserialize, Serialize};
2use yaserde_derive::{YaDeserialize, YaSerialize};
3
4#[derive(Clone, PartialEq, Debug, Serialize, Deserialize, YaSerialize, YaDeserialize)]
5#[yaserde(
6    prefix = "ns",
7    default_namespace = "ns",
8    namespace = "ns: http://cyclonedx.org/schema/bom/1.2"
9)]
10pub enum Scope {
11    #[serde(rename = "required")]
12    #[yaserde(rename = "required")]
13    Required,
14    #[serde(rename = "optional")]
15    #[yaserde(rename = "optional")]
16    Optional,
17    #[serde(rename = "excluded")]
18    #[yaserde(rename = "excluded")]
19    Excluded,
20}
21
22impl Default for Scope {
23    fn default() -> Self {
24        Scope::Required
25    }
26}