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