jsonld_core/loader/
none.rs1use super::Loader;
2use crate::{LoadError, loader::RemoteDocument};
3use iri_rs::{Iri, IriBuf};
4
5#[derive(Debug, Default)]
10pub struct NoLoader;
11
12#[derive(Debug, thiserror::Error)]
13#[error("no loader")]
14pub struct CannotLoad;
16
17impl Loader for NoLoader {
18 type Error = CannotLoad;
19
20 #[inline(always)]
21 async fn load(&self, url: Iri<&str>) -> Result<RemoteDocument<IriBuf>, LoadError<Self::Error>> {
22 Err(LoadError::new(url.into(), CannotLoad))
23 }
24}