#[non_exhaustive]
pub enum InstanceRoleType {
    Core,
    Master,
    Task,
    Unknown(UnknownVariantValue),
}
Expand description

When writing a match expression against InstanceRoleType, 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 instanceroletype = unimplemented!();
match instanceroletype {
    InstanceRoleType::Core => { /* ... */ },
    InstanceRoleType::Master => { /* ... */ },
    InstanceRoleType::Task => { /* ... */ },
    other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
    _ => { /* ... */ },
}

The above code demonstrates that when instanceroletype represents NewFeature, the execution path will lead to the second last match arm, even though the enum does not contain a variant InstanceRoleType::NewFeature in the current version of SDK. The reason is that the variable other, created by the @ operator, is bound to InstanceRoleType::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 InstanceRoleType::NewFeature is defined. Specifically, when instanceroletype represents NewFeature, the execution path will hit the second last match arm as before by virtue of calling as_str on InstanceRoleType::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.
§

Core

§

Master

§

Task

§

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 665)
664
665
666
    fn as_ref(&self) -> &str {
        self.as_str()
    }
More examples
Hide additional examples
src/json_ser.rs (line 1253)
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
pub fn serialize_structure_crate_model_instance_group_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::InstanceGroupConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_253) = &input.name {
        object.key("Name").string(var_253.as_str());
    }
    if let Some(var_254) = &input.market {
        object.key("Market").string(var_254.as_str());
    }
    if let Some(var_255) = &input.instance_role {
        object.key("InstanceRole").string(var_255.as_str());
    }
    if let Some(var_256) = &input.bid_price {
        object.key("BidPrice").string(var_256.as_str());
    }
    if let Some(var_257) = &input.instance_type {
        object.key("InstanceType").string(var_257.as_str());
    }
    if let Some(var_258) = &input.instance_count {
        object.key("InstanceCount").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_258).into()),
        );
    }
    if let Some(var_259) = &input.configurations {
        let mut array_260 = object.key("Configurations").start_array();
        for item_261 in var_259 {
            {
                #[allow(unused_mut)]
                let mut object_262 = array_260.value().start_object();
                crate::json_ser::serialize_structure_crate_model_configuration(
                    &mut object_262,
                    item_261,
                )?;
                object_262.finish();
            }
        }
        array_260.finish();
    }
    if let Some(var_263) = &input.ebs_configuration {
        #[allow(unused_mut)]
        let mut object_264 = object.key("EbsConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_ebs_configuration(
            &mut object_264,
            var_263,
        )?;
        object_264.finish();
    }
    if let Some(var_265) = &input.auto_scaling_policy {
        #[allow(unused_mut)]
        let mut object_266 = object.key("AutoScalingPolicy").start_object();
        crate::json_ser::serialize_structure_crate_model_auto_scaling_policy(
            &mut object_266,
            var_265,
        )?;
        object_266.finish();
    }
    if let Some(var_267) = &input.custom_ami_id {
        object.key("CustomAmiId").string(var_267.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_step_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::StepConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_268) = &input.name {
        object.key("Name").string(var_268.as_str());
    }
    if let Some(var_269) = &input.action_on_failure {
        object.key("ActionOnFailure").string(var_269.as_str());
    }
    if let Some(var_270) = &input.hadoop_jar_step {
        #[allow(unused_mut)]
        let mut object_271 = object.key("HadoopJarStep").start_object();
        crate::json_ser::serialize_structure_crate_model_hadoop_jar_step_config(
            &mut object_271,
            var_270,
        )?;
        object_271.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_tag(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Tag,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_272) = &input.key {
        object.key("Key").string(var_272.as_str());
    }
    if let Some(var_273) = &input.value {
        object.key("Value").string(var_273.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_release_label_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ReleaseLabelFilter,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_274) = &input.prefix {
        object.key("Prefix").string(var_274.as_str());
    }
    if let Some(var_275) = &input.application {
        object.key("Application").string(var_275.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_instance_fleet_modify_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::InstanceFleetModifyConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_276) = &input.instance_fleet_id {
        object.key("InstanceFleetId").string(var_276.as_str());
    }
    if let Some(var_277) = &input.target_on_demand_capacity {
        object.key("TargetOnDemandCapacity").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_277).into()),
        );
    }
    if let Some(var_278) = &input.target_spot_capacity {
        object.key("TargetSpotCapacity").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_278).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_instance_group_modify_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::InstanceGroupModifyConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_279) = &input.instance_group_id {
        object.key("InstanceGroupId").string(var_279.as_str());
    }
    if let Some(var_280) = &input.instance_count {
        object.key("InstanceCount").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_280).into()),
        );
    }
    if let Some(var_281) = &input.ec2_instance_ids_to_terminate {
        let mut array_282 = object.key("EC2InstanceIdsToTerminate").start_array();
        for item_283 in var_281 {
            {
                array_282.value().string(item_283.as_str());
            }
        }
        array_282.finish();
    }
    if let Some(var_284) = &input.shrink_policy {
        #[allow(unused_mut)]
        let mut object_285 = object.key("ShrinkPolicy").start_object();
        crate::json_ser::serialize_structure_crate_model_shrink_policy(&mut object_285, var_284)?;
        object_285.finish();
    }
    if let Some(var_286) = &input.reconfiguration_type {
        object.key("ReconfigurationType").string(var_286.as_str());
    }
    if let Some(var_287) = &input.configurations {
        let mut array_288 = object.key("Configurations").start_array();
        for item_289 in var_287 {
            {
                #[allow(unused_mut)]
                let mut object_290 = array_288.value().start_object();
                crate::json_ser::serialize_structure_crate_model_configuration(
                    &mut object_290,
                    item_289,
                )?;
                object_290.finish();
            }
        }
        array_288.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_auto_scaling_policy(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::AutoScalingPolicy,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_291) = &input.constraints {
        #[allow(unused_mut)]
        let mut object_292 = object.key("Constraints").start_object();
        crate::json_ser::serialize_structure_crate_model_scaling_constraints(
            &mut object_292,
            var_291,
        )?;
        object_292.finish();
    }
    if let Some(var_293) = &input.rules {
        let mut array_294 = object.key("Rules").start_array();
        for item_295 in var_293 {
            {
                #[allow(unused_mut)]
                let mut object_296 = array_294.value().start_object();
                crate::json_ser::serialize_structure_crate_model_scaling_rule(
                    &mut object_296,
                    item_295,
                )?;
                object_296.finish();
            }
        }
        array_294.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_auto_termination_policy(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::AutoTerminationPolicy,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if input.idle_timeout != 0 {
        object.key("IdleTimeout").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.idle_timeout).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_block_public_access_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::BlockPublicAccessConfiguration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    {
        object
            .key("BlockPublicSecurityGroupRules")
            .boolean(input.block_public_security_group_rules);
    }
    if let Some(var_297) = &input.permitted_public_security_group_rule_ranges {
        let mut array_298 = object
            .key("PermittedPublicSecurityGroupRuleRanges")
            .start_array();
        for item_299 in var_297 {
            {
                #[allow(unused_mut)]
                let mut object_300 = array_298.value().start_object();
                crate::json_ser::serialize_structure_crate_model_port_range(
                    &mut object_300,
                    item_299,
                )?;
                object_300.finish();
            }
        }
        array_298.finish();
    }
    if let Some(var_301) = &input.classification {
        object.key("Classification").string(var_301.as_str());
    }
    if let Some(var_302) = &input.configurations {
        let mut array_303 = object.key("Configurations").start_array();
        for item_304 in var_302 {
            {
                #[allow(unused_mut)]
                let mut object_305 = array_303.value().start_object();
                crate::json_ser::serialize_structure_crate_model_configuration(
                    &mut object_305,
                    item_304,
                )?;
                object_305.finish();
            }
        }
        array_303.finish();
    }
    if let Some(var_306) = &input.properties {
        #[allow(unused_mut)]
        let mut object_307 = object.key("Properties").start_object();
        for (key_308, value_309) in var_306 {
            {
                object_307.key(key_308.as_str()).string(value_309.as_str());
            }
        }
        object_307.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_managed_scaling_policy(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ManagedScalingPolicy,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_310) = &input.compute_limits {
        #[allow(unused_mut)]
        let mut object_311 = object.key("ComputeLimits").start_object();
        crate::json_ser::serialize_structure_crate_model_compute_limits(&mut object_311, var_310)?;
        object_311.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_job_flow_instances_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::JobFlowInstancesConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_312) = &input.master_instance_type {
        object.key("MasterInstanceType").string(var_312.as_str());
    }
    if let Some(var_313) = &input.slave_instance_type {
        object.key("SlaveInstanceType").string(var_313.as_str());
    }
    if let Some(var_314) = &input.instance_count {
        object.key("InstanceCount").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_314).into()),
        );
    }
    if let Some(var_315) = &input.instance_groups {
        let mut array_316 = object.key("InstanceGroups").start_array();
        for item_317 in var_315 {
            {
                #[allow(unused_mut)]
                let mut object_318 = array_316.value().start_object();
                crate::json_ser::serialize_structure_crate_model_instance_group_config(
                    &mut object_318,
                    item_317,
                )?;
                object_318.finish();
            }
        }
        array_316.finish();
    }
    if let Some(var_319) = &input.instance_fleets {
        let mut array_320 = object.key("InstanceFleets").start_array();
        for item_321 in var_319 {
            {
                #[allow(unused_mut)]
                let mut object_322 = array_320.value().start_object();
                crate::json_ser::serialize_structure_crate_model_instance_fleet_config(
                    &mut object_322,
                    item_321,
                )?;
                object_322.finish();
            }
        }
        array_320.finish();
    }
    if let Some(var_323) = &input.ec2_key_name {
        object.key("Ec2KeyName").string(var_323.as_str());
    }
    if let Some(var_324) = &input.placement {
        #[allow(unused_mut)]
        let mut object_325 = object.key("Placement").start_object();
        crate::json_ser::serialize_structure_crate_model_placement_type(&mut object_325, var_324)?;
        object_325.finish();
    }
    if input.keep_job_flow_alive_when_no_steps {
        object
            .key("KeepJobFlowAliveWhenNoSteps")
            .boolean(input.keep_job_flow_alive_when_no_steps);
    }
    if input.termination_protected {
        object
            .key("TerminationProtected")
            .boolean(input.termination_protected);
    }
    if let Some(var_326) = &input.hadoop_version {
        object.key("HadoopVersion").string(var_326.as_str());
    }
    if let Some(var_327) = &input.ec2_subnet_id {
        object.key("Ec2SubnetId").string(var_327.as_str());
    }
    if let Some(var_328) = &input.ec2_subnet_ids {
        let mut array_329 = object.key("Ec2SubnetIds").start_array();
        for item_330 in var_328 {
            {
                array_329.value().string(item_330.as_str());
            }
        }
        array_329.finish();
    }
    if let Some(var_331) = &input.emr_managed_master_security_group {
        object
            .key("EmrManagedMasterSecurityGroup")
            .string(var_331.as_str());
    }
    if let Some(var_332) = &input.emr_managed_slave_security_group {
        object
            .key("EmrManagedSlaveSecurityGroup")
            .string(var_332.as_str());
    }
    if let Some(var_333) = &input.service_access_security_group {
        object
            .key("ServiceAccessSecurityGroup")
            .string(var_333.as_str());
    }
    if let Some(var_334) = &input.additional_master_security_groups {
        let mut array_335 = object.key("AdditionalMasterSecurityGroups").start_array();
        for item_336 in var_334 {
            {
                array_335.value().string(item_336.as_str());
            }
        }
        array_335.finish();
    }
    if let Some(var_337) = &input.additional_slave_security_groups {
        let mut array_338 = object.key("AdditionalSlaveSecurityGroups").start_array();
        for item_339 in var_337 {
            {
                array_338.value().string(item_339.as_str());
            }
        }
        array_338.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_bootstrap_action_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::BootstrapActionConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_340) = &input.name {
        object.key("Name").string(var_340.as_str());
    }
    if let Some(var_341) = &input.script_bootstrap_action {
        #[allow(unused_mut)]
        let mut object_342 = object.key("ScriptBootstrapAction").start_object();
        crate::json_ser::serialize_structure_crate_model_script_bootstrap_action_config(
            &mut object_342,
            var_341,
        )?;
        object_342.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_supported_product_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::SupportedProductConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_343) = &input.name {
        object.key("Name").string(var_343.as_str());
    }
    if let Some(var_344) = &input.args {
        let mut array_345 = object.key("Args").start_array();
        for item_346 in var_344 {
            {
                array_345.value().string(item_346.as_str());
            }
        }
        array_345.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_application(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Application,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_347) = &input.name {
        object.key("Name").string(var_347.as_str());
    }
    if let Some(var_348) = &input.version {
        object.key("Version").string(var_348.as_str());
    }
    if let Some(var_349) = &input.args {
        let mut array_350 = object.key("Args").start_array();
        for item_351 in var_349 {
            {
                array_350.value().string(item_351.as_str());
            }
        }
        array_350.finish();
    }
    if let Some(var_352) = &input.additional_info {
        #[allow(unused_mut)]
        let mut object_353 = object.key("AdditionalInfo").start_object();
        for (key_354, value_355) in var_352 {
            {
                object_353.key(key_354.as_str()).string(value_355.as_str());
            }
        }
        object_353.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Configuration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_356) = &input.classification {
        object.key("Classification").string(var_356.as_str());
    }
    if let Some(var_357) = &input.configurations {
        let mut array_358 = object.key("Configurations").start_array();
        for item_359 in var_357 {
            {
                #[allow(unused_mut)]
                let mut object_360 = array_358.value().start_object();
                crate::json_ser::serialize_structure_crate_model_configuration(
                    &mut object_360,
                    item_359,
                )?;
                object_360.finish();
            }
        }
        array_358.finish();
    }
    if let Some(var_361) = &input.properties {
        #[allow(unused_mut)]
        let mut object_362 = object.key("Properties").start_object();
        for (key_363, value_364) in var_361 {
            {
                object_362.key(key_363.as_str()).string(value_364.as_str());
            }
        }
        object_362.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_kerberos_attributes(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::KerberosAttributes,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_365) = &input.realm {
        object.key("Realm").string(var_365.as_str());
    }
    if let Some(var_366) = &input.kdc_admin_password {
        object.key("KdcAdminPassword").string(var_366.as_str());
    }
    if let Some(var_367) = &input.cross_realm_trust_principal_password {
        object
            .key("CrossRealmTrustPrincipalPassword")
            .string(var_367.as_str());
    }
    if let Some(var_368) = &input.ad_domain_join_user {
        object.key("ADDomainJoinUser").string(var_368.as_str());
    }
    if let Some(var_369) = &input.ad_domain_join_password {
        object.key("ADDomainJoinPassword").string(var_369.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_placement_group_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::PlacementGroupConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_370) = &input.instance_role {
        object.key("InstanceRole").string(var_370.as_str());
    }
    if let Some(var_371) = &input.placement_strategy {
        object.key("PlacementStrategy").string(var_371.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