#[non_exhaustive]pub enum ExtensionModuleError {
ConflictingModule {
module_id: ExtensionModuleId,
},
ConflictingEngine {
module_id: ExtensionModuleId,
family_id: &'static str,
engine_id: EngineId,
},
PlanningConfigWithoutEngine {
module_id: ExtensionModuleId,
engine_id: EngineId,
},
PlanningConfigFamilyMismatch {
module_id: ExtensionModuleId,
engine_id: EngineId,
expected: &'static str,
actual: &'static str,
},
MissingPlanningConfig {
module_id: ExtensionModuleId,
engine_id: EngineId,
},
ConflictingPlanningConfig {
module_id: ExtensionModuleId,
engine_id: EngineId,
},
ConflictingCacheOwner {
module_id: ExtensionModuleId,
owner: CacheOwnerId,
},
}Expand description
Reports invalid extension module registration transactions.
§Examples
use tenferro_runtime::{EngineId, ExtensionModuleError, ExtensionModuleId};
let error = ExtensionModuleError::MissingPlanningConfig {
module_id: ExtensionModuleId::new("tenferro.module.test")?,
engine_id: EngineId::new("tenferro.engine.test")?,
};
assert!(error.to_string().contains("planning config"));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.
ConflictingModule
A distinct module is already installed at the same module ID.
Fields
§
module_id: ExtensionModuleIdConflicting module ID.
ConflictingEngine
A distinct extension engine is already registered for the same
(family, engine) key.
Fields
§
module_id: ExtensionModuleIdExtension module ID.
PlanningConfigWithoutEngine
A planning config was registered without exactly one matching engine.
PlanningConfigFamilyMismatch
Planning config family did not match the registered engine family.
Fields
§
module_id: ExtensionModuleIdExtension module ID.
MissingPlanningConfig
An engine was registered without its required planning config.
ConflictingPlanningConfig
A distinct planning config is already registered for the same engine.
ConflictingCacheOwner
A distinct cache owner is already registered for the same local owner ID.
Trait Implementations§
Source§impl Debug for ExtensionModuleError
impl Debug for ExtensionModuleError
Source§impl Display for ExtensionModuleError
impl Display for ExtensionModuleError
Source§impl Error for ExtensionModuleError
impl Error for ExtensionModuleError
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 ExtensionModuleError
impl RefUnwindSafe for ExtensionModuleError
impl Send for ExtensionModuleError
impl Sync for ExtensionModuleError
impl Unpin for ExtensionModuleError
impl UnsafeUnpin for ExtensionModuleError
impl UnwindSafe for ExtensionModuleError
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