Skip to main content

UpgradeError

Enum UpgradeError 

Source
pub enum UpgradeError {
Show 17 variants FromInvalid { from: String, reason: String, }, ModuleEmpty { kind: &'static str, }, ModuleInvalid { kind: &'static str, module: String, reason: String, }, EmptyScript, AbsoluteScript { script: PathBuf, }, ParentEscapeScript { script: PathBuf, }, NonLispExtensionScript { script: PathBuf, }, DuplicateFrom { from: String, }, FromNotBeforeVersao { from: String, versao: String, }, RestartNotExclusive { from: String, restart_count: usize, other_kinds: Vec<&'static str>, }, StateChangeWithoutPriorLoad { from: String, script: PathBuf, }, PurgeWithoutPriorLoad { from: String, kind: &'static str, module: String, }, DuplicateCleanup { from: String, module: String, kinds: Vec<&'static str>, }, DuplicateLoadModule { from: String, module: String, }, DuplicateStateChange { from: String, script: PathBuf, }, StateChangeAfterCleanup { from: String, script: PathBuf, prior_cleanup_kind: &'static str, prior_cleanup_module: String, }, StateChangeWithoutOnStateChangeCallback { from: String, script: PathBuf, },
}

Variants§

§

FromInvalid

Fields

§from: String
§reason: String
§

ModuleEmpty

Fields

§kind: &'static str
§

ModuleInvalid

Fields

§kind: &'static str
§module: String
§reason: String
§

EmptyScript

§

AbsoluteScript

Fields

§script: PathBuf
§

ParentEscapeScript

Fields

§script: PathBuf
§

NonLispExtensionScript

Fields

§script: PathBuf
§

DuplicateFrom

Fields

§from: String
§

FromNotBeforeVersao

Fields

§from: String
§versao: String
§

RestartNotExclusive

Fields

§from: String
§restart_count: usize
§other_kinds: Vec<&'static str>
§

StateChangeWithoutPriorLoad

Fields

§from: String
§script: PathBuf
§

PurgeWithoutPriorLoad

Fields

§from: String
§kind: &'static str
§module: String
§

DuplicateCleanup

Fields

§from: String
§module: String
§kinds: Vec<&'static str>
§

DuplicateLoadModule

Fields

§from: String
§module: String
§

DuplicateStateChange

Fields

§from: String
§script: PathBuf
§

StateChangeAfterCleanup

Fields

§from: String
§script: PathBuf
§prior_cleanup_kind: &'static str
§prior_cleanup_module: String
§

StateChangeWithoutOnStateChangeCallback

Fields

§from: String
§script: PathBuf

Implementations§

Source§

impl UpgradeError

Source

pub fn state_change_without_prior_load(from: &str, script: &Path) -> Self

Construct an UpgradeError::StateChangeWithoutPriorLoad naming the offending (:from <prior-versao>) and (:state-change <script>) pair. Folds the uniform Self::StateChangeWithoutPriorLoad { from: from.to_string(), script: script.to_path_buf() } two-field struct-literal onto one substrate primitive so every wire-up on this variant reads through one dispatch rather than the pre-lift three-line open-coded block. The from string threads verbatim from UpgradeFromEntry::prior_versao and the script path from UpgradeInstruction::declared_path at the call site.

Source

pub fn duplicate_state_change(from: &str, script: &Path) -> Self

Construct an UpgradeError::DuplicateStateChange naming the offending (:from <prior-versao>) and (:state-change <script>) pair. Folds the uniform Self::DuplicateStateChange { from: from.to_string(), script: script.to_path_buf() } two-field struct-literal onto one substrate primitive so every wire-up on this variant reads through one dispatch rather than the pre-lift three-line open-coded block. The from string threads verbatim from UpgradeFromEntry::prior_versao and the script path from UpgradeInstruction::declared_path at the call site.

Source

pub fn state_change_without_on_state_change_callback( from: &str, script: &Path, ) -> Self

