#[non_exhaustive]
pub enum SyntaxLanguageCode {
    De,
    En,
    Es,
    Fr,
    It,
    Pt,
    Unknown(UnknownVariantValue),
}
Expand description

When writing a match expression against SyntaxLanguageCode, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.

Here is an example of how you can make a match expression forward-compatible:

# let syntaxlanguagecode = unimplemented!();
match syntaxlanguagecode {
    SyntaxLanguageCode::De => { /* ... */ },
    SyntaxLanguageCode::En => { /* ... */ },
    SyntaxLanguageCode::Es => { /* ... */ },
    SyntaxLanguageCode::Fr => { /* ... */ },
    SyntaxLanguageCode::It => { /* ... */ },
    SyntaxLanguageCode::Pt => { /* ... */ },
    other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
    _ => { /* ... */ },
}

The above code demonstrates that when syntaxlanguagecode represents NewFeature, the execution path will lead to the second last match arm, even though the enum does not contain a variant SyntaxLanguageCode::NewFeature in the current version of SDK. The reason is that the variable other, created by the @ operator, is bound to SyntaxLanguageCode::Unknown(UnknownVariantValue("NewFeature".to_owned())) and calling as_str on it yields "NewFeature". This match expression is forward-compatible when executed with a newer version of SDK where the variant SyntaxLanguageCode::NewFeature is defined. Specifically, when syntaxlanguagecode represents NewFeature, the execution path will hit the second last match arm as before by virtue of calling as_str on SyntaxLanguageCode::NewFeature also yielding "NewFeature".

Explicitly matching on the Unknown variant should be avoided for two reasons:

  • The inner data UnknownVariantValue is opaque, and no further information can be extracted.
  • It might inadvertently shadow other intended match arms.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

De

§

En

§

Es

§

Fr

§

It

§

Pt

§

Unknown(UnknownVariantValue)

Unknown contains new variants that have been added since this code was generated.

Implementations§

Returns the &str value of the enum member.

Examples found in repository?
src/model.rs (line 11553)
11552
11553
11554
    fn as_ref(&self) -> &str {
        self.as_str()
    }
