pub enum PackageUpgradeError {
UnableToFetchPackage {
package_id: ObjectId,
},
NotAPackage {
object_id: ObjectId,
},
IncompatibleUpgrade,
DigestDoesNotMatch {
digest: Digest,
},
UnknownUpgradePolicy {
policy: u8,
},
PackageIdDoesNotMatch {
package_id: ObjectId,
ticket_id: ObjectId,
},
}Expand description
An error with a upgrading a package
§BCS
The BCS serialized form for this type is defined by the following ABNF:
package-upgrade-error = unable-to-fetch-package /
not-a-package /
incompatible-upgrade /
digest-does-not-match /
unknown-upgrade-policy /
package-id-does-not-match
unable-to-fetch-package = %x00 object-id
not-a-package = %x01 object-id
incompatible-upgrade = %x02
digest-does-not-match = %x03 digest
unknown-upgrade-policy = %x04 u8
package-id-does-not-match = %x05 object-id object-idVariants§
UnableToFetchPackage
Unable to fetch package
NotAPackage
Object is not a package
IncompatibleUpgrade
Package upgrade is incompatible with previous version
DigestDoesNotMatch
Digest in upgrade ticket and computed digest differ
UnknownUpgradePolicy
Upgrade policy is not valid
PackageIdDoesNotMatch
PackageId does not matach PackageId in upgrade ticket
Implementations§
Source§impl PackageUpgradeError
impl PackageUpgradeError
pub fn is_unable_to_fetch_package(&self) -> bool
pub fn is_not_a_package(&self) -> bool
pub fn is_incompatible_upgrade(&self) -> bool
pub fn is_digest_does_not_match(&self) -> bool
pub fn is_unknown_upgrade_policy(&self) -> bool
pub fn is_package_id_does_not_match(&self) -> bool
Trait Implementations§
Source§impl Arbitrary for PackageUpgradeError
impl Arbitrary for PackageUpgradeError
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<PackageUpgradeError>
type Strategy = BoxedStrategy<PackageUpgradeError>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl Clone for PackageUpgradeError
impl Clone for PackageUpgradeError
Source§fn clone(&self) -> PackageUpgradeError
fn clone(&self) -> PackageUpgradeError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackageUpgradeError
impl Debug for PackageUpgradeError
Source§impl<'de> Deserialize<'de> for PackageUpgradeError
Available on crate feature serde only.
impl<'de> Deserialize<'de> for PackageUpgradeError
Available on crate feature
serde only.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 JsonSchema for PackageUpgradeError
impl JsonSchema for PackageUpgradeError
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for PackageUpgradeError
impl PartialEq for PackageUpgradeError
Source§impl Serialize for PackageUpgradeError
Available on crate feature serde only.
impl Serialize for PackageUpgradeError
Available on crate feature
serde only.impl Eq for PackageUpgradeError
impl StructuralPartialEq for PackageUpgradeError
Auto Trait Implementations§
impl Freeze for PackageUpgradeError
impl RefUnwindSafe for PackageUpgradeError
impl Send for PackageUpgradeError
impl Sync for PackageUpgradeError
impl Unpin for PackageUpgradeError
impl UnwindSafe for PackageUpgradeError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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