qubit_spi/service_spec.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! Service specification binding configuration and service contracts.
11
12/// Type-level description of one pluggable service family.
13///
14/// A service specification gives a registry one type parameter that carries the
15/// configuration type accepted by providers and the service contract implemented
16/// by produced services.
17pub trait ServiceSpec {
18 /// Configuration type passed to provider checks and factories.
19 type Config: ?Sized;
20
21 /// Service contract implemented by provider-created services.
22 type Service: ?Sized;
23}