Enum warg_client::ClientError

source ·
pub enum ClientError {
Show 24 variants NoHomeRegistryUrl, ResettingRegistryLocalStateFailed, ClearContentCacheFailed, InvalidCheckpointSignature, InvalidCheckpointKeyId { key_id: KeyID, }, NoOperatorRecords, OperatorValidationFailed { inner: ValidationError, }, CannotInitializePackage { name: PackageName, }, MustInitializePackage { name: PackageName, }, NotPublishing, NothingToPublish { name: PackageName, }, PackageDoesNotExist { name: PackageName, }, PackageDoesNotExistWithHint { name: PackageName, hint: HeaderValue, }, PackageVersionDoesNotExist { version: Version, name: PackageName, }, PackageValidationFailed { name: PackageName, inner: ValidationError, }, ContentNotFound { digest: AnyHash, }, IncorrectContent { digest: AnyHash, expected: AnyHash, }, PackageLogEmpty { name: PackageName, }, PublishRejected { name: PackageName, record_id: RecordId, reason: String, }, PackageMissingContent, CheckpointLogLengthRewind { from: RegistryLen, to: RegistryLen, }, CheckpointChangedLogRootOrMapRoot { log_length: RegistryLen, }, Api(ClientError), Other(Error),
}
Expand description

Represents an error returned by Warg registry clients.

Variants§

§

NoHomeRegistryUrl

No home registry registry server URL is configured.

§

ResettingRegistryLocalStateFailed

Reset registry local state.

§

ClearContentCacheFailed

Clearing content local cache.

§

InvalidCheckpointSignature

Checkpoint signature failed verification

§

InvalidCheckpointKeyId

Checkpoint signature failed verification

Fields

§key_id: KeyID

The signature key ID.

§

NoOperatorRecords

The server did not provide operator records.

§

OperatorValidationFailed

The operator failed validation.

Fields

§inner: ValidationError

The validation error.

§

CannotInitializePackage

The package already exists and cannot be initialized.

Fields

§name: PackageName

The package name that already exists.

§

MustInitializePackage

The package must be initialized before publishing.

Fields

§name: PackageName

The name of the package that must be initialized.

§

NotPublishing

There is no publish operation in progress.

§

NothingToPublish

The package has no records to publish.

Fields

§name: PackageName

The package that has no publish operations.

§

PackageDoesNotExist

The package does not exist.

Fields

§name: PackageName

The missing package.

§

PackageDoesNotExistWithHint

The package does not exist with hint.

Fields

§name: PackageName

The missing package.

§hint: HeaderValue

The registry hint

§

PackageVersionDoesNotExist

The package version does not exist.

Fields

§version: Version

The missing version of the package.

§name: PackageName

The package with the missing version.

§

PackageValidationFailed

The package failed validation.

Fields

§name: PackageName

The package that failed validation.

§inner: ValidationError

The validation error.

§

ContentNotFound

Content was not found during a publish operation.

Fields

§digest: AnyHash

The digest of the missing content.

§

IncorrectContent

Content digest was different than expected.

Fields

§digest: AnyHash

The digest of the missing content.

§expected: AnyHash

The expected

§

PackageLogEmpty

The package log is empty and cannot be validated.

Fields

§name: PackageName

The package with an empty package log.

§

PublishRejected

A publish operation was rejected.

Fields

§name: PackageName

The package that was rejected.

§record_id: RecordId

The record identifier for the record that was rejected.

§reason: String

The reason it was rejected.

§

PackageMissingContent

The package is still missing content.

§

CheckpointLogLengthRewind

The registry provided a latest checkpoint with a log length less than a previously provided checkpoint log length.

Fields

§from: RegistryLen

The previously received checkpoint log length.

§to: RegistryLen

The latest checkpoint log length.

§

CheckpointChangedLogRootOrMapRoot

The registry provided a checkpoint with a different log_root and map_root than a previously provided checkpoint.

Fields

§log_length: RegistryLen

The checkpoint log length.

§

Api(ClientError)

An error occurred during an API operation.

§

Other(Error)

An error occurred while performing a client operation.

Trait Implementations§

source§

impl Debug for ClientError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ClientError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ClientError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<ClientError> for ClientError

source§

fn from(source: ClientError) -> Self

Converts to this type from the input type.
source§

impl From<Error> for ClientError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more