1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
//! `NoOpStateless` test capability.
//!
//! A reference capability with no internal state, intended for end-to-end
//! tests of the extension/capability wiring (registration, resolution,
//! `SharedAsLocal` fallback, builder APIs). Methods cover the relevant
//! codegen permutations: `&self` x {sync, async} x {with-args, no-args} x
//! {borrowed return, owned return}.
//!
//! The `#[capability]` proc macro expands the trait below into:
//!
//! - A `pub(crate) mod local` containing the `!Send` `NoOpStateless` trait variant
//! - A `pub(crate) mod shared` containing the `Send + Sync` `NoOpStateless` trait variant
//! - A `SharedAsLocalNoOpStateless` adapter
//! - A zero-sized `pub struct NoOpStateless` registration handle
//! - `local_entry::<E>` / `shared_entry::<E>` factory bridges
//! - A `KNOWN_CAPABILITIES` distributed-slice entry
use capability;
/// No-op test capability with no internal state.
///
/// All methods are pure: they never mutate `self`, and reference
/// implementations can be plain value types with no interior
/// mutability. Used by tests to exercise the registration and
/// resolution paths without entangling them with state semantics.
// The `#[capability]` macro emits the `local`/`shared` trait modules as
// `pub(crate)`, so downstream test crates reach the variants through these
// public aliases (a single surface) rather than the private submodule paths.
/// The `!Send` (local) variant of the [`NoOpStateless`] capability trait.
pub use NoOpStateless as LocalNoOpStateless;
/// The `Send + Sync` (shared) variant of the [`NoOpStateless`] capability trait.
pub use NoOpStateless as SharedNoOpStateless;