pub fn to_hashmap<T: ?Sized>(value: &T) -> Result<HashMap<String, AttributeValue>>
where
    T: serde::ser::Serialize,
{
    let mut writer = HashMapWriter {
        root: HashMap::new(),
        current_key: String::new(),
    };
    to_writer(&mut writer, value)?;
    Ok(writer.root)
}
/// Serialize the given data structure as an `HashMap<String, AttributeValue>`.
///
/// # Errors
///
/// Serialization can fail if `T`'s implementation of `Serialize` decides to
/// fail, or if `T` contains a map with non-string keys.
Serialize the given data structure as an `HashMap`.
Serialize the given data structure as an ` HashMap ` .
pub fn to_hashmap<T: ?Sized>(value: &T) -> Result<HashMap<String, AttributeValue>>
where
    T: serde::ser::Serialize,
{
    let mut writer = HashMapWriter {
        root: HashMap::new(),
        current_key: String::new(),
    };
    to_writer(&mut writer, value)?;
    Ok(writer.root)
}
pub fn to_hashmap < T : ? Sized > ( value : & T ) -> Result < HashMap < String , AttributeValue > > where T : serde :: ser :: Serialize , { let mut writer = HashMapWriter { root : HashMap :: new ( ) , current_key : String :: new ( ) , } ; to_writer ( & mut writer , value ) ? ; Ok ( writer . root ) }
Serialize the given data structure as an `HashMap<String, AttributeValue>`.
Serialize the given data structure as an ` HashMap<String AttributeValue > ` .
value
&T
value
&T
errors
Serialization can fail if `T`'s implementation of `Serialize` decides to
fail, or if `T` contains a map with non-string keys.
Serialization can fail if ` T ` ' s implementation of ` Serialize ` decides to fail or if ` T ` contains a map with non - string keys .