#[non_exhaustive]
pub enum AuthTokenUpdateStrategyType {
Delete,
Rotate,
Set,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against AuthTokenUpdateStrategyType
, 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 authtokenupdatestrategytype = unimplemented!();
match authtokenupdatestrategytype {
AuthTokenUpdateStrategyType::Delete => { /* ... */ },
AuthTokenUpdateStrategyType::Rotate => { /* ... */ },
AuthTokenUpdateStrategyType::Set => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when authtokenupdatestrategytype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant AuthTokenUpdateStrategyType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
AuthTokenUpdateStrategyType::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 AuthTokenUpdateStrategyType::NewFeature
is defined.
Specifically, when authtokenupdatestrategytype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on AuthTokenUpdateStrategyType::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
Delete
Rotate
Set
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl AuthTokenUpdateStrategyType
impl AuthTokenUpdateStrategyType
sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the &str
value of the enum member.
Examples found in repository?
More examples
2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509
pub fn serialize_operation_crate_operation_modify_cache_cluster(
input: &crate::input::ModifyCacheClusterInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "ModifyCacheCluster", "2015-02-02");
#[allow(unused_mut)]
let mut scope_588 = writer.prefix("CacheClusterId");
if let Some(var_589) = &input.cache_cluster_id {
scope_588.string(var_589);
}
#[allow(unused_mut)]
let mut scope_590 = writer.prefix("NumCacheNodes");
if let Some(var_591) = &input.num_cache_nodes {
scope_590.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_591).into()),
);
}
#[allow(unused_mut)]
let mut scope_592 = writer.prefix("CacheNodeIdsToRemove");
if let Some(var_593) = &input.cache_node_ids_to_remove {
let mut list_595 = scope_592.start_list(false, Some("CacheNodeId"));
for item_594 in var_593 {
#[allow(unused_mut)]
let mut entry_596 = list_595.entry();
entry_596.string(item_594);
}
list_595.finish();
}
#[allow(unused_mut)]
let mut scope_597 = writer.prefix("AZMode");
if let Some(var_598) = &input.az_mode {
scope_597.string(var_598.as_str());
}
#[allow(unused_mut)]
let mut scope_599 = writer.prefix("NewAvailabilityZones");
if let Some(var_600) = &input.new_availability_zones {
let mut list_602 = scope_599.start_list(false, Some("PreferredAvailabilityZone"));
for item_601 in var_600 {
#[allow(unused_mut)]
let mut entry_603 = list_602.entry();
entry_603.string(item_601);
}
list_602.finish();
}
#[allow(unused_mut)]
let mut scope_604 = writer.prefix("CacheSecurityGroupNames");
if let Some(var_605) = &input.cache_security_group_names {
let mut list_607 = scope_604.start_list(false, Some("CacheSecurityGroupName"));
for item_606 in var_605 {
#[allow(unused_mut)]
let mut entry_608 = list_607.entry();
entry_608.string(item_606);
}
list_607.finish();
}
#[allow(unused_mut)]
let mut scope_609 = writer.prefix("SecurityGroupIds");
if let Some(var_610) = &input.security_group_ids {
let mut list_612 = scope_609.start_list(false, Some("SecurityGroupId"));
for item_611 in var_610 {
#[allow(unused_mut)]
let mut entry_613 = list_612.entry();
entry_613.string(item_611);
}
list_612.finish();
}
#[allow(unused_mut)]
let mut scope_614 = writer.prefix("PreferredMaintenanceWindow");
if let Some(var_615) = &input.preferred_maintenance_window {
scope_614.string(var_615);
}
#[allow(unused_mut)]
let mut scope_616 = writer.prefix("NotificationTopicArn");
if let Some(var_617) = &input.notification_topic_arn {
scope_616.string(var_617);
}
#[allow(unused_mut)]
let mut scope_618 = writer.prefix("CacheParameterGroupName");
if let Some(var_619) = &input.cache_parameter_group_name {
scope_618.string(var_619);
}
#[allow(unused_mut)]
let mut scope_620 = writer.prefix("NotificationTopicStatus");
if let Some(var_621) = &input.notification_topic_status {
scope_620.string(var_621);
}
#[allow(unused_mut)]
let mut scope_622 = writer.prefix("ApplyImmediately");
if input.apply_immediately {
scope_622.boolean(input.apply_immediately);
}
#[allow(unused_mut)]
let mut scope_623 = writer.prefix("EngineVersion");
if let Some(var_624) = &input.engine_version {
scope_623.string(var_624);
}
#[allow(unused_mut)]
let mut scope_625 = writer.prefix("AutoMinorVersionUpgrade");
if let Some(var_626) = &input.auto_minor_version_upgrade {
scope_625.boolean(*var_626);
}
#[allow(unused_mut)]
let mut scope_627 = writer.prefix("SnapshotRetentionLimit");
if let Some(var_628) = &input.snapshot_retention_limit {
scope_627.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_628).into()),
);
}
#[allow(unused_mut)]
let mut scope_629 = writer.prefix("SnapshotWindow");
if let Some(var_630) = &input.snapshot_window {
scope_629.string(var_630);
}
#[allow(unused_mut)]
let mut scope_631 = writer.prefix("CacheNodeType");
if let Some(var_632) = &input.cache_node_type {
scope_631.string(var_632);
}
#[allow(unused_mut)]
let mut scope_633 = writer.prefix("AuthToken");
if let Some(var_634) = &input.auth_token {
scope_633.string(var_634);
}
#[allow(unused_mut)]
let mut scope_635 = writer.prefix("AuthTokenUpdateStrategy");
if let Some(var_636) = &input.auth_token_update_strategy {
scope_635.string(var_636.as_str());
}
#[allow(unused_mut)]
let mut scope_637 = writer.prefix("LogDeliveryConfigurations");
if let Some(var_638) = &input.log_delivery_configurations {
let mut list_640 = scope_637.start_list(false, Some("LogDeliveryConfigurationRequest"));
for item_639 in var_638 {
#[allow(unused_mut)]
let mut entry_641 = list_640.entry();
crate::query_ser::serialize_structure_crate_model_log_delivery_configuration_request(
entry_641, item_639,
)?;
}
list_640.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_modify_cache_parameter_group(
input: &crate::input::ModifyCacheParameterGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "ModifyCacheParameterGroup", "2015-02-02");
#[allow(unused_mut)]
let mut scope_642 = writer.prefix("CacheParameterGroupName");
if let Some(var_643) = &input.cache_parameter_group_name {
scope_642.string(var_643);
}
#[allow(unused_mut)]
let mut scope_644 = writer.prefix("ParameterNameValues");
if let Some(var_645) = &input.parameter_name_values {
let mut list_647 = scope_644.start_list(false, Some("ParameterNameValue"));
for item_646 in var_645 {
#[allow(unused_mut)]
let mut entry_648 = list_647.entry();
crate::query_ser::serialize_structure_crate_model_parameter_name_value(
entry_648, item_646,
)?;
}
list_647.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_modify_cache_subnet_group(
input: &crate::input::ModifyCacheSubnetGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "ModifyCacheSubnetGroup", "2015-02-02");
#[allow(unused_mut)]
let mut scope_649 = writer.prefix("CacheSubnetGroupName");
if let Some(var_650) = &input.cache_subnet_group_name {
scope_649.string(var_650);
}
#[allow(unused_mut)]
let mut scope_651 = writer.prefix("CacheSubnetGroupDescription");
if let Some(var_652) = &input.cache_subnet_group_description {
scope_651.string(var_652);
}
#[allow(unused_mut)]
let mut scope_653 = writer.prefix("SubnetIds");
if let Some(var_654) = &input.subnet_ids {
let mut list_656 = scope_653.start_list(false, Some("SubnetIdentifier"));
for item_655 in var_654 {
#[allow(unused_mut)]
let mut entry_657 = list_656.entry();
entry_657.string(item_655);
}
list_656.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_modify_global_replication_group(
input: &crate::input::ModifyGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "ModifyGlobalReplicationGroup", "2015-02-02");
#[allow(unused_mut)]
let mut scope_658 = writer.prefix("GlobalReplicationGroupId");
if let Some(var_659) = &input.global_replication_group_id {
scope_658.string(var_659);
}
#[allow(unused_mut)]
let mut scope_660 = writer.prefix("ApplyImmediately");
{
scope_660.boolean(input.apply_immediately);
}
#[allow(unused_mut)]
let mut scope_661 = writer.prefix("CacheNodeType");
if let Some(var_662) = &input.cache_node_type {
scope_661.string(var_662);
}
#[allow(unused_mut)]
let mut scope_663 = writer.prefix("EngineVersion");
if let Some(var_664) = &input.engine_version {
scope_663.string(var_664);
}
#[allow(unused_mut)]
let mut scope_665 = writer.prefix("CacheParameterGroupName");
if let Some(var_666) = &input.cache_parameter_group_name {
scope_665.string(var_666);
}
#[allow(unused_mut)]
let mut scope_667 = writer.prefix("GlobalReplicationGroupDescription");
if let Some(var_668) = &input.global_replication_group_description {
scope_667.string(var_668);
}
#[allow(unused_mut)]
let mut scope_669 = writer.prefix("AutomaticFailoverEnabled");
if let Some(var_670) = &input.automatic_failover_enabled {
scope_669.boolean(*var_670);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_modify_replication_group(
input: &crate::input::ModifyReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "ModifyReplicationGroup", "2015-02-02");
#[allow(unused_mut)]
let mut scope_671 = writer.prefix("ReplicationGroupId");
if let Some(var_672) = &input.replication_group_id {
scope_671.string(var_672);
}
#[allow(unused_mut)]
let mut scope_673 = writer.prefix("ReplicationGroupDescription");
if let Some(var_674) = &input.replication_group_description {
scope_673.string(var_674);
}
#[allow(unused_mut)]
let mut scope_675 = writer.prefix("PrimaryClusterId");
if let Some(var_676) = &input.primary_cluster_id {
scope_675.string(var_676);
}
#[allow(unused_mut)]
let mut scope_677 = writer.prefix("SnapshottingClusterId");
if let Some(var_678) = &input.snapshotting_cluster_id {
scope_677.string(var_678);
}
#[allow(unused_mut)]
let mut scope_679 = writer.prefix("AutomaticFailoverEnabled");
if let Some(var_680) = &input.automatic_failover_enabled {
scope_679.boolean(*var_680);
}
#[allow(unused_mut)]
let mut scope_681 = writer.prefix("MultiAZEnabled");
if let Some(var_682) = &input.multi_az_enabled {
scope_681.boolean(*var_682);
}
#[allow(unused_mut)]
let mut scope_683 = writer.prefix("NodeGroupId");
if let Some(var_684) = &input.node_group_id {
scope_683.string(var_684);
}
#[allow(unused_mut)]
let mut scope_685 = writer.prefix("CacheSecurityGroupNames");
if let Some(var_686) = &input.cache_security_group_names {
let mut list_688 = scope_685.start_list(false, Some("CacheSecurityGroupName"));
for item_687 in var_686 {
#[allow(unused_mut)]
let mut entry_689 = list_688.entry();
entry_689.string(item_687);
}
list_688.finish();
}
#[allow(unused_mut)]
let mut scope_690 = writer.prefix("SecurityGroupIds");
if let Some(var_691) = &input.security_group_ids {
let mut list_693 = scope_690.start_list(false, Some("SecurityGroupId"));
for item_692 in var_691 {
#[allow(unused_mut)]
let mut entry_694 = list_693.entry();
entry_694.string(item_692);
}
list_693.finish();
}
#[allow(unused_mut)]
let mut scope_695 = writer.prefix("PreferredMaintenanceWindow");
if let Some(var_696) = &input.preferred_maintenance_window {
scope_695.string(var_696);
}
#[allow(unused_mut)]
let mut scope_697 = writer.prefix("NotificationTopicArn");
if let Some(var_698) = &input.notification_topic_arn {
scope_697.string(var_698);
}
#[allow(unused_mut)]
let mut scope_699 = writer.prefix("CacheParameterGroupName");
if let Some(var_700) = &input.cache_parameter_group_name {
scope_699.string(var_700);
}
#[allow(unused_mut)]
let mut scope_701 = writer.prefix("NotificationTopicStatus");
if let Some(var_702) = &input.notification_topic_status {
scope_701.string(var_702);
}
#[allow(unused_mut)]
let mut scope_703 = writer.prefix("ApplyImmediately");
if input.apply_immediately {
scope_703.boolean(input.apply_immediately);
}
#[allow(unused_mut)]
let mut scope_704 = writer.prefix("EngineVersion");
if let Some(var_705) = &input.engine_version {
scope_704.string(var_705);
}
#[allow(unused_mut)]
let mut scope_706 = writer.prefix("AutoMinorVersionUpgrade");
if let Some(var_707) = &input.auto_minor_version_upgrade {
scope_706.boolean(*var_707);
}
#[allow(unused_mut)]
let mut scope_708 = writer.prefix("SnapshotRetentionLimit");
if let Some(var_709) = &input.snapshot_retention_limit {
scope_708.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_709).into()),
);
}
#[allow(unused_mut)]
let mut scope_710 = writer.prefix("SnapshotWindow");
if let Some(var_711) = &input.snapshot_window {
scope_710.string(var_711);
}
#[allow(unused_mut)]
let mut scope_712 = writer.prefix("CacheNodeType");
if let Some(var_713) = &input.cache_node_type {
scope_712.string(var_713);
}
#[allow(unused_mut)]
let mut scope_714 = writer.prefix("AuthToken");
if let Some(var_715) = &input.auth_token {
scope_714.string(var_715);
}
#[allow(unused_mut)]
let mut scope_716 = writer.prefix("AuthTokenUpdateStrategy");
if let Some(var_717) = &input.auth_token_update_strategy {
scope_716.string(var_717.as_str());
}
#[allow(unused_mut)]
let mut scope_718 = writer.prefix("UserGroupIdsToAdd");
if let Some(var_719) = &input.user_group_ids_to_add {
let mut list_721 = scope_718.start_list(false, None);
for item_720 in var_719 {
#[allow(unused_mut)]
let mut entry_722 = list_721.entry();
entry_722.string(item_720);
}
list_721.finish();
}
#[allow(unused_mut)]
let mut scope_723 = writer.prefix("UserGroupIdsToRemove");
if let Some(var_724) = &input.user_group_ids_to_remove {
let mut list_726 = scope_723.start_list(false, None);
for item_725 in var_724 {
#[allow(unused_mut)]
let mut entry_727 = list_726.entry();
entry_727.string(item_725);
}
list_726.finish();
}
#[allow(unused_mut)]
let mut scope_728 = writer.prefix("RemoveUserGroups");
if let Some(var_729) = &input.remove_user_groups {
scope_728.boolean(*var_729);
}
#[allow(unused_mut)]
let mut scope_730 = writer.prefix("LogDeliveryConfigurations");
if let Some(var_731) = &input.log_delivery_configurations {
let mut list_733 = scope_730.start_list(false, Some("LogDeliveryConfigurationRequest"));
for item_732 in var_731 {
#[allow(unused_mut)]
let mut entry_734 = list_733.entry();
crate::query_ser::serialize_structure_crate_model_log_delivery_configuration_request(
entry_734, item_732,
)?;
}
list_733.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
Trait Implementations§
source§impl AsRef<str> for AuthTokenUpdateStrategyType
impl AsRef<str> for AuthTokenUpdateStrategyType
source§impl Clone for AuthTokenUpdateStrategyType
impl Clone for AuthTokenUpdateStrategyType
source§fn clone(&self) -> AuthTokenUpdateStrategyType
fn clone(&self) -> AuthTokenUpdateStrategyType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AuthTokenUpdateStrategyType
impl Debug for AuthTokenUpdateStrategyType
source§impl From<&str> for AuthTokenUpdateStrategyType
impl From<&str> for AuthTokenUpdateStrategyType
source§impl Hash for AuthTokenUpdateStrategyType
impl Hash for AuthTokenUpdateStrategyType
source§impl Ord for AuthTokenUpdateStrategyType
impl Ord for AuthTokenUpdateStrategyType
source§fn cmp(&self, other: &AuthTokenUpdateStrategyType) -> Ordering
fn cmp(&self, other: &AuthTokenUpdateStrategyType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<AuthTokenUpdateStrategyType> for AuthTokenUpdateStrategyType
impl PartialEq<AuthTokenUpdateStrategyType> for AuthTokenUpdateStrategyType
source§fn eq(&self, other: &AuthTokenUpdateStrategyType) -> bool
fn eq(&self, other: &AuthTokenUpdateStrategyType) -> bool
source§impl PartialOrd<AuthTokenUpdateStrategyType> for AuthTokenUpdateStrategyType
impl PartialOrd<AuthTokenUpdateStrategyType> for AuthTokenUpdateStrategyType
source§fn partial_cmp(&self, other: &AuthTokenUpdateStrategyType) -> Option<Ordering>
fn partial_cmp(&self, other: &AuthTokenUpdateStrategyType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for AuthTokenUpdateStrategyType
impl StructuralEq for AuthTokenUpdateStrategyType
impl StructuralPartialEq for AuthTokenUpdateStrategyType
Auto Trait Implementations§
impl RefUnwindSafe for AuthTokenUpdateStrategyType
impl Send for AuthTokenUpdateStrategyType
impl Sync for AuthTokenUpdateStrategyType
impl Unpin for AuthTokenUpdateStrategyType
impl UnwindSafe for AuthTokenUpdateStrategyType
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.