More examples
Hide additional examples
src/json_ser.rs (line 89)
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
pub fn serialize_structure_crate_input_batch_detect_syntax_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::BatchDetectSyntaxInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_16) = &input.text_list {
        let mut array_17 = object.key("TextList").start_array();
        for item_18 in var_16 {
            {
                array_17.value().string(item_18.as_str());
            }
        }
        array_17.finish();
    }
    if let Some(var_19) = &input.language_code {
        object.key("LanguageCode").string(var_19.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_batch_detect_targeted_sentiment_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::BatchDetectTargetedSentimentInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_20) = &input.text_list {
        let mut array_21 = object.key("TextList").start_array();
        for item_22 in var_20 {
            {
                array_21.value().string(item_22.as_str());
            }
        }
        array_21.finish();
    }
    if let Some(var_23) = &input.language_code {
        object.key("LanguageCode").string(var_23.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_classify_document_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ClassifyDocumentInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_24) = &input.text {
        object.key("Text").string(var_24.as_str());
    }
    if let Some(var_25) = &input.endpoint_arn {
        object.key("EndpointArn").string(var_25.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_contains_pii_entities_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ContainsPiiEntitiesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_26) = &input.text {
        object.key("Text").string(var_26.as_str());
    }
    if let Some(var_27) = &input.language_code {
        object.key("LanguageCode").string(var_27.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_document_classifier_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDocumentClassifierInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_28) = &input.document_classifier_name {
        object.key("DocumentClassifierName").string(var_28.as_str());
    }
    if let Some(var_29) = &input.version_name {
        object.key("VersionName").string(var_29.as_str());
    }
    if let Some(var_30) = &input.data_access_role_arn {
        object.key("DataAccessRoleArn").string(var_30.as_str());
    }
    if let Some(var_31) = &input.tags {
        let mut array_32 = object.key("Tags").start_array();
        for item_33 in var_31 {
            {
                #[allow(unused_mut)]
                let mut object_34 = array_32.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_34, item_33)?;
                object_34.finish();
            }
        }
        array_32.finish();
    }
    if let Some(var_35) = &input.input_data_config {
        #[allow(unused_mut)]
        let mut object_36 = object.key("InputDataConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_document_classifier_input_data_config(
            &mut object_36,
            var_35,
        )?;
        object_36.finish();
    }
    if let Some(var_37) = &input.output_data_config {
        #[allow(unused_mut)]
        let mut object_38 = object.key("OutputDataConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_document_classifier_output_data_config(
            &mut object_38,
            var_37,
        )?;
        object_38.finish();
    }
    if let Some(var_39) = &input.client_request_token {
        object.key("ClientRequestToken").string(var_39.as_str());
    }
    if let Some(var_40) = &input.language_code {
        object.key("LanguageCode").string(var_40.as_str());
    }
    if let Some(var_41) = &input.volume_kms_key_id {
        object.key("VolumeKmsKeyId").string(var_41.as_str());
    }
    if let Some(var_42) = &input.vpc_config {
        #[allow(unused_mut)]
        let mut object_43 = object.key("VpcConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_vpc_config(&mut object_43, var_42)?;
        object_43.finish();
    }
    if let Some(var_44) = &input.mode {
        object.key("Mode").string(var_44.as_str());
    }
    if let Some(var_45) = &input.model_kms_key_id {
        object.key("ModelKmsKeyId").string(var_45.as_str());
    }
    if let Some(var_46) = &input.model_policy {
        object.key("ModelPolicy").string(var_46.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_endpoint_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateEndpointInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_47) = &input.endpoint_name {
        object.key("EndpointName").string(var_47.as_str());
    }
    if let Some(var_48) = &input.model_arn {
        object.key("ModelArn").string(var_48.as_str());
    }
    if let Some(var_49) = &input.desired_inference_units {
        object.key("DesiredInferenceUnits").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_49).into()),
        );
    }
    if let Some(var_50) = &input.client_request_token {
        object.key("ClientRequestToken").string(var_50.as_str());
    }
    if let Some(var_51) = &input.tags {
        let mut array_52 = object.key("Tags").start_array();
        for item_53 in var_51 {
            {
                #[allow(unused_mut)]
                let mut object_54 = array_52.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_54, item_53)?;
                object_54.finish();
            }
        }
        array_52.finish();
    }
    if let Some(var_55) = &input.data_access_role_arn {
        object.key("DataAccessRoleArn").string(var_55.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_entity_recognizer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateEntityRecognizerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_56) = &input.recognizer_name {
        object.key("RecognizerName").string(var_56.as_str());
    }
    if let Some(var_57) = &input.version_name {
        object.key("VersionName").string(var_57.as_str());
    }
    if let Some(var_58) = &input.data_access_role_arn {
        object.key("DataAccessRoleArn").string(var_58.as_str());
    }
    if let Some(var_59) = &input.tags {
        let mut array_60 = object.key("Tags").start_array();
        for item_61 in var_59 {
            {
                #[allow(unused_mut)]
                let mut object_62 = array_60.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_62, item_61)?;
                object_62.finish();
            }
        }
        array_60.finish();
    }
    if let Some(var_63) = &input.input_data_config {
        #[allow(unused_mut)]
        let mut object_64 = object.key("InputDataConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_entity_recognizer_input_data_config(
            &mut object_64,
            var_63,
        )?;
        object_64.finish();
    }
    if let Some(var_65) = &input.client_request_token {
        object.key("ClientRequestToken").string(var_65.as_str());
    }
    if let Some(var_66) = &input.language_code {
        object.key("LanguageCode").string(var_66.as_str());
    }
    if let Some(var_67) = &input.volume_kms_key_id {
        object.key("VolumeKmsKeyId").string(var_67.as_str());
    }
    if let Some(var_68) = &input.vpc_config {
        #[allow(unused_mut)]
        let mut object_69 = object.key("VpcConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_vpc_config(&mut object_69, var_68)?;
        object_69.finish();
    }
    if let Some(var_70) = &input.model_kms_key_id {
        object.key("ModelKmsKeyId").string(var_70.as_str());
    }
    if let Some(var_71) = &input.model_policy {
        object.key("ModelPolicy").string(var_71.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_document_classifier_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteDocumentClassifierInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_72) = &input.document_classifier_arn {
        object.key("DocumentClassifierArn").string(var_72.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_endpoint_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteEndpointInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_73) = &input.endpoint_arn {
        object.key("EndpointArn").string(var_73.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_entity_recognizer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteEntityRecognizerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_74) = &input.entity_recognizer_arn {
        object.key("EntityRecognizerArn").string(var_74.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_resource_policy_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteResourcePolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_75) = &input.resource_arn {
        object.key("ResourceArn").string(var_75.as_str());
    }
    if let Some(var_76) = &input.policy_revision_id {
        object.key("PolicyRevisionId").string(var_76.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_document_classification_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeDocumentClassificationJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_77) = &input.job_id {
        object.key("JobId").string(var_77.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_document_classifier_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeDocumentClassifierInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_78) = &input.document_classifier_arn {
        object.key("DocumentClassifierArn").string(var_78.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_dominant_language_detection_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeDominantLanguageDetectionJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_79) = &input.job_id {
        object.key("JobId").string(var_79.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_endpoint_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeEndpointInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_80) = &input.endpoint_arn {
        object.key("EndpointArn").string(var_80.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_entities_detection_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeEntitiesDetectionJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_81) = &input.job_id {
        object.key("JobId").string(var_81.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_entity_recognizer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeEntityRecognizerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_82) = &input.entity_recognizer_arn {
        object.key("EntityRecognizerArn").string(var_82.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_events_detection_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeEventsDetectionJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_83) = &input.job_id {
        object.key("JobId").string(var_83.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_key_phrases_detection_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeKeyPhrasesDetectionJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_84) = &input.job_id {
        object.key("JobId").string(var_84.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_pii_entities_detection_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribePiiEntitiesDetectionJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_85) = &input.job_id {
        object.key("JobId").string(var_85.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_resource_policy_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeResourcePolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_86) = &input.resource_arn {
        object.key("ResourceArn").string(var_86.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_sentiment_detection_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeSentimentDetectionJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_87) = &input.job_id {
        object.key("JobId").string(var_87.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_targeted_sentiment_detection_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeTargetedSentimentDetectionJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_88) = &input.job_id {
        object.key("JobId").string(var_88.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_topics_detection_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeTopicsDetectionJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_89) = &input.job_id {
        object.key("JobId").string(var_89.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detect_dominant_language_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetectDominantLanguageInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_90) = &input.text {
        object.key("Text").string(var_90.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detect_entities_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetectEntitiesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_91) = &input.text {
        object.key("Text").string(var_91.as_str());
    }
    if let Some(var_92) = &input.language_code {
        object.key("LanguageCode").string(var_92.as_str());
    }
    if let Some(var_93) = &input.endpoint_arn {
        object.key("EndpointArn").string(var_93.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detect_key_phrases_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetectKeyPhrasesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_94) = &input.text {
        object.key("Text").string(var_94.as_str());
    }
    if let Some(var_95) = &input.language_code {
        object.key("LanguageCode").string(var_95.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detect_pii_entities_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetectPiiEntitiesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_96) = &input.text {
        object.key("Text").string(var_96.as_str());
    }
    if let Some(var_97) = &input.language_code {
        object.key("LanguageCode").string(var_97.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detect_sentiment_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetectSentimentInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_98) = &input.text {
        object.key("Text").string(var_98.as_str());
    }
    if let Some(var_99) = &input.language_code {
        object.key("LanguageCode").string(var_99.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detect_syntax_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetectSyntaxInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_100) = &input.text {
        object.key("Text").string(var_100.as_str());
    }
    if let Some(var_101) = &input.language_code {
        object.key("LanguageCode").string(var_101.as_str());
    }
    Ok(())
}

Returns all the &str values of the enum members.

Trait Implementations§

Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more