@@ -227,24 +227,24 @@ pub mod field_descriptor_proto {
227227 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
228228 pub fn as_str_name ( & self ) -> & ' static str {
229229 match self {
230- Type :: Double => "TYPE_DOUBLE" ,
231- Type :: Float => "TYPE_FLOAT" ,
232- Type :: Int64 => "TYPE_INT64" ,
233- Type :: Uint64 => "TYPE_UINT64" ,
234- Type :: Int32 => "TYPE_INT32" ,
235- Type :: Fixed64 => "TYPE_FIXED64" ,
236- Type :: Fixed32 => "TYPE_FIXED32" ,
237- Type :: Bool => "TYPE_BOOL" ,
238- Type :: String => "TYPE_STRING" ,
239- Type :: Group => "TYPE_GROUP" ,
240- Type :: Message => "TYPE_MESSAGE" ,
241- Type :: Bytes => "TYPE_BYTES" ,
242- Type :: Uint32 => "TYPE_UINT32" ,
243- Type :: Enum => "TYPE_ENUM" ,
244- Type :: Sfixed32 => "TYPE_SFIXED32" ,
245- Type :: Sfixed64 => "TYPE_SFIXED64" ,
246- Type :: Sint32 => "TYPE_SINT32" ,
247- Type :: Sint64 => "TYPE_SINT64" ,
230+ Self :: Double => "TYPE_DOUBLE" ,
231+ Self :: Float => "TYPE_FLOAT" ,
232+ Self :: Int64 => "TYPE_INT64" ,
233+ Self :: Uint64 => "TYPE_UINT64" ,
234+ Self :: Int32 => "TYPE_INT32" ,
235+ Self :: Fixed64 => "TYPE_FIXED64" ,
236+ Self :: Fixed32 => "TYPE_FIXED32" ,
237+ Self :: Bool => "TYPE_BOOL" ,
238+ Self :: String => "TYPE_STRING" ,
239+ Self :: Group => "TYPE_GROUP" ,
240+ Self :: Message => "TYPE_MESSAGE" ,
241+ Self :: Bytes => "TYPE_BYTES" ,
242+ Self :: Uint32 => "TYPE_UINT32" ,
243+ Self :: Enum => "TYPE_ENUM" ,
244+ Self :: Sfixed32 => "TYPE_SFIXED32" ,
245+ Self :: Sfixed64 => "TYPE_SFIXED64" ,
246+ Self :: Sint32 => "TYPE_SINT32" ,
247+ Self :: Sint64 => "TYPE_SINT64" ,
248248 }
249249 }
250250 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -297,9 +297,9 @@ pub mod field_descriptor_proto {
297297 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
298298 pub fn as_str_name ( & self ) -> & ' static str {
299299 match self {
300- Label :: Optional => "LABEL_OPTIONAL" ,
301- Label :: Required => "LABEL_REQUIRED" ,
302- Label :: Repeated => "LABEL_REPEATED" ,
300+ Self :: Optional => "LABEL_OPTIONAL" ,
301+ Self :: Required => "LABEL_REQUIRED" ,
302+ Self :: Repeated => "LABEL_REPEATED" ,
303303 }
304304 }
305305 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -576,9 +576,9 @@ pub mod file_options {
576576 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
577577 pub fn as_str_name ( & self ) -> & ' static str {
578578 match self {
579- OptimizeMode :: Speed => "SPEED" ,
580- OptimizeMode :: CodeSize => "CODE_SIZE" ,
581- OptimizeMode :: LiteRuntime => "LITE_RUNTIME" ,
579+ Self :: Speed => "SPEED" ,
580+ Self :: CodeSize => "CODE_SIZE" ,
581+ Self :: LiteRuntime => "LITE_RUNTIME" ,
582582 }
583583 }
584584 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -759,9 +759,9 @@ pub mod field_options {
759759 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
760760 pub fn as_str_name ( & self ) -> & ' static str {
761761 match self {
762- CType :: String => "STRING" ,
763- CType :: Cord => "CORD" ,
764- CType :: StringPiece => "STRING_PIECE" ,
762+ Self :: String => "STRING" ,
763+ Self :: Cord => "CORD" ,
764+ Self :: StringPiece => "STRING_PIECE" ,
765765 }
766766 }
767767 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -801,9 +801,9 @@ pub mod field_options {
801801 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
802802 pub fn as_str_name ( & self ) -> & ' static str {
803803 match self {
804- JsType :: JsNormal => "JS_NORMAL" ,
805- JsType :: JsString => "JS_STRING" ,
806- JsType :: JsNumber => "JS_NUMBER" ,
804+ Self :: JsNormal => "JS_NORMAL" ,
805+ Self :: JsString => "JS_STRING" ,
806+ Self :: JsNumber => "JS_NUMBER" ,
807807 }
808808 }
809809 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -913,9 +913,9 @@ pub mod method_options {
913913 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
914914 pub fn as_str_name ( & self ) -> & ' static str {
915915 match self {
916- IdempotencyLevel :: IdempotencyUnknown => "IDEMPOTENCY_UNKNOWN" ,
917- IdempotencyLevel :: NoSideEffects => "NO_SIDE_EFFECTS" ,
918- IdempotencyLevel :: Idempotent => "IDEMPOTENT" ,
916+ Self :: IdempotencyUnknown => "IDEMPOTENCY_UNKNOWN" ,
917+ Self :: NoSideEffects => "NO_SIDE_EFFECTS" ,
918+ Self :: Idempotent => "IDEMPOTENT" ,
919919 }
920920 }
921921 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -1402,25 +1402,25 @@ pub mod field {
14021402 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
14031403 pub fn as_str_name ( & self ) -> & ' static str {
14041404 match self {
1405- Kind :: TypeUnknown => "TYPE_UNKNOWN" ,
1406- Kind :: TypeDouble => "TYPE_DOUBLE" ,
1407- Kind :: TypeFloat => "TYPE_FLOAT" ,
1408- Kind :: TypeInt64 => "TYPE_INT64" ,
1409- Kind :: TypeUint64 => "TYPE_UINT64" ,
1410- Kind :: TypeInt32 => "TYPE_INT32" ,
1411- Kind :: TypeFixed64 => "TYPE_FIXED64" ,
1412- Kind :: TypeFixed32 => "TYPE_FIXED32" ,
1413- Kind :: TypeBool => "TYPE_BOOL" ,
1414- Kind :: TypeString => "TYPE_STRING" ,
1415- Kind :: TypeGroup => "TYPE_GROUP" ,
1416- Kind :: TypeMessage => "TYPE_MESSAGE" ,
1417- Kind :: TypeBytes => "TYPE_BYTES" ,
1418- Kind :: TypeUint32 => "TYPE_UINT32" ,
1419- Kind :: TypeEnum => "TYPE_ENUM" ,
1420- Kind :: TypeSfixed32 => "TYPE_SFIXED32" ,
1421- Kind :: TypeSfixed64 => "TYPE_SFIXED64" ,
1422- Kind :: TypeSint32 => "TYPE_SINT32" ,
1423- Kind :: TypeSint64 => "TYPE_SINT64" ,
1405+ Self :: TypeUnknown => "TYPE_UNKNOWN" ,
1406+ Self :: TypeDouble => "TYPE_DOUBLE" ,
1407+ Self :: TypeFloat => "TYPE_FLOAT" ,
1408+ Self :: TypeInt64 => "TYPE_INT64" ,
1409+ Self :: TypeUint64 => "TYPE_UINT64" ,
1410+ Self :: TypeInt32 => "TYPE_INT32" ,
1411+ Self :: TypeFixed64 => "TYPE_FIXED64" ,
1412+ Self :: TypeFixed32 => "TYPE_FIXED32" ,
1413+ Self :: TypeBool => "TYPE_BOOL" ,
1414+ Self :: TypeString => "TYPE_STRING" ,
1415+ Self :: TypeGroup => "TYPE_GROUP" ,
1416+ Self :: TypeMessage => "TYPE_MESSAGE" ,
1417+ Self :: TypeBytes => "TYPE_BYTES" ,
1418+ Self :: TypeUint32 => "TYPE_UINT32" ,
1419+ Self :: TypeEnum => "TYPE_ENUM" ,
1420+ Self :: TypeSfixed32 => "TYPE_SFIXED32" ,
1421+ Self :: TypeSfixed64 => "TYPE_SFIXED64" ,
1422+ Self :: TypeSint32 => "TYPE_SINT32" ,
1423+ Self :: TypeSint64 => "TYPE_SINT64" ,
14241424 }
14251425 }
14261426 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -1479,10 +1479,10 @@ pub mod field {
14791479 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
14801480 pub fn as_str_name ( & self ) -> & ' static str {
14811481 match self {
1482- Cardinality :: Unknown => "CARDINALITY_UNKNOWN" ,
1483- Cardinality :: Optional => "CARDINALITY_OPTIONAL" ,
1484- Cardinality :: Required => "CARDINALITY_REQUIRED" ,
1485- Cardinality :: Repeated => "CARDINALITY_REPEATED" ,
1482+ Self :: Unknown => "CARDINALITY_UNKNOWN" ,
1483+ Self :: Optional => "CARDINALITY_OPTIONAL" ,
1484+ Self :: Required => "CARDINALITY_REQUIRED" ,
1485+ Self :: Repeated => "CARDINALITY_REPEATED" ,
14861486 }
14871487 }
14881488 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -1562,8 +1562,8 @@ impl Syntax {
15621562 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
15631563 pub fn as_str_name ( & self ) -> & ' static str {
15641564 match self {
1565- Syntax :: Proto2 => "SYNTAX_PROTO2" ,
1566- Syntax :: Proto3 => "SYNTAX_PROTO3" ,
1565+ Self :: Proto2 => "SYNTAX_PROTO2" ,
1566+ Self :: Proto3 => "SYNTAX_PROTO3" ,
15671567 }
15681568 }
15691569 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -2139,7 +2139,7 @@ impl NullValue {
21392139 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
21402140 pub fn as_str_name ( & self ) -> & ' static str {
21412141 match self {
2142- NullValue :: NullValue => "NULL_VALUE" ,
2142+ Self :: NullValue => "NULL_VALUE" ,
21432143 }
21442144 }
21452145 /// Creates an enum from field names used in the ProtoBuf definition.
0 commit comments