#[non_exhaustive]pub enum ResourceType {
Show 408 variants
Certificate,
AcmpcaCertificateAuthority,
AcmpcaCertificateAuthorityActivation,
ApsRuleGroupsNamespace,
AccessAnalyzerAnalyzer,
AmazonMqBroker,
AmplifyApp,
AmplifyBranch,
RestApi,
Stage,
Api,
StageV2,
AppConfigApplication,
AppConfigConfigurationProfile,
AppConfigDeploymentStrategy,
AppConfigEnvironment,
AppConfigHostedConfigurationVersion,
AppFlowFlow,
AppIntegrationsEventIntegration,
AppMeshGatewayRoute,
AppMeshMesh,
AppMeshRoute,
AppMeshVirtualGateway,
AppMeshVirtualNode,
AppMeshVirtualRouter,
AppMeshVirtualService,
AppRunnerService,
AppRunnerVpcConnector,
AppStreamApplication,
AppStreamDirectoryConfig,
AppStreamFleet,
AppStreamStack,
AppSyncGraphQlApi,
AthenaDataCatalog,
AthenaPreparedStatement,
AthenaWorkGroup,
AuditManagerAssessment,
AutoScalingGroup,
LaunchConfiguration,
ScalingPolicy,
ScheduledAction,
AutoScalingWarmPool,
BackupPlan,
BackupSelection,
BackupVault,
BackupRecoveryPoint,
BackupReportPlan,
BatchComputeEnvironment,
BatchJobQueue,
BatchSchedulingPolicy,
BudgetsBudgetsAction,
CassandraKeyspace,
Cloud9EnvironmentEc2,
Stack,
Distribution,
StreamingDistribution,
Trail,
Alarm,
CloudWatchMetricStream,
CodeArtifactRepository,
Project,
CodeBuildReportGroup,
CodeDeployApplication,
CodeDeployDeploymentConfig,
CodeDeployDeploymentGroup,
CodeGuruProfilerProfilingGroup,
CodeGuruReviewerRepositoryAssociation,
Pipeline,
CognitoUserPool,
CognitoUserPoolClient,
CognitoUserPoolGroup,
ConformancePackCompliance,
ResourceCompliance,
ConnectInstance,
ConnectPhoneNumber,
ConnectQuickConnect,
CustomerProfilesDomain,
CustomerProfilesObjectType,
DmsCertificate,
DmsEndpoint,
DmsEventSubscription,
DmsReplicationSubnetGroup,
DataSyncLocationEfs,
DataSyncLocationFSxLustre,
DataSyncLocationFSxWindows,
DataSyncLocationHdfs,
DataSyncLocationNfs,
DataSyncLocationObjectStorage,
DataSyncLocationS3,
DataSyncLocationSmb,
DataSyncTask,
DetectiveGraph,
DeviceFarmInstanceProfile,
DeviceFarmProject,
DeviceFarmTestGridProject,
Table,
Ec2CapacityReservation,
Ec2CarrierGateway,
Ec2ClientVpnEndpoint,
CustomerGateway,
Ec2DhcpOptions,
Ec2Ec2Fleet,
Eip,
EgressOnlyInternetGateway,
FlowLog,
Host,
Ec2Ipam,
Ec2IpamPool,
Ec2IpamScope,
Instance,
InternetGateway,
LaunchTemplate,
NatGateway,
NetworkAcl,
Ec2NetworkInsightsAccessScope,
NetworkInsightsAccessScopeAnalysis,
Ec2NetworkInsightsAnalysis,
Ec2NetworkInsightsPath,
NetworkInterface,
Ec2PrefixList,
RegisteredHaInstance,
RouteTable,
SecurityGroup,
Ec2SpotFleet,
Subnet,
Ec2SubnetRouteTableAssociation,
Ec2TrafficMirrorFilter,
Ec2TrafficMirrorSession,
Ec2TrafficMirrorTarget,
TransitGateway,
TransitGatewayAttachment,
Ec2TransitGatewayConnect,
Ec2TransitGatewayMulticastDomain,
TransitGatewayRouteTable,
Vpc,
VpcEndpoint,
VpcEndpointService,
VpcPeeringConnection,
VpnConnection,
VpnGateway,
Volume,
EcrPublicRepository,
EcrPullThroughCacheRule,
EcrRegistryPolicy,
EcrRepository,
EcsCapacityProvider,
EcsCluster,
EcsService,
EcsTaskDefinition,
EcsTaskSet,
EfsAccessPoint,
EfsFileSystem,
EksAddon,
EksCluster,
EksFargateProfile,
EksIdentityProviderConfig,
EmrSecurityConfiguration,
Application,
ApplicationVersion,
Environment,
LoadBalancer,
ListenerV2,
LoadBalancerV2,
Domain,
EventSchemasDiscoverer,
EventSchemasRegistry,
EventSchemasRegistryPolicy,
EventSchemasSchema,
EventsApiDestination,
EventsArchive,
EventsConnection,
EventsEndpoint,
EventsEventBus,
EventsRule,
EvidentlyLaunch,
EvidentlyProject,
FisExperimentTemplate,
ForecastDataset,
ForecastDatasetGroup,
FraudDetectorEntityType,
FraudDetectorLabel,
FraudDetectorOutcome,
FraudDetectorVariable,
GlobalAcceleratorAccelerator,
GlobalAcceleratorEndpointGroup,
GlobalAcceleratorListener,
GlueClassifier,
GlueJob,
GlueMlTransform,
GrafanaWorkspace,
GreengrassV2ComponentVersion,
GroundStationConfig,
GroundStationDataflowEndpointGroup,
GroundStationMissionProfile,
GuardDutyDetector,
GuardDutyFilter,
GuardDutyIpSet,
GuardDutyThreatIntelSet,
HealthLakeFhirDatastore,
Group,
IamInstanceProfile,
Policy,
Role,
IamsamlProvider,
IamServerCertificate,
User,
IvsChannel,
IvsPlaybackKeyPair,
IvsRecordingConfiguration,
ImageBuilderContainerRecipe,
ImageBuilderDistributionConfiguration,
ImageBuilderImagePipeline,
ImageBuilderImageRecipe,
ImageBuilderInfrastructureConfiguration,
InspectorV2Filter,
IoTAccountAuditConfiguration,
IoTAuthorizer,
IoTcaCertificate,
IoTCustomMetric,
IoTDimension,
IoTFleetMetric,
IoTJobTemplate,
IoTMitigationAction,
IoTPolicy,
IoTProvisioningTemplate,
IoTRoleAlias,
IoTScheduledAudit,
IoTSecurityProfile,
IoTAnalyticsChannel,
IoTAnalyticsDataset,
IoTAnalyticsDatastore,
IoTAnalyticsPipeline,
IoTEventsAlarmModel,
IoTEventsDetectorModel,
IoTEventsInput,
IoTSiteWiseAssetModel,
IoTSiteWiseDashboard,
IoTSiteWiseGateway,
IoTSiteWisePortal,
IoTSiteWiseProject,
IoTTwinMakerComponentType,
IoTTwinMakerEntity,
IoTTwinMakerScene,
IoTTwinMakerSyncJob,
IoTTwinMakerWorkspace,
IoTWirelessFuotaTask,
IoTWirelessMulticastGroup,
IoTWirelessServiceProfile,
KmsAlias,
Key,
KafkaConnectConnector,
KendraIndex,
KinesisStream,
KinesisStreamConsumer,
KinesisAnalyticsV2Application,
KinesisFirehoseDeliveryStream,
KinesisVideoSignalingChannel,
KinesisVideoStream,
LambdaCodeSigningConfig,
Function,
LexBot,
LexBotAlias,
LightsailBucket,
LightsailCertificate,
LightsailDisk,
LightsailStaticIp,
LogsDestination,
LookoutMetricsAlert,
LookoutVisionProject,
M2Environment,
MskBatchScramSecret,
MskCluster,
MskConfiguration,
MediaConnectFlowEntitlement,
MediaConnectFlowSource,
MediaConnectFlowVpcInterface,
MediaPackagePackagingConfiguration,
MediaPackagePackagingGroup,
MediaTailorPlaybackConfiguration,
NetworkFirewallFirewall,
NetworkFirewallFirewallPolicy,
NetworkFirewallRuleGroup,
NetworkManagerConnectPeer,
NetworkManagerCustomerGatewayAssociation,
NetworkManagerDevice,
NetworkManagerGlobalNetwork,
NetworkManagerLink,
NetworkManagerLinkAssociation,
NetworkManagerSite,
NetworkManagerTransitGatewayRegistration,
OpenSearchDomain,
PanoramaPackage,
PersonalizeDataset,
PersonalizeDatasetGroup,
PersonalizeSchema,
PersonalizeSolution,
PinpointApp,
PinpointApplicationSettings,
PinpointCampaign,
PinpointEmailChannel,
PinpointEmailTemplate,
PinpointEventStream,
PinpointInAppTemplate,
PinpointSegment,
QldbLedger,
QuickSightDataSource,
QuickSightTemplate,
QuickSightTheme,
DbCluster,
DbClusterSnapshot,
DbInstance,
DbSecurityGroup,
DbSnapshot,
DbSubnetGroup,
EventSubscription,
RdsGlobalCluster,
RdsOptionGroup,
RumAppMonitor,
Cluster,
ClusterParameterGroup,
ClusterSecurityGroup,
ClusterSnapshot,
ClusterSubnetGroup,
RedshiftEndpointAccess,
RedshiftEventSubscription,
RedshiftScheduledAction,
ResilienceHubApp,
ResilienceHubResiliencyPolicy,
ResourceExplorer2Index,
RoboMakerRobotApplication,
RoboMakerRobotApplicationVersion,
RoboMakerSimulationApplication,
Route53HostedZone,
Route53RecoveryControlCluster,
Route53RecoveryControlControlPanel,
Route53RecoveryControlRoutingControl,
Route53RecoveryControlSafetyRule,
Route53RecoveryReadinessCell,
Route53RecoveryReadinessReadinessCheck,
Route53RecoveryReadinessRecoveryGroup,
Route53RecoveryReadinessResourceSet,
Route53ResolverFirewallDomainList,
Route53ResolverFirewallRuleGroup,
Route53ResolverFirewallRuleGroupAssociation,
Route53ResolverResolverEndpoint,
Route53ResolverResolverQueryLoggingConfig,
Route53ResolverResolverQueryLoggingConfigAssociation,
Route53ResolverResolverRule,
Route53ResolverResolverRuleAssociation,
S3AccessPoint,
AccountPublicAccessBlock,
Bucket,
S3MultiRegionAccessPoint,
S3StorageLens,
SesConfigurationSet,
SesContactList,
SesReceiptFilter,
SesReceiptRuleSet,
SesTemplate,
Topic,
Queue,
AssociationCompliance,
SsmDocument,
FileData,
ManagedInstanceInventory,
PatchCompliance,
SageMakerAppImageConfig,
SageMakerCodeRepository,
SageMakerDomain,
SageMakerFeatureGroup,
SageMakerImage,
SageMakerModel,
SageMakerNotebookInstanceLifecycleConfig,
SageMakerWorkteam,
Secret,
CloudFormationProduct,
CloudFormationProvisionedProduct,
Portfolio,
ServiceDiscoveryHttpNamespace,
ServiceDiscoveryInstance,
ServiceDiscoveryPublicDnsNamespace,
ServiceDiscoveryService,
Protection,
RegionalProtection,
SignerSigningProfile,
StepFunctionsActivity,
StepFunctionsStateMachine,
TransferAgreement,
TransferCertificate,
TransferConnector,
TransferWorkflow,
RateBasedRule,
Rule,
RuleGroup,
WebAcl,
RegionalRateBasedRule,
RegionalRule,
RegionalRuleGroup,
RegionalWebAcl,
IpSetV2,
ManagedRuleSetV2,
RegexPatternSetV2,
RuleGroupV2,
WebAclv2,
WorkSpacesConnectionAlias,
WorkSpacesWorkspace,
EncryptionConfig,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against ResourceType
, 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 resourcetype = unimplemented!();
match resourcetype {
ResourceType::Certificate => { /* ... */ },
ResourceType::AcmpcaCertificateAuthority => { /* ... */ },
ResourceType::AcmpcaCertificateAuthorityActivation => { /* ... */ },
ResourceType::ApsRuleGroupsNamespace => { /* ... */ },
ResourceType::AccessAnalyzerAnalyzer => { /* ... */ },
ResourceType::AmazonMqBroker => { /* ... */ },
ResourceType::AmplifyApp => { /* ... */ },
ResourceType::AmplifyBranch => { /* ... */ },
ResourceType::RestApi => { /* ... */ },
ResourceType::Stage => { /* ... */ },
ResourceType::Api => { /* ... */ },
ResourceType::StageV2 => { /* ... */ },
ResourceType::AppConfigApplication => { /* ... */ },
ResourceType::AppConfigConfigurationProfile => { /* ... */ },
ResourceType::AppConfigDeploymentStrategy => { /* ... */ },
ResourceType::AppConfigEnvironment => { /* ... */ },
ResourceType::AppConfigHostedConfigurationVersion => { /* ... */ },
ResourceType::AppFlowFlow => { /* ... */ },
ResourceType::AppIntegrationsEventIntegration => { /* ... */ },
ResourceType::AppMeshGatewayRoute => { /* ... */ },
ResourceType::AppMeshMesh => { /* ... */ },
ResourceType::AppMeshRoute => { /* ... */ },
ResourceType::AppMeshVirtualGateway => { /* ... */ },
ResourceType::AppMeshVirtualNode => { /* ... */ },
ResourceType::AppMeshVirtualRouter => { /* ... */ },
ResourceType::AppMeshVirtualService => { /* ... */ },
ResourceType::AppRunnerService => { /* ... */ },
ResourceType::AppRunnerVpcConnector => { /* ... */ },
ResourceType::AppStreamApplication => { /* ... */ },
ResourceType::AppStreamDirectoryConfig => { /* ... */ },
ResourceType::AppStreamFleet => { /* ... */ },
ResourceType::AppStreamStack => { /* ... */ },
ResourceType::AppSyncGraphQlApi => { /* ... */ },
ResourceType::AthenaDataCatalog => { /* ... */ },
ResourceType::AthenaPreparedStatement => { /* ... */ },
ResourceType::AthenaWorkGroup => { /* ... */ },
ResourceType::AuditManagerAssessment => { /* ... */ },
ResourceType::AutoScalingGroup => { /* ... */ },
ResourceType::LaunchConfiguration => { /* ... */ },
ResourceType::ScalingPolicy => { /* ... */ },
ResourceType::ScheduledAction => { /* ... */ },
ResourceType::AutoScalingWarmPool => { /* ... */ },
ResourceType::BackupPlan => { /* ... */ },
ResourceType::BackupSelection => { /* ... */ },
ResourceType::BackupVault => { /* ... */ },
ResourceType::BackupRecoveryPoint => { /* ... */ },
ResourceType::BackupReportPlan => { /* ... */ },
ResourceType::BatchComputeEnvironment => { /* ... */ },
ResourceType::BatchJobQueue => { /* ... */ },
ResourceType::BatchSchedulingPolicy => { /* ... */ },
ResourceType::BudgetsBudgetsAction => { /* ... */ },
ResourceType::CassandraKeyspace => { /* ... */ },
ResourceType::Cloud9EnvironmentEc2 => { /* ... */ },
ResourceType::Stack => { /* ... */ },
ResourceType::Distribution => { /* ... */ },
ResourceType::StreamingDistribution => { /* ... */ },
ResourceType::Trail => { /* ... */ },
ResourceType::Alarm => { /* ... */ },
ResourceType::CloudWatchMetricStream => { /* ... */ },
ResourceType::CodeArtifactRepository => { /* ... */ },
ResourceType::Project => { /* ... */ },
ResourceType::CodeBuildReportGroup => { /* ... */ },
ResourceType::CodeDeployApplication => { /* ... */ },
ResourceType::CodeDeployDeploymentConfig => { /* ... */ },
ResourceType::CodeDeployDeploymentGroup => { /* ... */ },
ResourceType::CodeGuruProfilerProfilingGroup => { /* ... */ },
ResourceType::CodeGuruReviewerRepositoryAssociation => { /* ... */ },
ResourceType::Pipeline => { /* ... */ },
ResourceType::CognitoUserPool => { /* ... */ },
ResourceType::CognitoUserPoolClient => { /* ... */ },
ResourceType::CognitoUserPoolGroup => { /* ... */ },
ResourceType::ConformancePackCompliance => { /* ... */ },
ResourceType::ResourceCompliance => { /* ... */ },
ResourceType::ConnectInstance => { /* ... */ },
ResourceType::ConnectPhoneNumber => { /* ... */ },
ResourceType::ConnectQuickConnect => { /* ... */ },
ResourceType::CustomerProfilesDomain => { /* ... */ },
ResourceType::CustomerProfilesObjectType => { /* ... */ },
ResourceType::DmsCertificate => { /* ... */ },
ResourceType::DmsEndpoint => { /* ... */ },
ResourceType::DmsEventSubscription => { /* ... */ },
ResourceType::DmsReplicationSubnetGroup => { /* ... */ },
ResourceType::DataSyncLocationEfs => { /* ... */ },
ResourceType::DataSyncLocationFSxLustre => { /* ... */ },
ResourceType::DataSyncLocationFSxWindows => { /* ... */ },
ResourceType::DataSyncLocationHdfs => { /* ... */ },
ResourceType::DataSyncLocationNfs => { /* ... */ },
ResourceType::DataSyncLocationObjectStorage => { /* ... */ },
ResourceType::DataSyncLocationS3 => { /* ... */ },
ResourceType::DataSyncLocationSmb => { /* ... */ },
ResourceType::DataSyncTask => { /* ... */ },
ResourceType::DetectiveGraph => { /* ... */ },
ResourceType::DeviceFarmInstanceProfile => { /* ... */ },
ResourceType::DeviceFarmProject => { /* ... */ },
ResourceType::DeviceFarmTestGridProject => { /* ... */ },
ResourceType::Table => { /* ... */ },
ResourceType::Ec2CapacityReservation => { /* ... */ },
ResourceType::Ec2CarrierGateway => { /* ... */ },
ResourceType::Ec2ClientVpnEndpoint => { /* ... */ },
ResourceType::CustomerGateway => { /* ... */ },
ResourceType::Ec2DhcpOptions => { /* ... */ },
ResourceType::Ec2Ec2Fleet => { /* ... */ },
ResourceType::Eip => { /* ... */ },
ResourceType::EgressOnlyInternetGateway => { /* ... */ },
ResourceType::FlowLog => { /* ... */ },
ResourceType::Host => { /* ... */ },
ResourceType::Ec2Ipam => { /* ... */ },
ResourceType::Ec2IpamPool => { /* ... */ },
ResourceType::Ec2IpamScope => { /* ... */ },
ResourceType::Instance => { /* ... */ },
ResourceType::InternetGateway => { /* ... */ },
ResourceType::LaunchTemplate => { /* ... */ },
ResourceType::NatGateway => { /* ... */ },
ResourceType::NetworkAcl => { /* ... */ },
ResourceType::Ec2NetworkInsightsAccessScope => { /* ... */ },
ResourceType::NetworkInsightsAccessScopeAnalysis => { /* ... */ },
ResourceType::Ec2NetworkInsightsAnalysis => { /* ... */ },
ResourceType::Ec2NetworkInsightsPath => { /* ... */ },
ResourceType::NetworkInterface => { /* ... */ },
ResourceType::Ec2PrefixList => { /* ... */ },
ResourceType::RegisteredHaInstance => { /* ... */ },
ResourceType::RouteTable => { /* ... */ },
ResourceType::SecurityGroup => { /* ... */ },
ResourceType::Ec2SpotFleet => { /* ... */ },
ResourceType::Subnet => { /* ... */ },
ResourceType::Ec2SubnetRouteTableAssociation => { /* ... */ },
ResourceType::Ec2TrafficMirrorFilter => { /* ... */ },
ResourceType::Ec2TrafficMirrorSession => { /* ... */ },
ResourceType::Ec2TrafficMirrorTarget => { /* ... */ },
ResourceType::TransitGateway => { /* ... */ },
ResourceType::TransitGatewayAttachment => { /* ... */ },
ResourceType::Ec2TransitGatewayConnect => { /* ... */ },
ResourceType::Ec2TransitGatewayMulticastDomain => { /* ... */ },
ResourceType::TransitGatewayRouteTable => { /* ... */ },
ResourceType::Vpc => { /* ... */ },
ResourceType::VpcEndpoint => { /* ... */ },
ResourceType::VpcEndpointService => { /* ... */ },
ResourceType::VpcPeeringConnection => { /* ... */ },
ResourceType::VpnConnection => { /* ... */ },
ResourceType::VpnGateway => { /* ... */ },
ResourceType::Volume => { /* ... */ },
ResourceType::EcrPublicRepository => { /* ... */ },
ResourceType::EcrPullThroughCacheRule => { /* ... */ },
ResourceType::EcrRegistryPolicy => { /* ... */ },
ResourceType::EcrRepository => { /* ... */ },
ResourceType::EcsCapacityProvider => { /* ... */ },
ResourceType::EcsCluster => { /* ... */ },
ResourceType::EcsService => { /* ... */ },
ResourceType::EcsTaskDefinition => { /* ... */ },
ResourceType::EcsTaskSet => { /* ... */ },
ResourceType::EfsAccessPoint => { /* ... */ },
ResourceType::EfsFileSystem => { /* ... */ },
ResourceType::EksAddon => { /* ... */ },
ResourceType::EksCluster => { /* ... */ },
ResourceType::EksFargateProfile => { /* ... */ },
ResourceType::EksIdentityProviderConfig => { /* ... */ },
ResourceType::EmrSecurityConfiguration => { /* ... */ },
ResourceType::Application => { /* ... */ },
ResourceType::ApplicationVersion => { /* ... */ },
ResourceType::Environment => { /* ... */ },
ResourceType::LoadBalancer => { /* ... */ },
ResourceType::ListenerV2 => { /* ... */ },
ResourceType::LoadBalancerV2 => { /* ... */ },
ResourceType::Domain => { /* ... */ },
ResourceType::EventSchemasDiscoverer => { /* ... */ },
ResourceType::EventSchemasRegistry => { /* ... */ },
ResourceType::EventSchemasRegistryPolicy => { /* ... */ },
ResourceType::EventSchemasSchema => { /* ... */ },
ResourceType::EventsApiDestination => { /* ... */ },
ResourceType::EventsArchive => { /* ... */ },
ResourceType::EventsConnection => { /* ... */ },
ResourceType::EventsEndpoint => { /* ... */ },
ResourceType::EventsEventBus => { /* ... */ },
ResourceType::EventsRule => { /* ... */ },
ResourceType::EvidentlyLaunch => { /* ... */ },
ResourceType::EvidentlyProject => { /* ... */ },
ResourceType::FisExperimentTemplate => { /* ... */ },
ResourceType::ForecastDataset => { /* ... */ },
ResourceType::ForecastDatasetGroup => { /* ... */ },
ResourceType::FraudDetectorEntityType => { /* ... */ },
ResourceType::FraudDetectorLabel => { /* ... */ },
ResourceType::FraudDetectorOutcome => { /* ... */ },
ResourceType::FraudDetectorVariable => { /* ... */ },
ResourceType::GlobalAcceleratorAccelerator => { /* ... */ },
ResourceType::GlobalAcceleratorEndpointGroup => { /* ... */ },
ResourceType::GlobalAcceleratorListener => { /* ... */ },
ResourceType::GlueClassifier => { /* ... */ },
ResourceType::GlueJob => { /* ... */ },
ResourceType::GlueMlTransform => { /* ... */ },
ResourceType::GrafanaWorkspace => { /* ... */ },
ResourceType::GreengrassV2ComponentVersion => { /* ... */ },
ResourceType::GroundStationConfig => { /* ... */ },
ResourceType::GroundStationDataflowEndpointGroup => { /* ... */ },
ResourceType::GroundStationMissionProfile => { /* ... */ },
ResourceType::GuardDutyDetector => { /* ... */ },
ResourceType::GuardDutyFilter => { /* ... */ },
ResourceType::GuardDutyIpSet => { /* ... */ },
ResourceType::GuardDutyThreatIntelSet => { /* ... */ },
ResourceType::HealthLakeFhirDatastore => { /* ... */ },
ResourceType::Group => { /* ... */ },
ResourceType::IamInstanceProfile => { /* ... */ },
ResourceType::Policy => { /* ... */ },
ResourceType::Role => { /* ... */ },
ResourceType::IamsamlProvider => { /* ... */ },
ResourceType::IamServerCertificate => { /* ... */ },
ResourceType::User => { /* ... */ },
ResourceType::IvsChannel => { /* ... */ },
ResourceType::IvsPlaybackKeyPair => { /* ... */ },
ResourceType::IvsRecordingConfiguration => { /* ... */ },
ResourceType::ImageBuilderContainerRecipe => { /* ... */ },
ResourceType::ImageBuilderDistributionConfiguration => { /* ... */ },
ResourceType::ImageBuilderImagePipeline => { /* ... */ },
ResourceType::ImageBuilderImageRecipe => { /* ... */ },
ResourceType::ImageBuilderInfrastructureConfiguration => { /* ... */ },
ResourceType::InspectorV2Filter => { /* ... */ },
ResourceType::IoTAccountAuditConfiguration => { /* ... */ },
ResourceType::IoTAuthorizer => { /* ... */ },
ResourceType::IoTcaCertificate => { /* ... */ },
ResourceType::IoTCustomMetric => { /* ... */ },
ResourceType::IoTDimension => { /* ... */ },
ResourceType::IoTFleetMetric => { /* ... */ },
ResourceType::IoTJobTemplate => { /* ... */ },
ResourceType::IoTMitigationAction => { /* ... */ },
ResourceType::IoTPolicy => { /* ... */ },
ResourceType::IoTProvisioningTemplate => { /* ... */ },
ResourceType::IoTRoleAlias => { /* ... */ },
ResourceType::IoTScheduledAudit => { /* ... */ },
ResourceType::IoTSecurityProfile => { /* ... */ },
ResourceType::IoTAnalyticsChannel => { /* ... */ },
ResourceType::IoTAnalyticsDataset => { /* ... */ },
ResourceType::IoTAnalyticsDatastore => { /* ... */ },
ResourceType::IoTAnalyticsPipeline => { /* ... */ },
ResourceType::IoTEventsAlarmModel => { /* ... */ },
ResourceType::IoTEventsDetectorModel => { /* ... */ },
ResourceType::IoTEventsInput => { /* ... */ },
ResourceType::IoTSiteWiseAssetModel => { /* ... */ },
ResourceType::IoTSiteWiseDashboard => { /* ... */ },
ResourceType::IoTSiteWiseGateway => { /* ... */ },
ResourceType::IoTSiteWisePortal => { /* ... */ },
ResourceType::IoTSiteWiseProject => { /* ... */ },
ResourceType::IoTTwinMakerComponentType => { /* ... */ },
ResourceType::IoTTwinMakerEntity => { /* ... */ },
ResourceType::IoTTwinMakerScene => { /* ... */ },
ResourceType::IoTTwinMakerSyncJob => { /* ... */ },
ResourceType::IoTTwinMakerWorkspace => { /* ... */ },
ResourceType::IoTWirelessFuotaTask => { /* ... */ },
ResourceType::IoTWirelessMulticastGroup => { /* ... */ },
ResourceType::IoTWirelessServiceProfile => { /* ... */ },
ResourceType::KmsAlias => { /* ... */ },
ResourceType::Key => { /* ... */ },
ResourceType::KafkaConnectConnector => { /* ... */ },
ResourceType::KendraIndex => { /* ... */ },
ResourceType::KinesisStream => { /* ... */ },
ResourceType::KinesisStreamConsumer => { /* ... */ },
ResourceType::KinesisAnalyticsV2Application => { /* ... */ },
ResourceType::KinesisFirehoseDeliveryStream => { /* ... */ },
ResourceType::KinesisVideoSignalingChannel => { /* ... */ },
ResourceType::KinesisVideoStream => { /* ... */ },
ResourceType::LambdaCodeSigningConfig => { /* ... */ },
ResourceType::Function => { /* ... */ },
ResourceType::LexBot => { /* ... */ },
ResourceType::LexBotAlias => { /* ... */ },
ResourceType::LightsailBucket => { /* ... */ },
ResourceType::LightsailCertificate => { /* ... */ },
ResourceType::LightsailDisk => { /* ... */ },
ResourceType::LightsailStaticIp => { /* ... */ },
ResourceType::LogsDestination => { /* ... */ },
ResourceType::LookoutMetricsAlert => { /* ... */ },
ResourceType::LookoutVisionProject => { /* ... */ },
ResourceType::M2Environment => { /* ... */ },
ResourceType::MskBatchScramSecret => { /* ... */ },
ResourceType::MskCluster => { /* ... */ },
ResourceType::MskConfiguration => { /* ... */ },
ResourceType::MediaConnectFlowEntitlement => { /* ... */ },
ResourceType::MediaConnectFlowSource => { /* ... */ },
ResourceType::MediaConnectFlowVpcInterface => { /* ... */ },
ResourceType::MediaPackagePackagingConfiguration => { /* ... */ },
ResourceType::MediaPackagePackagingGroup => { /* ... */ },
ResourceType::MediaTailorPlaybackConfiguration => { /* ... */ },
ResourceType::NetworkFirewallFirewall => { /* ... */ },
ResourceType::NetworkFirewallFirewallPolicy => { /* ... */ },
ResourceType::NetworkFirewallRuleGroup => { /* ... */ },
ResourceType::NetworkManagerConnectPeer => { /* ... */ },
ResourceType::NetworkManagerCustomerGatewayAssociation => { /* ... */ },
ResourceType::NetworkManagerDevice => { /* ... */ },
ResourceType::NetworkManagerGlobalNetwork => { /* ... */ },
ResourceType::NetworkManagerLink => { /* ... */ },
ResourceType::NetworkManagerLinkAssociation => { /* ... */ },
ResourceType::NetworkManagerSite => { /* ... */ },
ResourceType::NetworkManagerTransitGatewayRegistration => { /* ... */ },
ResourceType::OpenSearchDomain => { /* ... */ },
ResourceType::PanoramaPackage => { /* ... */ },
ResourceType::PersonalizeDataset => { /* ... */ },
ResourceType::PersonalizeDatasetGroup => { /* ... */ },
ResourceType::PersonalizeSchema => { /* ... */ },
ResourceType::PersonalizeSolution => { /* ... */ },
ResourceType::PinpointApp => { /* ... */ },
ResourceType::PinpointApplicationSettings => { /* ... */ },
ResourceType::PinpointCampaign => { /* ... */ },
ResourceType::PinpointEmailChannel => { /* ... */ },
ResourceType::PinpointEmailTemplate => { /* ... */ },
ResourceType::PinpointEventStream => { /* ... */ },
ResourceType::PinpointInAppTemplate => { /* ... */ },
ResourceType::PinpointSegment => { /* ... */ },
ResourceType::QldbLedger => { /* ... */ },
ResourceType::QuickSightDataSource => { /* ... */ },
ResourceType::QuickSightTemplate => { /* ... */ },
ResourceType::QuickSightTheme => { /* ... */ },
ResourceType::DbCluster => { /* ... */ },
ResourceType::DbClusterSnapshot => { /* ... */ },
ResourceType::DbInstance => { /* ... */ },
ResourceType::DbSecurityGroup => { /* ... */ },
ResourceType::DbSnapshot => { /* ... */ },
ResourceType::DbSubnetGroup => { /* ... */ },
ResourceType::EventSubscription => { /* ... */ },
ResourceType::RdsGlobalCluster => { /* ... */ },
ResourceType::RdsOptionGroup => { /* ... */ },
ResourceType::RumAppMonitor => { /* ... */ },
ResourceType::Cluster => { /* ... */ },
ResourceType::ClusterParameterGroup => { /* ... */ },
ResourceType::ClusterSecurityGroup => { /* ... */ },
ResourceType::ClusterSnapshot => { /* ... */ },
ResourceType::ClusterSubnetGroup => { /* ... */ },
ResourceType::RedshiftEndpointAccess => { /* ... */ },
ResourceType::RedshiftEventSubscription => { /* ... */ },
ResourceType::RedshiftScheduledAction => { /* ... */ },
ResourceType::ResilienceHubApp => { /* ... */ },
ResourceType::ResilienceHubResiliencyPolicy => { /* ... */ },
ResourceType::ResourceExplorer2Index => { /* ... */ },
ResourceType::RoboMakerRobotApplication => { /* ... */ },
ResourceType::RoboMakerRobotApplicationVersion => { /* ... */ },
ResourceType::RoboMakerSimulationApplication => { /* ... */ },
ResourceType::Route53HostedZone => { /* ... */ },
ResourceType::Route53RecoveryControlCluster => { /* ... */ },
ResourceType::Route53RecoveryControlControlPanel => { /* ... */ },
ResourceType::Route53RecoveryControlRoutingControl => { /* ... */ },
ResourceType::Route53RecoveryControlSafetyRule => { /* ... */ },
ResourceType::Route53RecoveryReadinessCell => { /* ... */ },
ResourceType::Route53RecoveryReadinessReadinessCheck => { /* ... */ },
ResourceType::Route53RecoveryReadinessRecoveryGroup => { /* ... */ },
ResourceType::Route53RecoveryReadinessResourceSet => { /* ... */ },
ResourceType::Route53ResolverFirewallDomainList => { /* ... */ },
ResourceType::Route53ResolverFirewallRuleGroup => { /* ... */ },
ResourceType::Route53ResolverFirewallRuleGroupAssociation => { /* ... */ },
ResourceType::Route53ResolverResolverEndpoint => { /* ... */ },
ResourceType::Route53ResolverResolverQueryLoggingConfig => { /* ... */ },
ResourceType::Route53ResolverResolverQueryLoggingConfigAssociation => { /* ... */ },
ResourceType::Route53ResolverResolverRule => { /* ... */ },
ResourceType::Route53ResolverResolverRuleAssociation => { /* ... */ },
ResourceType::S3AccessPoint => { /* ... */ },
ResourceType::AccountPublicAccessBlock => { /* ... */ },
ResourceType::Bucket => { /* ... */ },
ResourceType::S3MultiRegionAccessPoint => { /* ... */ },
ResourceType::S3StorageLens => { /* ... */ },
ResourceType::SesConfigurationSet => { /* ... */ },
ResourceType::SesContactList => { /* ... */ },
ResourceType::SesReceiptFilter => { /* ... */ },
ResourceType::SesReceiptRuleSet => { /* ... */ },
ResourceType::SesTemplate => { /* ... */ },
ResourceType::Topic => { /* ... */ },
ResourceType::Queue => { /* ... */ },
ResourceType::AssociationCompliance => { /* ... */ },
ResourceType::SsmDocument => { /* ... */ },
ResourceType::FileData => { /* ... */ },
ResourceType::ManagedInstanceInventory => { /* ... */ },
ResourceType::PatchCompliance => { /* ... */ },
ResourceType::SageMakerAppImageConfig => { /* ... */ },
ResourceType::SageMakerCodeRepository => { /* ... */ },
ResourceType::SageMakerDomain => { /* ... */ },
ResourceType::SageMakerFeatureGroup => { /* ... */ },
ResourceType::SageMakerImage => { /* ... */ },
ResourceType::SageMakerModel => { /* ... */ },
ResourceType::SageMakerNotebookInstanceLifecycleConfig => { /* ... */ },
ResourceType::SageMakerWorkteam => { /* ... */ },
ResourceType::Secret => { /* ... */ },
ResourceType::CloudFormationProduct => { /* ... */ },
ResourceType::CloudFormationProvisionedProduct => { /* ... */ },
ResourceType::Portfolio => { /* ... */ },
ResourceType::ServiceDiscoveryHttpNamespace => { /* ... */ },
ResourceType::ServiceDiscoveryInstance => { /* ... */ },
ResourceType::ServiceDiscoveryPublicDnsNamespace => { /* ... */ },
ResourceType::ServiceDiscoveryService => { /* ... */ },
ResourceType::Protection => { /* ... */ },
ResourceType::RegionalProtection => { /* ... */ },
ResourceType::SignerSigningProfile => { /* ... */ },
ResourceType::StepFunctionsActivity => { /* ... */ },
ResourceType::StepFunctionsStateMachine => { /* ... */ },
ResourceType::TransferAgreement => { /* ... */ },
ResourceType::TransferCertificate => { /* ... */ },
ResourceType::TransferConnector => { /* ... */ },
ResourceType::TransferWorkflow => { /* ... */ },
ResourceType::RateBasedRule => { /* ... */ },
ResourceType::Rule => { /* ... */ },
ResourceType::RuleGroup => { /* ... */ },
ResourceType::WebAcl => { /* ... */ },
ResourceType::RegionalRateBasedRule => { /* ... */ },
ResourceType::RegionalRule => { /* ... */ },
ResourceType::RegionalRuleGroup => { /* ... */ },
ResourceType::RegionalWebAcl => { /* ... */ },
ResourceType::IpSetV2 => { /* ... */ },
ResourceType::ManagedRuleSetV2 => { /* ... */ },
ResourceType::RegexPatternSetV2 => { /* ... */ },
ResourceType::RuleGroupV2 => { /* ... */ },
ResourceType::WebAclv2 => { /* ... */ },
ResourceType::WorkSpacesConnectionAlias => { /* ... */ },
ResourceType::WorkSpacesWorkspace => { /* ... */ },
ResourceType::EncryptionConfig => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when resourcetype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant ResourceType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
ResourceType::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 ResourceType::NewFeature
is defined.
Specifically, when resourcetype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on ResourceType::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
Certificate
AcmpcaCertificateAuthority
AcmpcaCertificateAuthorityActivation
ApsRuleGroupsNamespace
AccessAnalyzerAnalyzer
AmazonMqBroker
AmplifyApp
AmplifyBranch
RestApi
Stage
Api
StageV2
AppConfigApplication
AppConfigConfigurationProfile
AppConfigDeploymentStrategy
AppConfigEnvironment
AppConfigHostedConfigurationVersion
AppFlowFlow
AppIntegrationsEventIntegration
AppMeshGatewayRoute
AppMeshMesh
AppMeshRoute
AppMeshVirtualGateway
AppMeshVirtualNode
AppMeshVirtualRouter
AppMeshVirtualService
AppRunnerService
AppRunnerVpcConnector
AppStreamApplication
AppStreamDirectoryConfig
AppStreamFleet
AppStreamStack
AppSyncGraphQlApi
AthenaDataCatalog
AthenaPreparedStatement
AthenaWorkGroup
AuditManagerAssessment
AutoScalingGroup
LaunchConfiguration
ScalingPolicy
ScheduledAction
AutoScalingWarmPool
BackupPlan
BackupSelection
BackupVault
BackupRecoveryPoint
BackupReportPlan
BatchComputeEnvironment
BatchJobQueue
BatchSchedulingPolicy
BudgetsBudgetsAction
CassandraKeyspace
Cloud9EnvironmentEc2
Stack
Distribution
StreamingDistribution
Trail
Alarm
CloudWatchMetricStream
CodeArtifactRepository
Project
CodeBuildReportGroup
CodeDeployApplication
CodeDeployDeploymentConfig
CodeDeployDeploymentGroup
CodeGuruProfilerProfilingGroup
CodeGuruReviewerRepositoryAssociation
Pipeline
CognitoUserPool
CognitoUserPoolClient
CognitoUserPoolGroup
ConformancePackCompliance
ResourceCompliance
ConnectInstance
ConnectPhoneNumber
ConnectQuickConnect
CustomerProfilesDomain
CustomerProfilesObjectType
DmsCertificate
DmsEndpoint
DmsEventSubscription
DmsReplicationSubnetGroup
DataSyncLocationEfs
DataSyncLocationFSxLustre
DataSyncLocationFSxWindows
DataSyncLocationHdfs
DataSyncLocationNfs
DataSyncLocationObjectStorage
DataSyncLocationS3
DataSyncLocationSmb
DataSyncTask
DetectiveGraph
DeviceFarmInstanceProfile
DeviceFarmProject
DeviceFarmTestGridProject
Table
Ec2CapacityReservation
Ec2CarrierGateway
Ec2ClientVpnEndpoint
CustomerGateway
Ec2DhcpOptions
Ec2Ec2Fleet
Eip
EgressOnlyInternetGateway
FlowLog
Host
Ec2Ipam
Ec2IpamPool
Ec2IpamScope
Instance
InternetGateway
LaunchTemplate
NatGateway
NetworkAcl
Ec2NetworkInsightsAccessScope
NetworkInsightsAccessScopeAnalysis
Ec2NetworkInsightsAnalysis
Ec2NetworkInsightsPath
NetworkInterface
Ec2PrefixList
RegisteredHaInstance
RouteTable
SecurityGroup
Ec2SpotFleet
Subnet
Ec2SubnetRouteTableAssociation
Ec2TrafficMirrorFilter
Ec2TrafficMirrorSession
Ec2TrafficMirrorTarget
TransitGateway
TransitGatewayAttachment
Ec2TransitGatewayConnect
Ec2TransitGatewayMulticastDomain
TransitGatewayRouteTable
Vpc
VpcEndpoint
VpcEndpointService
VpcPeeringConnection
VpnConnection
VpnGateway
Volume
EcrPublicRepository
EcrPullThroughCacheRule
EcrRegistryPolicy
EcrRepository
EcsCapacityProvider
EcsCluster
EcsService
EcsTaskDefinition
EcsTaskSet
EfsAccessPoint
EfsFileSystem
EksAddon
EksCluster
EksFargateProfile
EksIdentityProviderConfig
EmrSecurityConfiguration
Application
ApplicationVersion
Environment
LoadBalancer
ListenerV2
LoadBalancerV2
Domain
EventSchemasDiscoverer
EventSchemasRegistry
EventSchemasRegistryPolicy
EventSchemasSchema
EventsApiDestination
EventsArchive
EventsConnection
EventsEndpoint
EventsEventBus
EventsRule
EvidentlyLaunch
EvidentlyProject
FisExperimentTemplate
ForecastDataset
ForecastDatasetGroup
FraudDetectorEntityType
FraudDetectorLabel
FraudDetectorOutcome
FraudDetectorVariable
GlobalAcceleratorAccelerator
GlobalAcceleratorEndpointGroup
GlobalAcceleratorListener
GlueClassifier
GlueJob
GlueMlTransform
GrafanaWorkspace
GreengrassV2ComponentVersion
GroundStationConfig
GroundStationDataflowEndpointGroup
GroundStationMissionProfile
GuardDutyDetector
GuardDutyFilter
GuardDutyIpSet
GuardDutyThreatIntelSet
HealthLakeFhirDatastore
Group
IamInstanceProfile
Policy
Role
IamsamlProvider
IamServerCertificate
User
IvsChannel
IvsPlaybackKeyPair
IvsRecordingConfiguration
ImageBuilderContainerRecipe
ImageBuilderDistributionConfiguration
ImageBuilderImagePipeline
ImageBuilderImageRecipe
ImageBuilderInfrastructureConfiguration
InspectorV2Filter
IoTAccountAuditConfiguration
IoTAuthorizer
IoTcaCertificate
IoTCustomMetric
IoTDimension
IoTFleetMetric
IoTJobTemplate
IoTMitigationAction
IoTPolicy
IoTProvisioningTemplate
IoTRoleAlias
IoTScheduledAudit
IoTSecurityProfile
IoTAnalyticsChannel
IoTAnalyticsDataset
IoTAnalyticsDatastore
IoTAnalyticsPipeline
IoTEventsAlarmModel
IoTEventsDetectorModel
IoTEventsInput
IoTSiteWiseAssetModel
IoTSiteWiseDashboard
IoTSiteWiseGateway
IoTSiteWisePortal
IoTSiteWiseProject
IoTTwinMakerComponentType
IoTTwinMakerEntity
IoTTwinMakerScene
IoTTwinMakerSyncJob
IoTTwinMakerWorkspace
IoTWirelessFuotaTask
IoTWirelessMulticastGroup
IoTWirelessServiceProfile
KmsAlias
Key
KafkaConnectConnector
KendraIndex
KinesisStream
KinesisStreamConsumer
KinesisAnalyticsV2Application
KinesisFirehoseDeliveryStream
KinesisVideoSignalingChannel
KinesisVideoStream
LambdaCodeSigningConfig
Function
LexBot
LexBotAlias
LightsailBucket
LightsailCertificate
LightsailDisk
LightsailStaticIp
LogsDestination
LookoutMetricsAlert
LookoutVisionProject
M2Environment
MskBatchScramSecret
MskCluster
MskConfiguration
MediaConnectFlowEntitlement
MediaConnectFlowSource
MediaConnectFlowVpcInterface
MediaPackagePackagingConfiguration
MediaPackagePackagingGroup
MediaTailorPlaybackConfiguration
NetworkFirewallFirewall
NetworkFirewallFirewallPolicy
NetworkFirewallRuleGroup
NetworkManagerConnectPeer
NetworkManagerCustomerGatewayAssociation
NetworkManagerDevice
NetworkManagerGlobalNetwork
NetworkManagerLink
NetworkManagerLinkAssociation
NetworkManagerSite
NetworkManagerTransitGatewayRegistration
OpenSearchDomain
PanoramaPackage
PersonalizeDataset
PersonalizeDatasetGroup
PersonalizeSchema
PersonalizeSolution
PinpointApp
PinpointApplicationSettings
PinpointCampaign
PinpointEmailChannel
PinpointEmailTemplate
PinpointEventStream
PinpointInAppTemplate
PinpointSegment
QldbLedger
QuickSightDataSource
QuickSightTemplate
QuickSightTheme
DbCluster
DbClusterSnapshot
DbInstance
DbSecurityGroup
DbSnapshot
DbSubnetGroup
EventSubscription
RdsGlobalCluster
RdsOptionGroup
RumAppMonitor
Cluster
ClusterParameterGroup
ClusterSecurityGroup
ClusterSnapshot
ClusterSubnetGroup
RedshiftEndpointAccess
RedshiftEventSubscription
RedshiftScheduledAction
ResilienceHubApp
ResilienceHubResiliencyPolicy
ResourceExplorer2Index
RoboMakerRobotApplication
RoboMakerRobotApplicationVersion
RoboMakerSimulationApplication
Route53HostedZone
Route53RecoveryControlCluster
Route53RecoveryControlControlPanel
Route53RecoveryControlRoutingControl
Route53RecoveryControlSafetyRule
Route53RecoveryReadinessCell
Route53RecoveryReadinessReadinessCheck
Route53RecoveryReadinessRecoveryGroup
Route53RecoveryReadinessResourceSet
Route53ResolverFirewallDomainList
Route53ResolverFirewallRuleGroup
Route53ResolverFirewallRuleGroupAssociation
Route53ResolverResolverEndpoint
Route53ResolverResolverQueryLoggingConfig
Route53ResolverResolverQueryLoggingConfigAssociation
Route53ResolverResolverRule
Route53ResolverResolverRuleAssociation
S3AccessPoint
AccountPublicAccessBlock
Bucket
S3MultiRegionAccessPoint
S3StorageLens
SesConfigurationSet
SesContactList
SesReceiptFilter
SesReceiptRuleSet
SesTemplate
Topic
Queue
AssociationCompliance
SsmDocument
FileData
ManagedInstanceInventory
PatchCompliance
SageMakerAppImageConfig
SageMakerCodeRepository
SageMakerDomain
SageMakerFeatureGroup
SageMakerImage
SageMakerModel
SageMakerNotebookInstanceLifecycleConfig
SageMakerWorkteam
Secret
CloudFormationProduct
CloudFormationProvisionedProduct
Portfolio
ServiceDiscoveryHttpNamespace
ServiceDiscoveryInstance
ServiceDiscoveryPublicDnsNamespace
ServiceDiscoveryService
Protection
RegionalProtection
SignerSigningProfile
StepFunctionsActivity
StepFunctionsStateMachine
TransferAgreement
TransferCertificate
TransferConnector
TransferWorkflow
RateBasedRule
Rule
RuleGroup
WebAcl
RegionalRateBasedRule
RegionalRule
RegionalRuleGroup
RegionalWebAcl
IpSetV2
ManagedRuleSetV2
RegexPatternSetV2
RuleGroupV2
WebAclv2
WorkSpacesConnectionAlias
WorkSpacesWorkspace
EncryptionConfig
Unknown(UnknownVariantValue)
Unknown
. See the docs on this enum for the correct way to handle unknown variants.Unknown
contains new variants that have been added since this code was generated.
Implementations§
Source§impl ResourceType
impl ResourceType
Source§impl ResourceType
impl ResourceType
Sourcepub fn try_parse(value: &str) -> Result<Self, UnknownVariantError>
pub fn try_parse(value: &str) -> Result<Self, UnknownVariantError>
Parses the enum value while disallowing unknown variants.
Unknown variants will result in an error.
Trait Implementations§
Source§impl AsRef<str> for ResourceType
impl AsRef<str> for ResourceType
Source§impl Clone for ResourceType
impl Clone for ResourceType
Source§fn clone(&self) -> ResourceType
fn clone(&self) -> ResourceType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ResourceType
impl Debug for ResourceType
Source§impl Display for ResourceType
impl Display for ResourceType
Source§impl From<&str> for ResourceType
impl From<&str> for ResourceType
Source§impl FromStr for ResourceType
impl FromStr for ResourceType
Source§impl Hash for ResourceType
impl Hash for ResourceType
Source§impl Ord for ResourceType
impl Ord for ResourceType
Source§fn cmp(&self, other: &ResourceType) -> Ordering
fn cmp(&self, other: &ResourceType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ResourceType
impl PartialEq for ResourceType
Source§impl PartialOrd for ResourceType
impl PartialOrd for ResourceType
impl Eq for ResourceType
impl StructuralPartialEq for ResourceType
Auto Trait Implementations§
impl Freeze for ResourceType
impl RefUnwindSafe for ResourceType
impl Send for ResourceType
impl Sync for ResourceType
impl Unpin for ResourceType
impl UnwindSafe for ResourceType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);