1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
use ;
use crate::;
/// The [DynamoDB `contains` function][1]. True if the attribute specified
/// by [`Path`] is one of the following:
/// * A `String` that contains a particular substring.
/// * A `Set` that contains a particular element within the set.
/// * A `List` that contains a particular element within the list.
///
/// The operand must be a `String` if the attribute specified by path is a
/// `String`. If the attribute specified by path is a `Set`, the operand
/// must be the sets element type.
///
/// See also: [`Path::contains`]
///
/// ```
/// # fn main() -> Result<(), Box<dyn std::error::Error>> {
/// use dynamodb_expression::{Num, Path};
///
/// // String
/// let condition = "foo".parse::<Path>()?.contains("Quinn");
/// assert_eq!(r#"contains(foo, "Quinn")"#, condition.to_string());
///
/// // Number
/// let condition = "foo".parse::<Path>()?.contains(Num::new(42));
/// assert_eq!(r#"contains(foo, 42)"#, condition.to_string());
///
/// // Binary
/// let condition = "foo".parse::<Path>()?.contains(Vec::<u8>::from("fish"));
/// assert_eq!(r#"contains(foo, "ZmlzaA==")"#, condition.to_string());
/// #
/// # Ok(())
/// # }
/// ```
///
/// [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions