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
ModuleEmpty
ModuleInvalid
EmptyScript
AbsoluteScript
ParentEscapeScript
NonLispExtensionScript
DuplicateFrom
FromNotBeforeVersao
RestartNotExclusive
StateChangeWithoutPriorLoad
PurgeWithoutPriorLoad
DuplicateCleanup
DuplicateLoadModule
DuplicateStateChange
StateChangeAfterCleanup
StateChangeWithoutOnStateChangeCallback
Implementations§
Source§impl UpgradeError
impl UpgradeError
Sourcepub fn state_change_without_prior_load(from: &str, script: &Path) -> Self
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.
Sourcepub fn duplicate_state_change(from: &str, script: &Path) -> Self
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.
Sourcepub fn state_change_without_on_state_change_callback(
from: &str,
script: &Path,
) -> Self
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
impl UpgradeError
Sourcepub fn absolute_script(script: &Path) -> Self
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.
Sourcepub fn parent_escape_script(script: &Path) -> Self
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.
Sourcepub fn non_lisp_extension_script(script: &Path) -> Self
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
impl UpgradeError
Sourcepub fn from_invalid(from: &str, reason: &str) -> Self
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.
Sourcepub fn from_not_before_versao(from: &str, versao: &str) -> Self
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.
Sourcepub fn duplicate_load_module(from: &str, module: &str) -> Self
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
impl UpgradeError
Sourcepub fn duplicate_from(entry: &UpgradeFromEntry) -> Self
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.
Trait Implementations§
Source§impl Debug for UpgradeError
impl Debug for UpgradeError
Source§impl Display for UpgradeError
impl Display for UpgradeError
impl Eq for UpgradeError
Source§impl Error for UpgradeError
impl Error for UpgradeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for UpgradeError
impl PartialEq for UpgradeError
impl StructuralPartialEq for UpgradeError
Auto Trait Implementations§
impl Freeze for UpgradeError
impl RefUnwindSafe for UpgradeError
impl Send for UpgradeError
impl Sync for UpgradeError
impl Unpin for UpgradeError
impl UnsafeUnpin for UpgradeError
impl UnwindSafe for UpgradeError
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.