pub enum Error {
InvalidIri(String),
Request(String, RequestError),
Status(String, u16),
MediaType(String, Option<String>),
NotAContext(String),
Load(String, String),
Kv(KvError),
TooMany(usize),
TimedOut,
JsonLd(Error),
}Expand description
Why a context could not be loaded, or a document’s contexts resolved.
Variants§
InvalidIri(String)
The IRI is not an http or https URL.
Request(String, RequestError)
The request was refused or failed: a private address, a response
past MAX_CONTEXT_BYTES, a network failure.
Status(String, u16)
The server answered other than 200.
MediaType(String, Option<String>)
The server answered with a type other than MEDIA_TYPE.
NotAContext(String)
What came back is not a JSON object with an @context member.
Load(String, String)
The application’s loader failed.
Kv(KvError)
The key-value store failed. fetch_cached reports a failing store
to its caller rather than failing with this.
TooMany(usize)
The document named more contexts to load than Limits::max_remote.
TimedOut
Loading took longer than Limits::timeout.
JsonLd(Error)
The document cannot be expanded.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.