Construct an UpgradeError::StateChangeWithoutOnStateChangeCallback naming the offending (:from <prior-versao>) and (:state-change <script>) pair. Folds the uniform Self::StateChangeWithoutOnStateChangeCallback { from: from.to_string(), script: script.to_path_buf() } two-field struct-literal onto one substrate primitive so every wire-up on this variant reads through one dispatch rather than the pre-lift three-line open-coded block. The from string threads verbatim from UpgradeFromEntry::prior_versao and the script path from UpgradeInstruction::declared_path at the call site.

Source§

impl UpgradeError

Source

pub fn absolute_script(script: &Path) -> Self

Construct an UpgradeError::AbsoluteScript naming the offending (:state-change <script>). Folds the uniform Self::AbsoluteScript { script: script.to_path_buf() } one-field struct-literal onto one substrate primitive so every closure passed to crate::render::require_sandboxed_lisp_path at UpgradeInstruction::validate on this variant reads through one dispatch rather than the pre-lift three-line open-coded block. The script path threads verbatim from UpgradeInstruction::declared_path at the call site.

Source

pub fn parent_escape_script(script: &Path) -> Self

Construct an UpgradeError::ParentEscapeScript naming the offending (:state-change <script>). Folds the uniform Self::ParentEscapeScript { script: script.to_path_buf() } one-field struct-literal onto one substrate primitive so every closure passed to crate::render::require_sandboxed_lisp_path at UpgradeInstruction::validate on this variant reads through one dispatch rather than the pre-lift three-line open-coded block. The script path threads verbatim from UpgradeInstruction::declared_path at the call site.

Source

pub fn non_lisp_extension_script(script: &Path) -> Self

Construct an UpgradeError::NonLispExtensionScript naming the offending (:state-change <script>). Folds the uniform Self::NonLispExtensionScript { script: script.to_path_buf() } one-field struct-literal onto one substrate primitive so every closure passed to crate::render::require_sandboxed_lisp_path at UpgradeInstruction::validate on this variant reads through one dispatch rather than the pre-lift three-line open-coded block. The script path threads verbatim from UpgradeInstruction::declared_path at the call site.

Source§

impl UpgradeError

Source

pub fn from_invalid(from: &str, reason: &str) -> Self

Construct an UpgradeError::FromInvalid naming the offending (:from <prior-versao>) and the offending :reason axis value. Folds the uniform Self::FromInvalid { from: from.to_string(), reason: reason.to_string() } two-field struct-literal onto one substrate primitive so every in-crate wire-up on this variant reads through one dispatch rather than the pre-lift four-line open-coded block. Both from: &str and reason: &str parameters accept &str literals and &String (via Deref coercion) so every existing wire-up threads through the ctor without a pre-conversion.

Source

pub fn from_not_before_versao(from: &str, versao: &str) -> Self

Construct an UpgradeError::FromNotBeforeVersao naming the offending (:from <prior-versao>) and the offending :versao axis value. Folds the uniform Self::FromNotBeforeVersao { from: from.to_string(), versao: versao.to_string() } two-field struct-literal onto one substrate primitive so every in-crate wire-up on this variant reads through one dispatch rather than the pre-lift four-line open-coded block. Both from: &str and versao: &str parameters accept &str literals and &String (via Deref coercion) so every existing wire-up threads through the ctor without a pre-conversion.

Source

pub fn duplicate_load_module(from: &str, module: &str) -> Self

Construct an UpgradeError::DuplicateLoadModule naming the offending (:from <prior-versao>) and the offending :module axis value. Folds the uniform Self::DuplicateLoadModule { from: from.to_string(), module: module.to_string() } two-field struct-literal onto one substrate primitive so every in-crate wire-up on this variant reads through one dispatch rather than the pre-lift four-line open-coded block. Both from: &str and module: &str parameters accept &str literals and &String (via Deref coercion) so every existing wire-up threads through the ctor without a pre-conversion.

Source§

impl UpgradeError

Source

pub fn duplicate_from(entry: &UpgradeFromEntry) -> Self

