use crate::domain::exporter::{ExportResult, ExporterConfig, ExporterError};
#[derive(Debug)]
pub struct ZvecExporter {
config: ExporterConfig,
}
impl ZvecExporter {
#[must_use]
pub fn new(config: ExporterConfig) -> Self {
Self { config }
}
#[must_use]
pub fn is_available() -> bool {
false
}
}
impl crate::domain::exporter::Exporter for ZvecExporter {
fn export(&self, _document: crate::domain::entities::DocumentChunk) -> ExportResult<()> {
Err(ExporterError::InvalidConfig(
"ZvecExporter not yet implemented - requires zvec-sys dependency".to_string(),
))
}
fn export_batch(
&self,
_documents: Vec<crate::domain::entities::DocumentChunk>,
) -> ExportResult<()> {
Err(ExporterError::InvalidConfig(
"ZvecExporter not yet implemented - requires zvec-sys dependency".to_string(),
))
}
fn config(&self) -> &ExporterConfig {
&self.config
}
}
#[cfg(test)]
mod tests {
use std::path::PathBuf;
use crate::domain::entities::ExportFormat;
use crate::domain::exporter::Exporter;
use super::*;
#[test]
fn test_zvec_exporter_placeholder() {
let config = ExporterConfig::new(PathBuf::from("/tmp"), ExportFormat::Zvec, "test");
let exporter = ZvecExporter::new(config);
let result = exporter.export(
crate::domain::entities::DocumentChunk::from_scraped_content(
&crate::domain::ScrapedContent {
title: "Test".to_string(),
content: "Content".to_string(),
url: crate::domain::ValidUrl::parse("https://example.com").unwrap(),
excerpt: None,
author: None,
date: None,
html: None,
assets: Vec::new(),
},
),
);
assert!(result.is_err());
}
#[test]
fn test_zvec_availability() {
assert!(!ZvecExporter::is_available());
}
}