pub struct DatasetMetadata {
pub name: String,
pub description: Option<String>,
pub schema_name: String,
pub row_count: usize,
pub config: DataConfig,
pub created_at: DateTime<Utc>,
pub generation_time_ms: u128,
pub format: OutputFormat,
pub file_size_bytes: Option<u64>,
pub tags: HashMap<String, String>,
}Expand description
Dataset metadata
Fields§
§name: StringDataset name
description: Option<String>Dataset description
schema_name: StringSchema name used to generate this dataset
row_count: usizeNumber of rows
config: DataConfigGeneration configuration
created_at: DateTime<Utc>Creation timestamp
generation_time_ms: u128Generation time in milliseconds
format: OutputFormatFile format
file_size_bytes: Option<u64>File size in bytes
Additional metadata
Implementations§
Source§impl DatasetMetadata
impl DatasetMetadata
Sourcepub fn new(
name: String,
schema_name: String,
config: DataConfig,
format: OutputFormat,
) -> Self
pub fn new( name: String, schema_name: String, config: DataConfig, format: OutputFormat, ) -> Self
Create new dataset metadata
Sourcepub fn set_generation_time(&mut self, time_ms: u128)
pub fn set_generation_time(&mut self, time_ms: u128)
Update generation time
Sourcepub fn set_file_size(&mut self, size_bytes: u64)
pub fn set_file_size(&mut self, size_bytes: u64)
Set file size
Sourcepub fn remove_tag(&mut self, key: &str) -> Option<String>
pub fn remove_tag(&mut self, key: &str) -> Option<String>
Remove tag
Sourcepub fn estimated_size_bytes(&self) -> u64
pub fn estimated_size_bytes(&self) -> u64
Get total size in bytes (estimated)
Sourcepub fn human_readable_size(&self) -> String
pub fn human_readable_size(&self) -> String
Get human-readable size
Trait Implementations§
Source§impl Clone for DatasetMetadata
impl Clone for DatasetMetadata
Source§fn clone(&self) -> DatasetMetadata
fn clone(&self) -> DatasetMetadata
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 DatasetMetadata
impl Debug for DatasetMetadata
Source§impl Default for DatasetMetadata
impl Default for DatasetMetadata
Source§impl<'de> Deserialize<'de> for DatasetMetadata
impl<'de> Deserialize<'de> for DatasetMetadata
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 DatasetMetadata
impl RefUnwindSafe for DatasetMetadata
impl Send for DatasetMetadata
impl Sync for DatasetMetadata
impl Unpin for DatasetMetadata
impl UnwindSafe for DatasetMetadata
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