// Generated by alef. Do not edit by hand. #![allow(unused_variables, unreachable_code)] #![allow( clippy::map_identity, clippy::let_and_return, clippy::collapsible_match, clippy::manual_flatten, clippy::too_many_arguments, clippy::unit_arg, clippy::type_complexity, clippy::useless_conversion )] mod frb_generated; pub use flutter_rust_bridge::DartFnFuture; use flutter_rust_bridge::frb; /// Opaque JSON carrier for Rust's internal `InternalDocument` trait contract. /// Dart code should pass this value back to Alef-generated bridge APIs rather /// than treating it as the public `ExtractionResult` DTO. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct InternalDocumentBridge { pub json: String, } #[allow(unused_imports)] pub use kreuzberg::InternalDocument; #[frb(mirror(CacheStats))] pub struct CacheStats { pub total_files: i64, pub total_size_mb: f64, pub available_space_mb: f64, pub oldest_file_age_days: f64, pub newest_file_age_days: f64, } /// Hardware acceleration configuration for ONNX Runtime models. /// /// Controls which execution provider (CPU, CoreML, CUDA, TensorRT) is used /// for inference in layout detection and embedding generation. /// /// # Example /// /// ```rust /// use kreuzberg::AccelerationConfig; /// /// // Auto-select: CoreML on macOS, CUDA on Linux, CPU elsewhere /// let config = AccelerationConfig::default(); /// /// // Force CPU only /// let config = AccelerationConfig { /// provider: kreuzberg::ExecutionProviderType::Cpu, /// ..Default::default() /// }; /// ``` #[frb(mirror(AccelerationConfig))] pub struct AccelerationConfig { /// Execution provider to use for ONNX inference. pub provider: ExecutionProviderType, /// GPU device ID (for CUDA/TensorRT). Ignored for CPU/CoreML/Auto. pub device_id: i64, } /// Cross-extractor content filtering configuration. /// /// Controls whether "furniture" content (headers, footers, page numbers, /// watermarks, repeating text) is included in or stripped from extraction /// results. Applies across all extractors (PDF, DOCX, RTF, ODT, HTML, etc.) /// with format-specific implementation. /// /// When `None` on `ExtractionConfig`, each extractor uses its current /// default behavior unchanged. #[frb(mirror(ContentFilterConfig))] pub struct ContentFilterConfig { /// Include running headers in extraction output. /// /// - PDF: Disables top-margin furniture stripping and prevents the layout /// model from treating `PageHeader`-classified regions as furniture. /// - DOCX: Includes document headers in text output. /// - RTF/ODT: Headers already included; this is a no-op when true. /// - HTML/EPUB: Keeps `
` element content. /// /// Default: `false` (headers are stripped or excluded). pub include_headers: bool, /// Include running footers in extraction output. /// /// - PDF: Disables bottom-margin furniture stripping and prevents the layout /// model from treating `PageFooter`-classified regions as furniture. /// - DOCX: Includes document footers in text output. /// - RTF/ODT: Footers already included; this is a no-op when true. /// - HTML/EPUB: Keeps `