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