pub fn runtime_engine_registration_with_id(
backend: &CpuBackend,
engine_id: EngineId,
) -> Result<EngineRegistration, RuntimeConfigError>Expand description
Build a runtime engine registration for a CpuBackend with a
caller-selected engine identifier.
Use this when one process registers more than one CPU backend, for example when separate CPU resource domains or provider bundles need distinct placement identities. The hardware and storage classes remain the canonical host CPU classes; only the engine identity is caller-selected.
§Errors
Returns [RuntimeConfigError] if the supplied engine identifier or one of
the built-in CPU runtime identifiers fails runtime validation, or if the
registration is internally invalid.
§Examples
use tenferro_cpu::{runtime_engine_registration_with_id, CpuBackend};
use tenferro_runtime::EngineId;
let backend = CpuBackend::new();
let engine_id = EngineId::new("example.cpu.primary.v1")?;
let registration = runtime_engine_registration_with_id(&backend, engine_id)?;
assert_eq!(registration.engine_id().as_str(), "example.cpu.primary.v1");