pub enum AttributeValue {
S(String),
N(String),
B(Bytes),
Ss(Vec<String>),
Ns(Vec<String>),
Bs(Vec<Bytes>),
Bool(bool),
Null(bool),
L(Vec<AttributeValue>),
M(HashMap<String, AttributeValue>),
}Expand description
DynamoDB attribute value.
Represented as a tagged union where exactly one variant is present. Numbers are always string-encoded to preserve arbitrary precision.
Variants§
S(String)
String value.
N(String)
Number value (string-encoded for arbitrary precision).
B(Bytes)
Binary value (base64-encoded in JSON).
Ss(Vec<String>)
String Set.
Ns(Vec<String>)
Number Set (string-encoded).
Bs(Vec<Bytes>)
Binary Set (base64-encoded in JSON).
Bool(bool)
Boolean value.
Null(bool)
Null value.
L(Vec<AttributeValue>)
List of attribute values.
M(HashMap<String, AttributeValue>)
Map of attribute values.
Implementations§
Source§impl AttributeValue
impl AttributeValue
Sourcepub fn as_m(&self) -> Option<&HashMap<String, AttributeValue>>
pub fn as_m(&self) -> Option<&HashMap<String, AttributeValue>>
Returns the map if this is an M variant.
Sourcepub fn as_l(&self) -> Option<&[AttributeValue]>
pub fn as_l(&self) -> Option<&[AttributeValue]>
Returns the list if this is an L variant.
Sourcepub fn type_descriptor(&self) -> &'static str
pub fn type_descriptor(&self) -> &'static str
Returns the DynamoDB type descriptor string (e.g., “S”, “N”, “BOOL”).
Trait Implementations§
Source§impl Clone for AttributeValue
impl Clone for AttributeValue
Source§fn clone(&self) -> AttributeValue
fn clone(&self) -> AttributeValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttributeValue
impl Debug for AttributeValue
Source§impl<'de> Deserialize<'de> for AttributeValue
impl<'de> Deserialize<'de> for AttributeValue
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for AttributeValue
impl Display for AttributeValue
Source§impl Hash for AttributeValue
impl Hash for AttributeValue
Source§impl PartialEq for AttributeValue
impl PartialEq for AttributeValue
Source§impl Serialize for AttributeValue
impl Serialize for AttributeValue
impl Eq for AttributeValue
impl StructuralPartialEq for AttributeValue
Auto Trait Implementations§
impl !Freeze for AttributeValue
impl RefUnwindSafe for AttributeValue
impl Send for AttributeValue
impl Sync for AttributeValue
impl Unpin for AttributeValue
impl UnsafeUnpin for AttributeValue
impl UnwindSafe for AttributeValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more