blob: 8db4180a185502ccfe281b77156c2a7bac9a732c [file] [log] [blame]
// DO NOT EDIT: This file is machine-generated by fidlgen
#![warn(clippy::all)]
#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
pub mod natural {}
pub mod wire {}
pub mod wire_optional {}
pub mod generic {}
pub use self::natural::*;
/// The type corresponding to the DriverProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct DriverProtocol;
#[cfg(feature = "driver")]
impl ::fidl_next::HasTransport for DriverProtocol {
type Transport = ::fdf_fidl::DriverChannel;
}
pub mod driver_protocol {
pub mod prelude {
pub use crate::{
DriverProtocol, DriverProtocolClientHandler, DriverProtocolServerHandler,
driver_protocol,
};
}
mod ___detail {
unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DriverProtocol
where
___T: ::fidl_next::Transport,
{
type Client = DriverProtocolClient<___T>;
type Server = DriverProtocolServer<___T>;
}
/// The client for the `DriverProtocol` protocol.
#[repr(transparent)]
pub struct DriverProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> DriverProtocolClient<___T> where ___T: ::fidl_next::Transport {}
/// The server for the `DriverProtocol` protocol.
#[repr(transparent)]
pub struct DriverProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> DriverProtocolServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the DriverProtocol protocol.
///
/// See [`DriverProtocol`] for more details.
pub trait DriverProtocolClientHandler<
#[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
#[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
>
{
}
impl<___T> DriverProtocolClientHandler<___T> for ::fidl_next::IgnoreEvents where
___T: ::fidl_next::Transport
{
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DriverProtocol
where
___H: DriverProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_event(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// A server handler for the DriverProtocol protocol.
///
/// See [`DriverProtocol`] for more details.
pub trait DriverProtocolServerHandler<
#[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
#[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
>
{
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DriverProtocol
where
___H: DriverProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// The type corresponding to the SomeProtocol protocol.
#[derive(PartialEq, Debug)]
pub struct SomeProtocol;
#[cfg(target_os = "fuchsia")]
impl ::fidl_next::HasTransport for SomeProtocol {
type Transport = ::fidl_next::fuchsia::zx::Channel;
}
pub mod some_protocol {
pub mod prelude {
pub use crate::{
SomeProtocol, SomeProtocolClientHandler, SomeProtocolServerHandler, some_protocol,
};
}
mod ___detail {
unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::SomeProtocol
where
___T: ::fidl_next::Transport,
{
type Client = SomeProtocolClient<___T>;
type Server = SomeProtocolServer<___T>;
}
/// The client for the `SomeProtocol` protocol.
#[repr(transparent)]
pub struct SomeProtocolClient<___T: ::fidl_next::Transport> {
#[allow(dead_code)]
client: ::fidl_next::protocol::Client<___T>,
}
impl<___T> SomeProtocolClient<___T> where ___T: ::fidl_next::Transport {}
/// The server for the `SomeProtocol` protocol.
#[repr(transparent)]
pub struct SomeProtocolServer<___T: ::fidl_next::Transport> {
server: ::fidl_next::protocol::Server<___T>,
}
impl<___T> SomeProtocolServer<___T> where ___T: ::fidl_next::Transport {}
}
}
/// A client handler for the SomeProtocol protocol.
///
/// See [`SomeProtocol`] for more details.
pub trait SomeProtocolClientHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
}
impl<___T> SomeProtocolClientHandler<___T> for ::fidl_next::IgnoreEvents where
___T: ::fidl_next::Transport
{
}
impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for SomeProtocol
where
___H: SomeProtocolClientHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_event(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}
/// A server handler for the SomeProtocol protocol.
///
/// See [`SomeProtocol`] for more details.
pub trait SomeProtocolServerHandler<
#[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
#[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
>
{
}
impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for SomeProtocol
where
___H: SomeProtocolServerHandler<___T> + ::core::marker::Send,
___T: ::fidl_next::Transport,
{
async fn on_one_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
async fn on_two_way(
handler: &mut ___H,
ordinal: u64,
flexibility: ::fidl_next::protocol::Flexibility,
buffer: ___T::RecvBuffer,
responder: ::fidl_next::protocol::Responder<___T>,
) -> ::core::result::Result<
(),
::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
> {
match ordinal {
ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
}
}
}