#[non_exhaustive]pub enum PackageError {
LogNotFound(LogId),
RecordNotFound(RecordId),
RecordNotSourcing,
NamespaceNotDefined(String),
NamespaceImported(String),
Unauthorized(String),
NotSupported(String),
ConflictPendingPublish(RecordId),
Rejection(String),
Message {
status: u16,
message: String,
},
}
Expand description
Represents a package API error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LogNotFound(LogId)
The provided log was not found.
RecordNotFound(RecordId)
The provided record was not found.
RecordNotSourcing
The record is not currently sourcing content.
NamespaceNotDefined(String)
The provided package’s namespace was not found in the operator log.
NamespaceImported(String)
The provided package’s namespace is imported from another registry.
The operation was not authorized by the registry.
NotSupported(String)
The operation was not supported by the registry.
ConflictPendingPublish(RecordId)
The package was rejected by the registry, due to a conflict with a pending publish.
Rejection(String)
The package was rejected by the registry.
Message
An error with a message occurred.
Implementations§
Trait Implementations§
Source§impl Debug for PackageError
impl Debug for PackageError
Source§impl<'de> Deserialize<'de> for PackageError
impl<'de> Deserialize<'de> for PackageError
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PackageError
impl Display for PackageError
Source§impl Error for PackageError
impl Error for PackageError
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 Freeze for PackageError
impl RefUnwindSafe for PackageError
impl Send for PackageError
impl Sync for PackageError
impl Unpin for PackageError
impl UnwindSafe for PackageError
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
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>
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 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>
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