#[cfg(feature = "async")]
use super::loader::AsyncIncludeLoader;
use super::loader::IncludeLoaderError;
use crate::prelude::parser::loader::IncludeLoader;
#[derive(Debug, Default)]
pub struct NoopIncludeLoader;
impl IncludeLoader for NoopIncludeLoader {
fn resolve(&self, path: &str) -> Result<String, IncludeLoaderError> {
Err(IncludeLoaderError::not_found(path))
}
}
#[cfg(feature = "async")]
#[cfg_attr(target_arch = "wasm32", async_trait::async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait::async_trait)]
impl AsyncIncludeLoader for NoopIncludeLoader {
async fn async_resolve(&self, path: &str) -> Result<String, IncludeLoaderError> {
Err(IncludeLoaderError::not_found(path))
}
}