#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use {
bitflags::bitflags,
fidl::{
client::QueryResponseFut,
endpoints::{ControlHandle as _, Responder as _},
},
fuchsia_zircon_status as zx_status,
futures::future::{self, MaybeDone, TryFutureExt},
};
#[cfg(target_os = "fuchsia")]
use fuchsia_zircon as zx;
pub type LogMessage = String;
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct InspectPuppetRecordIntRequest {
pub key: String,
pub value: i64,
}
impl fidl::Persistable for InspectPuppetRecordIntRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct InspectPuppetRecordStringRequest {
pub key: String,
pub value: String,
}
impl fidl::Persistable for InspectPuppetRecordStringRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct LazyInspectPuppetCommitRequest {
pub options: CommitOptions,
}
impl fidl::Persistable for LazyInspectPuppetCommitRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct LogPuppetEprintlnRequest {
pub message: String,
}
impl fidl::Persistable for LogPuppetEprintlnRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct LogPuppetPrintlnRequest {
pub message: String,
}
impl fidl::Persistable for LogPuppetPrintlnRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct PuppetCrashRequest {
pub message: String,
}
impl fidl::Persistable for PuppetCrashRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct PuppetRecordLazyValuesRequest {
pub key: String,
}
impl fidl::Persistable for PuppetRecordLazyValuesRequest {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct PuppetRecordLazyValuesResponse {
pub client: fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>,
}
impl fidl::Standalone for PuppetRecordLazyValuesResponse {}
#[derive(Debug, PartialEq)]
pub struct RealmFactoryCreateRealmRequest {
pub options: RealmOptions,
pub realm_server: fidl::endpoints::ServerEnd<fidl_fuchsia_testing_harness::RealmProxy_Marker>,
}
impl fidl::Standalone for RealmFactoryCreateRealmRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ArchivistConfig {
pub enable_klog: Option<bool>,
pub logs_max_cached_original_bytes: Option<u64>,
pub pipelines_path: Option<String>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for ArchivistConfig {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CommitOptions {
pub hang: Option<bool>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for CommitOptions {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct LogPuppetLogRequest {
pub message: Option<String>,
pub severity: Option<fidl_fuchsia_diagnostics::Severity>,
pub time: Option<i64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for LogPuppetLogRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct LogPuppetWaitForInterestChangeResponse {
pub severity: Option<fidl_fuchsia_diagnostics::Severity>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for LogPuppetWaitForInterestChangeResponse {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PuppetDecl {
pub name: Option<String>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for PuppetDecl {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RealmOptions {
pub realm_name: Option<String>,
pub puppets: Option<Vec<PuppetDecl>>,
pub archivist_config: Option<ArchivistConfig>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for RealmOptions {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct InspectPuppetMarker;
impl fidl::endpoints::ProtocolMarker for InspectPuppetMarker {
type Proxy = InspectPuppetProxy;
type RequestStream = InspectPuppetRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = InspectPuppetSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.archivist.test.InspectPuppet";
}
impl fidl::endpoints::DiscoverableProtocolMarker for InspectPuppetMarker {}
pub trait InspectPuppetProxyInterface: Send + Sync {
type SetHealthOkResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#set_health_ok(&self) -> Self::SetHealthOkResponseFut;
type RecordStringResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#record_string(&self, key: &str, value: &str) -> Self::RecordStringResponseFut;
type RecordIntResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#record_int(&self, key: &str, value: i64) -> Self::RecordIntResponseFut;
type EmitExampleInspectDataResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
+ Send;
fn r#emit_example_inspect_data(&self) -> Self::EmitExampleInspectDataResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct InspectPuppetSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for InspectPuppetSynchronousProxy {
type Proxy = InspectPuppetProxy;
type Protocol = InspectPuppetMarker;
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 InspectPuppetSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <InspectPuppetMarker 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::Time) -> Result<InspectPuppetEvent, fidl::Error> {
InspectPuppetEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#set_health_ok(&self, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(),
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<InspectPuppetMarker>("set_health_ok")?;
Ok(_response)
}
pub fn r#record_string(
&self,
mut key: &str,
mut value: &str,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
InspectPuppetRecordStringRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(key, value,),
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<InspectPuppetMarker>("record_string")?;
Ok(_response)
}
pub fn r#record_int(
&self,
mut key: &str,
mut value: i64,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
InspectPuppetRecordIntRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(key, value,),
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<InspectPuppetMarker>("record_int")?;
Ok(_response)
}
pub fn r#emit_example_inspect_data(&self, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(),
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<InspectPuppetMarker>("emit_example_inspect_data")?;
Ok(_response)
}
}
#[derive(Debug, Clone)]
pub struct InspectPuppetProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for InspectPuppetProxy {
type Protocol = InspectPuppetMarker;
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 InspectPuppetProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <InspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> InspectPuppetEventStream {
InspectPuppetEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#set_health_ok(&self) -> fidl::client::QueryResponseFut<()> {
InspectPuppetProxyInterface::r#set_health_ok(self)
}
pub fn r#record_string(
&self,
mut key: &str,
mut value: &str,
) -> fidl::client::QueryResponseFut<()> {
InspectPuppetProxyInterface::r#record_string(self, key, value)
}
pub fn r#record_int(
&self,
mut key: &str,
mut value: i64,
) -> fidl::client::QueryResponseFut<()> {
InspectPuppetProxyInterface::r#record_int(self, key, value)
}
pub fn r#emit_example_inspect_data(&self) -> fidl::client::QueryResponseFut<()> {
InspectPuppetProxyInterface::r#emit_example_inspect_data(self)
}
}
impl InspectPuppetProxyInterface for InspectPuppetProxy {
type SetHealthOkResponseFut = fidl::client::QueryResponseFut<()>;
fn r#set_health_ok(&self) -> Self::SetHealthOkResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x3c39f4da45df944f,
>(_buf?)?
.into_result::<InspectPuppetMarker>("set_health_ok")?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type RecordStringResponseFut = fidl::client::QueryResponseFut<()>;
fn r#record_string(&self, mut key: &str, mut value: &str) -> Self::RecordStringResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x2e7796dc0afaa83,
>(_buf?)?
.into_result::<InspectPuppetMarker>("record_string")?;
Ok(_response)
}
self.client.send_query_and_decode::<InspectPuppetRecordStringRequest, ()>(
(key, value),
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type RecordIntResponseFut = fidl::client::QueryResponseFut<()>;
fn r#record_int(&self, mut key: &str, mut value: i64) -> Self::RecordIntResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x4fbc67c76f171b0a,
>(_buf?)?
.into_result::<InspectPuppetMarker>("record_int")?;
Ok(_response)
}
self.client.send_query_and_decode::<InspectPuppetRecordIntRequest, ()>(
(key, value),
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type EmitExampleInspectDataResponseFut = fidl::client::QueryResponseFut<()>;
fn r#emit_example_inspect_data(&self) -> Self::EmitExampleInspectDataResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x3b65dd22aa9fa442,
>(_buf?)?
.into_result::<InspectPuppetMarker>("emit_example_inspect_data")?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
}
pub struct InspectPuppetEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for InspectPuppetEventStream {}
impl futures::stream::FusedStream for InspectPuppetEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for InspectPuppetEventStream {
type Item = Result<InspectPuppetEvent, 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(InspectPuppetEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum InspectPuppetEvent {
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl InspectPuppetEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<InspectPuppetEvent, 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(InspectPuppetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <InspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct InspectPuppetRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for InspectPuppetRequestStream {}
impl futures::stream::FusedStream for InspectPuppetRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for InspectPuppetRequestStream {
type Protocol = InspectPuppetMarker;
type ControlHandle = InspectPuppetControlHandle;
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 {
InspectPuppetControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for InspectPuppetRequestStream {
type Item = Result<InspectPuppetRequest, 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 InspectPuppetRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x3c39f4da45df944f => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = InspectPuppetControlHandle { inner: this.inner.clone() };
Ok(InspectPuppetRequest::SetHealthOk {
responder: InspectPuppetSetHealthOkResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2e7796dc0afaa83 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(InspectPuppetRecordStringRequest);
fidl::encoding::Decoder::decode_into::<InspectPuppetRecordStringRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = InspectPuppetControlHandle { inner: this.inner.clone() };
Ok(InspectPuppetRequest::RecordString {
key: req.key,
value: req.value,
responder: InspectPuppetRecordStringResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4fbc67c76f171b0a => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(InspectPuppetRecordIntRequest);
fidl::encoding::Decoder::decode_into::<InspectPuppetRecordIntRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = InspectPuppetControlHandle { inner: this.inner.clone() };
Ok(InspectPuppetRequest::RecordInt {
key: req.key,
value: req.value,
responder: InspectPuppetRecordIntResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3b65dd22aa9fa442 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = InspectPuppetControlHandle { inner: this.inner.clone() };
Ok(InspectPuppetRequest::EmitExampleInspectData {
responder: InspectPuppetEmitExampleInspectDataResponder {
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(InspectPuppetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: InspectPuppetControlHandle { 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(InspectPuppetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: InspectPuppetControlHandle { inner: this.inner.clone() },
method_type: fidl::MethodType::TwoWay,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<InspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum InspectPuppetRequest {
SetHealthOk { responder: InspectPuppetSetHealthOkResponder },
RecordString { key: String, value: String, responder: InspectPuppetRecordStringResponder },
RecordInt { key: String, value: i64, responder: InspectPuppetRecordIntResponder },
EmitExampleInspectData { responder: InspectPuppetEmitExampleInspectDataResponder },
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: InspectPuppetControlHandle,
method_type: fidl::MethodType,
},
}
impl InspectPuppetRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_set_health_ok(self) -> Option<(InspectPuppetSetHealthOkResponder)> {
if let InspectPuppetRequest::SetHealthOk { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_record_string(
self,
) -> Option<(String, String, InspectPuppetRecordStringResponder)> {
if let InspectPuppetRequest::RecordString { key, value, responder } = self {
Some((key, value, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_record_int(self) -> Option<(String, i64, InspectPuppetRecordIntResponder)> {
if let InspectPuppetRequest::RecordInt { key, value, responder } = self {
Some((key, value, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_emit_example_inspect_data(
self,
) -> Option<(InspectPuppetEmitExampleInspectDataResponder)> {
if let InspectPuppetRequest::EmitExampleInspectData { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
InspectPuppetRequest::SetHealthOk { .. } => "set_health_ok",
InspectPuppetRequest::RecordString { .. } => "record_string",
InspectPuppetRequest::RecordInt { .. } => "record_int",
InspectPuppetRequest::EmitExampleInspectData { .. } => "emit_example_inspect_data",
InspectPuppetRequest::_UnknownMethod {
method_type: fidl::MethodType::OneWay, ..
} => "unknown one-way method",
InspectPuppetRequest::_UnknownMethod {
method_type: fidl::MethodType::TwoWay, ..
} => "unknown two-way method",
}
}
}
#[derive(Debug, Clone)]
pub struct InspectPuppetControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for InspectPuppetControlHandle {
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()
}
}
impl InspectPuppetControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct InspectPuppetSetHealthOkResponder {
control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for InspectPuppetSetHealthOkResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for InspectPuppetSetHealthOkResponder {
type ControlHandle = InspectPuppetControlHandle;
fn control_handle(&self) -> &InspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl InspectPuppetSetHealthOkResponder {
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,
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct InspectPuppetRecordStringResponder {
control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for InspectPuppetRecordStringResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for InspectPuppetRecordStringResponder {
type ControlHandle = InspectPuppetControlHandle;
fn control_handle(&self) -> &InspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl InspectPuppetRecordStringResponder {
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,
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct InspectPuppetRecordIntResponder {
control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for InspectPuppetRecordIntResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for InspectPuppetRecordIntResponder {
type ControlHandle = InspectPuppetControlHandle;
fn control_handle(&self) -> &InspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl InspectPuppetRecordIntResponder {
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,
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct InspectPuppetEmitExampleInspectDataResponder {
control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for InspectPuppetEmitExampleInspectDataResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for InspectPuppetEmitExampleInspectDataResponder {
type ControlHandle = InspectPuppetControlHandle;
fn control_handle(&self) -> &InspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl InspectPuppetEmitExampleInspectDataResponder {
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,
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct LazyInspectPuppetMarker;
impl fidl::endpoints::ProtocolMarker for LazyInspectPuppetMarker {
type Proxy = LazyInspectPuppetProxy;
type RequestStream = LazyInspectPuppetRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = LazyInspectPuppetSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) LazyInspectPuppet";
}
pub trait LazyInspectPuppetProxyInterface: Send + Sync {
type SetHealthOkResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#set_health_ok(&self) -> Self::SetHealthOkResponseFut;
type RecordStringResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#record_string(&self, key: &str, value: &str) -> Self::RecordStringResponseFut;
type RecordIntResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#record_int(&self, key: &str, value: i64) -> Self::RecordIntResponseFut;
type EmitExampleInspectDataResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
+ Send;
fn r#emit_example_inspect_data(&self) -> Self::EmitExampleInspectDataResponseFut;
type CommitResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#commit(&self, options: &CommitOptions) -> Self::CommitResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct LazyInspectPuppetSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for LazyInspectPuppetSynchronousProxy {
type Proxy = LazyInspectPuppetProxy;
type Protocol = LazyInspectPuppetMarker;
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 LazyInspectPuppetSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<LazyInspectPuppetMarker 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::Time,
) -> Result<LazyInspectPuppetEvent, fidl::Error> {
LazyInspectPuppetEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#set_health_ok(&self, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(),
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LazyInspectPuppetMarker>("set_health_ok")?;
Ok(_response)
}
pub fn r#record_string(
&self,
mut key: &str,
mut value: &str,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
InspectPuppetRecordStringRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(key, value,),
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LazyInspectPuppetMarker>("record_string")?;
Ok(_response)
}
pub fn r#record_int(
&self,
mut key: &str,
mut value: i64,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
InspectPuppetRecordIntRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(key, value,),
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LazyInspectPuppetMarker>("record_int")?;
Ok(_response)
}
pub fn r#emit_example_inspect_data(&self, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(),
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LazyInspectPuppetMarker>("emit_example_inspect_data")?;
Ok(_response)
}
pub fn r#commit(
&self,
mut options: &CommitOptions,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
LazyInspectPuppetCommitRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(options,),
0x79524e5e00cbf03f,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LazyInspectPuppetMarker>("commit")?;
Ok(_response)
}
}
#[derive(Debug, Clone)]
pub struct LazyInspectPuppetProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for LazyInspectPuppetProxy {
type Protocol = LazyInspectPuppetMarker;
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 LazyInspectPuppetProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name =
<LazyInspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> LazyInspectPuppetEventStream {
LazyInspectPuppetEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#set_health_ok(&self) -> fidl::client::QueryResponseFut<()> {
LazyInspectPuppetProxyInterface::r#set_health_ok(self)
}
pub fn r#record_string(
&self,
mut key: &str,
mut value: &str,
) -> fidl::client::QueryResponseFut<()> {
LazyInspectPuppetProxyInterface::r#record_string(self, key, value)
}
pub fn r#record_int(
&self,
mut key: &str,
mut value: i64,
) -> fidl::client::QueryResponseFut<()> {
LazyInspectPuppetProxyInterface::r#record_int(self, key, value)
}
pub fn r#emit_example_inspect_data(&self) -> fidl::client::QueryResponseFut<()> {
LazyInspectPuppetProxyInterface::r#emit_example_inspect_data(self)
}
pub fn r#commit(&self, mut options: &CommitOptions) -> fidl::client::QueryResponseFut<()> {
LazyInspectPuppetProxyInterface::r#commit(self, options)
}
}
impl LazyInspectPuppetProxyInterface for LazyInspectPuppetProxy {
type SetHealthOkResponseFut = fidl::client::QueryResponseFut<()>;
fn r#set_health_ok(&self) -> Self::SetHealthOkResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x3c39f4da45df944f,
>(_buf?)?
.into_result::<LazyInspectPuppetMarker>("set_health_ok")?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type RecordStringResponseFut = fidl::client::QueryResponseFut<()>;
fn r#record_string(&self, mut key: &str, mut value: &str) -> Self::RecordStringResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x2e7796dc0afaa83,
>(_buf?)?
.into_result::<LazyInspectPuppetMarker>("record_string")?;
Ok(_response)
}
self.client.send_query_and_decode::<InspectPuppetRecordStringRequest, ()>(
(key, value),
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type RecordIntResponseFut = fidl::client::QueryResponseFut<()>;
fn r#record_int(&self, mut key: &str, mut value: i64) -> Self::RecordIntResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x4fbc67c76f171b0a,
>(_buf?)?
.into_result::<LazyInspectPuppetMarker>("record_int")?;
Ok(_response)
}
self.client.send_query_and_decode::<InspectPuppetRecordIntRequest, ()>(
(key, value),
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type EmitExampleInspectDataResponseFut = fidl::client::QueryResponseFut<()>;
fn r#emit_example_inspect_data(&self) -> Self::EmitExampleInspectDataResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x3b65dd22aa9fa442,
>(_buf?)?
.into_result::<LazyInspectPuppetMarker>("emit_example_inspect_data")?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type CommitResponseFut = fidl::client::QueryResponseFut<()>;
fn r#commit(&self, mut options: &CommitOptions) -> Self::CommitResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x79524e5e00cbf03f,
>(_buf?)?
.into_result::<LazyInspectPuppetMarker>("commit")?;
Ok(_response)
}
self.client.send_query_and_decode::<LazyInspectPuppetCommitRequest, ()>(
(options,),
0x79524e5e00cbf03f,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
}
pub struct LazyInspectPuppetEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for LazyInspectPuppetEventStream {}
impl futures::stream::FusedStream for LazyInspectPuppetEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for LazyInspectPuppetEventStream {
type Item = Result<LazyInspectPuppetEvent, 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(LazyInspectPuppetEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum LazyInspectPuppetEvent {
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl LazyInspectPuppetEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<LazyInspectPuppetEvent, 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(LazyInspectPuppetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name:
<LazyInspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct LazyInspectPuppetRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for LazyInspectPuppetRequestStream {}
impl futures::stream::FusedStream for LazyInspectPuppetRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for LazyInspectPuppetRequestStream {
type Protocol = LazyInspectPuppetMarker;
type ControlHandle = LazyInspectPuppetControlHandle;
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 {
LazyInspectPuppetControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for LazyInspectPuppetRequestStream {
type Item = Result<LazyInspectPuppetRequest, 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 LazyInspectPuppetRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x3c39f4da45df944f => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
LazyInspectPuppetControlHandle { inner: this.inner.clone() };
Ok(LazyInspectPuppetRequest::SetHealthOk {
responder: LazyInspectPuppetSetHealthOkResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2e7796dc0afaa83 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(InspectPuppetRecordStringRequest);
fidl::encoding::Decoder::decode_into::<InspectPuppetRecordStringRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
LazyInspectPuppetControlHandle { inner: this.inner.clone() };
Ok(LazyInspectPuppetRequest::RecordString {
key: req.key,
value: req.value,
responder: LazyInspectPuppetRecordStringResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4fbc67c76f171b0a => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(InspectPuppetRecordIntRequest);
fidl::encoding::Decoder::decode_into::<InspectPuppetRecordIntRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
LazyInspectPuppetControlHandle { inner: this.inner.clone() };
Ok(LazyInspectPuppetRequest::RecordInt {
key: req.key,
value: req.value,
responder: LazyInspectPuppetRecordIntResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3b65dd22aa9fa442 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
LazyInspectPuppetControlHandle { inner: this.inner.clone() };
Ok(LazyInspectPuppetRequest::EmitExampleInspectData {
responder: LazyInspectPuppetEmitExampleInspectDataResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x79524e5e00cbf03f => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(LazyInspectPuppetCommitRequest);
fidl::encoding::Decoder::decode_into::<LazyInspectPuppetCommitRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
LazyInspectPuppetControlHandle { inner: this.inner.clone() };
Ok(LazyInspectPuppetRequest::Commit {
options: req.options,
responder: LazyInspectPuppetCommitResponder {
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(LazyInspectPuppetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: LazyInspectPuppetControlHandle {
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(LazyInspectPuppetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: LazyInspectPuppetControlHandle {
inner: this.inner.clone(),
},
method_type: fidl::MethodType::TwoWay,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<LazyInspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum LazyInspectPuppetRequest {
SetHealthOk { responder: LazyInspectPuppetSetHealthOkResponder },
RecordString { key: String, value: String, responder: LazyInspectPuppetRecordStringResponder },
RecordInt { key: String, value: i64, responder: LazyInspectPuppetRecordIntResponder },
EmitExampleInspectData { responder: LazyInspectPuppetEmitExampleInspectDataResponder },
Commit { options: CommitOptions, responder: LazyInspectPuppetCommitResponder },
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: LazyInspectPuppetControlHandle,
method_type: fidl::MethodType,
},
}
impl LazyInspectPuppetRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_set_health_ok(self) -> Option<(LazyInspectPuppetSetHealthOkResponder)> {
if let LazyInspectPuppetRequest::SetHealthOk { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_record_string(
self,
) -> Option<(String, String, LazyInspectPuppetRecordStringResponder)> {
if let LazyInspectPuppetRequest::RecordString { key, value, responder } = self {
Some((key, value, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_record_int(self) -> Option<(String, i64, LazyInspectPuppetRecordIntResponder)> {
if let LazyInspectPuppetRequest::RecordInt { key, value, responder } = self {
Some((key, value, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_emit_example_inspect_data(
self,
) -> Option<(LazyInspectPuppetEmitExampleInspectDataResponder)> {
if let LazyInspectPuppetRequest::EmitExampleInspectData { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_commit(self) -> Option<(CommitOptions, LazyInspectPuppetCommitResponder)> {
if let LazyInspectPuppetRequest::Commit { options, responder } = self {
Some((options, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
LazyInspectPuppetRequest::SetHealthOk { .. } => "set_health_ok",
LazyInspectPuppetRequest::RecordString { .. } => "record_string",
LazyInspectPuppetRequest::RecordInt { .. } => "record_int",
LazyInspectPuppetRequest::EmitExampleInspectData { .. } => "emit_example_inspect_data",
LazyInspectPuppetRequest::Commit { .. } => "commit",
LazyInspectPuppetRequest::_UnknownMethod {
method_type: fidl::MethodType::OneWay,
..
} => "unknown one-way method",
LazyInspectPuppetRequest::_UnknownMethod {
method_type: fidl::MethodType::TwoWay,
..
} => "unknown two-way method",
}
}
}
#[derive(Debug, Clone)]
pub struct LazyInspectPuppetControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for LazyInspectPuppetControlHandle {
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()
}
}
impl LazyInspectPuppetControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LazyInspectPuppetSetHealthOkResponder {
control_handle: std::mem::ManuallyDrop<LazyInspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LazyInspectPuppetSetHealthOkResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LazyInspectPuppetSetHealthOkResponder {
type ControlHandle = LazyInspectPuppetControlHandle;
fn control_handle(&self) -> &LazyInspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LazyInspectPuppetSetHealthOkResponder {
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,
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LazyInspectPuppetRecordStringResponder {
control_handle: std::mem::ManuallyDrop<LazyInspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LazyInspectPuppetRecordStringResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LazyInspectPuppetRecordStringResponder {
type ControlHandle = LazyInspectPuppetControlHandle;
fn control_handle(&self) -> &LazyInspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LazyInspectPuppetRecordStringResponder {
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,
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LazyInspectPuppetRecordIntResponder {
control_handle: std::mem::ManuallyDrop<LazyInspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LazyInspectPuppetRecordIntResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LazyInspectPuppetRecordIntResponder {
type ControlHandle = LazyInspectPuppetControlHandle;
fn control_handle(&self) -> &LazyInspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LazyInspectPuppetRecordIntResponder {
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,
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LazyInspectPuppetEmitExampleInspectDataResponder {
control_handle: std::mem::ManuallyDrop<LazyInspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LazyInspectPuppetEmitExampleInspectDataResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LazyInspectPuppetEmitExampleInspectDataResponder {
type ControlHandle = LazyInspectPuppetControlHandle;
fn control_handle(&self) -> &LazyInspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LazyInspectPuppetEmitExampleInspectDataResponder {
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,
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LazyInspectPuppetCommitResponder {
control_handle: std::mem::ManuallyDrop<LazyInspectPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LazyInspectPuppetCommitResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LazyInspectPuppetCommitResponder {
type ControlHandle = LazyInspectPuppetControlHandle;
fn control_handle(&self) -> &LazyInspectPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LazyInspectPuppetCommitResponder {
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,
0x79524e5e00cbf03f,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct LogPuppetMarker;
impl fidl::endpoints::ProtocolMarker for LogPuppetMarker {
type Proxy = LogPuppetProxy;
type RequestStream = LogPuppetRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = LogPuppetSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) LogPuppet";
}
pub trait LogPuppetProxyInterface: Send + Sync {
type PrintlnResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#println(&self, message: &str) -> Self::PrintlnResponseFut;
type EprintlnResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#eprintln(&self, message: &str) -> Self::EprintlnResponseFut;
type LogResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#log(&self, payload: &LogPuppetLogRequest) -> Self::LogResponseFut;
type WaitForInterestChangeResponseFut: std::future::Future<Output = Result<LogPuppetWaitForInterestChangeResponse, fidl::Error>>
+ Send;
fn r#wait_for_interest_change(&self) -> Self::WaitForInterestChangeResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct LogPuppetSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for LogPuppetSynchronousProxy {
type Proxy = LogPuppetProxy;
type Protocol = LogPuppetMarker;
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 LogPuppetSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <LogPuppetMarker 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::Time) -> Result<LogPuppetEvent, fidl::Error> {
LogPuppetEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#println(&self, mut message: &str, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
LogPuppetPrintlnRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(message,),
0x6584cb93e1978da0,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LogPuppetMarker>("println")?;
Ok(_response)
}
pub fn r#eprintln(&self, mut message: &str, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
LogPuppetEprintlnRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(message,),
0x770e4524f6b093ef,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LogPuppetMarker>("eprintln")?;
Ok(_response)
}
pub fn r#log(
&self,
mut payload: &LogPuppetLogRequest,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
LogPuppetLogRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
payload,
0x34d3dd4225e79a8b,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LogPuppetMarker>("log")?;
Ok(_response)
}
pub fn r#wait_for_interest_change(
&self,
___deadline: zx::Time,
) -> Result<LogPuppetWaitForInterestChangeResponse, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<LogPuppetWaitForInterestChangeResponse>,
>(
(),
0x3645d3ad544bc546,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<LogPuppetMarker>("wait_for_interest_change")?;
Ok(_response)
}
}
#[derive(Debug, Clone)]
pub struct LogPuppetProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for LogPuppetProxy {
type Protocol = LogPuppetMarker;
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 LogPuppetProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <LogPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> LogPuppetEventStream {
LogPuppetEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#println(&self, mut message: &str) -> fidl::client::QueryResponseFut<()> {
LogPuppetProxyInterface::r#println(self, message)
}
pub fn r#eprintln(&self, mut message: &str) -> fidl::client::QueryResponseFut<()> {
LogPuppetProxyInterface::r#eprintln(self, message)
}
pub fn r#log(&self, mut payload: &LogPuppetLogRequest) -> fidl::client::QueryResponseFut<()> {
LogPuppetProxyInterface::r#log(self, payload)
}
pub fn r#wait_for_interest_change(
&self,
) -> fidl::client::QueryResponseFut<LogPuppetWaitForInterestChangeResponse> {
LogPuppetProxyInterface::r#wait_for_interest_change(self)
}
}
impl LogPuppetProxyInterface for LogPuppetProxy {
type PrintlnResponseFut = fidl::client::QueryResponseFut<()>;
fn r#println(&self, mut message: &str) -> Self::PrintlnResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x6584cb93e1978da0,
>(_buf?)?
.into_result::<LogPuppetMarker>("println")?;
Ok(_response)
}
self.client.send_query_and_decode::<LogPuppetPrintlnRequest, ()>(
(message,),
0x6584cb93e1978da0,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type EprintlnResponseFut = fidl::client::QueryResponseFut<()>;
fn r#eprintln(&self, mut message: &str) -> Self::EprintlnResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x770e4524f6b093ef,
>(_buf?)?
.into_result::<LogPuppetMarker>("eprintln")?;
Ok(_response)
}
self.client.send_query_and_decode::<LogPuppetEprintlnRequest, ()>(
(message,),
0x770e4524f6b093ef,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type LogResponseFut = fidl::client::QueryResponseFut<()>;
fn r#log(&self, mut payload: &LogPuppetLogRequest) -> Self::LogResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x34d3dd4225e79a8b,
>(_buf?)?
.into_result::<LogPuppetMarker>("log")?;
Ok(_response)
}
self.client.send_query_and_decode::<LogPuppetLogRequest, ()>(
payload,
0x34d3dd4225e79a8b,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type WaitForInterestChangeResponseFut =
fidl::client::QueryResponseFut<LogPuppetWaitForInterestChangeResponse>;
fn r#wait_for_interest_change(&self) -> Self::WaitForInterestChangeResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<LogPuppetWaitForInterestChangeResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<LogPuppetWaitForInterestChangeResponse>,
0x3645d3ad544bc546,
>(_buf?)?
.into_result::<LogPuppetMarker>("wait_for_interest_change")?;
Ok(_response)
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
LogPuppetWaitForInterestChangeResponse,
>(
(),
0x3645d3ad544bc546,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
}
pub struct LogPuppetEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for LogPuppetEventStream {}
impl futures::stream::FusedStream for LogPuppetEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for LogPuppetEventStream {
type Item = Result<LogPuppetEvent, 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(LogPuppetEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum LogPuppetEvent {
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl LogPuppetEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<LogPuppetEvent, 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(LogPuppetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <LogPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct LogPuppetRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for LogPuppetRequestStream {}
impl futures::stream::FusedStream for LogPuppetRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for LogPuppetRequestStream {
type Protocol = LogPuppetMarker;
type ControlHandle = LogPuppetControlHandle;
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 {
LogPuppetControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for LogPuppetRequestStream {
type Item = Result<LogPuppetRequest, 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 LogPuppetRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x6584cb93e1978da0 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(LogPuppetPrintlnRequest);
fidl::encoding::Decoder::decode_into::<LogPuppetPrintlnRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = LogPuppetControlHandle { inner: this.inner.clone() };
Ok(LogPuppetRequest::Println {
message: req.message,
responder: LogPuppetPrintlnResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x770e4524f6b093ef => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(LogPuppetEprintlnRequest);
fidl::encoding::Decoder::decode_into::<LogPuppetEprintlnRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = LogPuppetControlHandle { inner: this.inner.clone() };
Ok(LogPuppetRequest::Eprintln {
message: req.message,
responder: LogPuppetEprintlnResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x34d3dd4225e79a8b => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(LogPuppetLogRequest);
fidl::encoding::Decoder::decode_into::<LogPuppetLogRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = LogPuppetControlHandle { inner: this.inner.clone() };
Ok(LogPuppetRequest::Log {
payload: req,
responder: LogPuppetLogResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3645d3ad544bc546 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = LogPuppetControlHandle { inner: this.inner.clone() };
Ok(LogPuppetRequest::WaitForInterestChange {
responder: LogPuppetWaitForInterestChangeResponder {
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(LogPuppetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: LogPuppetControlHandle { 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(LogPuppetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: LogPuppetControlHandle { inner: this.inner.clone() },
method_type: fidl::MethodType::TwoWay,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <LogPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum LogPuppetRequest {
Println { message: String, responder: LogPuppetPrintlnResponder },
Eprintln { message: String, responder: LogPuppetEprintlnResponder },
Log { payload: LogPuppetLogRequest, responder: LogPuppetLogResponder },
WaitForInterestChange { responder: LogPuppetWaitForInterestChangeResponder },
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: LogPuppetControlHandle,
method_type: fidl::MethodType,
},
}
impl LogPuppetRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_println(self) -> Option<(String, LogPuppetPrintlnResponder)> {
if let LogPuppetRequest::Println { message, responder } = self {
Some((message, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_eprintln(self) -> Option<(String, LogPuppetEprintlnResponder)> {
if let LogPuppetRequest::Eprintln { message, responder } = self {
Some((message, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_log(self) -> Option<(LogPuppetLogRequest, LogPuppetLogResponder)> {
if let LogPuppetRequest::Log { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_wait_for_interest_change(
self,
) -> Option<(LogPuppetWaitForInterestChangeResponder)> {
if let LogPuppetRequest::WaitForInterestChange { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
LogPuppetRequest::Println { .. } => "println",
LogPuppetRequest::Eprintln { .. } => "eprintln",
LogPuppetRequest::Log { .. } => "log",
LogPuppetRequest::WaitForInterestChange { .. } => "wait_for_interest_change",
LogPuppetRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
"unknown one-way method"
}
LogPuppetRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
"unknown two-way method"
}
}
}
}
#[derive(Debug, Clone)]
pub struct LogPuppetControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for LogPuppetControlHandle {
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()
}
}
impl LogPuppetControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LogPuppetPrintlnResponder {
control_handle: std::mem::ManuallyDrop<LogPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LogPuppetPrintlnResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LogPuppetPrintlnResponder {
type ControlHandle = LogPuppetControlHandle;
fn control_handle(&self) -> &LogPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LogPuppetPrintlnResponder {
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,
0x6584cb93e1978da0,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LogPuppetEprintlnResponder {
control_handle: std::mem::ManuallyDrop<LogPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LogPuppetEprintlnResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LogPuppetEprintlnResponder {
type ControlHandle = LogPuppetControlHandle;
fn control_handle(&self) -> &LogPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LogPuppetEprintlnResponder {
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,
0x770e4524f6b093ef,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LogPuppetLogResponder {
control_handle: std::mem::ManuallyDrop<LogPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LogPuppetLogResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LogPuppetLogResponder {
type ControlHandle = LogPuppetControlHandle;
fn control_handle(&self) -> &LogPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LogPuppetLogResponder {
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,
0x34d3dd4225e79a8b,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct LogPuppetWaitForInterestChangeResponder {
control_handle: std::mem::ManuallyDrop<LogPuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for LogPuppetWaitForInterestChangeResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for LogPuppetWaitForInterestChangeResponder {
type ControlHandle = LogPuppetControlHandle;
fn control_handle(&self) -> &LogPuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl LogPuppetWaitForInterestChangeResponder {
pub fn send(
self,
mut payload: &LogPuppetWaitForInterestChangeResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut payload: &LogPuppetWaitForInterestChangeResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut payload: &LogPuppetWaitForInterestChangeResponse,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleType<
LogPuppetWaitForInterestChangeResponse,
>>(
fidl::encoding::Flexible::new(payload),
self.tx_id,
0x3645d3ad544bc546,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct PuppetMarker;
impl fidl::endpoints::ProtocolMarker for PuppetMarker {
type Proxy = PuppetProxy;
type RequestStream = PuppetRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = PuppetSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.archivist.test.Puppet";
}
impl fidl::endpoints::DiscoverableProtocolMarker for PuppetMarker {}
pub trait PuppetProxyInterface: Send + Sync {
type SetHealthOkResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#set_health_ok(&self) -> Self::SetHealthOkResponseFut;
type RecordStringResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#record_string(&self, key: &str, value: &str) -> Self::RecordStringResponseFut;
type RecordIntResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#record_int(&self, key: &str, value: i64) -> Self::RecordIntResponseFut;
type EmitExampleInspectDataResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
+ Send;
fn r#emit_example_inspect_data(&self) -> Self::EmitExampleInspectDataResponseFut;
type PrintlnResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#println(&self, message: &str) -> Self::PrintlnResponseFut;
type EprintlnResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#eprintln(&self, message: &str) -> Self::EprintlnResponseFut;
type LogResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#log(&self, payload: &LogPuppetLogRequest) -> Self::LogResponseFut;
type WaitForInterestChangeResponseFut: std::future::Future<Output = Result<LogPuppetWaitForInterestChangeResponse, fidl::Error>>
+ Send;
fn r#wait_for_interest_change(&self) -> Self::WaitForInterestChangeResponseFut;
type RecordLazyValuesResponseFut: std::future::Future<
Output = Result<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>, fidl::Error>,
> + Send;
fn r#record_lazy_values(&self, key: &str) -> Self::RecordLazyValuesResponseFut;
fn r#crash(&self, message: &str) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct PuppetSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for PuppetSynchronousProxy {
type Proxy = PuppetProxy;
type Protocol = PuppetMarker;
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 PuppetSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <PuppetMarker 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::Time) -> Result<PuppetEvent, fidl::Error> {
PuppetEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#set_health_ok(&self, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(),
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("set_health_ok")?;
Ok(_response)
}
pub fn r#record_string(
&self,
mut key: &str,
mut value: &str,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
InspectPuppetRecordStringRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(key, value,),
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("record_string")?;
Ok(_response)
}
pub fn r#record_int(
&self,
mut key: &str,
mut value: i64,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
InspectPuppetRecordIntRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(key, value,),
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("record_int")?;
Ok(_response)
}
pub fn r#emit_example_inspect_data(&self, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(),
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("emit_example_inspect_data")?;
Ok(_response)
}
pub fn r#println(&self, mut message: &str, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
LogPuppetPrintlnRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(message,),
0x6584cb93e1978da0,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("println")?;
Ok(_response)
}
pub fn r#eprintln(&self, mut message: &str, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
LogPuppetEprintlnRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(message,),
0x770e4524f6b093ef,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("eprintln")?;
Ok(_response)
}
pub fn r#log(
&self,
mut payload: &LogPuppetLogRequest,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
LogPuppetLogRequest,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
payload,
0x34d3dd4225e79a8b,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("log")?;
Ok(_response)
}
pub fn r#wait_for_interest_change(
&self,
___deadline: zx::Time,
) -> Result<LogPuppetWaitForInterestChangeResponse, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<LogPuppetWaitForInterestChangeResponse>,
>(
(),
0x3645d3ad544bc546,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("wait_for_interest_change")?;
Ok(_response)
}
pub fn r#record_lazy_values(
&self,
mut key: &str,
___deadline: zx::Time,
) -> Result<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>, fidl::Error> {
let _response = self.client.send_query::<
PuppetRecordLazyValuesRequest,
fidl::encoding::FlexibleType<PuppetRecordLazyValuesResponse>,
>(
(key,),
0x339951b623dc9d7d,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<PuppetMarker>("record_lazy_values")?;
Ok(_response.client)
}
pub fn r#crash(&self, mut message: &str) -> Result<(), fidl::Error> {
self.client.send::<PuppetCrashRequest>(
(message,),
0x2aeef488fb79c9db,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[derive(Debug, Clone)]
pub struct PuppetProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for PuppetProxy {
type Protocol = PuppetMarker;
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 PuppetProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <PuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> PuppetEventStream {
PuppetEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#set_health_ok(&self) -> fidl::client::QueryResponseFut<()> {
PuppetProxyInterface::r#set_health_ok(self)
}
pub fn r#record_string(
&self,
mut key: &str,
mut value: &str,
) -> fidl::client::QueryResponseFut<()> {
PuppetProxyInterface::r#record_string(self, key, value)
}
pub fn r#record_int(
&self,
mut key: &str,
mut value: i64,
) -> fidl::client::QueryResponseFut<()> {
PuppetProxyInterface::r#record_int(self, key, value)
}
pub fn r#emit_example_inspect_data(&self) -> fidl::client::QueryResponseFut<()> {
PuppetProxyInterface::r#emit_example_inspect_data(self)
}
pub fn r#println(&self, mut message: &str) -> fidl::client::QueryResponseFut<()> {
PuppetProxyInterface::r#println(self, message)
}
pub fn r#eprintln(&self, mut message: &str) -> fidl::client::QueryResponseFut<()> {
PuppetProxyInterface::r#eprintln(self, message)
}
pub fn r#log(&self, mut payload: &LogPuppetLogRequest) -> fidl::client::QueryResponseFut<()> {
PuppetProxyInterface::r#log(self, payload)
}
pub fn r#wait_for_interest_change(
&self,
) -> fidl::client::QueryResponseFut<LogPuppetWaitForInterestChangeResponse> {
PuppetProxyInterface::r#wait_for_interest_change(self)
}
pub fn r#record_lazy_values(
&self,
mut key: &str,
) -> fidl::client::QueryResponseFut<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>> {
PuppetProxyInterface::r#record_lazy_values(self, key)
}
pub fn r#crash(&self, mut message: &str) -> Result<(), fidl::Error> {
PuppetProxyInterface::r#crash(self, message)
}
}
impl PuppetProxyInterface for PuppetProxy {
type SetHealthOkResponseFut = fidl::client::QueryResponseFut<()>;
fn r#set_health_ok(&self) -> Self::SetHealthOkResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x3c39f4da45df944f,
>(_buf?)?
.into_result::<PuppetMarker>("set_health_ok")?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type RecordStringResponseFut = fidl::client::QueryResponseFut<()>;
fn r#record_string(&self, mut key: &str, mut value: &str) -> Self::RecordStringResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x2e7796dc0afaa83,
>(_buf?)?
.into_result::<PuppetMarker>("record_string")?;
Ok(_response)
}
self.client.send_query_and_decode::<InspectPuppetRecordStringRequest, ()>(
(key, value),
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type RecordIntResponseFut = fidl::client::QueryResponseFut<()>;
fn r#record_int(&self, mut key: &str, mut value: i64) -> Self::RecordIntResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x4fbc67c76f171b0a,
>(_buf?)?
.into_result::<PuppetMarker>("record_int")?;
Ok(_response)
}
self.client.send_query_and_decode::<InspectPuppetRecordIntRequest, ()>(
(key, value),
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type EmitExampleInspectDataResponseFut = fidl::client::QueryResponseFut<()>;
fn r#emit_example_inspect_data(&self) -> Self::EmitExampleInspectDataResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x3b65dd22aa9fa442,
>(_buf?)?
.into_result::<PuppetMarker>("emit_example_inspect_data")?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type PrintlnResponseFut = fidl::client::QueryResponseFut<()>;
fn r#println(&self, mut message: &str) -> Self::PrintlnResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x6584cb93e1978da0,
>(_buf?)?
.into_result::<PuppetMarker>("println")?;
Ok(_response)
}
self.client.send_query_and_decode::<LogPuppetPrintlnRequest, ()>(
(message,),
0x6584cb93e1978da0,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type EprintlnResponseFut = fidl::client::QueryResponseFut<()>;
fn r#eprintln(&self, mut message: &str) -> Self::EprintlnResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x770e4524f6b093ef,
>(_buf?)?
.into_result::<PuppetMarker>("eprintln")?;
Ok(_response)
}
self.client.send_query_and_decode::<LogPuppetEprintlnRequest, ()>(
(message,),
0x770e4524f6b093ef,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type LogResponseFut = fidl::client::QueryResponseFut<()>;
fn r#log(&self, mut payload: &LogPuppetLogRequest) -> Self::LogResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
0x34d3dd4225e79a8b,
>(_buf?)?
.into_result::<PuppetMarker>("log")?;
Ok(_response)
}
self.client.send_query_and_decode::<LogPuppetLogRequest, ()>(
payload,
0x34d3dd4225e79a8b,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type WaitForInterestChangeResponseFut =
fidl::client::QueryResponseFut<LogPuppetWaitForInterestChangeResponse>;
fn r#wait_for_interest_change(&self) -> Self::WaitForInterestChangeResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<LogPuppetWaitForInterestChangeResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<LogPuppetWaitForInterestChangeResponse>,
0x3645d3ad544bc546,
>(_buf?)?
.into_result::<PuppetMarker>("wait_for_interest_change")?;
Ok(_response)
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
LogPuppetWaitForInterestChangeResponse,
>(
(),
0x3645d3ad544bc546,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type RecordLazyValuesResponseFut =
fidl::client::QueryResponseFut<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>>;
fn r#record_lazy_values(&self, mut key: &str) -> Self::RecordLazyValuesResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<PuppetRecordLazyValuesResponse>,
0x339951b623dc9d7d,
>(_buf?)?
.into_result::<PuppetMarker>("record_lazy_values")?;
Ok(_response.client)
}
self.client.send_query_and_decode::<
PuppetRecordLazyValuesRequest,
fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>,
>(
(key,),
0x339951b623dc9d7d,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
fn r#crash(&self, mut message: &str) -> Result<(), fidl::Error> {
self.client.send::<PuppetCrashRequest>(
(message,),
0x2aeef488fb79c9db,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
pub struct PuppetEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for PuppetEventStream {}
impl futures::stream::FusedStream for PuppetEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for PuppetEventStream {
type Item = Result<PuppetEvent, 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(PuppetEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum PuppetEvent {
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl PuppetEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<PuppetEvent, 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(PuppetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <PuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct PuppetRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for PuppetRequestStream {}
impl futures::stream::FusedStream for PuppetRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for PuppetRequestStream {
type Protocol = PuppetMarker;
type ControlHandle = PuppetControlHandle;
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 {
PuppetControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for PuppetRequestStream {
type Item = Result<PuppetRequest, 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 PuppetRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x3c39f4da45df944f => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::SetHealthOk {
responder: PuppetSetHealthOkResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2e7796dc0afaa83 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(InspectPuppetRecordStringRequest);
fidl::encoding::Decoder::decode_into::<InspectPuppetRecordStringRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::RecordString {
key: req.key,
value: req.value,
responder: PuppetRecordStringResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4fbc67c76f171b0a => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(InspectPuppetRecordIntRequest);
fidl::encoding::Decoder::decode_into::<InspectPuppetRecordIntRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::RecordInt {
key: req.key,
value: req.value,
responder: PuppetRecordIntResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3b65dd22aa9fa442 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::EmitExampleInspectData {
responder: PuppetEmitExampleInspectDataResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x6584cb93e1978da0 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(LogPuppetPrintlnRequest);
fidl::encoding::Decoder::decode_into::<LogPuppetPrintlnRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::Println {
message: req.message,
responder: PuppetPrintlnResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x770e4524f6b093ef => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(LogPuppetEprintlnRequest);
fidl::encoding::Decoder::decode_into::<LogPuppetEprintlnRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::Eprintln {
message: req.message,
responder: PuppetEprintlnResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x34d3dd4225e79a8b => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(LogPuppetLogRequest);
fidl::encoding::Decoder::decode_into::<LogPuppetLogRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::Log {
payload: req,
responder: PuppetLogResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3645d3ad544bc546 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::WaitForInterestChange {
responder: PuppetWaitForInterestChangeResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x339951b623dc9d7d => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(PuppetRecordLazyValuesRequest);
fidl::encoding::Decoder::decode_into::<PuppetRecordLazyValuesRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::RecordLazyValues {
key: req.key,
responder: PuppetRecordLazyValuesResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2aeef488fb79c9db => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(PuppetCrashRequest);
fidl::encoding::Decoder::decode_into::<PuppetCrashRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = PuppetControlHandle { inner: this.inner.clone() };
Ok(PuppetRequest::Crash { message: req.message, control_handle })
}
_ if header.tx_id == 0
&& header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
{
Ok(PuppetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: PuppetControlHandle { 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(PuppetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: PuppetControlHandle { inner: this.inner.clone() },
method_type: fidl::MethodType::TwoWay,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <PuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum PuppetRequest {
SetHealthOk { responder: PuppetSetHealthOkResponder },
RecordString { key: String, value: String, responder: PuppetRecordStringResponder },
RecordInt { key: String, value: i64, responder: PuppetRecordIntResponder },
EmitExampleInspectData { responder: PuppetEmitExampleInspectDataResponder },
Println { message: String, responder: PuppetPrintlnResponder },
Eprintln { message: String, responder: PuppetEprintlnResponder },
Log { payload: LogPuppetLogRequest, responder: PuppetLogResponder },
WaitForInterestChange { responder: PuppetWaitForInterestChangeResponder },
RecordLazyValues { key: String, responder: PuppetRecordLazyValuesResponder },
Crash { message: String, control_handle: PuppetControlHandle },
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: PuppetControlHandle,
method_type: fidl::MethodType,
},
}
impl PuppetRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_set_health_ok(self) -> Option<(PuppetSetHealthOkResponder)> {
if let PuppetRequest::SetHealthOk { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_record_string(self) -> Option<(String, String, PuppetRecordStringResponder)> {
if let PuppetRequest::RecordString { key, value, responder } = self {
Some((key, value, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_record_int(self) -> Option<(String, i64, PuppetRecordIntResponder)> {
if let PuppetRequest::RecordInt { key, value, responder } = self {
Some((key, value, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_emit_example_inspect_data(self) -> Option<(PuppetEmitExampleInspectDataResponder)> {
if let PuppetRequest::EmitExampleInspectData { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_println(self) -> Option<(String, PuppetPrintlnResponder)> {
if let PuppetRequest::Println { message, responder } = self {
Some((message, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_eprintln(self) -> Option<(String, PuppetEprintlnResponder)> {
if let PuppetRequest::Eprintln { message, responder } = self {
Some((message, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_log(self) -> Option<(LogPuppetLogRequest, PuppetLogResponder)> {
if let PuppetRequest::Log { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_wait_for_interest_change(self) -> Option<(PuppetWaitForInterestChangeResponder)> {
if let PuppetRequest::WaitForInterestChange { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_record_lazy_values(self) -> Option<(String, PuppetRecordLazyValuesResponder)> {
if let PuppetRequest::RecordLazyValues { key, responder } = self {
Some((key, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_crash(self) -> Option<(String, PuppetControlHandle)> {
if let PuppetRequest::Crash { message, control_handle } = self {
Some((message, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
PuppetRequest::SetHealthOk { .. } => "set_health_ok",
PuppetRequest::RecordString { .. } => "record_string",
PuppetRequest::RecordInt { .. } => "record_int",
PuppetRequest::EmitExampleInspectData { .. } => "emit_example_inspect_data",
PuppetRequest::Println { .. } => "println",
PuppetRequest::Eprintln { .. } => "eprintln",
PuppetRequest::Log { .. } => "log",
PuppetRequest::WaitForInterestChange { .. } => "wait_for_interest_change",
PuppetRequest::RecordLazyValues { .. } => "record_lazy_values",
PuppetRequest::Crash { .. } => "crash",
PuppetRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
"unknown one-way method"
}
PuppetRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
"unknown two-way method"
}
}
}
}
#[derive(Debug, Clone)]
pub struct PuppetControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for PuppetControlHandle {
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()
}
}
impl PuppetControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetSetHealthOkResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetSetHealthOkResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetSetHealthOkResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetSetHealthOkResponder {
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,
0x3c39f4da45df944f,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetRecordStringResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetRecordStringResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetRecordStringResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetRecordStringResponder {
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,
0x2e7796dc0afaa83,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetRecordIntResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetRecordIntResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetRecordIntResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetRecordIntResponder {
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,
0x4fbc67c76f171b0a,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetEmitExampleInspectDataResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetEmitExampleInspectDataResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetEmitExampleInspectDataResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetEmitExampleInspectDataResponder {
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,
0x3b65dd22aa9fa442,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetPrintlnResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetPrintlnResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetPrintlnResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetPrintlnResponder {
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,
0x6584cb93e1978da0,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetEprintlnResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetEprintlnResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetEprintlnResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetEprintlnResponder {
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,
0x770e4524f6b093ef,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetLogResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetLogResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetLogResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetLogResponder {
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,
0x34d3dd4225e79a8b,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetWaitForInterestChangeResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetWaitForInterestChangeResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetWaitForInterestChangeResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetWaitForInterestChangeResponder {
pub fn send(
self,
mut payload: &LogPuppetWaitForInterestChangeResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut payload: &LogPuppetWaitForInterestChangeResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut payload: &LogPuppetWaitForInterestChangeResponse,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleType<
LogPuppetWaitForInterestChangeResponse,
>>(
fidl::encoding::Flexible::new(payload),
self.tx_id,
0x3645d3ad544bc546,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct PuppetRecordLazyValuesResponder {
control_handle: std::mem::ManuallyDrop<PuppetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for PuppetRecordLazyValuesResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for PuppetRecordLazyValuesResponder {
type ControlHandle = PuppetControlHandle;
fn control_handle(&self) -> &PuppetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl PuppetRecordLazyValuesResponder {
pub fn send(
self,
mut client: fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(client);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut client: fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(client);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut client: fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>,
) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::FlexibleType<PuppetRecordLazyValuesResponse>>(
fidl::encoding::Flexible::new((client,)),
self.tx_id,
0x339951b623dc9d7d,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct RealmFactoryMarker;
impl fidl::endpoints::ProtocolMarker for RealmFactoryMarker {
type Proxy = RealmFactoryProxy;
type RequestStream = RealmFactoryRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = RealmFactorySynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.archivist.test.RealmFactory";
}
impl fidl::endpoints::DiscoverableProtocolMarker for RealmFactoryMarker {}
pub type RealmFactoryCreateRealmResult = Result<(), fidl_fuchsia_testing_harness::OperationError>;
pub trait RealmFactoryProxyInterface: Send + Sync {
type CreateRealmResponseFut: std::future::Future<Output = Result<RealmFactoryCreateRealmResult, fidl::Error>>
+ Send;
fn r#create_realm(
&self,
options: &RealmOptions,
realm_server: fidl::endpoints::ServerEnd<fidl_fuchsia_testing_harness::RealmProxy_Marker>,
) -> Self::CreateRealmResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct RealmFactorySynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for RealmFactorySynchronousProxy {
type Proxy = RealmFactoryProxy;
type Protocol = RealmFactoryMarker;
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 RealmFactorySynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <RealmFactoryMarker 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::Time) -> Result<RealmFactoryEvent, fidl::Error> {
RealmFactoryEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#create_realm(
&self,
mut options: &RealmOptions,
mut realm_server: fidl::endpoints::ServerEnd<
fidl_fuchsia_testing_harness::RealmProxy_Marker,
>,
___deadline: zx::Time,
) -> Result<RealmFactoryCreateRealmResult, fidl::Error> {
let _response = self
.client
.send_query::<RealmFactoryCreateRealmRequest, fidl::encoding::FlexibleResultType<
fidl::encoding::EmptyStruct,
fidl_fuchsia_testing_harness::OperationError,
>>(
(options, realm_server),
0x176832ac7263ab99,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<RealmFactoryMarker>("create_realm")?;
Ok(_response.map(|x| x))
}
}
#[derive(Debug, Clone)]
pub struct RealmFactoryProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for RealmFactoryProxy {
type Protocol = RealmFactoryMarker;
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 RealmFactoryProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <RealmFactoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> RealmFactoryEventStream {
RealmFactoryEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#create_realm(
&self,
mut options: &RealmOptions,
mut realm_server: fidl::endpoints::ServerEnd<
fidl_fuchsia_testing_harness::RealmProxy_Marker,
>,
) -> fidl::client::QueryResponseFut<RealmFactoryCreateRealmResult> {
RealmFactoryProxyInterface::r#create_realm(self, options, realm_server)
}
}
impl RealmFactoryProxyInterface for RealmFactoryProxy {
type CreateRealmResponseFut = fidl::client::QueryResponseFut<RealmFactoryCreateRealmResult>;
fn r#create_realm(
&self,
mut options: &RealmOptions,
mut realm_server: fidl::endpoints::ServerEnd<
fidl_fuchsia_testing_harness::RealmProxy_Marker,
>,
) -> Self::CreateRealmResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<RealmFactoryCreateRealmResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleResultType<
fidl::encoding::EmptyStruct,
fidl_fuchsia_testing_harness::OperationError,
>,
0x176832ac7263ab99,
>(_buf?)?
.into_result::<RealmFactoryMarker>("create_realm")?;
Ok(_response.map(|x| x))
}
self.client
.send_query_and_decode::<RealmFactoryCreateRealmRequest, RealmFactoryCreateRealmResult>(
(options, realm_server),
0x176832ac7263ab99,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
}
pub struct RealmFactoryEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for RealmFactoryEventStream {}
impl futures::stream::FusedStream for RealmFactoryEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for RealmFactoryEventStream {
type Item = Result<RealmFactoryEvent, 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(RealmFactoryEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum RealmFactoryEvent {
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl RealmFactoryEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<RealmFactoryEvent, 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(RealmFactoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <RealmFactoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct RealmFactoryRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for RealmFactoryRequestStream {}
impl futures::stream::FusedStream for RealmFactoryRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for RealmFactoryRequestStream {
type Protocol = RealmFactoryMarker;
type ControlHandle = RealmFactoryControlHandle;
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 {
RealmFactoryControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for RealmFactoryRequestStream {
type Item = Result<RealmFactoryRequest, 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 RealmFactoryRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x176832ac7263ab99 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(RealmFactoryCreateRealmRequest);
fidl::encoding::Decoder::decode_into::<RealmFactoryCreateRealmRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = RealmFactoryControlHandle { inner: this.inner.clone() };
Ok(RealmFactoryRequest::CreateRealm {
options: req.options,
realm_server: req.realm_server,
responder: RealmFactoryCreateRealmResponder {
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(RealmFactoryRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: RealmFactoryControlHandle { 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(RealmFactoryRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: RealmFactoryControlHandle { inner: this.inner.clone() },
method_type: fidl::MethodType::TwoWay,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<RealmFactoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum RealmFactoryRequest {
CreateRealm {
options: RealmOptions,
realm_server: fidl::endpoints::ServerEnd<fidl_fuchsia_testing_harness::RealmProxy_Marker>,
responder: RealmFactoryCreateRealmResponder,
},
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: RealmFactoryControlHandle,
method_type: fidl::MethodType,
},
}
impl RealmFactoryRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_create_realm(
self,
) -> Option<(
RealmOptions,
fidl::endpoints::ServerEnd<fidl_fuchsia_testing_harness::RealmProxy_Marker>,
RealmFactoryCreateRealmResponder,
)> {
if let RealmFactoryRequest::CreateRealm { options, realm_server, responder } = self {
Some((options, realm_server, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
RealmFactoryRequest::CreateRealm { .. } => "create_realm",
RealmFactoryRequest::_UnknownMethod {
method_type: fidl::MethodType::OneWay, ..
} => "unknown one-way method",
RealmFactoryRequest::_UnknownMethod {
method_type: fidl::MethodType::TwoWay, ..
} => "unknown two-way method",
}
}
}
#[derive(Debug, Clone)]
pub struct RealmFactoryControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for RealmFactoryControlHandle {
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()
}
}
impl RealmFactoryControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct RealmFactoryCreateRealmResponder {
control_handle: std::mem::ManuallyDrop<RealmFactoryControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for RealmFactoryCreateRealmResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for RealmFactoryCreateRealmResponder {
type ControlHandle = RealmFactoryControlHandle;
fn control_handle(&self) -> &RealmFactoryControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl RealmFactoryCreateRealmResponder {
pub fn send(
self,
mut result: Result<(), fidl_fuchsia_testing_harness::OperationError>,
) -> 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<(), fidl_fuchsia_testing_harness::OperationError>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<(), fidl_fuchsia_testing_harness::OperationError>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
fidl::encoding::EmptyStruct,
fidl_fuchsia_testing_harness::OperationError,
>>(
fidl::encoding::FlexibleResult::new(result),
self.tx_id,
0x176832ac7263ab99,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for InspectPuppetRecordIntRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
impl fidl::encoding::ValueTypeMarker for InspectPuppetRecordIntRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<InspectPuppetRecordIntRequest>
for &InspectPuppetRecordIntRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InspectPuppetRecordIntRequest>(offset);
fidl::encoding::Encode::<InspectPuppetRecordIntRequest>::encode(
(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.key,
),
<i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T1: fidl::encoding::Encode<i64>,
> fidl::encoding::Encode<InspectPuppetRecordIntRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InspectPuppetRecordIntRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for InspectPuppetRecordIntRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
key: fidl::new_empty!(fidl::encoding::UnboundedString),
value: fidl::new_empty!(i64),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.key,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(i64, &mut self.value, decoder, offset + 16, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for InspectPuppetRecordStringRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
impl fidl::encoding::ValueTypeMarker for InspectPuppetRecordStringRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<InspectPuppetRecordStringRequest>
for &InspectPuppetRecordStringRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InspectPuppetRecordStringRequest>(offset);
fidl::encoding::Encode::<InspectPuppetRecordStringRequest>::encode(
(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.key,
),
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.value,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedString>,
> fidl::encoding::Encode<InspectPuppetRecordStringRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InspectPuppetRecordStringRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for InspectPuppetRecordStringRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
key: fidl::new_empty!(fidl::encoding::UnboundedString),
value: fidl::new_empty!(fidl::encoding::UnboundedString),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.key,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.value,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for LazyInspectPuppetCommitRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for LazyInspectPuppetCommitRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<LazyInspectPuppetCommitRequest>
for &LazyInspectPuppetCommitRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LazyInspectPuppetCommitRequest>(offset);
fidl::encoding::Encode::<LazyInspectPuppetCommitRequest>::encode(
(<CommitOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<CommitOptions>>
fidl::encoding::Encode<LazyInspectPuppetCommitRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LazyInspectPuppetCommitRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for LazyInspectPuppetCommitRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { options: fidl::new_empty!(CommitOptions) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(CommitOptions, &mut self.options, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for LogPuppetEprintlnRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for LogPuppetEprintlnRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<LogPuppetEprintlnRequest> for &LogPuppetEprintlnRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LogPuppetEprintlnRequest>(offset);
fidl::encoding::Encode::<LogPuppetEprintlnRequest>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.message,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>>
fidl::encoding::Encode<LogPuppetEprintlnRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LogPuppetEprintlnRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for LogPuppetEprintlnRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { message: fidl::new_empty!(fidl::encoding::UnboundedString) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.message,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for LogPuppetPrintlnRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for LogPuppetPrintlnRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<LogPuppetPrintlnRequest> for &LogPuppetPrintlnRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LogPuppetPrintlnRequest>(offset);
fidl::encoding::Encode::<LogPuppetPrintlnRequest>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.message,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>>
fidl::encoding::Encode<LogPuppetPrintlnRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LogPuppetPrintlnRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for LogPuppetPrintlnRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { message: fidl::new_empty!(fidl::encoding::UnboundedString) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.message,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for PuppetCrashRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for PuppetCrashRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<PuppetCrashRequest> for &PuppetCrashRequest {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PuppetCrashRequest>(offset);
fidl::encoding::Encode::<PuppetCrashRequest>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.message,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>>
fidl::encoding::Encode<PuppetCrashRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PuppetCrashRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for PuppetCrashRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { message: fidl::new_empty!(fidl::encoding::UnboundedString) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.message,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for PuppetRecordLazyValuesRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for PuppetRecordLazyValuesRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<PuppetRecordLazyValuesRequest>
for &PuppetRecordLazyValuesRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PuppetRecordLazyValuesRequest>(offset);
fidl::encoding::Encode::<PuppetRecordLazyValuesRequest>::encode(
(<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
&self.key,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl::encoding::UnboundedString>>
fidl::encoding::Encode<PuppetRecordLazyValuesRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PuppetRecordLazyValuesRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for PuppetRecordLazyValuesRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { key: fidl::new_empty!(fidl::encoding::UnboundedString) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedString,
&mut self.key,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for PuppetRecordLazyValuesResponse {
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
}
}
impl fidl::encoding::ResourceTypeMarker for PuppetRecordLazyValuesResponse {
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::Encode<PuppetRecordLazyValuesResponse>
for &mut PuppetRecordLazyValuesResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PuppetRecordLazyValuesResponse>(offset);
fidl::encoding::Encode::<PuppetRecordLazyValuesResponse>::encode(
(
<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.client),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>>,
>,
> fidl::encoding::Encode<PuppetRecordLazyValuesResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PuppetRecordLazyValuesResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for PuppetRecordLazyValuesResponse {
#[inline(always)]
fn new_empty() -> Self {
Self {
client: fidl::new_empty!(
fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<LazyInspectPuppetMarker>>,
&mut self.client,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for RealmFactoryCreateRealmRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
impl fidl::encoding::ResourceTypeMarker for RealmFactoryCreateRealmRequest {
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::Encode<RealmFactoryCreateRealmRequest>
for &mut RealmFactoryCreateRealmRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RealmFactoryCreateRealmRequest>(offset);
fidl::encoding::Encode::<RealmFactoryCreateRealmRequest>::encode(
(
<RealmOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
<fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_testing_harness::RealmProxy_Marker>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.realm_server,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<RealmOptions>,
T1: fidl::encoding::Encode<
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_testing_harness::RealmProxy_Marker>,
>,
>,
> fidl::encoding::Encode<RealmFactoryCreateRealmRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RealmFactoryCreateRealmRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for RealmFactoryCreateRealmRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
options: fidl::new_empty!(RealmOptions),
realm_server: fidl::new_empty!(
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_testing_harness::RealmProxy_Marker>,
>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(RealmOptions, &mut self.options, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_testing_harness::RealmProxy_Marker>,
>,
&mut self.realm_server,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl ArchivistConfig {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.pipelines_path {
return 3;
}
if let Some(_) = self.logs_max_cached_original_bytes {
return 2;
}
if let Some(_) = self.enable_klog {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for ArchivistConfig {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for ArchivistConfig {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<ArchivistConfig> for &ArchivistConfig {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ArchivistConfig>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<bool>(
self.enable_klog.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u64>(
self.logs_max_cached_original_bytes
.as_ref()
.map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 3 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (3 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<256>>(
self.pipelines_path.as_ref().map(
<fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for ArchivistConfig {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.enable_klog.get_or_insert_with(|| fidl::new_empty!(bool));
fidl::decode!(bool, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.logs_max_cached_original_bytes
.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 3 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl::encoding::BoundedString<256> as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.pipelines_path
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<256>));
fidl::decode!(
fidl::encoding::BoundedString<256>,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl CommitOptions {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.hang {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for CommitOptions {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for CommitOptions {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<CommitOptions> for &CommitOptions {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<CommitOptions>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<bool>(
self.hang.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for CommitOptions {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.hang.get_or_insert_with(|| fidl::new_empty!(bool));
fidl::decode!(bool, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl LogPuppetLogRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.time {
return 3;
}
if let Some(_) = self.severity {
return 2;
}
if let Some(_) = self.message {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for LogPuppetLogRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for LogPuppetLogRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<LogPuppetLogRequest> for &LogPuppetLogRequest {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LogPuppetLogRequest>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString>(
self.message.as_ref().map(
<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_diagnostics::Severity>(
self.severity.as_ref().map(
<fidl_fuchsia_diagnostics::Severity as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 3 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (3 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i64>(
self.time.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for LogPuppetLogRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.message
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString));
fidl::decode!(
fidl::encoding::UnboundedString,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl_fuchsia_diagnostics::Severity as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.severity
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_diagnostics::Severity));
fidl::decode!(
fidl_fuchsia_diagnostics::Severity,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 3 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.time.get_or_insert_with(|| fidl::new_empty!(i64));
fidl::decode!(i64, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl LogPuppetWaitForInterestChangeResponse {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.severity {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for LogPuppetWaitForInterestChangeResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for LogPuppetWaitForInterestChangeResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<LogPuppetWaitForInterestChangeResponse>
for &LogPuppetWaitForInterestChangeResponse
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LogPuppetWaitForInterestChangeResponse>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_diagnostics::Severity>(
self.severity.as_ref().map(
<fidl_fuchsia_diagnostics::Severity as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for LogPuppetWaitForInterestChangeResponse {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl_fuchsia_diagnostics::Severity as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.severity
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_diagnostics::Severity));
fidl::decode!(
fidl_fuchsia_diagnostics::Severity,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl PuppetDecl {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.name {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for PuppetDecl {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for PuppetDecl {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<PuppetDecl> for &PuppetDecl {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PuppetDecl>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<1024>>(
self.name.as_ref().map(<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow),
encoder, offset + cur_offset, depth
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for PuppetDecl {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size = <fidl::encoding::BoundedString<1024> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.name
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<1024>));
fidl::decode!(
fidl::encoding::BoundedString<1024>,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl RealmOptions {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.archivist_config {
return 3;
}
if let Some(_) = self.puppets {
return 2;
}
if let Some(_) = self.realm_name {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for RealmOptions {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for RealmOptions {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<RealmOptions> for &RealmOptions {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RealmOptions>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<255>>(
self.realm_name.as_ref().map(
<fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<PuppetDecl>>(
self.puppets.as_ref().map(<fidl::encoding::UnboundedVector<PuppetDecl> as fidl::encoding::ValueTypeMarker>::borrow),
encoder, offset + cur_offset, depth
)?;
_prev_end_offset = cur_offset + envelope_size;
if 3 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (3 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<ArchivistConfig>(
self.archivist_config
.as_ref()
.map(<ArchivistConfig as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for RealmOptions {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.realm_name
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<255>));
fidl::decode!(
fidl::encoding::BoundedString<255>,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size = <fidl::encoding::UnboundedVector<PuppetDecl> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.puppets.get_or_insert_with(|| {
fidl::new_empty!(fidl::encoding::UnboundedVector<PuppetDecl>)
});
fidl::decode!(
fidl::encoding::UnboundedVector<PuppetDecl>,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 3 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<ArchivistConfig as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.archivist_config.get_or_insert_with(|| fidl::new_empty!(ArchivistConfig));
fidl::decode!(ArchivistConfig, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
}