fidl_driver/endpoints.rs
1// Copyright 2024 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use std::marker::PhantomData;
6
7use fdf::Channel;
8
9#[derive(Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
10pub struct DriverClientEnd<T>(pub(crate) Option<Channel<u8>>, pub(crate) PhantomData<T>);
11
12/// A marker for a particular FIDL protocol.
13///
14/// Implementations of this trait can be used to manufacture instances of a FIDL
15/// protocol and get metadata about a particular protocol.
16pub trait DriverProtocolMarker: Sized + Send + Sync + 'static {
17 /// The name of the protocol suitable for debug purposes.
18 ///
19 /// For discoverable protocols, this should be identical to
20 /// `<Self as DiscoverableProtocolMarker>::PROTOCOL_NAME`.
21 const DEBUG_NAME: &'static str;
22
23 // TODO(364653685): This will contain associated types for proxies and servers.
24}