Trait serde_dynamo::AttributeValue
source · [−]pub trait AttributeValue: Sized {
Show 39 methods
fn is_n(&self) -> bool;
fn is_s(&self) -> bool;
fn is_bool(&self) -> bool;
fn is_b(&self) -> bool;
fn is_null(&self) -> bool;
fn is_m(&self) -> bool;
fn is_l(&self) -> bool;
fn is_ss(&self) -> bool;
fn is_ns(&self) -> bool;
fn is_bs(&self) -> bool;
fn as_n(&self) -> Option<&str>;
fn as_s(&self) -> Option<&str>;
fn as_bool(&self) -> Option<bool>;
fn as_b(&self) -> Option<&[u8]>;
fn as_null(&self) -> Option<bool>;
fn as_m(&self) -> Option<&HashMap<String, Self>>;
fn as_l(&self) -> Option<&[Self]>;
fn as_ss(&self) -> Option<&[String]>;
fn as_ns(&self) -> Option<&[String]>;
fn into_n(self) -> Option<String>;
fn into_s(self) -> Option<String>;
fn into_bool(self) -> Option<bool>;
fn into_b(self) -> Option<Vec<u8>>;
fn into_null(self) -> Option<bool>;
fn into_m(self) -> Option<HashMap<String, Self>>;
fn into_l(self) -> Option<Vec<Self>>;
fn into_ss(self) -> Option<Vec<String>>;
fn into_ns(self) -> Option<Vec<String>>;
fn into_bs(self) -> Option<Vec<Vec<u8>>>;
fn construct_n(input: String) -> Self;
fn construct_s(input: String) -> Self;
fn construct_bool(input: bool) -> Self;
fn construct_b(input: &[u8]) -> Self;
fn construct_null(input: bool) -> Self;
fn construct_m(input: HashMap<String, Self>) -> Self;
fn construct_l(input: Vec<Self>) -> Self;
fn construct_ss(input: Vec<String>) -> Self;
fn construct_ns(input: Vec<String>) -> Self;
fn construct_bs(input: Vec<Vec<u8>>) -> Self;
}
Expand description
A type that can be used as a DynamoDb attribute value
This trait will not typically be used by user code. It exists to abstract over the
AttributeValue
definitions in different libraries: aws-sdk-dynamodb
, rusoto_dynamodb
, and
rusoto_dynamodbstreams
.
Required methods
Determine if the attribute value represents a map of string/attribute value pairs
Get the map without consuming the attribute value
Consume the attribute value and return the map
Consume the attribute value and return the byte string list
fn construct_n(input: String) -> Self
fn construct_n(input: String) -> Self
Create a new attribute value from a number
fn construct_s(input: String) -> Self
fn construct_s(input: String) -> Self
Create a new attribute value from a string
fn construct_bool(input: bool) -> Self
fn construct_bool(input: bool) -> Self
Create a new attribute value from a bool
fn construct_b(input: &[u8]) -> Self
fn construct_b(input: &[u8]) -> Self
Create a new attribute value from bytes
fn construct_null(input: bool) -> Self
fn construct_null(input: bool) -> Self
Create a new attribute value from a null
fn construct_m(input: HashMap<String, Self>) -> Self
fn construct_m(input: HashMap<String, Self>) -> Self
Create a new attribute value from a map
fn construct_l(input: Vec<Self>) -> Self
fn construct_l(input: Vec<Self>) -> Self
Create a new attribute value from a list
fn construct_ss(input: Vec<String>) -> Self
fn construct_ss(input: Vec<String>) -> Self
Create a new attribute value from a string list
fn construct_ns(input: Vec<String>) -> Self
fn construct_ns(input: Vec<String>) -> Self
Create a new attribute value from a number list
fn construct_bs(input: Vec<Vec<u8>>) -> Self
fn construct_bs(input: Vec<Vec<u8>>) -> Self
Create a new attribute value from a byte string list
Implementations on Foreign Types
impl AttributeValue for AttributeValue
This is supported on crate feature aws-sdk-dynamodb+0_0_25-alpha
only.
impl AttributeValue for AttributeValue
aws-sdk-dynamodb+0_0_25-alpha
only.impl AttributeValue for AttributeValue
This is supported on crate feature rusoto_dynamodbstreams+0_46
only.
impl AttributeValue for AttributeValue
rusoto_dynamodbstreams+0_46
only.impl AttributeValue for AttributeValue
This is supported on crate feature rusoto_dynamodbstreams+0_47
only.
impl AttributeValue for AttributeValue
rusoto_dynamodbstreams+0_47
only.