pub struct ExecutableEngineRegistrationConfig<B> { /* private fields */ }Expand description
Typed configuration for assembling an executable engine registration.
The backend, event domain, ingress contract, and optional cache owner are kept together with the shared provider metadata until the runtime creates the complete execution witness.
§Examples
use std::sync::Arc;
use tenferro_runtime::{
CoreCapabilityBundle, EngineId, EngineRegistrationMetadata,
ExecutableEngineRegistrationConfig, EventDomainDriver, HardwareClassId,
ImmediateEventDomainDriver, InputIngressContract, InputPlacementContract,
InputSignatureContract, ProviderDeviceIdentity, ProviderId, ResidentOutputContract,
RuntimeInputContract, StorageClass,
};
fn make_config<B>(backend: B) -> ExecutableEngineRegistrationConfig<B> {
let engine_id = EngineId::new("example.engine.v1").unwrap();
let provider = ProviderDeviceIdentity::new(
ProviderId::new("example.provider").unwrap(),
"device:0",
)
.unwrap();
let hardware = HardwareClassId::new("example.hardware.v1").unwrap();
let storage = StorageClass::new("example.storage.v1").unwrap();
let metadata = EngineRegistrationMetadata::new(
engine_id,
provider,
hardware,
Arc::from([storage.clone()]),
storage,
CoreCapabilityBundle::default(),
);
let ingress = InputIngressContract::new(
InputPlacementContract::new(|_, _| true),
InputSignatureContract::new(|_, _, _, _| true),
RuntimeInputContract::new(|_, _| true),
ResidentOutputContract::new(|_, _| true),
);
let event_domain_driver: Arc<dyn EventDomainDriver> =
Arc::new(ImmediateEventDomainDriver::new());
ExecutableEngineRegistrationConfig::new(
metadata,
backend,
event_domain_driver,
ingress,
None,
)
}
let _ = make_config(());Implementations§
Source§impl<B> ExecutableEngineRegistrationConfig<B>
impl<B> ExecutableEngineRegistrationConfig<B>
Sourcepub fn new(
metadata: EngineRegistrationMetadata,
backend: B,
event_domain_driver: Arc<dyn EventDomainDriver>,
ingress: InputIngressContract,
cache_owner: Option<Arc<dyn RuntimeCacheOwner>>,
) -> Self
pub fn new( metadata: EngineRegistrationMetadata, backend: B, event_domain_driver: Arc<dyn EventDomainDriver>, ingress: InputIngressContract, cache_owner: Option<Arc<dyn RuntimeCacheOwner>>, ) -> Self
Construct an executable registration descriptor.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for ExecutableEngineRegistrationConfig<B>where
B: Freeze,
impl<B> !RefUnwindSafe for ExecutableEngineRegistrationConfig<B>
impl<B> Send for ExecutableEngineRegistrationConfig<B>where
B: Send,
impl<B> Sync for ExecutableEngineRegistrationConfig<B>where
B: Sync,
impl<B> Unpin for ExecutableEngineRegistrationConfig<B>where
B: Unpin,
impl<B> UnsafeUnpin for ExecutableEngineRegistrationConfig<B>where
B: UnsafeUnpin,
impl<B> !UnwindSafe for ExecutableEngineRegistrationConfig<B>
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