#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use bitflags::bitflags;
use fidl::client::QueryResponseFut;
use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
use fidl::endpoints::{ControlHandle as _, Responder as _};
use futures::future::{self, MaybeDone, TryFutureExt};
use zx_status;
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct UnknownInteractionsProtocolFlexibleEventFieldsRequest {
pub some_field: i32,
}
impl fidl::Persistable for UnknownInteractionsProtocolFlexibleEventFieldsRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct UnknownInteractionsProtocolStrictEventFieldsRequest {
pub some_field: i32,
}
impl fidl::Persistable for UnknownInteractionsProtocolStrictEventFieldsRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct UnknownInteractionsProtocolStrictTwoWayFieldsResponse {
pub some_field: i32,
}
impl fidl::Persistable for UnknownInteractionsProtocolStrictTwoWayFieldsResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl fidl::Persistable for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
pub some_field: i32,
}
impl fidl::Persistable for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
pub some_field: i32,
}
impl fidl::Persistable for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct UnknownInteractionsAjarProtocolMarker;
impl fidl::endpoints::ProtocolMarker for UnknownInteractionsAjarProtocolMarker {
type Proxy = UnknownInteractionsAjarProtocolProxy;
type RequestStream = UnknownInteractionsAjarProtocolRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = UnknownInteractionsAjarProtocolSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) UnknownInteractionsAjarProtocol";
}
pub trait UnknownInteractionsAjarProtocolProxyInterface: Send + Sync {}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct UnknownInteractionsAjarProtocolSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for UnknownInteractionsAjarProtocolSynchronousProxy {
type Proxy = UnknownInteractionsAjarProtocolProxy;
type Protocol = UnknownInteractionsAjarProtocolMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl UnknownInteractionsAjarProtocolSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<UnknownInteractionsAjarProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<UnknownInteractionsAjarProtocolEvent, fidl::Error> {
UnknownInteractionsAjarProtocolEvent::decode(self.client.wait_for_event(deadline)?)
}
}
#[derive(Debug, Clone)]
pub struct UnknownInteractionsAjarProtocolProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for UnknownInteractionsAjarProtocolProxy {
type Protocol = UnknownInteractionsAjarProtocolMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl UnknownInteractionsAjarProtocolProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<UnknownInteractionsAjarProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> UnknownInteractionsAjarProtocolEventStream {
UnknownInteractionsAjarProtocolEventStream {
event_receiver: self.client.take_event_receiver(),
}
}
}
impl UnknownInteractionsAjarProtocolProxyInterface for UnknownInteractionsAjarProtocolProxy {}
pub struct UnknownInteractionsAjarProtocolEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for UnknownInteractionsAjarProtocolEventStream {}
impl futures::stream::FusedStream for UnknownInteractionsAjarProtocolEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for UnknownInteractionsAjarProtocolEventStream {
type Item = Result<UnknownInteractionsAjarProtocolEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => {
std::task::Poll::Ready(Some(UnknownInteractionsAjarProtocolEvent::decode(buf)))
}
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum UnknownInteractionsAjarProtocolEvent {
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl UnknownInteractionsAjarProtocolEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<UnknownInteractionsAjarProtocolEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
Ok(UnknownInteractionsAjarProtocolEvent::_UnknownEvent {
ordinal: tx_header.ordinal,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <UnknownInteractionsAjarProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
})
}
}
}
pub struct UnknownInteractionsAjarProtocolRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for UnknownInteractionsAjarProtocolRequestStream {}
impl futures::stream::FusedStream for UnknownInteractionsAjarProtocolRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for UnknownInteractionsAjarProtocolRequestStream {
type Protocol = UnknownInteractionsAjarProtocolMarker;
type ControlHandle = UnknownInteractionsAjarProtocolControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
UnknownInteractionsAjarProtocolControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for UnknownInteractionsAjarProtocolRequestStream {
type Item = Result<UnknownInteractionsAjarProtocolRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled UnknownInteractionsAjarProtocolRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
_ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
Ok(UnknownInteractionsAjarProtocolRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: UnknownInteractionsAjarProtocolControlHandle { inner: this.inner.clone() },
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <UnknownInteractionsAjarProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum UnknownInteractionsAjarProtocolRequest {
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: UnknownInteractionsAjarProtocolControlHandle,
},
}
impl UnknownInteractionsAjarProtocolRequest {
pub fn method_name(&self) -> &'static str {
match *self {
UnknownInteractionsAjarProtocolRequest::_UnknownMethod { .. } => {
"unknown one-way method"
}
}
}
}
#[derive(Debug, Clone)]
pub struct UnknownInteractionsAjarProtocolControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for UnknownInteractionsAjarProtocolControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl UnknownInteractionsAjarProtocolControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct UnknownInteractionsClosedProtocolMarker;
impl fidl::endpoints::ProtocolMarker for UnknownInteractionsClosedProtocolMarker {
type Proxy = UnknownInteractionsClosedProtocolProxy;
type RequestStream = UnknownInteractionsClosedProtocolRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = UnknownInteractionsClosedProtocolSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) UnknownInteractionsClosedProtocol";
}
pub trait UnknownInteractionsClosedProtocolProxyInterface: Send + Sync {}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct UnknownInteractionsClosedProtocolSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for UnknownInteractionsClosedProtocolSynchronousProxy {
type Proxy = UnknownInteractionsClosedProtocolProxy;
type Protocol = UnknownInteractionsClosedProtocolMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl UnknownInteractionsClosedProtocolSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <UnknownInteractionsClosedProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<UnknownInteractionsClosedProtocolEvent, fidl::Error> {
UnknownInteractionsClosedProtocolEvent::decode(self.client.wait_for_event(deadline)?)
}
}
#[derive(Debug, Clone)]
pub struct UnknownInteractionsClosedProtocolProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for UnknownInteractionsClosedProtocolProxy {
type Protocol = UnknownInteractionsClosedProtocolMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl UnknownInteractionsClosedProtocolProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <UnknownInteractionsClosedProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> UnknownInteractionsClosedProtocolEventStream {
UnknownInteractionsClosedProtocolEventStream {
event_receiver: self.client.take_event_receiver(),
}
}
}
impl UnknownInteractionsClosedProtocolProxyInterface for UnknownInteractionsClosedProtocolProxy {}
pub struct UnknownInteractionsClosedProtocolEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for UnknownInteractionsClosedProtocolEventStream {}
impl futures::stream::FusedStream for UnknownInteractionsClosedProtocolEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for UnknownInteractionsClosedProtocolEventStream {
type Item = Result<UnknownInteractionsClosedProtocolEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => {
std::task::Poll::Ready(Some(UnknownInteractionsClosedProtocolEvent::decode(buf)))
}
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum UnknownInteractionsClosedProtocolEvent {}
impl UnknownInteractionsClosedProtocolEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<UnknownInteractionsClosedProtocolEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <UnknownInteractionsClosedProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
})
}
}
}
pub struct UnknownInteractionsClosedProtocolRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for UnknownInteractionsClosedProtocolRequestStream {}
impl futures::stream::FusedStream for UnknownInteractionsClosedProtocolRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for UnknownInteractionsClosedProtocolRequestStream {
type Protocol = UnknownInteractionsClosedProtocolMarker;
type ControlHandle = UnknownInteractionsClosedProtocolControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
UnknownInteractionsClosedProtocolControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for UnknownInteractionsClosedProtocolRequestStream {
type Item = Result<UnknownInteractionsClosedProtocolRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled UnknownInteractionsClosedProtocolRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <UnknownInteractionsClosedProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum UnknownInteractionsClosedProtocolRequest {}
impl UnknownInteractionsClosedProtocolRequest {
pub fn method_name(&self) -> &'static str {
match *self {}
}
}
#[derive(Debug, Clone)]
pub struct UnknownInteractionsClosedProtocolControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for UnknownInteractionsClosedProtocolControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl UnknownInteractionsClosedProtocolControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct UnknownInteractionsProtocolMarker;
impl fidl::endpoints::ProtocolMarker for UnknownInteractionsProtocolMarker {
type Proxy = UnknownInteractionsProtocolProxy;
type RequestStream = UnknownInteractionsProtocolRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = UnknownInteractionsProtocolSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) UnknownInteractionsProtocol";
}
pub type UnknownInteractionsProtocolStrictTwoWayErrResult = Result<(), i32>;
pub type UnknownInteractionsProtocolStrictTwoWayFieldsErrResult = Result<i32, i32>;
pub type UnknownInteractionsProtocolFlexibleTwoWayErrResult = Result<(), i32>;
pub type UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult = Result<i32, i32>;
pub trait UnknownInteractionsProtocolProxyInterface: Send + Sync {
fn r#strict_one_way(&self) -> Result<(), fidl::Error>;
fn r#flexible_one_way(&self) -> Result<(), fidl::Error>;
type StrictTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut;
type StrictTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
+ Send;
fn r#strict_two_way_fields(&self) -> Self::StrictTwoWayFieldsResponseFut;
type StrictTwoWayErrResponseFut: std::future::Future<
Output = Result<UnknownInteractionsProtocolStrictTwoWayErrResult, fidl::Error>,
> + Send;
fn r#strict_two_way_err(&self) -> Self::StrictTwoWayErrResponseFut;
type StrictTwoWayFieldsErrResponseFut: std::future::Future<
Output = Result<UnknownInteractionsProtocolStrictTwoWayFieldsErrResult, fidl::Error>,
> + Send;
fn r#strict_two_way_fields_err(&self) -> Self::StrictTwoWayFieldsErrResponseFut;
type FlexibleTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut;
type FlexibleTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
+ Send;
fn r#flexible_two_way_fields(&self) -> Self::FlexibleTwoWayFieldsResponseFut;
type FlexibleTwoWayErrResponseFut: std::future::Future<
Output = Result<UnknownInteractionsProtocolFlexibleTwoWayErrResult, fidl::Error>,
> + Send;
fn r#flexible_two_way_err(&self) -> Self::FlexibleTwoWayErrResponseFut;
type FlexibleTwoWayFieldsErrResponseFut: std::future::Future<
Output = Result<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult, fidl::Error>,
> + Send;
fn r#flexible_two_way_fields_err(&self) -> Self::FlexibleTwoWayFieldsErrResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct UnknownInteractionsProtocolSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for UnknownInteractionsProtocolSynchronousProxy {
type Proxy = UnknownInteractionsProtocolProxy;
type Protocol = UnknownInteractionsProtocolMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl UnknownInteractionsProtocolSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<UnknownInteractionsProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<UnknownInteractionsProtocolEvent, fidl::Error> {
UnknownInteractionsProtocolEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0x1fa581504cb382d5,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0x2793277ae2bb90fc,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
pub fn r#strict_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
(),
0x73ba6f957055b0dc,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#strict_two_way_fields(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<i32, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
UnknownInteractionsProtocolStrictTwoWayFieldsResponse,
>(
(),
0x21513db78c6597f7,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.some_field)
}
pub fn r#strict_two_way_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<UnknownInteractionsProtocolStrictTwoWayErrResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(),
0x2e9beb4e08e058bb,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#strict_two_way_fields_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<UnknownInteractionsProtocolStrictTwoWayFieldsErrResult, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
i32,
>>(
(), 0x6dd97948e8f69be4, fidl::encoding::DynamicFlags::empty(), ___deadline
)?;
Ok(_response.map(|x| x.some_field))
}
pub fn r#flexible_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(),
0x1f33517a0395609d,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way")?;
Ok(_response)
}
pub fn r#flexible_two_way_fields(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<i32, fidl::Error> {
let _response =
self.client
.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::FlexibleType<
UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
>>(
(), 0x58ed18873e28b84d, fidl::encoding::DynamicFlags::FLEXIBLE, ___deadline
)?
.into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_fields")?;
Ok(_response.some_field)
}
pub fn r#flexible_two_way_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<UnknownInteractionsProtocolFlexibleTwoWayErrResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
>(
(),
0x706905decb20bd62,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_err")?;
Ok(_response.map(|x| x))
}
pub fn r#flexible_two_way_fields_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::FlexibleResultType<
UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
i32,
>>(
(), 0x681fcbbead668390, fidl::encoding::DynamicFlags::FLEXIBLE, ___deadline
)?
.into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_fields_err")?;
Ok(_response.map(|x| x.some_field))
}
}
#[derive(Debug, Clone)]
pub struct UnknownInteractionsProtocolProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for UnknownInteractionsProtocolProxy {
type Protocol = UnknownInteractionsProtocolMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl UnknownInteractionsProtocolProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<UnknownInteractionsProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> UnknownInteractionsProtocolEventStream {
UnknownInteractionsProtocolEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
UnknownInteractionsProtocolProxyInterface::r#strict_one_way(self)
}
pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
UnknownInteractionsProtocolProxyInterface::r#flexible_one_way(self)
}
pub fn r#strict_two_way(
&self,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
UnknownInteractionsProtocolProxyInterface::r#strict_two_way(self)
}
pub fn r#strict_two_way_fields(
&self,
) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
UnknownInteractionsProtocolProxyInterface::r#strict_two_way_fields(self)
}
pub fn r#strict_two_way_err(
&self,
) -> fidl::client::QueryResponseFut<
UnknownInteractionsProtocolStrictTwoWayErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
UnknownInteractionsProtocolProxyInterface::r#strict_two_way_err(self)
}
pub fn r#strict_two_way_fields_err(
&self,
) -> fidl::client::QueryResponseFut<
UnknownInteractionsProtocolStrictTwoWayFieldsErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
UnknownInteractionsProtocolProxyInterface::r#strict_two_way_fields_err(self)
}
pub fn r#flexible_two_way(
&self,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
UnknownInteractionsProtocolProxyInterface::r#flexible_two_way(self)
}
pub fn r#flexible_two_way_fields(
&self,
) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
UnknownInteractionsProtocolProxyInterface::r#flexible_two_way_fields(self)
}
pub fn r#flexible_two_way_err(
&self,
) -> fidl::client::QueryResponseFut<
UnknownInteractionsProtocolFlexibleTwoWayErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
UnknownInteractionsProtocolProxyInterface::r#flexible_two_way_err(self)
}
pub fn r#flexible_two_way_fields_err(
&self,
) -> fidl::client::QueryResponseFut<
UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
UnknownInteractionsProtocolProxyInterface::r#flexible_two_way_fields_err(self)
}
}
impl UnknownInteractionsProtocolProxyInterface for UnknownInteractionsProtocolProxy {
fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0x1fa581504cb382d5,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0x2793277ae2bb90fc,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
type StrictTwoWayResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x73ba6f957055b0dc,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x73ba6f957055b0dc,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StrictTwoWayFieldsResponseFut =
fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#strict_two_way_fields(&self) -> Self::StrictTwoWayFieldsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<i32, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
UnknownInteractionsProtocolStrictTwoWayFieldsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x21513db78c6597f7,
>(_buf?)?;
Ok(_response.some_field)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
(),
0x21513db78c6597f7,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StrictTwoWayErrResponseFut = fidl::client::QueryResponseFut<
UnknownInteractionsProtocolStrictTwoWayErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#strict_two_way_err(&self) -> Self::StrictTwoWayErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<UnknownInteractionsProtocolStrictTwoWayErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x2e9beb4e08e058bb,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
UnknownInteractionsProtocolStrictTwoWayErrResult,
>(
(),
0x2e9beb4e08e058bb,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StrictTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
UnknownInteractionsProtocolStrictTwoWayFieldsErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#strict_two_way_fields_err(&self) -> Self::StrictTwoWayFieldsErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<UnknownInteractionsProtocolStrictTwoWayFieldsErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<
UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
i32,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x6dd97948e8f69be4,
>(_buf?)?;
Ok(_response.map(|x| x.some_field))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
UnknownInteractionsProtocolStrictTwoWayFieldsErrResult,
>(
(),
0x6dd97948e8f69be4,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type FlexibleTwoWayResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x1f33517a0395609d,
>(_buf?)?
.into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way")?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x1f33517a0395609d,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type FlexibleTwoWayFieldsResponseFut =
fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#flexible_two_way_fields(&self) -> Self::FlexibleTwoWayFieldsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<i32, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<
UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x58ed18873e28b84d,
>(_buf?)?
.into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_fields")?;
Ok(_response.some_field)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
(),
0x58ed18873e28b84d,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type FlexibleTwoWayErrResponseFut = fidl::client::QueryResponseFut<
UnknownInteractionsProtocolFlexibleTwoWayErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#flexible_two_way_err(&self) -> Self::FlexibleTwoWayErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<UnknownInteractionsProtocolFlexibleTwoWayErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x706905decb20bd62,
>(_buf?)?
.into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_err")?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
UnknownInteractionsProtocolFlexibleTwoWayErrResult,
>(
(),
0x706905decb20bd62,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type FlexibleTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#flexible_two_way_fields_err(&self) -> Self::FlexibleTwoWayFieldsErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleResultType<
UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
i32,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x681fcbbead668390,
>(_buf?)?
.into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_fields_err")?;
Ok(_response.map(|x| x.some_field))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult,
>(
(),
0x681fcbbead668390,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
}
pub struct UnknownInteractionsProtocolEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for UnknownInteractionsProtocolEventStream {}
impl futures::stream::FusedStream for UnknownInteractionsProtocolEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for UnknownInteractionsProtocolEventStream {
type Item = Result<UnknownInteractionsProtocolEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => {
std::task::Poll::Ready(Some(UnknownInteractionsProtocolEvent::decode(buf)))
}
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum UnknownInteractionsProtocolEvent {
StrictEvent {},
StrictEventFields {
some_field: i32,
},
FlexibleEvent {},
FlexibleEventFields {
some_field: i32,
},
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl UnknownInteractionsProtocolEvent {
#[allow(irrefutable_let_patterns)]
pub fn into_strict_event(self) -> Option<()> {
if let UnknownInteractionsProtocolEvent::StrictEvent {} = self {
Some(())
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_event_fields(self) -> Option<i32> {
if let UnknownInteractionsProtocolEvent::StrictEventFields { some_field } = self {
Some((some_field))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_event(self) -> Option<()> {
if let UnknownInteractionsProtocolEvent::FlexibleEvent {} = self {
Some(())
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_event_fields(self) -> Option<i32> {
if let UnknownInteractionsProtocolEvent::FlexibleEventFields { some_field } = self {
Some((some_field))
} else {
None
}
}
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<UnknownInteractionsProtocolEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
0x584b419891a32738 => {
let mut out = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((
UnknownInteractionsProtocolEvent::StrictEvent {
}
))
}
0x4c622afb12e4a13b => {
let mut out = fidl::new_empty!(UnknownInteractionsProtocolStrictEventFieldsRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnknownInteractionsProtocolStrictEventFieldsRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((
UnknownInteractionsProtocolEvent::StrictEventFields {some_field: out.some_field,
}
))
}
0x317a1a8e0b802c6c => {
let mut out = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((
UnknownInteractionsProtocolEvent::FlexibleEvent {
}
))
}
0x40620b164591af9e => {
let mut out = fidl::new_empty!(UnknownInteractionsProtocolFlexibleEventFieldsRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnknownInteractionsProtocolFlexibleEventFieldsRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((
UnknownInteractionsProtocolEvent::FlexibleEventFields {some_field: out.some_field,
}
))
}
_ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
Ok(UnknownInteractionsProtocolEvent::_UnknownEvent {
ordinal: tx_header.ordinal,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <UnknownInteractionsProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
})
}
}
}
pub struct UnknownInteractionsProtocolRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for UnknownInteractionsProtocolRequestStream {}
impl futures::stream::FusedStream for UnknownInteractionsProtocolRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for UnknownInteractionsProtocolRequestStream {
type Protocol = UnknownInteractionsProtocolMarker;
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
UnknownInteractionsProtocolControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for UnknownInteractionsProtocolRequestStream {
type Item = Result<UnknownInteractionsProtocolRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled UnknownInteractionsProtocolRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x1fa581504cb382d5 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::StrictOneWay {
control_handle,
})
}
0x2793277ae2bb90fc => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::FlexibleOneWay {
control_handle,
})
}
0x73ba6f957055b0dc => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::StrictTwoWay {
responder: UnknownInteractionsProtocolStrictTwoWayResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x21513db78c6597f7 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::StrictTwoWayFields {
responder: UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2e9beb4e08e058bb => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::StrictTwoWayErr {
responder: UnknownInteractionsProtocolStrictTwoWayErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x6dd97948e8f69be4 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::StrictTwoWayFieldsErr {
responder: UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x1f33517a0395609d => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::FlexibleTwoWay {
responder: UnknownInteractionsProtocolFlexibleTwoWayResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x58ed18873e28b84d => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::FlexibleTwoWayFields {
responder: UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x706905decb20bd62 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::FlexibleTwoWayErr {
responder: UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x681fcbbead668390 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = UnknownInteractionsProtocolControlHandle {
inner: this.inner.clone(),
};
Ok(UnknownInteractionsProtocolRequest::FlexibleTwoWayFieldsErr {
responder: UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
Ok(UnknownInteractionsProtocolRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: UnknownInteractionsProtocolControlHandle { inner: this.inner.clone() },
method_type: fidl::MethodType::OneWay,
})
}
_ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
this.inner.send_framework_err(
fidl::encoding::FrameworkErr::UnknownMethod,
header.tx_id,
header.ordinal,
header.dynamic_flags(),
(bytes, handles),
)?;
Ok(UnknownInteractionsProtocolRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: UnknownInteractionsProtocolControlHandle { inner: this.inner.clone() },
method_type: fidl::MethodType::TwoWay,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <UnknownInteractionsProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum UnknownInteractionsProtocolRequest {
StrictOneWay {
control_handle: UnknownInteractionsProtocolControlHandle,
},
FlexibleOneWay {
control_handle: UnknownInteractionsProtocolControlHandle,
},
StrictTwoWay {
responder: UnknownInteractionsProtocolStrictTwoWayResponder,
},
StrictTwoWayFields {
responder: UnknownInteractionsProtocolStrictTwoWayFieldsResponder,
},
StrictTwoWayErr {
responder: UnknownInteractionsProtocolStrictTwoWayErrResponder,
},
StrictTwoWayFieldsErr {
responder: UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder,
},
FlexibleTwoWay {
responder: UnknownInteractionsProtocolFlexibleTwoWayResponder,
},
FlexibleTwoWayFields {
responder: UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder,
},
FlexibleTwoWayErr {
responder: UnknownInteractionsProtocolFlexibleTwoWayErrResponder,
},
FlexibleTwoWayFieldsErr {
responder: UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder,
},
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: UnknownInteractionsProtocolControlHandle,
method_type: fidl::MethodType,
},
}
impl UnknownInteractionsProtocolRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_strict_one_way(self) -> Option<(UnknownInteractionsProtocolControlHandle)> {
if let UnknownInteractionsProtocolRequest::StrictOneWay { control_handle } = self {
Some((control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_one_way(self) -> Option<(UnknownInteractionsProtocolControlHandle)> {
if let UnknownInteractionsProtocolRequest::FlexibleOneWay { control_handle } = self {
Some((control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_two_way(self) -> Option<(UnknownInteractionsProtocolStrictTwoWayResponder)> {
if let UnknownInteractionsProtocolRequest::StrictTwoWay { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_two_way_fields(
self,
) -> Option<(UnknownInteractionsProtocolStrictTwoWayFieldsResponder)> {
if let UnknownInteractionsProtocolRequest::StrictTwoWayFields { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_two_way_err(
self,
) -> Option<(UnknownInteractionsProtocolStrictTwoWayErrResponder)> {
if let UnknownInteractionsProtocolRequest::StrictTwoWayErr { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_two_way_fields_err(
self,
) -> Option<(UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder)> {
if let UnknownInteractionsProtocolRequest::StrictTwoWayFieldsErr { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_two_way(
self,
) -> Option<(UnknownInteractionsProtocolFlexibleTwoWayResponder)> {
if let UnknownInteractionsProtocolRequest::FlexibleTwoWay { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_two_way_fields(
self,
) -> Option<(UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder)> {
if let UnknownInteractionsProtocolRequest::FlexibleTwoWayFields { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_two_way_err(
self,
) -> Option<(UnknownInteractionsProtocolFlexibleTwoWayErrResponder)> {
if let UnknownInteractionsProtocolRequest::FlexibleTwoWayErr { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_two_way_fields_err(
self,
) -> Option<(UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder)> {
if let UnknownInteractionsProtocolRequest::FlexibleTwoWayFieldsErr { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
UnknownInteractionsProtocolRequest::StrictOneWay { .. } => "strict_one_way",
UnknownInteractionsProtocolRequest::FlexibleOneWay { .. } => "flexible_one_way",
UnknownInteractionsProtocolRequest::StrictTwoWay { .. } => "strict_two_way",
UnknownInteractionsProtocolRequest::StrictTwoWayFields { .. } => {
"strict_two_way_fields"
}
UnknownInteractionsProtocolRequest::StrictTwoWayErr { .. } => "strict_two_way_err",
UnknownInteractionsProtocolRequest::StrictTwoWayFieldsErr { .. } => {
"strict_two_way_fields_err"
}
UnknownInteractionsProtocolRequest::FlexibleTwoWay { .. } => "flexible_two_way",
UnknownInteractionsProtocolRequest::FlexibleTwoWayFields { .. } => {
"flexible_two_way_fields"
}
UnknownInteractionsProtocolRequest::FlexibleTwoWayErr { .. } => "flexible_two_way_err",
UnknownInteractionsProtocolRequest::FlexibleTwoWayFieldsErr { .. } => {
"flexible_two_way_fields_err"
}
UnknownInteractionsProtocolRequest::_UnknownMethod {
method_type: fidl::MethodType::OneWay,
..
} => "unknown one-way method",
UnknownInteractionsProtocolRequest::_UnknownMethod {
method_type: fidl::MethodType::TwoWay,
..
} => "unknown two-way method",
}
}
}
#[derive(Debug, Clone)]
pub struct UnknownInteractionsProtocolControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for UnknownInteractionsProtocolControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl UnknownInteractionsProtocolControlHandle {
pub fn send_strict_event(&self) -> Result<(), fidl::Error> {
self.inner.send::<fidl::encoding::EmptyPayload>(
(),
0,
0x584b419891a32738,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_strict_event_fields(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.inner.send::<UnknownInteractionsProtocolStrictEventFieldsRequest>(
(some_field,),
0,
0x4c622afb12e4a13b,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_flexible_event(&self) -> Result<(), fidl::Error> {
self.inner.send::<fidl::encoding::EmptyPayload>(
(),
0,
0x317a1a8e0b802c6c,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
pub fn send_flexible_event_fields(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.inner.send::<UnknownInteractionsProtocolFlexibleEventFieldsRequest>(
(some_field,),
0,
0x40620b164591af9e,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UnknownInteractionsProtocolStrictTwoWayResponder {
control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UnknownInteractionsProtocolStrictTwoWayResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UnknownInteractionsProtocolStrictTwoWayResponder {
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UnknownInteractionsProtocolStrictTwoWayResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0x73ba6f957055b0dc,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<UnknownInteractionsProtocolStrictTwoWayFieldsResponse>(
(some_field,),
self.tx_id,
0x21513db78c6597f7,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UnknownInteractionsProtocolStrictTwoWayErrResponder {
control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UnknownInteractionsProtocolStrictTwoWayErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UnknownInteractionsProtocolStrictTwoWayErrResponder {
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UnknownInteractionsProtocolStrictTwoWayErrResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x2e9beb4e08e058bb,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
i32,
>>(
result.map(|some_field| (some_field,)),
self.tx_id,
0x6dd97948e8f69be4,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayResponder {
control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UnknownInteractionsProtocolFlexibleTwoWayResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UnknownInteractionsProtocolFlexibleTwoWayResponder {
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UnknownInteractionsProtocolFlexibleTwoWayResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>>(
fidl::encoding::Flexible::new(()),
self.tx_id,
0x1f33517a0395609d,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleType<
UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
>>(
fidl::encoding::Flexible::new((some_field,)),
self.tx_id,
0x58ed18873e28b84d,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
fidl::encoding::EmptyStruct,
i32,
>>(
fidl::encoding::FlexibleResult::new(result),
self.tx_id,
0x706905decb20bd62,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
type ControlHandle = UnknownInteractionsProtocolControlHandle;
fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
i32,
>>(
fidl::encoding::FlexibleResult::new(result.map(|some_field| (some_field,))),
self.tx_id,
0x681fcbbead668390,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
mod internal {
use super::*;
impl fidl::encoding::ValueTypeMarker for UnknownInteractionsProtocolFlexibleEventFieldsRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for UnknownInteractionsProtocolFlexibleEventFieldsRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<UnknownInteractionsProtocolFlexibleEventFieldsRequest, D>
for &UnknownInteractionsProtocolFlexibleEventFieldsRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnknownInteractionsProtocolFlexibleEventFieldsRequest>(
offset,
);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut UnknownInteractionsProtocolFlexibleEventFieldsRequest)
.write_unaligned(
(self as *const UnknownInteractionsProtocolFlexibleEventFieldsRequest)
.read(),
);
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
fidl::encoding::Encode<UnknownInteractionsProtocolFlexibleEventFieldsRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnknownInteractionsProtocolFlexibleEventFieldsRequest>(
offset,
);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for UnknownInteractionsProtocolFlexibleEventFieldsRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { some_field: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for UnknownInteractionsProtocolStrictEventFieldsRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for UnknownInteractionsProtocolStrictEventFieldsRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<UnknownInteractionsProtocolStrictEventFieldsRequest, D>
for &UnknownInteractionsProtocolStrictEventFieldsRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder
.debug_check_bounds::<UnknownInteractionsProtocolStrictEventFieldsRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut UnknownInteractionsProtocolStrictEventFieldsRequest)
.write_unaligned(
(self as *const UnknownInteractionsProtocolStrictEventFieldsRequest).read(),
);
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
fidl::encoding::Encode<UnknownInteractionsProtocolStrictEventFieldsRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder
.debug_check_bounds::<UnknownInteractionsProtocolStrictEventFieldsRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for UnknownInteractionsProtocolStrictEventFieldsRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { some_field: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for UnknownInteractionsProtocolStrictTwoWayFieldsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for UnknownInteractionsProtocolStrictTwoWayFieldsResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<UnknownInteractionsProtocolStrictTwoWayFieldsResponse, D>
for &UnknownInteractionsProtocolStrictTwoWayFieldsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnknownInteractionsProtocolStrictTwoWayFieldsResponse>(
offset,
);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut UnknownInteractionsProtocolStrictTwoWayFieldsResponse)
.write_unaligned(
(self as *const UnknownInteractionsProtocolStrictTwoWayFieldsResponse)
.read(),
);
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
fidl::encoding::Encode<UnknownInteractionsProtocolStrictTwoWayFieldsResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnknownInteractionsProtocolStrictTwoWayFieldsResponse>(
offset,
);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for UnknownInteractionsProtocolStrictTwoWayFieldsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { some_field: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker
for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
{
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker
for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
{
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse, D>
for &UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder
.debug_check_bounds::<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse>(
offset,
);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse)
.write_unaligned(
(self as *const UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse)
.read(),
);
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
fidl::encoding::Encode<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse, D>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder
.debug_check_bounds::<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse>(
offset,
);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { some_field: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse, D>
for &UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse>(
offset,
);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse)
.write_unaligned(
(self as *const UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse)
.read(),
);
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
fidl::encoding::Encode<UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse, D>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse>(
offset,
);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { some_field: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker
for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
{
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse, D>
for &UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse>(
offset,
);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse)
.write_unaligned(
(self as *const UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse)
.read(),
);
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
fidl::encoding::Encode<UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse, D>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse>(
offset,
);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { some_field: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
}