#[non_exhaustive]pub enum Error {
Show 15 variants
NotFound {
uri: String,
},
NotModified {
uri: String,
},
Unauthenticated {
message: String,
},
PermissionDenied {
message: String,
},
RateLimited {
retry_after_ms: u64,
},
Http {
status: u16,
message: String,
},
InvalidUrl {
message: String,
},
Crawl {
source_kind: &'static str,
message: String,
},
Extract {
message: String,
},
Embed {
message: String,
},
Format {
message: String,
},
DimMismatch {
index: usize,
query: usize,
},
Timeout {
duration_ms: u64,
},
Backend {
backend: &'static str,
message: String,
},
Io {
source: Error,
},
}Expand description
The unified error type for every link-r operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
A resource (page, index file) could not be found.
NotModified
The remote returned 304 Not Modified — used as the unchanged sentinel for incremental rebuilds.
Unauthenticated
Authentication was required and failed or was missing.
PermissionDenied
The credential was valid but lacked permission.
RateLimited
The remote rate-limited us; retry after the given delay.
Http
A non-success HTTP status that isn’t modelled more specifically.
InvalidUrl
A malformed or unsupported URL.
Crawl
Discovery/crawl failed for a source.
Fields
Extract
Content extraction failed.
Embed
Embedding failed.
Format
The on-disk index format was invalid or corrupt.
DimMismatch
A query/index dimension mismatch (e.g. searching with the wrong embedder).
Timeout
An operation timed out.
Backend
An error originating from a named backend dependency.
Fields
Io
An underlying I/O error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn not_found(uri: impl Into<String>) -> Self
pub fn not_found(uri: impl Into<String>) -> Self
Construct a Error::NotFound.
Sourcepub fn not_modified(uri: impl Into<String>) -> Self
pub fn not_modified(uri: impl Into<String>) -> Self
Construct a Error::NotModified.
Sourcepub fn unauthenticated(message: impl Into<String>) -> Self
pub fn unauthenticated(message: impl Into<String>) -> Self
Construct a Error::Unauthenticated.
Sourcepub fn permission_denied(message: impl Into<String>) -> Self
pub fn permission_denied(message: impl Into<String>) -> Self
Construct a Error::PermissionDenied.
Sourcepub fn rate_limited(retry_after_ms: u64) -> Self
pub fn rate_limited(retry_after_ms: u64) -> Self
Construct a Error::RateLimited.
Sourcepub fn invalid_url(message: impl Into<String>) -> Self
pub fn invalid_url(message: impl Into<String>) -> Self
Construct a Error::InvalidUrl.
Sourcepub fn crawl(source_kind: &'static str, message: impl Into<String>) -> Self
pub fn crawl(source_kind: &'static str, message: impl Into<String>) -> Self
Construct a Error::Crawl.
Sourcepub fn extract(message: impl Into<String>) -> Self
pub fn extract(message: impl Into<String>) -> Self
Construct a Error::Extract.
Sourcepub fn embed(message: impl Into<String>) -> Self
pub fn embed(message: impl Into<String>) -> Self
Construct a Error::Embed.
Sourcepub fn format(message: impl Into<String>) -> Self
pub fn format(message: impl Into<String>) -> Self
Construct a Error::Format.
Sourcepub fn backend(backend: &'static str, message: impl Into<String>) -> Self
pub fn backend(backend: &'static str, message: impl Into<String>) -> Self
Construct a Error::Backend.
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Whether retrying the failed operation could plausibly succeed.
Drives backoff in the fetch/crawl layer: timeouts, rate limits, transient HTTP 5xx/408/429, and recoverable I/O conditions are retriable; logical errors (not found, auth, format) are not.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for Error
graph-r core (byte codecs, container, mmap) reports malformed images as
format errors; its I/O stays I/O.
impl From<Error> for Error
graph-r core (byte codecs, container, mmap) reports malformed images as format errors; its I/O stays I/O.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more