1212/// ```text
1313/// # let type = unimplemented!();
1414/// match type {
15+ /// Type::Audio => { /* ... */ },
1516/// Type::Document => { /* ... */ },
1617/// Type::Image => { /* ... */ },
1718/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
4243 :: std:: clone:: Clone , :: std:: cmp:: Eq , :: std:: cmp:: Ord , :: std:: cmp:: PartialEq , :: std:: cmp:: PartialOrd , :: std:: fmt:: Debug , :: std:: hash:: Hash ,
4344) ]
4445pub enum Type {
46+ #[ allow( missing_docs) ] // documentation missing in model
47+ Audio ,
4548 #[ allow( missing_docs) ] // documentation missing in model
4649 Document ,
4750 #[ allow( missing_docs) ] // documentation missing in model
@@ -53,6 +56,7 @@ pub enum Type {
5356impl :: std:: convert:: From < & str > for Type {
5457 fn from ( s : & str ) -> Self {
5558 match s {
59+ "AUDIO" => Type :: Audio ,
5660 "DOCUMENT" => Type :: Document ,
5761 "IMAGE" => Type :: Image ,
5862 other => Type :: Unknown ( crate :: primitives:: sealed_enum_unknown:: UnknownVariantValue ( other. to_owned ( ) ) ) ,
@@ -70,14 +74,15 @@ impl Type {
7074 /// Returns the `&str` value of the enum member.
7175 pub fn as_str ( & self ) -> & str {
7276 match self {
77+ Type :: Audio => "AUDIO" ,
7378 Type :: Document => "DOCUMENT" ,
7479 Type :: Image => "IMAGE" ,
7580 Type :: Unknown ( value) => value. as_str ( ) ,
7681 }
7782 }
7883 /// Returns all the `&str` representations of the enum members.
7984 pub const fn values ( ) -> & ' static [ & ' static str ] {
80- & [ "DOCUMENT" , "IMAGE" ]
85+ & [ "AUDIO" , " DOCUMENT", "IMAGE" ]
8186 }
8287}
8388impl :: std:: convert:: AsRef < str > for Type {
@@ -100,6 +105,7 @@ impl Type {
100105impl :: std:: fmt:: Display for Type {
101106 fn fmt ( & self , f : & mut :: std:: fmt:: Formatter ) -> :: std:: fmt:: Result {
102107 match self {
108+ Type :: Audio => write ! ( f, "AUDIO" ) ,
103109 Type :: Document => write ! ( f, "DOCUMENT" ) ,
104110 Type :: Image => write ! ( f, "IMAGE" ) ,
105111 Type :: Unknown ( value) => write ! ( f, "{}" , value) ,
0 commit comments