pub fn new_with_key(key: impl string::ToString, value: T) -> Self {
        Self {
            key: Some(key.to_string()),
            value,
        }
    }
/// Make a new item with a key and a value.
///
/// # Examples
///
/// ```
/// use deta::Item;
///
/// let item = Item::new_with_key("five", 5);
/// assert_eq!(item.key.unwrap_or_default(), "five");
/// assert_eq!(item.value, 5);
/// ```
Make a new item with a key and a value.
Make a new item with a key and a value .
pub fn new_with_key(key: impl string::ToString, value: T) -> Self {
        Self {
            key: Some(key.to_string()),
            value,
        }
    }
pub fn new_with_key ( key : impl string :: ToString , value : T ) -> Self { Self { key : Some ( key . to_string ( ) ) , value , } }
Make a new item with a key and a value.
Make a new item with a key and a value .
key
impl string::ToString
value
T
key
impl string::ToString
value
T
examples


let item = Item::new_with_key("five", 5);
assert_eq!(item.key.unwrap_or_default(), "five");
assert_eq!(item.value, 5);
```
let item = Item :: new_with_key ( " five " 5 ) ; assert_eq! ( item . key . unwrap_or_default () " five " ) ; assert_eq! ( item . value 5 ) ; ` ` `