aws_sdk_dynamodb/waiters/
matchers.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Matcher union: {"output":{"path":"Table.TableStatus","expected":"ACTIVE","comparator":"stringEquals"}}
4pub(crate) fn match_describe_table_0429b99996ae6dab6(
5    _result: ::std::result::Result<&crate::operation::describe_table::DescribeTableOutput, &crate::operation::describe_table::DescribeTableError>,
6) -> bool {
7    fn path_traversal<'a>(
8        _output: &'a crate::operation::describe_table::DescribeTableOutput,
9    ) -> ::std::option::Option<&'a crate::types::TableStatus> {
10        let _fld_1 = _output.table.as_ref()?;
11        let _fld_2 = _fld_1.table_status.as_ref()?;
12        ::std::option::Option::Some(_fld_2)
13    }
14    _result
15        .as_ref()
16        .ok()
17        .and_then(|output| path_traversal(output))
18        .map(|value| {
19            let _tmp_2 = value.as_str();
20            let right = "ACTIVE";
21            let _cmp_1 = _tmp_2 == right;
22            _cmp_1
23        })
24        .unwrap_or_default()
25}
26
27/// Matcher union: {"errorType":"ResourceNotFoundException"}
28pub(crate) fn match_describe_table_1cce2c05524fb92d4(
29    _result: ::std::result::Result<&crate::operation::describe_table::DescribeTableOutput, &crate::operation::describe_table::DescribeTableError>,
30) -> bool {
31    if let ::std::result::Result::Err(err) = _result {
32        if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(err) {
33            return code == "ResourceNotFoundException";
34        }
35    }
36    false
37}