#![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(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct FactoryStoreProviderGetFactoryStoreRequest {
pub dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for FactoryStoreProviderGetFactoryStoreRequest
{
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct AlphaFactoryStoreProviderMarker;
impl fidl::endpoints::ProtocolMarker for AlphaFactoryStoreProviderMarker {
type Proxy = AlphaFactoryStoreProviderProxy;
type RequestStream = AlphaFactoryStoreProviderRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = AlphaFactoryStoreProviderSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.factory.AlphaFactoryStoreProvider";
}
impl fidl::endpoints::DiscoverableProtocolMarker for AlphaFactoryStoreProviderMarker {}
pub trait AlphaFactoryStoreProviderProxyInterface: Send + Sync {
fn r#get_factory_store(
&self,
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct AlphaFactoryStoreProviderSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for AlphaFactoryStoreProviderSynchronousProxy {
type Proxy = AlphaFactoryStoreProviderProxy;
type Protocol = AlphaFactoryStoreProviderMarker;
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 AlphaFactoryStoreProviderSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<AlphaFactoryStoreProviderMarker 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<AlphaFactoryStoreProviderEvent, fidl::Error> {
AlphaFactoryStoreProviderEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct AlphaFactoryStoreProviderProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for AlphaFactoryStoreProviderProxy {
type Protocol = AlphaFactoryStoreProviderMarker;
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 AlphaFactoryStoreProviderProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<AlphaFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> AlphaFactoryStoreProviderEventStream {
AlphaFactoryStoreProviderEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
AlphaFactoryStoreProviderProxyInterface::r#get_factory_store(self, dir)
}
}
impl AlphaFactoryStoreProviderProxyInterface for AlphaFactoryStoreProviderProxy {
fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct AlphaFactoryStoreProviderEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for AlphaFactoryStoreProviderEventStream {}
impl futures::stream::FusedStream for AlphaFactoryStoreProviderEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for AlphaFactoryStoreProviderEventStream {
type Item = Result<AlphaFactoryStoreProviderEvent, 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(AlphaFactoryStoreProviderEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum AlphaFactoryStoreProviderEvent {}
impl AlphaFactoryStoreProviderEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<AlphaFactoryStoreProviderEvent, 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:
<AlphaFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct AlphaFactoryStoreProviderRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for AlphaFactoryStoreProviderRequestStream {}
impl futures::stream::FusedStream for AlphaFactoryStoreProviderRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for AlphaFactoryStoreProviderRequestStream {
type Protocol = AlphaFactoryStoreProviderMarker;
type ControlHandle = AlphaFactoryStoreProviderControlHandle;
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 {
AlphaFactoryStoreProviderControlHandle { 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 AlphaFactoryStoreProviderRequestStream {
type Item = Result<AlphaFactoryStoreProviderRequest, 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 AlphaFactoryStoreProviderRequestStream 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 {
0x21fa8e8bc0e1209e => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(FactoryStoreProviderGetFactoryStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryStoreProviderGetFactoryStoreRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = AlphaFactoryStoreProviderControlHandle {
inner: this.inner.clone(),
};
Ok(AlphaFactoryStoreProviderRequest::GetFactoryStore {dir: req.dir,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <AlphaFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum AlphaFactoryStoreProviderRequest {
GetFactoryStore {
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
control_handle: AlphaFactoryStoreProviderControlHandle,
},
}
impl AlphaFactoryStoreProviderRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_factory_store(
self,
) -> Option<(
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
AlphaFactoryStoreProviderControlHandle,
)> {
if let AlphaFactoryStoreProviderRequest::GetFactoryStore { dir, control_handle } = self {
Some((dir, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
AlphaFactoryStoreProviderRequest::GetFactoryStore { .. } => "get_factory_store",
}
}
}
#[derive(Debug, Clone)]
pub struct AlphaFactoryStoreProviderControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for AlphaFactoryStoreProviderControlHandle {
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 AlphaFactoryStoreProviderControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct CastCredentialsFactoryStoreProviderMarker;
impl fidl::endpoints::ProtocolMarker for CastCredentialsFactoryStoreProviderMarker {
type Proxy = CastCredentialsFactoryStoreProviderProxy;
type RequestStream = CastCredentialsFactoryStoreProviderRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = CastCredentialsFactoryStoreProviderSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.factory.CastCredentialsFactoryStoreProvider";
}
impl fidl::endpoints::DiscoverableProtocolMarker for CastCredentialsFactoryStoreProviderMarker {}
pub trait CastCredentialsFactoryStoreProviderProxyInterface: Send + Sync {
fn r#get_factory_store(
&self,
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct CastCredentialsFactoryStoreProviderSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for CastCredentialsFactoryStoreProviderSynchronousProxy {
type Proxy = CastCredentialsFactoryStoreProviderProxy;
type Protocol = CastCredentialsFactoryStoreProviderMarker;
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 CastCredentialsFactoryStoreProviderSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <CastCredentialsFactoryStoreProviderMarker 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<CastCredentialsFactoryStoreProviderEvent, fidl::Error> {
CastCredentialsFactoryStoreProviderEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct CastCredentialsFactoryStoreProviderProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for CastCredentialsFactoryStoreProviderProxy {
type Protocol = CastCredentialsFactoryStoreProviderMarker;
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 CastCredentialsFactoryStoreProviderProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <CastCredentialsFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> CastCredentialsFactoryStoreProviderEventStream {
CastCredentialsFactoryStoreProviderEventStream {
event_receiver: self.client.take_event_receiver(),
}
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
CastCredentialsFactoryStoreProviderProxyInterface::r#get_factory_store(self, dir)
}
}
impl CastCredentialsFactoryStoreProviderProxyInterface
for CastCredentialsFactoryStoreProviderProxy
{
fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct CastCredentialsFactoryStoreProviderEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for CastCredentialsFactoryStoreProviderEventStream {}
impl futures::stream::FusedStream for CastCredentialsFactoryStoreProviderEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for CastCredentialsFactoryStoreProviderEventStream {
type Item = Result<CastCredentialsFactoryStoreProviderEvent, 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(CastCredentialsFactoryStoreProviderEvent::decode(buf)))
}
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum CastCredentialsFactoryStoreProviderEvent {}
impl CastCredentialsFactoryStoreProviderEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<CastCredentialsFactoryStoreProviderEvent, 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: <CastCredentialsFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
})
}
}
}
pub struct CastCredentialsFactoryStoreProviderRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for CastCredentialsFactoryStoreProviderRequestStream {}
impl futures::stream::FusedStream for CastCredentialsFactoryStoreProviderRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for CastCredentialsFactoryStoreProviderRequestStream {
type Protocol = CastCredentialsFactoryStoreProviderMarker;
type ControlHandle = CastCredentialsFactoryStoreProviderControlHandle;
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 {
CastCredentialsFactoryStoreProviderControlHandle { 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 CastCredentialsFactoryStoreProviderRequestStream {
type Item = Result<CastCredentialsFactoryStoreProviderRequest, 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 CastCredentialsFactoryStoreProviderRequestStream 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 {
0x21fa8e8bc0e1209e => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(FactoryStoreProviderGetFactoryStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryStoreProviderGetFactoryStoreRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = CastCredentialsFactoryStoreProviderControlHandle {
inner: this.inner.clone(),
};
Ok(CastCredentialsFactoryStoreProviderRequest::GetFactoryStore {dir: req.dir,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <CastCredentialsFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum CastCredentialsFactoryStoreProviderRequest {
GetFactoryStore {
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
control_handle: CastCredentialsFactoryStoreProviderControlHandle,
},
}
impl CastCredentialsFactoryStoreProviderRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_factory_store(
self,
) -> Option<(
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
CastCredentialsFactoryStoreProviderControlHandle,
)> {
if let CastCredentialsFactoryStoreProviderRequest::GetFactoryStore { dir, control_handle } =
self
{
Some((dir, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
CastCredentialsFactoryStoreProviderRequest::GetFactoryStore { .. } => {
"get_factory_store"
}
}
}
}
#[derive(Debug, Clone)]
pub struct CastCredentialsFactoryStoreProviderControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for CastCredentialsFactoryStoreProviderControlHandle {
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 CastCredentialsFactoryStoreProviderControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct FactoryStoreProviderMarker;
impl fidl::endpoints::ProtocolMarker for FactoryStoreProviderMarker {
type Proxy = FactoryStoreProviderProxy;
type RequestStream = FactoryStoreProviderRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = FactoryStoreProviderSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) FactoryStoreProvider";
}
pub trait FactoryStoreProviderProxyInterface: Send + Sync {
fn r#get_factory_store(
&self,
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct FactoryStoreProviderSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for FactoryStoreProviderSynchronousProxy {
type Proxy = FactoryStoreProviderProxy;
type Protocol = FactoryStoreProviderMarker;
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 FactoryStoreProviderSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<FactoryStoreProviderMarker 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<FactoryStoreProviderEvent, fidl::Error> {
FactoryStoreProviderEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct FactoryStoreProviderProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for FactoryStoreProviderProxy {
type Protocol = FactoryStoreProviderMarker;
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 FactoryStoreProviderProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<FactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> FactoryStoreProviderEventStream {
FactoryStoreProviderEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
FactoryStoreProviderProxyInterface::r#get_factory_store(self, dir)
}
}
impl FactoryStoreProviderProxyInterface for FactoryStoreProviderProxy {
fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct FactoryStoreProviderEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for FactoryStoreProviderEventStream {}
impl futures::stream::FusedStream for FactoryStoreProviderEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for FactoryStoreProviderEventStream {
type Item = Result<FactoryStoreProviderEvent, 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(FactoryStoreProviderEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum FactoryStoreProviderEvent {}
impl FactoryStoreProviderEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<FactoryStoreProviderEvent, 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:
<FactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct FactoryStoreProviderRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for FactoryStoreProviderRequestStream {}
impl futures::stream::FusedStream for FactoryStoreProviderRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for FactoryStoreProviderRequestStream {
type Protocol = FactoryStoreProviderMarker;
type ControlHandle = FactoryStoreProviderControlHandle;
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 {
FactoryStoreProviderControlHandle { 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 FactoryStoreProviderRequestStream {
type Item = Result<FactoryStoreProviderRequest, 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 FactoryStoreProviderRequestStream 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 {
0x21fa8e8bc0e1209e => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(FactoryStoreProviderGetFactoryStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryStoreProviderGetFactoryStoreRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = FactoryStoreProviderControlHandle {
inner: this.inner.clone(),
};
Ok(FactoryStoreProviderRequest::GetFactoryStore {dir: req.dir,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <FactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum FactoryStoreProviderRequest {
GetFactoryStore {
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
control_handle: FactoryStoreProviderControlHandle,
},
}
impl FactoryStoreProviderRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_factory_store(
self,
) -> Option<(
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
FactoryStoreProviderControlHandle,
)> {
if let FactoryStoreProviderRequest::GetFactoryStore { dir, control_handle } = self {
Some((dir, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
FactoryStoreProviderRequest::GetFactoryStore { .. } => "get_factory_store",
}
}
}
#[derive(Debug, Clone)]
pub struct FactoryStoreProviderControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for FactoryStoreProviderControlHandle {
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 FactoryStoreProviderControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct MiscFactoryStoreProviderMarker;
impl fidl::endpoints::ProtocolMarker for MiscFactoryStoreProviderMarker {
type Proxy = MiscFactoryStoreProviderProxy;
type RequestStream = MiscFactoryStoreProviderRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = MiscFactoryStoreProviderSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.factory.MiscFactoryStoreProvider";
}
impl fidl::endpoints::DiscoverableProtocolMarker for MiscFactoryStoreProviderMarker {}
pub trait MiscFactoryStoreProviderProxyInterface: Send + Sync {
fn r#get_factory_store(
&self,
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct MiscFactoryStoreProviderSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for MiscFactoryStoreProviderSynchronousProxy {
type Proxy = MiscFactoryStoreProviderProxy;
type Protocol = MiscFactoryStoreProviderMarker;
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 MiscFactoryStoreProviderSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<MiscFactoryStoreProviderMarker 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<MiscFactoryStoreProviderEvent, fidl::Error> {
MiscFactoryStoreProviderEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct MiscFactoryStoreProviderProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for MiscFactoryStoreProviderProxy {
type Protocol = MiscFactoryStoreProviderMarker;
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 MiscFactoryStoreProviderProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<MiscFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> MiscFactoryStoreProviderEventStream {
MiscFactoryStoreProviderEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
MiscFactoryStoreProviderProxyInterface::r#get_factory_store(self, dir)
}
}
impl MiscFactoryStoreProviderProxyInterface for MiscFactoryStoreProviderProxy {
fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct MiscFactoryStoreProviderEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for MiscFactoryStoreProviderEventStream {}
impl futures::stream::FusedStream for MiscFactoryStoreProviderEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for MiscFactoryStoreProviderEventStream {
type Item = Result<MiscFactoryStoreProviderEvent, 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(MiscFactoryStoreProviderEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum MiscFactoryStoreProviderEvent {}
impl MiscFactoryStoreProviderEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<MiscFactoryStoreProviderEvent, 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:
<MiscFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct MiscFactoryStoreProviderRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for MiscFactoryStoreProviderRequestStream {}
impl futures::stream::FusedStream for MiscFactoryStoreProviderRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for MiscFactoryStoreProviderRequestStream {
type Protocol = MiscFactoryStoreProviderMarker;
type ControlHandle = MiscFactoryStoreProviderControlHandle;
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 {
MiscFactoryStoreProviderControlHandle { 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 MiscFactoryStoreProviderRequestStream {
type Item = Result<MiscFactoryStoreProviderRequest, 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 MiscFactoryStoreProviderRequestStream 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 {
0x21fa8e8bc0e1209e => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(FactoryStoreProviderGetFactoryStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryStoreProviderGetFactoryStoreRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MiscFactoryStoreProviderControlHandle {
inner: this.inner.clone(),
};
Ok(MiscFactoryStoreProviderRequest::GetFactoryStore {dir: req.dir,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <MiscFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum MiscFactoryStoreProviderRequest {
GetFactoryStore {
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
control_handle: MiscFactoryStoreProviderControlHandle,
},
}
impl MiscFactoryStoreProviderRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_factory_store(
self,
) -> Option<(
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
MiscFactoryStoreProviderControlHandle,
)> {
if let MiscFactoryStoreProviderRequest::GetFactoryStore { dir, control_handle } = self {
Some((dir, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
MiscFactoryStoreProviderRequest::GetFactoryStore { .. } => "get_factory_store",
}
}
}
#[derive(Debug, Clone)]
pub struct MiscFactoryStoreProviderControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for MiscFactoryStoreProviderControlHandle {
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 MiscFactoryStoreProviderControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct PlayReadyFactoryStoreProviderMarker;
impl fidl::endpoints::ProtocolMarker for PlayReadyFactoryStoreProviderMarker {
type Proxy = PlayReadyFactoryStoreProviderProxy;
type RequestStream = PlayReadyFactoryStoreProviderRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = PlayReadyFactoryStoreProviderSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.factory.PlayReadyFactoryStoreProvider";
}
impl fidl::endpoints::DiscoverableProtocolMarker for PlayReadyFactoryStoreProviderMarker {}
pub trait PlayReadyFactoryStoreProviderProxyInterface: Send + Sync {
fn r#get_factory_store(
&self,
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct PlayReadyFactoryStoreProviderSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for PlayReadyFactoryStoreProviderSynchronousProxy {
type Proxy = PlayReadyFactoryStoreProviderProxy;
type Protocol = PlayReadyFactoryStoreProviderMarker;
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 PlayReadyFactoryStoreProviderSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<PlayReadyFactoryStoreProviderMarker 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<PlayReadyFactoryStoreProviderEvent, fidl::Error> {
PlayReadyFactoryStoreProviderEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct PlayReadyFactoryStoreProviderProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for PlayReadyFactoryStoreProviderProxy {
type Protocol = PlayReadyFactoryStoreProviderMarker;
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 PlayReadyFactoryStoreProviderProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<PlayReadyFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> PlayReadyFactoryStoreProviderEventStream {
PlayReadyFactoryStoreProviderEventStream {
event_receiver: self.client.take_event_receiver(),
}
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
PlayReadyFactoryStoreProviderProxyInterface::r#get_factory_store(self, dir)
}
}
impl PlayReadyFactoryStoreProviderProxyInterface for PlayReadyFactoryStoreProviderProxy {
fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct PlayReadyFactoryStoreProviderEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for PlayReadyFactoryStoreProviderEventStream {}
impl futures::stream::FusedStream for PlayReadyFactoryStoreProviderEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for PlayReadyFactoryStoreProviderEventStream {
type Item = Result<PlayReadyFactoryStoreProviderEvent, 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(PlayReadyFactoryStoreProviderEvent::decode(buf)))
}
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum PlayReadyFactoryStoreProviderEvent {}
impl PlayReadyFactoryStoreProviderEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<PlayReadyFactoryStoreProviderEvent, 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: <PlayReadyFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
})
}
}
}
pub struct PlayReadyFactoryStoreProviderRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for PlayReadyFactoryStoreProviderRequestStream {}
impl futures::stream::FusedStream for PlayReadyFactoryStoreProviderRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for PlayReadyFactoryStoreProviderRequestStream {
type Protocol = PlayReadyFactoryStoreProviderMarker;
type ControlHandle = PlayReadyFactoryStoreProviderControlHandle;
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 {
PlayReadyFactoryStoreProviderControlHandle { 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 PlayReadyFactoryStoreProviderRequestStream {
type Item = Result<PlayReadyFactoryStoreProviderRequest, 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 PlayReadyFactoryStoreProviderRequestStream 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 {
0x21fa8e8bc0e1209e => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(FactoryStoreProviderGetFactoryStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryStoreProviderGetFactoryStoreRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = PlayReadyFactoryStoreProviderControlHandle {
inner: this.inner.clone(),
};
Ok(PlayReadyFactoryStoreProviderRequest::GetFactoryStore {dir: req.dir,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <PlayReadyFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum PlayReadyFactoryStoreProviderRequest {
GetFactoryStore {
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
control_handle: PlayReadyFactoryStoreProviderControlHandle,
},
}
impl PlayReadyFactoryStoreProviderRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_factory_store(
self,
) -> Option<(
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
PlayReadyFactoryStoreProviderControlHandle,
)> {
if let PlayReadyFactoryStoreProviderRequest::GetFactoryStore { dir, control_handle } = self
{
Some((dir, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
PlayReadyFactoryStoreProviderRequest::GetFactoryStore { .. } => "get_factory_store",
}
}
}
#[derive(Debug, Clone)]
pub struct PlayReadyFactoryStoreProviderControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for PlayReadyFactoryStoreProviderControlHandle {
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 PlayReadyFactoryStoreProviderControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct WeaveFactoryStoreProviderMarker;
impl fidl::endpoints::ProtocolMarker for WeaveFactoryStoreProviderMarker {
type Proxy = WeaveFactoryStoreProviderProxy;
type RequestStream = WeaveFactoryStoreProviderRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = WeaveFactoryStoreProviderSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.factory.WeaveFactoryStoreProvider";
}
impl fidl::endpoints::DiscoverableProtocolMarker for WeaveFactoryStoreProviderMarker {}
pub trait WeaveFactoryStoreProviderProxyInterface: Send + Sync {
fn r#get_factory_store(
&self,
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct WeaveFactoryStoreProviderSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for WeaveFactoryStoreProviderSynchronousProxy {
type Proxy = WeaveFactoryStoreProviderProxy;
type Protocol = WeaveFactoryStoreProviderMarker;
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 WeaveFactoryStoreProviderSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<WeaveFactoryStoreProviderMarker 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<WeaveFactoryStoreProviderEvent, fidl::Error> {
WeaveFactoryStoreProviderEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct WeaveFactoryStoreProviderProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for WeaveFactoryStoreProviderProxy {
type Protocol = WeaveFactoryStoreProviderMarker;
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 WeaveFactoryStoreProviderProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<WeaveFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> WeaveFactoryStoreProviderEventStream {
WeaveFactoryStoreProviderEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
WeaveFactoryStoreProviderProxyInterface::r#get_factory_store(self, dir)
}
}
impl WeaveFactoryStoreProviderProxyInterface for WeaveFactoryStoreProviderProxy {
fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct WeaveFactoryStoreProviderEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for WeaveFactoryStoreProviderEventStream {}
impl futures::stream::FusedStream for WeaveFactoryStoreProviderEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for WeaveFactoryStoreProviderEventStream {
type Item = Result<WeaveFactoryStoreProviderEvent, 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(WeaveFactoryStoreProviderEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum WeaveFactoryStoreProviderEvent {}
impl WeaveFactoryStoreProviderEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<WeaveFactoryStoreProviderEvent, 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:
<WeaveFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct WeaveFactoryStoreProviderRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for WeaveFactoryStoreProviderRequestStream {}
impl futures::stream::FusedStream for WeaveFactoryStoreProviderRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for WeaveFactoryStoreProviderRequestStream {
type Protocol = WeaveFactoryStoreProviderMarker;
type ControlHandle = WeaveFactoryStoreProviderControlHandle;
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 {
WeaveFactoryStoreProviderControlHandle { 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 WeaveFactoryStoreProviderRequestStream {
type Item = Result<WeaveFactoryStoreProviderRequest, 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 WeaveFactoryStoreProviderRequestStream 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 {
0x21fa8e8bc0e1209e => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(FactoryStoreProviderGetFactoryStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryStoreProviderGetFactoryStoreRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = WeaveFactoryStoreProviderControlHandle {
inner: this.inner.clone(),
};
Ok(WeaveFactoryStoreProviderRequest::GetFactoryStore {dir: req.dir,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <WeaveFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum WeaveFactoryStoreProviderRequest {
GetFactoryStore {
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
control_handle: WeaveFactoryStoreProviderControlHandle,
},
}
impl WeaveFactoryStoreProviderRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_factory_store(
self,
) -> Option<(
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
WeaveFactoryStoreProviderControlHandle,
)> {
if let WeaveFactoryStoreProviderRequest::GetFactoryStore { dir, control_handle } = self {
Some((dir, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
WeaveFactoryStoreProviderRequest::GetFactoryStore { .. } => "get_factory_store",
}
}
}
#[derive(Debug, Clone)]
pub struct WeaveFactoryStoreProviderControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for WeaveFactoryStoreProviderControlHandle {
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 WeaveFactoryStoreProviderControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct WidevineFactoryStoreProviderMarker;
impl fidl::endpoints::ProtocolMarker for WidevineFactoryStoreProviderMarker {
type Proxy = WidevineFactoryStoreProviderProxy;
type RequestStream = WidevineFactoryStoreProviderRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = WidevineFactoryStoreProviderSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.factory.WidevineFactoryStoreProvider";
}
impl fidl::endpoints::DiscoverableProtocolMarker for WidevineFactoryStoreProviderMarker {}
pub trait WidevineFactoryStoreProviderProxyInterface: Send + Sync {
fn r#get_factory_store(
&self,
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct WidevineFactoryStoreProviderSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for WidevineFactoryStoreProviderSynchronousProxy {
type Proxy = WidevineFactoryStoreProviderProxy;
type Protocol = WidevineFactoryStoreProviderMarker;
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 WidevineFactoryStoreProviderSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<WidevineFactoryStoreProviderMarker 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<WidevineFactoryStoreProviderEvent, fidl::Error> {
WidevineFactoryStoreProviderEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct WidevineFactoryStoreProviderProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for WidevineFactoryStoreProviderProxy {
type Protocol = WidevineFactoryStoreProviderMarker;
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 WidevineFactoryStoreProviderProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<WidevineFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> WidevineFactoryStoreProviderEventStream {
WidevineFactoryStoreProviderEventStream {
event_receiver: self.client.take_event_receiver(),
}
}
pub fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
WidevineFactoryStoreProviderProxyInterface::r#get_factory_store(self, dir)
}
}
impl WidevineFactoryStoreProviderProxyInterface for WidevineFactoryStoreProviderProxy {
fn r#get_factory_store(
&self,
mut dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<FactoryStoreProviderGetFactoryStoreRequest>(
(dir,),
0x21fa8e8bc0e1209e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct WidevineFactoryStoreProviderEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for WidevineFactoryStoreProviderEventStream {}
impl futures::stream::FusedStream for WidevineFactoryStoreProviderEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for WidevineFactoryStoreProviderEventStream {
type Item = Result<WidevineFactoryStoreProviderEvent, 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(WidevineFactoryStoreProviderEvent::decode(buf)))
}
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum WidevineFactoryStoreProviderEvent {}
impl WidevineFactoryStoreProviderEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<WidevineFactoryStoreProviderEvent, 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: <WidevineFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
})
}
}
}
pub struct WidevineFactoryStoreProviderRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for WidevineFactoryStoreProviderRequestStream {}
impl futures::stream::FusedStream for WidevineFactoryStoreProviderRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for WidevineFactoryStoreProviderRequestStream {
type Protocol = WidevineFactoryStoreProviderMarker;
type ControlHandle = WidevineFactoryStoreProviderControlHandle;
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 {
WidevineFactoryStoreProviderControlHandle { 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 WidevineFactoryStoreProviderRequestStream {
type Item = Result<WidevineFactoryStoreProviderRequest, 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 WidevineFactoryStoreProviderRequestStream 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 {
0x21fa8e8bc0e1209e => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(FactoryStoreProviderGetFactoryStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryStoreProviderGetFactoryStoreRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = WidevineFactoryStoreProviderControlHandle {
inner: this.inner.clone(),
};
Ok(WidevineFactoryStoreProviderRequest::GetFactoryStore {dir: req.dir,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <WidevineFactoryStoreProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum WidevineFactoryStoreProviderRequest {
GetFactoryStore {
dir: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
control_handle: WidevineFactoryStoreProviderControlHandle,
},
}
impl WidevineFactoryStoreProviderRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_factory_store(
self,
) -> Option<(
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
WidevineFactoryStoreProviderControlHandle,
)> {
if let WidevineFactoryStoreProviderRequest::GetFactoryStore { dir, control_handle } = self {
Some((dir, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
WidevineFactoryStoreProviderRequest::GetFactoryStore { .. } => "get_factory_store",
}
}
}
#[derive(Debug, Clone)]
pub struct WidevineFactoryStoreProviderControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for WidevineFactoryStoreProviderControlHandle {
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 WidevineFactoryStoreProviderControlHandle {}
mod internal {
use super::*;
impl fidl::encoding::ResourceTypeMarker for FactoryStoreProviderGetFactoryStoreRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for FactoryStoreProviderGetFactoryStoreRequest {
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
}
}
unsafe impl
fidl::encoding::Encode<
FactoryStoreProviderGetFactoryStoreRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut FactoryStoreProviderGetFactoryStoreRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FactoryStoreProviderGetFactoryStoreRequest>(offset);
fidl::encoding::Encode::<
FactoryStoreProviderGetFactoryStoreRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.dir
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
FactoryStoreProviderGetFactoryStoreRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FactoryStoreProviderGetFactoryStoreRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for FactoryStoreProviderGetFactoryStoreRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
dir: fidl::new_empty!(
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.dir,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
}