pub struct EngineRegistrationMetadata { /* private fields */ }Expand description
Shared provider metadata for one runtime engine registration.
The caller supplies the engine and provider/device identities explicitly. Storage metadata is validated when the metadata is assembled into either an executable or preparation-only registration.
§Examples
use std::sync::Arc;
use tenferro_runtime::{
CoreCapabilityBundle, EngineId, EngineRegistrationMetadata, HardwareClassId,
ProviderDeviceIdentity, ProviderId, StorageClass,
};
let engine_id = EngineId::new("example.engine.v1")?;
let provider = ProviderDeviceIdentity::new(
ProviderId::new("example.provider")?,
"device:0",
)?;
let hardware = HardwareClassId::new("example.hardware.v1")?;
let storage = StorageClass::new("example.storage.v1")?;
let metadata = EngineRegistrationMetadata::new(
engine_id,
provider,
hardware,
Arc::from([storage.clone()]),
storage,
CoreCapabilityBundle::default(),
);
let _ = metadata;Implementations§
Source§impl EngineRegistrationMetadata
impl EngineRegistrationMetadata
Sourcepub fn new(
engine_id: EngineId,
provider_device_identity: ProviderDeviceIdentity,
hardware_class: HardwareClassId,
storage_classes: Arc<[StorageClass]>,
default_storage_class: StorageClass,
capabilities: CoreCapabilityBundle,
) -> Self
pub fn new( engine_id: EngineId, provider_device_identity: ProviderDeviceIdentity, hardware_class: HardwareClassId, storage_classes: Arc<[StorageClass]>, default_storage_class: StorageClass, capabilities: CoreCapabilityBundle, ) -> Self
Construct the metadata shared by executable and preparation-only registration descriptors.
Trait Implementations§
Source§impl Clone for EngineRegistrationMetadata
impl Clone for EngineRegistrationMetadata
Source§fn clone(&self) -> EngineRegistrationMetadata
fn clone(&self) -> EngineRegistrationMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EngineRegistrationMetadata
impl !RefUnwindSafe for EngineRegistrationMetadata
impl Send for EngineRegistrationMetadata
impl Sync for EngineRegistrationMetadata
impl Unpin for EngineRegistrationMetadata
impl UnsafeUnpin for EngineRegistrationMetadata
impl !UnwindSafe for EngineRegistrationMetadata
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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