use async_trait::async_trait;
use std::path::Path;
use crate::domain::error::DomainError;
use crate::domain::ir::ParsedDocument;
#[async_trait]
pub trait FileParserBackend: Send + Sync {
fn id(&self) -> &'static str;
fn supported_extensions(&self) -> &'static [&'static str];
async fn parse_local_path(&self, path: &Path) -> Result<ParsedDocument, DomainError>;
async fn parse_bytes(
&self,
filename_hint: Option<&str>,
content_type: Option<&str>,
bytes: bytes::Bytes,
) -> Result<ParsedDocument, DomainError>;
}