liboxen 0.53.0

Oxen is a fast data version control system, built with machine learning training data in mind. Designed to handle terabytes of data with ease, using a workflow similar to git. Version both structured and unstructured data of any modality: text, images, video, audio, CSV, Parquet, JSONL, model checkpoints, and more. liboxen is the embeddable core library behind the oxen CLI and server, which power fine tuning and inference pipelines for multimodal LLMs, image models, and video models on Oxen.ai.
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

#[derive(Deserialize, Serialize, Debug, Clone, ToSchema)]
pub struct MetadataText {
    pub text: MetadataTextImpl,
}

#[derive(Deserialize, Serialize, Debug, Clone, ToSchema)]
pub struct MetadataTextImpl {
    pub num_lines: usize,
    pub num_chars: usize,
}

impl MetadataText {
    pub fn new(num_lines: usize, num_chars: usize) -> Self {
        Self {
            text: MetadataTextImpl {
                num_lines,
                num_chars,
            },
        }
    }
}

impl std::fmt::Display for MetadataText {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        write!(
            f,
            "MetadataText({} lines, {} chars)",
            self.text.num_lines, self.text.num_chars
        )
    }
}