From 583cc826ebe4eac03581c31eec576580e514aa71 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 18 Aug 2026 17:38:20 -0700 Subject: [PATCH] more types cleanup --- rust/pspp/src/spv/read/graph.rs | 299 ++++++++++++++++++-------------- 1 file changed, 166 insertions(+), 133 deletions(-) diff --git a/rust/pspp/src/spv/read/graph.rs b/rust/pspp/src/spv/read/graph.rs index 88cf30c204..61ca63f5f0 100644 --- a/rust/pspp/src/spv/read/graph.rs +++ b/rust/pspp/src/spv/read/graph.rs @@ -122,20 +122,116 @@ pub enum GraphError { /// Error parsing XML data: {0} XmlError(#[from] serde_path_to_error::Error), - /// Graph has no `coordinates` element. - NoCoordinates, - - /// Graph has multiple `{0}` child elements. - DuplicateGraphChild(&'static str), - /// Graph references missing variable `{0}`. MissingVariable(String), } +#[derive(Debug)] +pub struct Visualization { + /// Locale used for output, e.g. `en-US`. + lang: Option, + + /// The `id` for the base [Style] for the graph. + _style: Option, + + /// Title or caption. + _description: Option, + + /// VizML Schema version number. + _version: Option, + + id: Option, + + source_variables: Vec, + derived_variables: Vec, + delimited_file_sources: Vec, + embedded_sources: Vec, + categorical_domains: Vec, + interval_domains: Vec, + graphs: Vec, + label_frames: Vec, + containers: Vec, + styles: Vec