@@ -214,7 +214,7 @@ pub mod field_descriptor_proto {
214
214
///
215
215
/// The values are not transformed in any way and thus are considered stable
216
216
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
217
- pub fn to_str_name ( & self ) -> & ' static str {
217
+ pub fn as_str_name ( & self ) -> & ' static str {
218
218
match self {
219
219
Type :: Double => "TYPE_DOUBLE" ,
220
220
Type :: Float => "TYPE_FLOAT" ,
@@ -250,7 +250,7 @@ pub mod field_descriptor_proto {
250
250
///
251
251
/// The values are not transformed in any way and thus are considered stable
252
252
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
253
- pub fn to_str_name ( & self ) -> & ' static str {
253
+ pub fn as_str_name ( & self ) -> & ' static str {
254
254
match self {
255
255
Label :: Optional => "LABEL_OPTIONAL" ,
256
256
Label :: Required => "LABEL_REQUIRED" ,
@@ -507,7 +507,7 @@ pub mod file_options {
507
507
///
508
508
/// The values are not transformed in any way and thus are considered stable
509
509
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
510
- pub fn to_str_name ( & self ) -> & ' static str {
510
+ pub fn as_str_name ( & self ) -> & ' static str {
511
511
match self {
512
512
OptimizeMode :: Speed => "SPEED" ,
513
513
OptimizeMode :: CodeSize => "CODE_SIZE" ,
@@ -661,7 +661,7 @@ pub mod field_options {
661
661
///
662
662
/// The values are not transformed in any way and thus are considered stable
663
663
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
664
- pub fn to_str_name ( & self ) -> & ' static str {
664
+ pub fn as_str_name ( & self ) -> & ' static str {
665
665
match self {
666
666
CType :: String => "STRING" ,
667
667
CType :: Cord => "CORD" ,
@@ -684,7 +684,7 @@ pub mod field_options {
684
684
///
685
685
/// The values are not transformed in any way and thus are considered stable
686
686
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
687
- pub fn to_str_name ( & self ) -> & ' static str {
687
+ pub fn as_str_name ( & self ) -> & ' static str {
688
688
match self {
689
689
JsType :: JsNormal => "JS_NORMAL" ,
690
690
JsType :: JsString => "JS_STRING" ,
@@ -782,7 +782,7 @@ pub mod method_options {
782
782
///
783
783
/// The values are not transformed in any way and thus are considered stable
784
784
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
785
- pub fn to_str_name ( & self ) -> & ' static str {
785
+ pub fn as_str_name ( & self ) -> & ' static str {
786
786
match self {
787
787
IdempotencyLevel :: IdempotencyUnknown => "IDEMPOTENCY_UNKNOWN" ,
788
788
IdempotencyLevel :: NoSideEffects => "NO_SIDE_EFFECTS" ,
@@ -1253,7 +1253,7 @@ pub mod field {
1253
1253
///
1254
1254
/// The values are not transformed in any way and thus are considered stable
1255
1255
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
1256
- pub fn to_str_name ( & self ) -> & ' static str {
1256
+ pub fn as_str_name ( & self ) -> & ' static str {
1257
1257
match self {
1258
1258
Kind :: TypeUnknown => "TYPE_UNKNOWN" ,
1259
1259
Kind :: TypeDouble => "TYPE_DOUBLE" ,
@@ -1295,7 +1295,7 @@ pub mod field {
1295
1295
///
1296
1296
/// The values are not transformed in any way and thus are considered stable
1297
1297
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
1298
- pub fn to_str_name ( & self ) -> & ' static str {
1298
+ pub fn as_str_name ( & self ) -> & ' static str {
1299
1299
match self {
1300
1300
Cardinality :: Unknown => "CARDINALITY_UNKNOWN" ,
1301
1301
Cardinality :: Optional => "CARDINALITY_OPTIONAL" ,
@@ -1368,7 +1368,7 @@ impl Syntax {
1368
1368
///
1369
1369
/// The values are not transformed in any way and thus are considered stable
1370
1370
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
1371
- pub fn to_str_name ( & self ) -> & ' static str {
1371
+ pub fn as_str_name ( & self ) -> & ' static str {
1372
1372
match self {
1373
1373
Syntax :: Proto2 => "SYNTAX_PROTO2" ,
1374
1374
Syntax :: Proto3 => "SYNTAX_PROTO3" ,
@@ -1934,7 +1934,7 @@ impl NullValue {
1934
1934
///
1935
1935
/// The values are not transformed in any way and thus are considered stable
1936
1936
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
1937
- pub fn to_str_name ( & self ) -> & ' static str {
1937
+ pub fn as_str_name ( & self ) -> & ' static str {
1938
1938
match self {
1939
1939
NullValue :: NullValue => "NULL_VALUE" ,
1940
1940
}
0 commit comments