pubmed_client/pmc/extracted.rs
1use pubmed_parser::pmc::Figure;
2use serde::{Deserialize, Serialize};
3
4/// Represents an extracted figure with both XML metadata and file path.
5///
6/// This is a client-layer type that combines domain-level figure metadata
7/// (from the parsed XML) with extraction concerns (file path, size, dimensions).
8#[derive(Debug, Serialize, Deserialize, Clone)]
9pub struct ExtractedFigure {
10 /// Figure metadata from XML
11 pub figure: Figure,
12 /// Actual file path where the figure was extracted
13 pub extracted_file_path: String,
14 /// File size in bytes
15 pub file_size: Option<u64>,
16 /// Image dimensions (width, height) if available
17 pub dimensions: Option<(u32, u32)>,
18}