Skip to main content

liminal_server/server/
connection.rs

1#[path = "connection/apply.rs"]
2mod apply;
3#[path = "connection/channel_registry.rs"]
4pub mod channel_registry;
5#[path = "connection/conversation.rs"]
6mod conversation;
7#[path = "connection/delivery.rs"]
8mod delivery;
9#[path = "connection/incarnation.rs"]
10mod incarnation;
11#[cfg(test)]
12#[path = "connection/incarnation_tests.rs"]
13mod incarnation_tests;
14#[path = "connection/loopback.rs"]
15mod loopback;
16#[path = "connection/notifier.rs"]
17pub mod notifier;
18#[path = "connection/outbound.rs"]
19mod outbound;
20#[path = "connection/participant_delivery.rs"]
21mod participant_delivery;
22#[cfg(test)]
23#[path = "connection/participant_runtime_tests.rs"]
24mod participant_runtime_tests;
25#[path = "connection/pending_reply.rs"]
26mod pending_reply;
27#[path = "connection/pre_admission.rs"]
28pub(crate) mod pre_admission;
29#[path = "connection/process.rs"]
30mod process;
31#[path = "connection/refusal.rs"]
32pub(crate) mod refusal;
33#[cfg(test)]
34#[path = "connection/refusal_tests.rs"]
35mod refusal_tests;
36#[path = "connection/services.rs"]
37pub mod services;
38#[cfg(test)]
39#[path = "connection/services_a1_dedup_tests.rs"]
40mod services_a1_dedup_tests;
41#[cfg(test)]
42#[path = "connection/services_adopt_config_tests.rs"]
43mod services_adopt_config_tests;
44#[path = "connection/services_cluster.rs"]
45mod services_cluster;
46#[cfg(test)]
47#[path = "connection/services_r5_tests.rs"]
48mod services_r5_tests;
49#[path = "connection/services_schema.rs"]
50mod services_schema;
51#[cfg(test)]
52#[path = "connection/services_unresolved_restart_tests.rs"]
53mod services_unresolved_restart_tests;
54#[cfg(test)]
55#[path = "connection/services_unresolved_tests.rs"]
56mod services_unresolved_tests;
57#[path = "connection/state.rs"]
58mod state;
59#[path = "connection/supervisor.rs"]
60mod supervisor;
61#[cfg(test)]
62#[path = "connection/tests_no_path_refusal.rs"]
63mod tests_no_path_refusal;
64#[path = "connection/wake.rs"]
65pub(crate) mod wake;
66#[path = "connection/websocket.rs"]
67pub(crate) mod websocket;
68#[path = "connection/worker_front_door.rs"]
69mod worker_front_door;
70
71pub use channel_registry::{
72    CONSOLE_NAMESPACE_PREFIX, CONSOLE_TAP_PREFIX, ChannelAccessError, ChannelConfigField,
73    ChannelDescriptor, ChannelOrigin, ChannelRegistration, ChannelRegistryError, ChannelState,
74    ChannelStatus, MAX_CHANNELS_KEY, Registered, console_tap_target, is_console_subject,
75};
76pub use conversation::{ConnectionConversation, ConversationResource};
77// The in-process transport's public surface is exactly two names: the type an
78// embedded caller holds and the constructor that mints it. `LoopbackServerEnd`
79// is deliberately NOT re-exported — it is the half that touches the connection
80// machinery, so the private `loopback` module is its visibility ceiling and the
81// step-3 sites that need it (all of them inside `connection`) reach it as
82// `loopback::LoopbackServerEnd`.
83pub use loopback::{LoopbackClientEnd, LoopbackDuplex};
84pub use notifier::ConnectionNotifier;
85#[cfg(test)]
86pub(crate) const fn assert_held_heads_are_move_only() {
87    macro_rules! assert_not_impl {
88        ($type:ty: $trait:path) => {
89            const _: fn() = || {
90                struct Probe<T: ?Sized>(core::marker::PhantomData<T>);
91                trait AmbiguousIfImplemented<A> {
92                    fn probe() {}
93                }
94                impl<T: ?Sized> AmbiguousIfImplemented<()> for Probe<T> {}
95                impl<T: ?Sized + $trait> AmbiguousIfImplemented<u8> for Probe<T> {}
96                let _ = <Probe<$type> as AmbiguousIfImplemented<_>>::probe;
97            };
98        };
99    }
100    assert_not_impl!(participant_delivery::HeldParticipantHead: Clone);
101    assert_not_impl!(participant_delivery::HeldParticipantHead: Copy);
102    assert_not_impl!(participant_delivery::HeldObserverHead: Clone);
103    assert_not_impl!(participant_delivery::HeldObserverHead: Copy);
104}
105pub use services::{
106    ChannelCluster, ChannelOperation, ConnectionServices, ConnectionSubscription,
107    LiminalConnectionServices, PublishOutcome, build_connection_services,
108};
109pub use supervisor::{
110    ConnectionHandle, ConnectionSupervisor, ConnectionSupervisorBuilder, PushReplyAwaiter,
111};
112pub(crate) use wake::ReadyWaker;
113pub use websocket::WebSocketListener;
114pub use worker_front_door::WorkerFrontDoorServices;