pub enum GhcrError {
Version(String),
Http(Error),
Malformed {
repo: String,
what: &'static str,
},
GcpToken {
registry: String,
reason: String,
},
}Expand description
A digest-resolution failure.
A library error (thiserror) so callers on anyhow can add context and
callers on thiserror can wrap it.
Variants§
Version(String)
The target version did not parse as semver (so it can’t map to a published image tag).
Http(Error)
The HTTP client could not be built or a request failed in transport.
Malformed
The registry accepted the request but returned no usable body/header (no token, or no digest header on the manifest response).
Fields
GcpToken
A GCP access token could not be obtained for a *.pkg.dev / *.gcr.io
registry, so the digest cannot be resolved. Fail closed rather than fall
back to an anonymous request that would 401.
Trait Implementations§
Source§impl Error for GhcrError
impl Error for GhcrError
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 GhcrError
impl !UnwindSafe for GhcrError
impl Freeze for GhcrError
impl Send for GhcrError
impl Sync for GhcrError
impl Unpin for GhcrError
impl UnsafeUnpin for GhcrError
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request