Enum aws_sdk_dynamodb::model::AttributeValue[][src]

#[non_exhaustive]
pub enum AttributeValue {
    B(Blob),
    Bool(bool),
    Bs(Vec<Blob>),
    L(Vec<AttributeValue>),
    M(HashMap<String, AttributeValue>),
    N(String),
    Ns(Vec<String>),
    Null(bool),
    S(String),
    Ss(Vec<String>),
}
Expand description

Represents the data for an attribute.

Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.

For more information, see Data Types in the Amazon DynamoDB Developer Guide.

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.
B(Blob)

An attribute of type Binary. For example:

"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

Tuple Fields of B

0: Blob
Bool(bool)

An attribute of type Boolean. For example:

"BOOL": true

Tuple Fields of Bool

0: bool
Bs(Vec<Blob>)

An attribute of type Binary Set. For example:

"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

Tuple Fields of Bs

0: Vec<Blob>

An attribute of type List. For example:

"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]

Tuple Fields of L

0: Vec<AttributeValue>

An attribute of type Map. For example:

"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}

Tuple Fields of M

0: HashMap<String, AttributeValue>

An attribute of type Number. For example:

"N": "123.45"

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.

Tuple Fields of N

0: String
Ns(Vec<String>)

An attribute of type Number Set. For example:

"NS": ["42.2", "-19", "7.5", "3.14"]

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.

Tuple Fields of Ns

0: Vec<String>
Null(bool)

An attribute of type Null. For example:

"NULL": true

Tuple Fields of Null

0: bool

An attribute of type String. For example:

"S": "Hello"

Tuple Fields of S

0: String
Ss(Vec<String>)

An attribute of type String Set. For example:

"SS": ["Giraffe", "Hippo" ,"Zebra"]

Tuple Fields of Ss

0: Vec<String>

Implementations

Tries to convert the enum instance into B, extracting the inner Blob. Returns Err(&Self) if it can’t be converted.

Returns true if this is a B.

Tries to convert the enum instance into Bool, extracting the inner bool. Returns Err(&Self) if it can’t be converted.

Returns true if this is a Bool.

Tries to convert the enum instance into Bs, extracting the inner Vec. Returns Err(&Self) if it can’t be converted.

Returns true if this is a Bs.

Tries to convert the enum instance into L, extracting the inner Vec. Returns Err(&Self) if it can’t be converted.

Returns true if this is a L.

Tries to convert the enum instance into M, extracting the inner HashMap. Returns Err(&Self) if it can’t be converted.

Returns true if this is a M.

Tries to convert the enum instance into N, extracting the inner String. Returns Err(&Self) if it can’t be converted.

Returns true if this is a N.

Tries to convert the enum instance into Ns, extracting the inner Vec. Returns Err(&Self) if it can’t be converted.

Returns true if this is a Ns.

Tries to convert the enum instance into Null, extracting the inner bool. Returns Err(&Self) if it can’t be converted.

Returns true if this is a Null.

Tries to convert the enum instance into S, extracting the inner String. Returns Err(&Self) if it can’t be converted.

Returns true if this is a S.

Tries to convert the enum instance into Ss, extracting the inner Vec. Returns Err(&Self) if it can’t be converted.

Returns true if this is a Ss.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

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

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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