Construct an UpgradeError::DuplicateFrom naming the offending duplicate (:from <prior-versao>) entry, projecting through the paired UpgradeFromEntry::prior_versao scalar accessor on the substrate primitive. Folds the uniform Self::DuplicateFrom { from: entry.prior_versao().to_string() } one-field struct-literal onto one substrate primitive so every wire-up on this variant reads through one dispatch, matching the sibling crate::AplicacaoError::contrato_self_loop (b30edfe) substrate-primitive-projection ctor’s shape on the peer [AplicacaoError] envelope. The entry: &UpgradeFromEntry parameter accepts the borrowed entry verbatim so the paired prior_versao().to_string() projection is spelled once — inside the ctor body — rather than at every wire-up site.

Source

pub fn purge_without_prior_load( from: &str, kind: &'static str, module: &str, ) -> Self

Construct an UpgradeError::PurgeWithoutPriorLoad naming the offending (:from <prior-versao>) entry, the offending cleanup instruction’s :kind lisp-form (:soft-purge / :purge), and its :module target. Folds the uniform Self::PurgeWithoutPriorLoad { from: from.to_string(), kind, module: module.to_string() } three-field struct-literal onto one substrate primitive so every wire-up on this sole-variant cleanup-family load-before-cleanup ordering-refusal envelope reads through one dispatch rather than the pre-lift seven-line open-coded block.

The from: &str parameter accepts &str literals and &String via Deref coercion so the sole in-crate wire-up site threads UpgradeFromEntry::prior_versao verbatim without a pre-conversion. The kind: &'static str parameter accepts the lisp-form &'static str UpgradeInstruction::lisp_form returns for the two UpgradeInstruction::is_cleanup arms — M2_UPGRADE_INSTRUCTION_KIND_SOFT_PURGE / M2_UPGRADE_INSTRUCTION_KIND_PURGE — verbatim without a per-arm re-projection at the ctor path. The module: &str parameter takes the &str UpgradeInstruction::declared_module returns via .expect("is_cleanup() implies declared_module() is Some") at the caller — the is_cleanup-implies-declared_module-is- Some composition pin at [tests::upgrade_instruction_is_cleanup_implies_declared_module_is_some] makes the .expect(…) structurally infallible at build time.

Peer of the sibling one-off standalone-ctor UpgradeError::duplicate_from on the paired one-slot { from: String } envelope on the same UpgradeError envelope, and of the sibling AplicacaoError::contrato_endpoint_not_absolute (cdf1a2c) three-slot { de, para, endpoint: String } sole- variant standalone ctor on the peer AplicacaoError envelope. Closes the last unlifted { from: String, kind: &'static str, module: String } three-slot open-coded struct-literal wire-up on the OTP-appup load-before-cleanup ordering axis, sibling of the peer sub-family generated by [upgrade_from_axis_ctors!] (41d08db, three variants on { from: String, <axis>: String }) on the paired ordering / uniqueness / callback-declaration axes, and of the peer standalone UpgradeError::duplicate_from (7e52aec) one-slot ctor on the sibling cross-entry duplicate- :from gate. Every future consumer that raises this refusal outside UpgradeFromEntry::validate_purge_ordering — a deferred wasm-operator’s install_release/1 per-entry load-before-cleanup re-checker at hot-upgrade dispatch time, a future feira validate --upgrade-from per-caixa admission verb re-running the load-before-cleanup gate on demand, a per-Caixa overlay resolver rejecting a cluster-local :soft-purge / :purge overlay lacking a preceding :load-module — reaches the variant through one call rather than re-inlining the seven-line struct-literal in lockstep with the sole in-crate wire-up site.

Trait Implementations§

Source§

impl Debug for UpgradeError

Source§

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

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

impl Display for UpgradeError

Source§

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

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

impl Eq for UpgradeError

Source§

impl Error for UpgradeError

1.30.0 · Source§

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

👎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 PartialEq for UpgradeError

Source§

fn eq(&self, other: &UpgradeError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for UpgradeError

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToString for T
where T: Display + ?Sized,

Source§

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>,

Source§

type Error = !

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>,

Source§

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.