data_modelling_sdk/export/
mod.rs1pub mod avro;
12pub mod json_schema;
13pub mod odcs;
14#[cfg(feature = "png-export")]
15pub mod png;
16pub mod protobuf;
17pub mod sql;
18
19#[derive(Debug)]
25#[must_use = "export results contain the exported content and should be used"]
26pub struct ExportResult {
27 pub content: String,
29 pub format: String,
31}
32
33#[derive(Debug, thiserror::Error)]
35pub enum ExportError {
36 #[error("Serialization error: {0}")]
37 SerializationError(String),
38 #[error("Validation error: {0}")]
39 ValidationError(String),
40 #[error("IO error: {0}")]
41 IoError(String),
42 #[error("Export error: {0}")]
43 ExportError(String),
44}
45
46impl From<Box<dyn std::error::Error>> for ExportError {
47 fn from(err: Box<dyn std::error::Error>) -> Self {
48 ExportError::ExportError(err.to_string())
49 }
50}
51
52pub use avro::AvroExporter;
54pub use json_schema::JSONSchemaExporter;
55pub use odcs::ODCSExporter;
56#[cfg(feature = "png-export")]
57pub use png::PNGExporter;
58pub use protobuf::ProtobufExporter;
59pub use sql::SQLExporter;