pub struct DatasetRow {
pub id: String,
pub data: HashMap<String, Value>,
pub metadata: HashMap<String, String>,
pub created_at: DateTime<Utc>,
}Expand description
Single row of data in a dataset
Fields§
§id: StringRow ID
data: HashMap<String, Value>Row data as key-value pairs
metadata: HashMap<String, String>Row metadata
created_at: DateTime<Utc>Creation timestamp
Implementations§
Source§impl DatasetRow
impl DatasetRow
Sourcepub fn add_metadata(&mut self, key: String, value: String)
pub fn add_metadata(&mut self, key: String, value: String)
Add metadata to the row
Sourcepub fn get_metadata(&self, key: &str) -> Option<&String>
pub fn get_metadata(&self, key: &str) -> Option<&String>
Get metadata value
Sourcepub fn remove_metadata(&mut self, key: &str) -> Option<String>
pub fn remove_metadata(&mut self, key: &str) -> Option<String>
Remove metadata
Sourcepub fn field_names(&self) -> Vec<&String>
pub fn field_names(&self) -> Vec<&String>
Get all field names
Trait Implementations§
Source§impl Clone for DatasetRow
impl Clone for DatasetRow
Source§fn clone(&self) -> DatasetRow
fn clone(&self) -> DatasetRow
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 DatasetRow
impl Debug for DatasetRow
Source§impl<'de> Deserialize<'de> for DatasetRow
impl<'de> Deserialize<'de> for DatasetRow
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DatasetRow
impl RefUnwindSafe for DatasetRow
impl Send for DatasetRow
impl Sync for DatasetRow
impl Unpin for DatasetRow
impl UnwindSafe for DatasetRow
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