1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fdomain_client::fidl::{ControlHandle as _, FDomainFlexibleIntoResult as _, Responder as _};
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9pub use fidl_fuchsia_hardware_audio_signalprocessing_common::*;
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14pub struct ConnectorSignalProcessingConnectRequest {
15 pub protocol: fdomain_client::fidl::ServerEnd<SignalProcessingMarker>,
16}
17
18impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
19 for ConnectorSignalProcessingConnectRequest
20{
21}
22
23#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24pub struct ConnectorMarker;
25
26impl fdomain_client::fidl::ProtocolMarker for ConnectorMarker {
27 type Proxy = ConnectorProxy;
28 type RequestStream = ConnectorRequestStream;
29
30 const DEBUG_NAME: &'static str = "(anonymous) Connector";
31}
32
33pub trait ConnectorProxyInterface: Send + Sync {
34 fn r#signal_processing_connect(
35 &self,
36 protocol: fdomain_client::fidl::ServerEnd<SignalProcessingMarker>,
37 ) -> Result<(), fidl::Error>;
38}
39
40#[derive(Debug, Clone)]
41pub struct ConnectorProxy {
42 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
43}
44
45impl fdomain_client::fidl::Proxy for ConnectorProxy {
46 type Protocol = ConnectorMarker;
47
48 fn from_channel(inner: fdomain_client::Channel) -> Self {
49 Self::new(inner)
50 }
51
52 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
53 self.client.into_channel().map_err(|client| Self { client })
54 }
55
56 fn as_channel(&self) -> &fdomain_client::Channel {
57 self.client.as_channel()
58 }
59}
60
61impl ConnectorProxy {
62 pub fn new(channel: fdomain_client::Channel) -> Self {
64 let protocol_name = <ConnectorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
65 Self { client: fidl::client::Client::new(channel, protocol_name) }
66 }
67
68 pub fn take_event_stream(&self) -> ConnectorEventStream {
74 ConnectorEventStream { event_receiver: self.client.take_event_receiver() }
75 }
76
77 pub fn r#signal_processing_connect(
89 &self,
90 mut protocol: fdomain_client::fidl::ServerEnd<SignalProcessingMarker>,
91 ) -> Result<(), fidl::Error> {
92 ConnectorProxyInterface::r#signal_processing_connect(self, protocol)
93 }
94}
95
96impl ConnectorProxyInterface for ConnectorProxy {
97 fn r#signal_processing_connect(
98 &self,
99 mut protocol: fdomain_client::fidl::ServerEnd<SignalProcessingMarker>,
100 ) -> Result<(), fidl::Error> {
101 self.client.send::<ConnectorSignalProcessingConnectRequest>(
102 (protocol,),
103 0xa81907ce6066295,
104 fidl::encoding::DynamicFlags::empty(),
105 )
106 }
107}
108
109pub struct ConnectorEventStream {
110 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
111}
112
113impl std::marker::Unpin for ConnectorEventStream {}
114
115impl futures::stream::FusedStream for ConnectorEventStream {
116 fn is_terminated(&self) -> bool {
117 self.event_receiver.is_terminated()
118 }
119}
120
121impl futures::Stream for ConnectorEventStream {
122 type Item = Result<ConnectorEvent, fidl::Error>;
123
124 fn poll_next(
125 mut self: std::pin::Pin<&mut Self>,
126 cx: &mut std::task::Context<'_>,
127 ) -> std::task::Poll<Option<Self::Item>> {
128 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
129 &mut self.event_receiver,
130 cx
131 )?) {
132 Some(buf) => std::task::Poll::Ready(Some(ConnectorEvent::decode(buf))),
133 None => std::task::Poll::Ready(None),
134 }
135 }
136}
137
138#[derive(Debug)]
139pub enum ConnectorEvent {}
140
141impl ConnectorEvent {
142 fn decode(
144 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
145 ) -> Result<ConnectorEvent, fidl::Error> {
146 let (bytes, _handles) = buf.split_mut();
147 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
148 debug_assert_eq!(tx_header.tx_id, 0);
149 match tx_header.ordinal {
150 _ => Err(fidl::Error::UnknownOrdinal {
151 ordinal: tx_header.ordinal,
152 protocol_name:
153 <ConnectorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
154 }),
155 }
156 }
157}
158
159pub struct ConnectorRequestStream {
161 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
162 is_terminated: bool,
163}
164
165impl std::marker::Unpin for ConnectorRequestStream {}
166
167impl futures::stream::FusedStream for ConnectorRequestStream {
168 fn is_terminated(&self) -> bool {
169 self.is_terminated
170 }
171}
172
173impl fdomain_client::fidl::RequestStream for ConnectorRequestStream {
174 type Protocol = ConnectorMarker;
175 type ControlHandle = ConnectorControlHandle;
176
177 fn from_channel(channel: fdomain_client::Channel) -> Self {
178 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
179 }
180
181 fn control_handle(&self) -> Self::ControlHandle {
182 ConnectorControlHandle { inner: self.inner.clone() }
183 }
184
185 fn into_inner(
186 self,
187 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
188 {
189 (self.inner, self.is_terminated)
190 }
191
192 fn from_inner(
193 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
194 is_terminated: bool,
195 ) -> Self {
196 Self { inner, is_terminated }
197 }
198}
199
200impl futures::Stream for ConnectorRequestStream {
201 type Item = Result<ConnectorRequest, fidl::Error>;
202
203 fn poll_next(
204 mut self: std::pin::Pin<&mut Self>,
205 cx: &mut std::task::Context<'_>,
206 ) -> std::task::Poll<Option<Self::Item>> {
207 let this = &mut *self;
208 if this.inner.check_shutdown(cx) {
209 this.is_terminated = true;
210 return std::task::Poll::Ready(None);
211 }
212 if this.is_terminated {
213 panic!("polled ConnectorRequestStream after completion");
214 }
215 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
216 |bytes, handles| {
217 match this.inner.channel().read_etc(cx, bytes, handles) {
218 std::task::Poll::Ready(Ok(())) => {}
219 std::task::Poll::Pending => return std::task::Poll::Pending,
220 std::task::Poll::Ready(Err(None)) => {
221 this.is_terminated = true;
222 return std::task::Poll::Ready(None);
223 }
224 std::task::Poll::Ready(Err(Some(e))) => {
225 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
226 e.into(),
227 ))));
228 }
229 }
230
231 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
233
234 std::task::Poll::Ready(Some(match header.ordinal {
235 0xa81907ce6066295 => {
236 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
237 let mut req = fidl::new_empty!(
238 ConnectorSignalProcessingConnectRequest,
239 fdomain_client::fidl::FDomainResourceDialect
240 );
241 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ConnectorSignalProcessingConnectRequest>(&header, _body_bytes, handles, &mut req)?;
242 let control_handle = ConnectorControlHandle { inner: this.inner.clone() };
243 Ok(ConnectorRequest::SignalProcessingConnect {
244 protocol: req.protocol,
245
246 control_handle,
247 })
248 }
249 _ => Err(fidl::Error::UnknownOrdinal {
250 ordinal: header.ordinal,
251 protocol_name:
252 <ConnectorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
253 }),
254 }))
255 },
256 )
257 }
258}
259
260#[derive(Debug)]
263pub enum ConnectorRequest {
264 SignalProcessingConnect {
276 protocol: fdomain_client::fidl::ServerEnd<SignalProcessingMarker>,
277 control_handle: ConnectorControlHandle,
278 },
279}
280
281impl ConnectorRequest {
282 #[allow(irrefutable_let_patterns)]
283 pub fn into_signal_processing_connect(
284 self,
285 ) -> Option<(fdomain_client::fidl::ServerEnd<SignalProcessingMarker>, ConnectorControlHandle)>
286 {
287 if let ConnectorRequest::SignalProcessingConnect { protocol, control_handle } = self {
288 Some((protocol, control_handle))
289 } else {
290 None
291 }
292 }
293
294 pub fn method_name(&self) -> &'static str {
296 match *self {
297 ConnectorRequest::SignalProcessingConnect { .. } => "signal_processing_connect",
298 }
299 }
300}
301
302#[derive(Debug, Clone)]
303pub struct ConnectorControlHandle {
304 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
305}
306
307impl ConnectorControlHandle {
308 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
309 self.inner.shutdown_with_epitaph(status.into())
310 }
311}
312
313impl fdomain_client::fidl::ControlHandle for ConnectorControlHandle {
314 fn shutdown(&self) {
315 self.inner.shutdown()
316 }
317
318 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
319 self.inner.shutdown_with_epitaph(status)
320 }
321
322 fn is_closed(&self) -> bool {
323 self.inner.channel().is_closed()
324 }
325 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
326 self.inner.channel().on_closed()
327 }
328}
329
330impl ConnectorControlHandle {}
331
332#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
333pub struct ReaderMarker;
334
335impl fdomain_client::fidl::ProtocolMarker for ReaderMarker {
336 type Proxy = ReaderProxy;
337 type RequestStream = ReaderRequestStream;
338
339 const DEBUG_NAME: &'static str = "(anonymous) Reader";
340}
341pub type ReaderGetElementsResult = Result<Vec<Element>, i32>;
342pub type ReaderGetTopologiesResult = Result<Vec<Topology>, i32>;
343
344pub trait ReaderProxyInterface: Send + Sync {
345 type GetElementsResponseFut: std::future::Future<Output = Result<ReaderGetElementsResult, fidl::Error>>
346 + Send;
347 fn r#get_elements(&self) -> Self::GetElementsResponseFut;
348 type WatchElementStateResponseFut: std::future::Future<Output = Result<ElementState, fidl::Error>>
349 + Send;
350 fn r#watch_element_state(
351 &self,
352 processing_element_id: u64,
353 ) -> Self::WatchElementStateResponseFut;
354 type GetTopologiesResponseFut: std::future::Future<Output = Result<ReaderGetTopologiesResult, fidl::Error>>
355 + Send;
356 fn r#get_topologies(&self) -> Self::GetTopologiesResponseFut;
357 type WatchTopologyResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
358 fn r#watch_topology(&self) -> Self::WatchTopologyResponseFut;
359}
360
361#[derive(Debug, Clone)]
362pub struct ReaderProxy {
363 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
364}
365
366impl fdomain_client::fidl::Proxy for ReaderProxy {
367 type Protocol = ReaderMarker;
368
369 fn from_channel(inner: fdomain_client::Channel) -> Self {
370 Self::new(inner)
371 }
372
373 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
374 self.client.into_channel().map_err(|client| Self { client })
375 }
376
377 fn as_channel(&self) -> &fdomain_client::Channel {
378 self.client.as_channel()
379 }
380}
381
382impl ReaderProxy {
383 pub fn new(channel: fdomain_client::Channel) -> Self {
385 let protocol_name = <ReaderMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
386 Self { client: fidl::client::Client::new(channel, protocol_name) }
387 }
388
389 pub fn take_event_stream(&self) -> ReaderEventStream {
395 ReaderEventStream { event_receiver: self.client.take_event_receiver() }
396 }
397
398 pub fn r#get_elements(
401 &self,
402 ) -> fidl::client::QueryResponseFut<
403 ReaderGetElementsResult,
404 fdomain_client::fidl::FDomainResourceDialect,
405 > {
406 ReaderProxyInterface::r#get_elements(self)
407 }
408
409 pub fn r#watch_element_state(
422 &self,
423 mut processing_element_id: u64,
424 ) -> fidl::client::QueryResponseFut<ElementState, fdomain_client::fidl::FDomainResourceDialect>
425 {
426 ReaderProxyInterface::r#watch_element_state(self, processing_element_id)
427 }
428
429 pub fn r#get_topologies(
438 &self,
439 ) -> fidl::client::QueryResponseFut<
440 ReaderGetTopologiesResult,
441 fdomain_client::fidl::FDomainResourceDialect,
442 > {
443 ReaderProxyInterface::r#get_topologies(self)
444 }
445
446 pub fn r#watch_topology(
454 &self,
455 ) -> fidl::client::QueryResponseFut<u64, fdomain_client::fidl::FDomainResourceDialect> {
456 ReaderProxyInterface::r#watch_topology(self)
457 }
458}
459
460impl ReaderProxyInterface for ReaderProxy {
461 type GetElementsResponseFut = fidl::client::QueryResponseFut<
462 ReaderGetElementsResult,
463 fdomain_client::fidl::FDomainResourceDialect,
464 >;
465 fn r#get_elements(&self) -> Self::GetElementsResponseFut {
466 fn _decode(
467 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
468 ) -> Result<ReaderGetElementsResult, fidl::Error> {
469 let _response = fidl::client::decode_transaction_body::<
470 fidl::encoding::ResultType<ReaderGetElementsResponse, i32>,
471 fdomain_client::fidl::FDomainResourceDialect,
472 0x1b14ff4adf5dc6f8,
473 >(_buf?)?;
474 Ok(_response.map(|x| x.processing_elements))
475 }
476 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ReaderGetElementsResult>(
477 (),
478 0x1b14ff4adf5dc6f8,
479 fidl::encoding::DynamicFlags::empty(),
480 _decode,
481 )
482 }
483
484 type WatchElementStateResponseFut =
485 fidl::client::QueryResponseFut<ElementState, fdomain_client::fidl::FDomainResourceDialect>;
486 fn r#watch_element_state(
487 &self,
488 mut processing_element_id: u64,
489 ) -> Self::WatchElementStateResponseFut {
490 fn _decode(
491 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
492 ) -> Result<ElementState, fidl::Error> {
493 let _response = fidl::client::decode_transaction_body::<
494 ReaderWatchElementStateResponse,
495 fdomain_client::fidl::FDomainResourceDialect,
496 0x524da8772a69056f,
497 >(_buf?)?;
498 Ok(_response.state)
499 }
500 self.client.send_query_and_decode::<ReaderWatchElementStateRequest, ElementState>(
501 (processing_element_id,),
502 0x524da8772a69056f,
503 fidl::encoding::DynamicFlags::empty(),
504 _decode,
505 )
506 }
507
508 type GetTopologiesResponseFut = fidl::client::QueryResponseFut<
509 ReaderGetTopologiesResult,
510 fdomain_client::fidl::FDomainResourceDialect,
511 >;
512 fn r#get_topologies(&self) -> Self::GetTopologiesResponseFut {
513 fn _decode(
514 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
515 ) -> Result<ReaderGetTopologiesResult, fidl::Error> {
516 let _response = fidl::client::decode_transaction_body::<
517 fidl::encoding::ResultType<ReaderGetTopologiesResponse, i32>,
518 fdomain_client::fidl::FDomainResourceDialect,
519 0x73ffb73af24d30b6,
520 >(_buf?)?;
521 Ok(_response.map(|x| x.topologies))
522 }
523 self.client
524 .send_query_and_decode::<fidl::encoding::EmptyPayload, ReaderGetTopologiesResult>(
525 (),
526 0x73ffb73af24d30b6,
527 fidl::encoding::DynamicFlags::empty(),
528 _decode,
529 )
530 }
531
532 type WatchTopologyResponseFut =
533 fidl::client::QueryResponseFut<u64, fdomain_client::fidl::FDomainResourceDialect>;
534 fn r#watch_topology(&self) -> Self::WatchTopologyResponseFut {
535 fn _decode(
536 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
537 ) -> Result<u64, fidl::Error> {
538 let _response = fidl::client::decode_transaction_body::<
539 fidl::encoding::FlexibleType<ReaderWatchTopologyResponse>,
540 fdomain_client::fidl::FDomainResourceDialect,
541 0x66d172acdb36a729,
542 >(_buf?)?
543 .into_result_fdomain::<ReaderMarker>("watch_topology")?;
544 Ok(_response.topology_id)
545 }
546 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
547 (),
548 0x66d172acdb36a729,
549 fidl::encoding::DynamicFlags::FLEXIBLE,
550 _decode,
551 )
552 }
553}
554
555pub struct ReaderEventStream {
556 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
557}
558
559impl std::marker::Unpin for ReaderEventStream {}
560
561impl futures::stream::FusedStream for ReaderEventStream {
562 fn is_terminated(&self) -> bool {
563 self.event_receiver.is_terminated()
564 }
565}
566
567impl futures::Stream for ReaderEventStream {
568 type Item = Result<ReaderEvent, fidl::Error>;
569
570 fn poll_next(
571 mut self: std::pin::Pin<&mut Self>,
572 cx: &mut std::task::Context<'_>,
573 ) -> std::task::Poll<Option<Self::Item>> {
574 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
575 &mut self.event_receiver,
576 cx
577 )?) {
578 Some(buf) => std::task::Poll::Ready(Some(ReaderEvent::decode(buf))),
579 None => std::task::Poll::Ready(None),
580 }
581 }
582}
583
584#[derive(Debug)]
585pub enum ReaderEvent {
586 #[non_exhaustive]
587 _UnknownEvent {
588 ordinal: u64,
590 },
591}
592
593impl ReaderEvent {
594 fn decode(
596 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
597 ) -> Result<ReaderEvent, fidl::Error> {
598 let (bytes, _handles) = buf.split_mut();
599 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
600 debug_assert_eq!(tx_header.tx_id, 0);
601 match tx_header.ordinal {
602 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
603 Ok(ReaderEvent::_UnknownEvent { ordinal: tx_header.ordinal })
604 }
605 _ => Err(fidl::Error::UnknownOrdinal {
606 ordinal: tx_header.ordinal,
607 protocol_name: <ReaderMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
608 }),
609 }
610 }
611}
612
613pub struct ReaderRequestStream {
615 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
616 is_terminated: bool,
617}
618
619impl std::marker::Unpin for ReaderRequestStream {}
620
621impl futures::stream::FusedStream for ReaderRequestStream {
622 fn is_terminated(&self) -> bool {
623 self.is_terminated
624 }
625}
626
627impl fdomain_client::fidl::RequestStream for ReaderRequestStream {
628 type Protocol = ReaderMarker;
629 type ControlHandle = ReaderControlHandle;
630
631 fn from_channel(channel: fdomain_client::Channel) -> Self {
632 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
633 }
634
635 fn control_handle(&self) -> Self::ControlHandle {
636 ReaderControlHandle { inner: self.inner.clone() }
637 }
638
639 fn into_inner(
640 self,
641 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
642 {
643 (self.inner, self.is_terminated)
644 }
645
646 fn from_inner(
647 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
648 is_terminated: bool,
649 ) -> Self {
650 Self { inner, is_terminated }
651 }
652}
653
654impl futures::Stream for ReaderRequestStream {
655 type Item = Result<ReaderRequest, fidl::Error>;
656
657 fn poll_next(
658 mut self: std::pin::Pin<&mut Self>,
659 cx: &mut std::task::Context<'_>,
660 ) -> std::task::Poll<Option<Self::Item>> {
661 let this = &mut *self;
662 if this.inner.check_shutdown(cx) {
663 this.is_terminated = true;
664 return std::task::Poll::Ready(None);
665 }
666 if this.is_terminated {
667 panic!("polled ReaderRequestStream after completion");
668 }
669 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
670 |bytes, handles| {
671 match this.inner.channel().read_etc(cx, bytes, handles) {
672 std::task::Poll::Ready(Ok(())) => {}
673 std::task::Poll::Pending => return std::task::Poll::Pending,
674 std::task::Poll::Ready(Err(None)) => {
675 this.is_terminated = true;
676 return std::task::Poll::Ready(None);
677 }
678 std::task::Poll::Ready(Err(Some(e))) => {
679 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
680 e.into(),
681 ))));
682 }
683 }
684
685 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
687
688 std::task::Poll::Ready(Some(match header.ordinal {
689 0x1b14ff4adf5dc6f8 => {
690 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
691 let mut req = fidl::new_empty!(
692 fidl::encoding::EmptyPayload,
693 fdomain_client::fidl::FDomainResourceDialect
694 );
695 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
696 let control_handle = ReaderControlHandle { inner: this.inner.clone() };
697 Ok(ReaderRequest::GetElements {
698 responder: ReaderGetElementsResponder {
699 control_handle: std::mem::ManuallyDrop::new(control_handle),
700 tx_id: header.tx_id,
701 },
702 })
703 }
704 0x524da8772a69056f => {
705 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
706 let mut req = fidl::new_empty!(
707 ReaderWatchElementStateRequest,
708 fdomain_client::fidl::FDomainResourceDialect
709 );
710 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReaderWatchElementStateRequest>(&header, _body_bytes, handles, &mut req)?;
711 let control_handle = ReaderControlHandle { inner: this.inner.clone() };
712 Ok(ReaderRequest::WatchElementState {
713 processing_element_id: req.processing_element_id,
714
715 responder: ReaderWatchElementStateResponder {
716 control_handle: std::mem::ManuallyDrop::new(control_handle),
717 tx_id: header.tx_id,
718 },
719 })
720 }
721 0x73ffb73af24d30b6 => {
722 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
723 let mut req = fidl::new_empty!(
724 fidl::encoding::EmptyPayload,
725 fdomain_client::fidl::FDomainResourceDialect
726 );
727 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
728 let control_handle = ReaderControlHandle { inner: this.inner.clone() };
729 Ok(ReaderRequest::GetTopologies {
730 responder: ReaderGetTopologiesResponder {
731 control_handle: std::mem::ManuallyDrop::new(control_handle),
732 tx_id: header.tx_id,
733 },
734 })
735 }
736 0x66d172acdb36a729 => {
737 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
738 let mut req = fidl::new_empty!(
739 fidl::encoding::EmptyPayload,
740 fdomain_client::fidl::FDomainResourceDialect
741 );
742 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
743 let control_handle = ReaderControlHandle { inner: this.inner.clone() };
744 Ok(ReaderRequest::WatchTopology {
745 responder: ReaderWatchTopologyResponder {
746 control_handle: std::mem::ManuallyDrop::new(control_handle),
747 tx_id: header.tx_id,
748 },
749 })
750 }
751 _ if header.tx_id == 0
752 && header
753 .dynamic_flags()
754 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
755 {
756 Ok(ReaderRequest::_UnknownMethod {
757 ordinal: header.ordinal,
758 control_handle: ReaderControlHandle { inner: this.inner.clone() },
759 method_type: fidl::MethodType::OneWay,
760 })
761 }
762 _ if header
763 .dynamic_flags()
764 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
765 {
766 this.inner.send_framework_err(
767 fidl::encoding::FrameworkErr::UnknownMethod,
768 header.tx_id,
769 header.ordinal,
770 header.dynamic_flags(),
771 (bytes, handles),
772 )?;
773 Ok(ReaderRequest::_UnknownMethod {
774 ordinal: header.ordinal,
775 control_handle: ReaderControlHandle { inner: this.inner.clone() },
776 method_type: fidl::MethodType::TwoWay,
777 })
778 }
779 _ => Err(fidl::Error::UnknownOrdinal {
780 ordinal: header.ordinal,
781 protocol_name:
782 <ReaderMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
783 }),
784 }))
785 },
786 )
787 }
788}
789
790#[derive(Debug)]
796pub enum ReaderRequest {
797 GetElements { responder: ReaderGetElementsResponder },
800 WatchElementState { processing_element_id: u64, responder: ReaderWatchElementStateResponder },
813 GetTopologies { responder: ReaderGetTopologiesResponder },
822 WatchTopology { responder: ReaderWatchTopologyResponder },
830 #[non_exhaustive]
832 _UnknownMethod {
833 ordinal: u64,
835 control_handle: ReaderControlHandle,
836 method_type: fidl::MethodType,
837 },
838}
839
840impl ReaderRequest {
841 #[allow(irrefutable_let_patterns)]
842 pub fn into_get_elements(self) -> Option<(ReaderGetElementsResponder)> {
843 if let ReaderRequest::GetElements { responder } = self { Some((responder)) } else { None }
844 }
845
846 #[allow(irrefutable_let_patterns)]
847 pub fn into_watch_element_state(self) -> Option<(u64, ReaderWatchElementStateResponder)> {
848 if let ReaderRequest::WatchElementState { processing_element_id, responder } = self {
849 Some((processing_element_id, responder))
850 } else {
851 None
852 }
853 }
854
855 #[allow(irrefutable_let_patterns)]
856 pub fn into_get_topologies(self) -> Option<(ReaderGetTopologiesResponder)> {
857 if let ReaderRequest::GetTopologies { responder } = self { Some((responder)) } else { None }
858 }
859
860 #[allow(irrefutable_let_patterns)]
861 pub fn into_watch_topology(self) -> Option<(ReaderWatchTopologyResponder)> {
862 if let ReaderRequest::WatchTopology { responder } = self { Some((responder)) } else { None }
863 }
864
865 pub fn method_name(&self) -> &'static str {
867 match *self {
868 ReaderRequest::GetElements { .. } => "get_elements",
869 ReaderRequest::WatchElementState { .. } => "watch_element_state",
870 ReaderRequest::GetTopologies { .. } => "get_topologies",
871 ReaderRequest::WatchTopology { .. } => "watch_topology",
872 ReaderRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
873 "unknown one-way method"
874 }
875 ReaderRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
876 "unknown two-way method"
877 }
878 }
879 }
880}
881
882#[derive(Debug, Clone)]
883pub struct ReaderControlHandle {
884 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
885}
886
887impl ReaderControlHandle {
888 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
889 self.inner.shutdown_with_epitaph(status.into())
890 }
891}
892
893impl fdomain_client::fidl::ControlHandle for ReaderControlHandle {
894 fn shutdown(&self) {
895 self.inner.shutdown()
896 }
897
898 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
899 self.inner.shutdown_with_epitaph(status)
900 }
901
902 fn is_closed(&self) -> bool {
903 self.inner.channel().is_closed()
904 }
905 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
906 self.inner.channel().on_closed()
907 }
908}
909
910impl ReaderControlHandle {}
911
912#[must_use = "FIDL methods require a response to be sent"]
913#[derive(Debug)]
914pub struct ReaderGetElementsResponder {
915 control_handle: std::mem::ManuallyDrop<ReaderControlHandle>,
916 tx_id: u32,
917}
918
919impl std::ops::Drop for ReaderGetElementsResponder {
923 fn drop(&mut self) {
924 self.control_handle.shutdown();
925 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
927 }
928}
929
930impl fdomain_client::fidl::Responder for ReaderGetElementsResponder {
931 type ControlHandle = ReaderControlHandle;
932
933 fn control_handle(&self) -> &ReaderControlHandle {
934 &self.control_handle
935 }
936
937 fn drop_without_shutdown(mut self) {
938 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
940 std::mem::forget(self);
942 }
943}
944
945impl ReaderGetElementsResponder {
946 pub fn send(self, mut result: Result<&[Element], i32>) -> Result<(), fidl::Error> {
950 let _result = self.send_raw(result);
951 if _result.is_err() {
952 self.control_handle.shutdown();
953 }
954 self.drop_without_shutdown();
955 _result
956 }
957
958 pub fn send_no_shutdown_on_err(
960 self,
961 mut result: Result<&[Element], i32>,
962 ) -> Result<(), fidl::Error> {
963 let _result = self.send_raw(result);
964 self.drop_without_shutdown();
965 _result
966 }
967
968 fn send_raw(&self, mut result: Result<&[Element], i32>) -> Result<(), fidl::Error> {
969 self.control_handle
970 .inner
971 .send::<fidl::encoding::ResultType<ReaderGetElementsResponse, i32>>(
972 result.map(|processing_elements| (processing_elements,)),
973 self.tx_id,
974 0x1b14ff4adf5dc6f8,
975 fidl::encoding::DynamicFlags::empty(),
976 )
977 }
978}
979
980#[must_use = "FIDL methods require a response to be sent"]
981#[derive(Debug)]
982pub struct ReaderWatchElementStateResponder {
983 control_handle: std::mem::ManuallyDrop<ReaderControlHandle>,
984 tx_id: u32,
985}
986
987impl std::ops::Drop for ReaderWatchElementStateResponder {
991 fn drop(&mut self) {
992 self.control_handle.shutdown();
993 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
995 }
996}
997
998impl fdomain_client::fidl::Responder for ReaderWatchElementStateResponder {
999 type ControlHandle = ReaderControlHandle;
1000
1001 fn control_handle(&self) -> &ReaderControlHandle {
1002 &self.control_handle
1003 }
1004
1005 fn drop_without_shutdown(mut self) {
1006 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1008 std::mem::forget(self);
1010 }
1011}
1012
1013impl ReaderWatchElementStateResponder {
1014 pub fn send(self, mut state: &ElementState) -> Result<(), fidl::Error> {
1018 let _result = self.send_raw(state);
1019 if _result.is_err() {
1020 self.control_handle.shutdown();
1021 }
1022 self.drop_without_shutdown();
1023 _result
1024 }
1025
1026 pub fn send_no_shutdown_on_err(self, mut state: &ElementState) -> Result<(), fidl::Error> {
1028 let _result = self.send_raw(state);
1029 self.drop_without_shutdown();
1030 _result
1031 }
1032
1033 fn send_raw(&self, mut state: &ElementState) -> Result<(), fidl::Error> {
1034 self.control_handle.inner.send::<ReaderWatchElementStateResponse>(
1035 (state,),
1036 self.tx_id,
1037 0x524da8772a69056f,
1038 fidl::encoding::DynamicFlags::empty(),
1039 )
1040 }
1041}
1042
1043#[must_use = "FIDL methods require a response to be sent"]
1044#[derive(Debug)]
1045pub struct ReaderGetTopologiesResponder {
1046 control_handle: std::mem::ManuallyDrop<ReaderControlHandle>,
1047 tx_id: u32,
1048}
1049
1050impl std::ops::Drop for ReaderGetTopologiesResponder {
1054 fn drop(&mut self) {
1055 self.control_handle.shutdown();
1056 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1058 }
1059}
1060
1061impl fdomain_client::fidl::Responder for ReaderGetTopologiesResponder {
1062 type ControlHandle = ReaderControlHandle;
1063
1064 fn control_handle(&self) -> &ReaderControlHandle {
1065 &self.control_handle
1066 }
1067
1068 fn drop_without_shutdown(mut self) {
1069 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1071 std::mem::forget(self);
1073 }
1074}
1075
1076impl ReaderGetTopologiesResponder {
1077 pub fn send(self, mut result: Result<&[Topology], i32>) -> Result<(), fidl::Error> {
1081 let _result = self.send_raw(result);
1082 if _result.is_err() {
1083 self.control_handle.shutdown();
1084 }
1085 self.drop_without_shutdown();
1086 _result
1087 }
1088
1089 pub fn send_no_shutdown_on_err(
1091 self,
1092 mut result: Result<&[Topology], i32>,
1093 ) -> Result<(), fidl::Error> {
1094 let _result = self.send_raw(result);
1095 self.drop_without_shutdown();
1096 _result
1097 }
1098
1099 fn send_raw(&self, mut result: Result<&[Topology], i32>) -> Result<(), fidl::Error> {
1100 self.control_handle
1101 .inner
1102 .send::<fidl::encoding::ResultType<ReaderGetTopologiesResponse, i32>>(
1103 result.map(|topologies| (topologies,)),
1104 self.tx_id,
1105 0x73ffb73af24d30b6,
1106 fidl::encoding::DynamicFlags::empty(),
1107 )
1108 }
1109}
1110
1111#[must_use = "FIDL methods require a response to be sent"]
1112#[derive(Debug)]
1113pub struct ReaderWatchTopologyResponder {
1114 control_handle: std::mem::ManuallyDrop<ReaderControlHandle>,
1115 tx_id: u32,
1116}
1117
1118impl std::ops::Drop for ReaderWatchTopologyResponder {
1122 fn drop(&mut self) {
1123 self.control_handle.shutdown();
1124 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1126 }
1127}
1128
1129impl fdomain_client::fidl::Responder for ReaderWatchTopologyResponder {
1130 type ControlHandle = ReaderControlHandle;
1131
1132 fn control_handle(&self) -> &ReaderControlHandle {
1133 &self.control_handle
1134 }
1135
1136 fn drop_without_shutdown(mut self) {
1137 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1139 std::mem::forget(self);
1141 }
1142}
1143
1144impl ReaderWatchTopologyResponder {
1145 pub fn send(self, mut topology_id: u64) -> Result<(), fidl::Error> {
1149 let _result = self.send_raw(topology_id);
1150 if _result.is_err() {
1151 self.control_handle.shutdown();
1152 }
1153 self.drop_without_shutdown();
1154 _result
1155 }
1156
1157 pub fn send_no_shutdown_on_err(self, mut topology_id: u64) -> Result<(), fidl::Error> {
1159 let _result = self.send_raw(topology_id);
1160 self.drop_without_shutdown();
1161 _result
1162 }
1163
1164 fn send_raw(&self, mut topology_id: u64) -> Result<(), fidl::Error> {
1165 self.control_handle.inner.send::<fidl::encoding::FlexibleType<ReaderWatchTopologyResponse>>(
1166 fidl::encoding::Flexible::new((topology_id,)),
1167 self.tx_id,
1168 0x66d172acdb36a729,
1169 fidl::encoding::DynamicFlags::FLEXIBLE,
1170 )
1171 }
1172}
1173
1174#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1175pub struct SignalProcessingMarker;
1176
1177impl fdomain_client::fidl::ProtocolMarker for SignalProcessingMarker {
1178 type Proxy = SignalProcessingProxy;
1179 type RequestStream = SignalProcessingRequestStream;
1180
1181 const DEBUG_NAME: &'static str = "(anonymous) SignalProcessing";
1182}
1183pub type SignalProcessingSetTopologyResult = Result<(), i32>;
1184pub type SignalProcessingSetElementStateResult = Result<(), i32>;
1185
1186pub trait SignalProcessingProxyInterface: Send + Sync {
1187 type GetElementsResponseFut: std::future::Future<Output = Result<ReaderGetElementsResult, fidl::Error>>
1188 + Send;
1189 fn r#get_elements(&self) -> Self::GetElementsResponseFut;
1190 type WatchElementStateResponseFut: std::future::Future<Output = Result<ElementState, fidl::Error>>
1191 + Send;
1192 fn r#watch_element_state(
1193 &self,
1194 processing_element_id: u64,
1195 ) -> Self::WatchElementStateResponseFut;
1196 type GetTopologiesResponseFut: std::future::Future<Output = Result<ReaderGetTopologiesResult, fidl::Error>>
1197 + Send;
1198 fn r#get_topologies(&self) -> Self::GetTopologiesResponseFut;
1199 type WatchTopologyResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
1200 fn r#watch_topology(&self) -> Self::WatchTopologyResponseFut;
1201 type SetTopologyResponseFut: std::future::Future<Output = Result<SignalProcessingSetTopologyResult, fidl::Error>>
1202 + Send;
1203 fn r#set_topology(&self, topology_id: u64) -> Self::SetTopologyResponseFut;
1204 type SetElementStateResponseFut: std::future::Future<Output = Result<SignalProcessingSetElementStateResult, fidl::Error>>
1205 + Send;
1206 fn r#set_element_state(
1207 &self,
1208 processing_element_id: u64,
1209 state: &SettableElementState,
1210 ) -> Self::SetElementStateResponseFut;
1211}
1212
1213#[derive(Debug, Clone)]
1214pub struct SignalProcessingProxy {
1215 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
1216}
1217
1218impl fdomain_client::fidl::Proxy for SignalProcessingProxy {
1219 type Protocol = SignalProcessingMarker;
1220
1221 fn from_channel(inner: fdomain_client::Channel) -> Self {
1222 Self::new(inner)
1223 }
1224
1225 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
1226 self.client.into_channel().map_err(|client| Self { client })
1227 }
1228
1229 fn as_channel(&self) -> &fdomain_client::Channel {
1230 self.client.as_channel()
1231 }
1232}
1233
1234impl SignalProcessingProxy {
1235 pub fn new(channel: fdomain_client::Channel) -> Self {
1237 let protocol_name =
1238 <SignalProcessingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
1239 Self { client: fidl::client::Client::new(channel, protocol_name) }
1240 }
1241
1242 pub fn take_event_stream(&self) -> SignalProcessingEventStream {
1248 SignalProcessingEventStream { event_receiver: self.client.take_event_receiver() }
1249 }
1250
1251 pub fn r#get_elements(
1254 &self,
1255 ) -> fidl::client::QueryResponseFut<
1256 ReaderGetElementsResult,
1257 fdomain_client::fidl::FDomainResourceDialect,
1258 > {
1259 SignalProcessingProxyInterface::r#get_elements(self)
1260 }
1261
1262 pub fn r#watch_element_state(
1275 &self,
1276 mut processing_element_id: u64,
1277 ) -> fidl::client::QueryResponseFut<ElementState, fdomain_client::fidl::FDomainResourceDialect>
1278 {
1279 SignalProcessingProxyInterface::r#watch_element_state(self, processing_element_id)
1280 }
1281
1282 pub fn r#get_topologies(
1291 &self,
1292 ) -> fidl::client::QueryResponseFut<
1293 ReaderGetTopologiesResult,
1294 fdomain_client::fidl::FDomainResourceDialect,
1295 > {
1296 SignalProcessingProxyInterface::r#get_topologies(self)
1297 }
1298
1299 pub fn r#watch_topology(
1307 &self,
1308 ) -> fidl::client::QueryResponseFut<u64, fdomain_client::fidl::FDomainResourceDialect> {
1309 SignalProcessingProxyInterface::r#watch_topology(self)
1310 }
1311
1312 pub fn r#set_topology(
1327 &self,
1328 mut topology_id: u64,
1329 ) -> fidl::client::QueryResponseFut<
1330 SignalProcessingSetTopologyResult,
1331 fdomain_client::fidl::FDomainResourceDialect,
1332 > {
1333 SignalProcessingProxyInterface::r#set_topology(self, topology_id)
1334 }
1335
1336 pub fn r#set_element_state(
1374 &self,
1375 mut processing_element_id: u64,
1376 mut state: &SettableElementState,
1377 ) -> fidl::client::QueryResponseFut<
1378 SignalProcessingSetElementStateResult,
1379 fdomain_client::fidl::FDomainResourceDialect,
1380 > {
1381 SignalProcessingProxyInterface::r#set_element_state(self, processing_element_id, state)
1382 }
1383}
1384
1385impl SignalProcessingProxyInterface for SignalProcessingProxy {
1386 type GetElementsResponseFut = fidl::client::QueryResponseFut<
1387 ReaderGetElementsResult,
1388 fdomain_client::fidl::FDomainResourceDialect,
1389 >;
1390 fn r#get_elements(&self) -> Self::GetElementsResponseFut {
1391 fn _decode(
1392 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1393 ) -> Result<ReaderGetElementsResult, fidl::Error> {
1394 let _response = fidl::client::decode_transaction_body::<
1395 fidl::encoding::ResultType<ReaderGetElementsResponse, i32>,
1396 fdomain_client::fidl::FDomainResourceDialect,
1397 0x1b14ff4adf5dc6f8,
1398 >(_buf?)?;
1399 Ok(_response.map(|x| x.processing_elements))
1400 }
1401 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ReaderGetElementsResult>(
1402 (),
1403 0x1b14ff4adf5dc6f8,
1404 fidl::encoding::DynamicFlags::empty(),
1405 _decode,
1406 )
1407 }
1408
1409 type WatchElementStateResponseFut =
1410 fidl::client::QueryResponseFut<ElementState, fdomain_client::fidl::FDomainResourceDialect>;
1411 fn r#watch_element_state(
1412 &self,
1413 mut processing_element_id: u64,
1414 ) -> Self::WatchElementStateResponseFut {
1415 fn _decode(
1416 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1417 ) -> Result<ElementState, fidl::Error> {
1418 let _response = fidl::client::decode_transaction_body::<
1419 ReaderWatchElementStateResponse,
1420 fdomain_client::fidl::FDomainResourceDialect,
1421 0x524da8772a69056f,
1422 >(_buf?)?;
1423 Ok(_response.state)
1424 }
1425 self.client.send_query_and_decode::<ReaderWatchElementStateRequest, ElementState>(
1426 (processing_element_id,),
1427 0x524da8772a69056f,
1428 fidl::encoding::DynamicFlags::empty(),
1429 _decode,
1430 )
1431 }
1432
1433 type GetTopologiesResponseFut = fidl::client::QueryResponseFut<
1434 ReaderGetTopologiesResult,
1435 fdomain_client::fidl::FDomainResourceDialect,
1436 >;
1437 fn r#get_topologies(&self) -> Self::GetTopologiesResponseFut {
1438 fn _decode(
1439 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1440 ) -> Result<ReaderGetTopologiesResult, fidl::Error> {
1441 let _response = fidl::client::decode_transaction_body::<
1442 fidl::encoding::ResultType<ReaderGetTopologiesResponse, i32>,
1443 fdomain_client::fidl::FDomainResourceDialect,
1444 0x73ffb73af24d30b6,
1445 >(_buf?)?;
1446 Ok(_response.map(|x| x.topologies))
1447 }
1448 self.client
1449 .send_query_and_decode::<fidl::encoding::EmptyPayload, ReaderGetTopologiesResult>(
1450 (),
1451 0x73ffb73af24d30b6,
1452 fidl::encoding::DynamicFlags::empty(),
1453 _decode,
1454 )
1455 }
1456
1457 type WatchTopologyResponseFut =
1458 fidl::client::QueryResponseFut<u64, fdomain_client::fidl::FDomainResourceDialect>;
1459 fn r#watch_topology(&self) -> Self::WatchTopologyResponseFut {
1460 fn _decode(
1461 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1462 ) -> Result<u64, fidl::Error> {
1463 let _response = fidl::client::decode_transaction_body::<
1464 fidl::encoding::FlexibleType<ReaderWatchTopologyResponse>,
1465 fdomain_client::fidl::FDomainResourceDialect,
1466 0x66d172acdb36a729,
1467 >(_buf?)?
1468 .into_result_fdomain::<SignalProcessingMarker>("watch_topology")?;
1469 Ok(_response.topology_id)
1470 }
1471 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
1472 (),
1473 0x66d172acdb36a729,
1474 fidl::encoding::DynamicFlags::FLEXIBLE,
1475 _decode,
1476 )
1477 }
1478
1479 type SetTopologyResponseFut = fidl::client::QueryResponseFut<
1480 SignalProcessingSetTopologyResult,
1481 fdomain_client::fidl::FDomainResourceDialect,
1482 >;
1483 fn r#set_topology(&self, mut topology_id: u64) -> Self::SetTopologyResponseFut {
1484 fn _decode(
1485 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1486 ) -> Result<SignalProcessingSetTopologyResult, fidl::Error> {
1487 let _response = fidl::client::decode_transaction_body::<
1488 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1489 fdomain_client::fidl::FDomainResourceDialect,
1490 0x1d9a7f9b8fee790c,
1491 >(_buf?)?;
1492 Ok(_response.map(|x| x))
1493 }
1494 self.client.send_query_and_decode::<
1495 SignalProcessingSetTopologyRequest,
1496 SignalProcessingSetTopologyResult,
1497 >(
1498 (topology_id,),
1499 0x1d9a7f9b8fee790c,
1500 fidl::encoding::DynamicFlags::empty(),
1501 _decode,
1502 )
1503 }
1504
1505 type SetElementStateResponseFut = fidl::client::QueryResponseFut<
1506 SignalProcessingSetElementStateResult,
1507 fdomain_client::fidl::FDomainResourceDialect,
1508 >;
1509 fn r#set_element_state(
1510 &self,
1511 mut processing_element_id: u64,
1512 mut state: &SettableElementState,
1513 ) -> Self::SetElementStateResponseFut {
1514 fn _decode(
1515 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1516 ) -> Result<SignalProcessingSetElementStateResult, fidl::Error> {
1517 let _response = fidl::client::decode_transaction_body::<
1518 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1519 fdomain_client::fidl::FDomainResourceDialect,
1520 0x38c3b2d4bae698f4,
1521 >(_buf?)?;
1522 Ok(_response.map(|x| x))
1523 }
1524 self.client.send_query_and_decode::<
1525 SignalProcessingSetElementStateRequest,
1526 SignalProcessingSetElementStateResult,
1527 >(
1528 (processing_element_id, state,),
1529 0x38c3b2d4bae698f4,
1530 fidl::encoding::DynamicFlags::empty(),
1531 _decode,
1532 )
1533 }
1534}
1535
1536pub struct SignalProcessingEventStream {
1537 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
1538}
1539
1540impl std::marker::Unpin for SignalProcessingEventStream {}
1541
1542impl futures::stream::FusedStream for SignalProcessingEventStream {
1543 fn is_terminated(&self) -> bool {
1544 self.event_receiver.is_terminated()
1545 }
1546}
1547
1548impl futures::Stream for SignalProcessingEventStream {
1549 type Item = Result<SignalProcessingEvent, fidl::Error>;
1550
1551 fn poll_next(
1552 mut self: std::pin::Pin<&mut Self>,
1553 cx: &mut std::task::Context<'_>,
1554 ) -> std::task::Poll<Option<Self::Item>> {
1555 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1556 &mut self.event_receiver,
1557 cx
1558 )?) {
1559 Some(buf) => std::task::Poll::Ready(Some(SignalProcessingEvent::decode(buf))),
1560 None => std::task::Poll::Ready(None),
1561 }
1562 }
1563}
1564
1565#[derive(Debug)]
1566pub enum SignalProcessingEvent {
1567 #[non_exhaustive]
1568 _UnknownEvent {
1569 ordinal: u64,
1571 },
1572}
1573
1574impl SignalProcessingEvent {
1575 fn decode(
1577 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1578 ) -> Result<SignalProcessingEvent, fidl::Error> {
1579 let (bytes, _handles) = buf.split_mut();
1580 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1581 debug_assert_eq!(tx_header.tx_id, 0);
1582 match tx_header.ordinal {
1583 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1584 Ok(SignalProcessingEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1585 }
1586 _ => Err(fidl::Error::UnknownOrdinal {
1587 ordinal: tx_header.ordinal,
1588 protocol_name:
1589 <SignalProcessingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1590 }),
1591 }
1592 }
1593}
1594
1595pub struct SignalProcessingRequestStream {
1597 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1598 is_terminated: bool,
1599}
1600
1601impl std::marker::Unpin for SignalProcessingRequestStream {}
1602
1603impl futures::stream::FusedStream for SignalProcessingRequestStream {
1604 fn is_terminated(&self) -> bool {
1605 self.is_terminated
1606 }
1607}
1608
1609impl fdomain_client::fidl::RequestStream for SignalProcessingRequestStream {
1610 type Protocol = SignalProcessingMarker;
1611 type ControlHandle = SignalProcessingControlHandle;
1612
1613 fn from_channel(channel: fdomain_client::Channel) -> Self {
1614 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1615 }
1616
1617 fn control_handle(&self) -> Self::ControlHandle {
1618 SignalProcessingControlHandle { inner: self.inner.clone() }
1619 }
1620
1621 fn into_inner(
1622 self,
1623 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
1624 {
1625 (self.inner, self.is_terminated)
1626 }
1627
1628 fn from_inner(
1629 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1630 is_terminated: bool,
1631 ) -> Self {
1632 Self { inner, is_terminated }
1633 }
1634}
1635
1636impl futures::Stream for SignalProcessingRequestStream {
1637 type Item = Result<SignalProcessingRequest, fidl::Error>;
1638
1639 fn poll_next(
1640 mut self: std::pin::Pin<&mut Self>,
1641 cx: &mut std::task::Context<'_>,
1642 ) -> std::task::Poll<Option<Self::Item>> {
1643 let this = &mut *self;
1644 if this.inner.check_shutdown(cx) {
1645 this.is_terminated = true;
1646 return std::task::Poll::Ready(None);
1647 }
1648 if this.is_terminated {
1649 panic!("polled SignalProcessingRequestStream after completion");
1650 }
1651 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
1652 |bytes, handles| {
1653 match this.inner.channel().read_etc(cx, bytes, handles) {
1654 std::task::Poll::Ready(Ok(())) => {}
1655 std::task::Poll::Pending => return std::task::Poll::Pending,
1656 std::task::Poll::Ready(Err(None)) => {
1657 this.is_terminated = true;
1658 return std::task::Poll::Ready(None);
1659 }
1660 std::task::Poll::Ready(Err(Some(e))) => {
1661 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1662 e.into(),
1663 ))));
1664 }
1665 }
1666
1667 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1669
1670 std::task::Poll::Ready(Some(match header.ordinal {
1671 0x1b14ff4adf5dc6f8 => {
1672 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1673 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
1674 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1675 let control_handle = SignalProcessingControlHandle {
1676 inner: this.inner.clone(),
1677 };
1678 Ok(SignalProcessingRequest::GetElements {
1679 responder: SignalProcessingGetElementsResponder {
1680 control_handle: std::mem::ManuallyDrop::new(control_handle),
1681 tx_id: header.tx_id,
1682 },
1683 })
1684 }
1685 0x524da8772a69056f => {
1686 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1687 let mut req = fidl::new_empty!(ReaderWatchElementStateRequest, fdomain_client::fidl::FDomainResourceDialect);
1688 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReaderWatchElementStateRequest>(&header, _body_bytes, handles, &mut req)?;
1689 let control_handle = SignalProcessingControlHandle {
1690 inner: this.inner.clone(),
1691 };
1692 Ok(SignalProcessingRequest::WatchElementState {processing_element_id: req.processing_element_id,
1693
1694 responder: SignalProcessingWatchElementStateResponder {
1695 control_handle: std::mem::ManuallyDrop::new(control_handle),
1696 tx_id: header.tx_id,
1697 },
1698 })
1699 }
1700 0x73ffb73af24d30b6 => {
1701 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1702 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
1703 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1704 let control_handle = SignalProcessingControlHandle {
1705 inner: this.inner.clone(),
1706 };
1707 Ok(SignalProcessingRequest::GetTopologies {
1708 responder: SignalProcessingGetTopologiesResponder {
1709 control_handle: std::mem::ManuallyDrop::new(control_handle),
1710 tx_id: header.tx_id,
1711 },
1712 })
1713 }
1714 0x66d172acdb36a729 => {
1715 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1716 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
1717 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1718 let control_handle = SignalProcessingControlHandle {
1719 inner: this.inner.clone(),
1720 };
1721 Ok(SignalProcessingRequest::WatchTopology {
1722 responder: SignalProcessingWatchTopologyResponder {
1723 control_handle: std::mem::ManuallyDrop::new(control_handle),
1724 tx_id: header.tx_id,
1725 },
1726 })
1727 }
1728 0x1d9a7f9b8fee790c => {
1729 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1730 let mut req = fidl::new_empty!(SignalProcessingSetTopologyRequest, fdomain_client::fidl::FDomainResourceDialect);
1731 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<SignalProcessingSetTopologyRequest>(&header, _body_bytes, handles, &mut req)?;
1732 let control_handle = SignalProcessingControlHandle {
1733 inner: this.inner.clone(),
1734 };
1735 Ok(SignalProcessingRequest::SetTopology {topology_id: req.topology_id,
1736
1737 responder: SignalProcessingSetTopologyResponder {
1738 control_handle: std::mem::ManuallyDrop::new(control_handle),
1739 tx_id: header.tx_id,
1740 },
1741 })
1742 }
1743 0x38c3b2d4bae698f4 => {
1744 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1745 let mut req = fidl::new_empty!(SignalProcessingSetElementStateRequest, fdomain_client::fidl::FDomainResourceDialect);
1746 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<SignalProcessingSetElementStateRequest>(&header, _body_bytes, handles, &mut req)?;
1747 let control_handle = SignalProcessingControlHandle {
1748 inner: this.inner.clone(),
1749 };
1750 Ok(SignalProcessingRequest::SetElementState {processing_element_id: req.processing_element_id,
1751state: req.state,
1752
1753 responder: SignalProcessingSetElementStateResponder {
1754 control_handle: std::mem::ManuallyDrop::new(control_handle),
1755 tx_id: header.tx_id,
1756 },
1757 })
1758 }
1759 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1760 Ok(SignalProcessingRequest::_UnknownMethod {
1761 ordinal: header.ordinal,
1762 control_handle: SignalProcessingControlHandle { inner: this.inner.clone() },
1763 method_type: fidl::MethodType::OneWay,
1764 })
1765 }
1766 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1767 this.inner.send_framework_err(
1768 fidl::encoding::FrameworkErr::UnknownMethod,
1769 header.tx_id,
1770 header.ordinal,
1771 header.dynamic_flags(),
1772 (bytes, handles),
1773 )?;
1774 Ok(SignalProcessingRequest::_UnknownMethod {
1775 ordinal: header.ordinal,
1776 control_handle: SignalProcessingControlHandle { inner: this.inner.clone() },
1777 method_type: fidl::MethodType::TwoWay,
1778 })
1779 }
1780 _ => Err(fidl::Error::UnknownOrdinal {
1781 ordinal: header.ordinal,
1782 protocol_name: <SignalProcessingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1783 }),
1784 }))
1785 },
1786 )
1787 }
1788}
1789
1790#[derive(Debug)]
1796pub enum SignalProcessingRequest {
1797 GetElements { responder: SignalProcessingGetElementsResponder },
1800 WatchElementState {
1813 processing_element_id: u64,
1814 responder: SignalProcessingWatchElementStateResponder,
1815 },
1816 GetTopologies { responder: SignalProcessingGetTopologiesResponder },
1825 WatchTopology { responder: SignalProcessingWatchTopologyResponder },
1833 SetTopology { topology_id: u64, responder: SignalProcessingSetTopologyResponder },
1848 SetElementState {
1886 processing_element_id: u64,
1887 state: SettableElementState,
1888 responder: SignalProcessingSetElementStateResponder,
1889 },
1890 #[non_exhaustive]
1892 _UnknownMethod {
1893 ordinal: u64,
1895 control_handle: SignalProcessingControlHandle,
1896 method_type: fidl::MethodType,
1897 },
1898}
1899
1900impl SignalProcessingRequest {
1901 #[allow(irrefutable_let_patterns)]
1902 pub fn into_get_elements(self) -> Option<(SignalProcessingGetElementsResponder)> {
1903 if let SignalProcessingRequest::GetElements { responder } = self {
1904 Some((responder))
1905 } else {
1906 None
1907 }
1908 }
1909
1910 #[allow(irrefutable_let_patterns)]
1911 pub fn into_watch_element_state(
1912 self,
1913 ) -> Option<(u64, SignalProcessingWatchElementStateResponder)> {
1914 if let SignalProcessingRequest::WatchElementState { processing_element_id, responder } =
1915 self
1916 {
1917 Some((processing_element_id, responder))
1918 } else {
1919 None
1920 }
1921 }
1922
1923 #[allow(irrefutable_let_patterns)]
1924 pub fn into_get_topologies(self) -> Option<(SignalProcessingGetTopologiesResponder)> {
1925 if let SignalProcessingRequest::GetTopologies { responder } = self {
1926 Some((responder))
1927 } else {
1928 None
1929 }
1930 }
1931
1932 #[allow(irrefutable_let_patterns)]
1933 pub fn into_watch_topology(self) -> Option<(SignalProcessingWatchTopologyResponder)> {
1934 if let SignalProcessingRequest::WatchTopology { responder } = self {
1935 Some((responder))
1936 } else {
1937 None
1938 }
1939 }
1940
1941 #[allow(irrefutable_let_patterns)]
1942 pub fn into_set_topology(self) -> Option<(u64, SignalProcessingSetTopologyResponder)> {
1943 if let SignalProcessingRequest::SetTopology { topology_id, responder } = self {
1944 Some((topology_id, responder))
1945 } else {
1946 None
1947 }
1948 }
1949
1950 #[allow(irrefutable_let_patterns)]
1951 pub fn into_set_element_state(
1952 self,
1953 ) -> Option<(u64, SettableElementState, SignalProcessingSetElementStateResponder)> {
1954 if let SignalProcessingRequest::SetElementState {
1955 processing_element_id,
1956 state,
1957 responder,
1958 } = self
1959 {
1960 Some((processing_element_id, state, responder))
1961 } else {
1962 None
1963 }
1964 }
1965
1966 pub fn method_name(&self) -> &'static str {
1968 match *self {
1969 SignalProcessingRequest::GetElements { .. } => "get_elements",
1970 SignalProcessingRequest::WatchElementState { .. } => "watch_element_state",
1971 SignalProcessingRequest::GetTopologies { .. } => "get_topologies",
1972 SignalProcessingRequest::WatchTopology { .. } => "watch_topology",
1973 SignalProcessingRequest::SetTopology { .. } => "set_topology",
1974 SignalProcessingRequest::SetElementState { .. } => "set_element_state",
1975 SignalProcessingRequest::_UnknownMethod {
1976 method_type: fidl::MethodType::OneWay,
1977 ..
1978 } => "unknown one-way method",
1979 SignalProcessingRequest::_UnknownMethod {
1980 method_type: fidl::MethodType::TwoWay,
1981 ..
1982 } => "unknown two-way method",
1983 }
1984 }
1985}
1986
1987#[derive(Debug, Clone)]
1988pub struct SignalProcessingControlHandle {
1989 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1990}
1991
1992impl SignalProcessingControlHandle {
1993 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
1994 self.inner.shutdown_with_epitaph(status.into())
1995 }
1996}
1997
1998impl fdomain_client::fidl::ControlHandle for SignalProcessingControlHandle {
1999 fn shutdown(&self) {
2000 self.inner.shutdown()
2001 }
2002
2003 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
2004 self.inner.shutdown_with_epitaph(status)
2005 }
2006
2007 fn is_closed(&self) -> bool {
2008 self.inner.channel().is_closed()
2009 }
2010 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
2011 self.inner.channel().on_closed()
2012 }
2013}
2014
2015impl SignalProcessingControlHandle {}
2016
2017#[must_use = "FIDL methods require a response to be sent"]
2018#[derive(Debug)]
2019pub struct SignalProcessingGetElementsResponder {
2020 control_handle: std::mem::ManuallyDrop<SignalProcessingControlHandle>,
2021 tx_id: u32,
2022}
2023
2024impl std::ops::Drop for SignalProcessingGetElementsResponder {
2028 fn drop(&mut self) {
2029 self.control_handle.shutdown();
2030 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2032 }
2033}
2034
2035impl fdomain_client::fidl::Responder for SignalProcessingGetElementsResponder {
2036 type ControlHandle = SignalProcessingControlHandle;
2037
2038 fn control_handle(&self) -> &SignalProcessingControlHandle {
2039 &self.control_handle
2040 }
2041
2042 fn drop_without_shutdown(mut self) {
2043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2045 std::mem::forget(self);
2047 }
2048}
2049
2050impl SignalProcessingGetElementsResponder {
2051 pub fn send(self, mut result: Result<&[Element], i32>) -> Result<(), fidl::Error> {
2055 let _result = self.send_raw(result);
2056 if _result.is_err() {
2057 self.control_handle.shutdown();
2058 }
2059 self.drop_without_shutdown();
2060 _result
2061 }
2062
2063 pub fn send_no_shutdown_on_err(
2065 self,
2066 mut result: Result<&[Element], i32>,
2067 ) -> Result<(), fidl::Error> {
2068 let _result = self.send_raw(result);
2069 self.drop_without_shutdown();
2070 _result
2071 }
2072
2073 fn send_raw(&self, mut result: Result<&[Element], i32>) -> Result<(), fidl::Error> {
2074 self.control_handle
2075 .inner
2076 .send::<fidl::encoding::ResultType<ReaderGetElementsResponse, i32>>(
2077 result.map(|processing_elements| (processing_elements,)),
2078 self.tx_id,
2079 0x1b14ff4adf5dc6f8,
2080 fidl::encoding::DynamicFlags::empty(),
2081 )
2082 }
2083}
2084
2085#[must_use = "FIDL methods require a response to be sent"]
2086#[derive(Debug)]
2087pub struct SignalProcessingWatchElementStateResponder {
2088 control_handle: std::mem::ManuallyDrop<SignalProcessingControlHandle>,
2089 tx_id: u32,
2090}
2091
2092impl std::ops::Drop for SignalProcessingWatchElementStateResponder {
2096 fn drop(&mut self) {
2097 self.control_handle.shutdown();
2098 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2100 }
2101}
2102
2103impl fdomain_client::fidl::Responder for SignalProcessingWatchElementStateResponder {
2104 type ControlHandle = SignalProcessingControlHandle;
2105
2106 fn control_handle(&self) -> &SignalProcessingControlHandle {
2107 &self.control_handle
2108 }
2109
2110 fn drop_without_shutdown(mut self) {
2111 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2113 std::mem::forget(self);
2115 }
2116}
2117
2118impl SignalProcessingWatchElementStateResponder {
2119 pub fn send(self, mut state: &ElementState) -> Result<(), fidl::Error> {
2123 let _result = self.send_raw(state);
2124 if _result.is_err() {
2125 self.control_handle.shutdown();
2126 }
2127 self.drop_without_shutdown();
2128 _result
2129 }
2130
2131 pub fn send_no_shutdown_on_err(self, mut state: &ElementState) -> Result<(), fidl::Error> {
2133 let _result = self.send_raw(state);
2134 self.drop_without_shutdown();
2135 _result
2136 }
2137
2138 fn send_raw(&self, mut state: &ElementState) -> Result<(), fidl::Error> {
2139 self.control_handle.inner.send::<ReaderWatchElementStateResponse>(
2140 (state,),
2141 self.tx_id,
2142 0x524da8772a69056f,
2143 fidl::encoding::DynamicFlags::empty(),
2144 )
2145 }
2146}
2147
2148#[must_use = "FIDL methods require a response to be sent"]
2149#[derive(Debug)]
2150pub struct SignalProcessingGetTopologiesResponder {
2151 control_handle: std::mem::ManuallyDrop<SignalProcessingControlHandle>,
2152 tx_id: u32,
2153}
2154
2155impl std::ops::Drop for SignalProcessingGetTopologiesResponder {
2159 fn drop(&mut self) {
2160 self.control_handle.shutdown();
2161 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2163 }
2164}
2165
2166impl fdomain_client::fidl::Responder for SignalProcessingGetTopologiesResponder {
2167 type ControlHandle = SignalProcessingControlHandle;
2168
2169 fn control_handle(&self) -> &SignalProcessingControlHandle {
2170 &self.control_handle
2171 }
2172
2173 fn drop_without_shutdown(mut self) {
2174 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2176 std::mem::forget(self);
2178 }
2179}
2180
2181impl SignalProcessingGetTopologiesResponder {
2182 pub fn send(self, mut result: Result<&[Topology], i32>) -> Result<(), fidl::Error> {
2186 let _result = self.send_raw(result);
2187 if _result.is_err() {
2188 self.control_handle.shutdown();
2189 }
2190 self.drop_without_shutdown();
2191 _result
2192 }
2193
2194 pub fn send_no_shutdown_on_err(
2196 self,
2197 mut result: Result<&[Topology], i32>,
2198 ) -> Result<(), fidl::Error> {
2199 let _result = self.send_raw(result);
2200 self.drop_without_shutdown();
2201 _result
2202 }
2203
2204 fn send_raw(&self, mut result: Result<&[Topology], i32>) -> Result<(), fidl::Error> {
2205 self.control_handle
2206 .inner
2207 .send::<fidl::encoding::ResultType<ReaderGetTopologiesResponse, i32>>(
2208 result.map(|topologies| (topologies,)),
2209 self.tx_id,
2210 0x73ffb73af24d30b6,
2211 fidl::encoding::DynamicFlags::empty(),
2212 )
2213 }
2214}
2215
2216#[must_use = "FIDL methods require a response to be sent"]
2217#[derive(Debug)]
2218pub struct SignalProcessingWatchTopologyResponder {
2219 control_handle: std::mem::ManuallyDrop<SignalProcessingControlHandle>,
2220 tx_id: u32,
2221}
2222
2223impl std::ops::Drop for SignalProcessingWatchTopologyResponder {
2227 fn drop(&mut self) {
2228 self.control_handle.shutdown();
2229 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2231 }
2232}
2233
2234impl fdomain_client::fidl::Responder for SignalProcessingWatchTopologyResponder {
2235 type ControlHandle = SignalProcessingControlHandle;
2236
2237 fn control_handle(&self) -> &SignalProcessingControlHandle {
2238 &self.control_handle
2239 }
2240
2241 fn drop_without_shutdown(mut self) {
2242 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2244 std::mem::forget(self);
2246 }
2247}
2248
2249impl SignalProcessingWatchTopologyResponder {
2250 pub fn send(self, mut topology_id: u64) -> Result<(), fidl::Error> {
2254 let _result = self.send_raw(topology_id);
2255 if _result.is_err() {
2256 self.control_handle.shutdown();
2257 }
2258 self.drop_without_shutdown();
2259 _result
2260 }
2261
2262 pub fn send_no_shutdown_on_err(self, mut topology_id: u64) -> Result<(), fidl::Error> {
2264 let _result = self.send_raw(topology_id);
2265 self.drop_without_shutdown();
2266 _result
2267 }
2268
2269 fn send_raw(&self, mut topology_id: u64) -> Result<(), fidl::Error> {
2270 self.control_handle.inner.send::<fidl::encoding::FlexibleType<ReaderWatchTopologyResponse>>(
2271 fidl::encoding::Flexible::new((topology_id,)),
2272 self.tx_id,
2273 0x66d172acdb36a729,
2274 fidl::encoding::DynamicFlags::FLEXIBLE,
2275 )
2276 }
2277}
2278
2279#[must_use = "FIDL methods require a response to be sent"]
2280#[derive(Debug)]
2281pub struct SignalProcessingSetTopologyResponder {
2282 control_handle: std::mem::ManuallyDrop<SignalProcessingControlHandle>,
2283 tx_id: u32,
2284}
2285
2286impl std::ops::Drop for SignalProcessingSetTopologyResponder {
2290 fn drop(&mut self) {
2291 self.control_handle.shutdown();
2292 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2294 }
2295}
2296
2297impl fdomain_client::fidl::Responder for SignalProcessingSetTopologyResponder {
2298 type ControlHandle = SignalProcessingControlHandle;
2299
2300 fn control_handle(&self) -> &SignalProcessingControlHandle {
2301 &self.control_handle
2302 }
2303
2304 fn drop_without_shutdown(mut self) {
2305 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2307 std::mem::forget(self);
2309 }
2310}
2311
2312impl SignalProcessingSetTopologyResponder {
2313 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2317 let _result = self.send_raw(result);
2318 if _result.is_err() {
2319 self.control_handle.shutdown();
2320 }
2321 self.drop_without_shutdown();
2322 _result
2323 }
2324
2325 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2327 let _result = self.send_raw(result);
2328 self.drop_without_shutdown();
2329 _result
2330 }
2331
2332 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2333 self.control_handle
2334 .inner
2335 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2336 result,
2337 self.tx_id,
2338 0x1d9a7f9b8fee790c,
2339 fidl::encoding::DynamicFlags::empty(),
2340 )
2341 }
2342}
2343
2344#[must_use = "FIDL methods require a response to be sent"]
2345#[derive(Debug)]
2346pub struct SignalProcessingSetElementStateResponder {
2347 control_handle: std::mem::ManuallyDrop<SignalProcessingControlHandle>,
2348 tx_id: u32,
2349}
2350
2351impl std::ops::Drop for SignalProcessingSetElementStateResponder {
2355 fn drop(&mut self) {
2356 self.control_handle.shutdown();
2357 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2359 }
2360}
2361
2362impl fdomain_client::fidl::Responder for SignalProcessingSetElementStateResponder {
2363 type ControlHandle = SignalProcessingControlHandle;
2364
2365 fn control_handle(&self) -> &SignalProcessingControlHandle {
2366 &self.control_handle
2367 }
2368
2369 fn drop_without_shutdown(mut self) {
2370 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2372 std::mem::forget(self);
2374 }
2375}
2376
2377impl SignalProcessingSetElementStateResponder {
2378 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2382 let _result = self.send_raw(result);
2383 if _result.is_err() {
2384 self.control_handle.shutdown();
2385 }
2386 self.drop_without_shutdown();
2387 _result
2388 }
2389
2390 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2392 let _result = self.send_raw(result);
2393 self.drop_without_shutdown();
2394 _result
2395 }
2396
2397 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2398 self.control_handle
2399 .inner
2400 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2401 result,
2402 self.tx_id,
2403 0x38c3b2d4bae698f4,
2404 fidl::encoding::DynamicFlags::empty(),
2405 )
2406 }
2407}
2408
2409mod internal {
2410 use super::*;
2411
2412 impl fidl::encoding::ResourceTypeMarker for ConnectorSignalProcessingConnectRequest {
2413 type Borrowed<'a> = &'a mut Self;
2414 fn take_or_borrow<'a>(
2415 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2416 ) -> Self::Borrowed<'a> {
2417 value
2418 }
2419 }
2420
2421 unsafe impl fidl::encoding::TypeMarker for ConnectorSignalProcessingConnectRequest {
2422 type Owned = Self;
2423
2424 #[inline(always)]
2425 fn inline_align(_context: fidl::encoding::Context) -> usize {
2426 4
2427 }
2428
2429 #[inline(always)]
2430 fn inline_size(_context: fidl::encoding::Context) -> usize {
2431 4
2432 }
2433 }
2434
2435 unsafe impl
2436 fidl::encoding::Encode<
2437 ConnectorSignalProcessingConnectRequest,
2438 fdomain_client::fidl::FDomainResourceDialect,
2439 > for &mut ConnectorSignalProcessingConnectRequest
2440 {
2441 #[inline]
2442 unsafe fn encode(
2443 self,
2444 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2445 offset: usize,
2446 _depth: fidl::encoding::Depth,
2447 ) -> fidl::Result<()> {
2448 encoder.debug_check_bounds::<ConnectorSignalProcessingConnectRequest>(offset);
2449 fidl::encoding::Encode::<
2451 ConnectorSignalProcessingConnectRequest,
2452 fdomain_client::fidl::FDomainResourceDialect,
2453 >::encode(
2454 (
2455 <fidl::encoding::Endpoint<
2456 fdomain_client::fidl::ServerEnd<SignalProcessingMarker>,
2457 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2458 &mut self.protocol
2459 ),
2460 ),
2461 encoder,
2462 offset,
2463 _depth,
2464 )
2465 }
2466 }
2467 unsafe impl<
2468 T0: fidl::encoding::Encode<
2469 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SignalProcessingMarker>>,
2470 fdomain_client::fidl::FDomainResourceDialect,
2471 >,
2472 >
2473 fidl::encoding::Encode<
2474 ConnectorSignalProcessingConnectRequest,
2475 fdomain_client::fidl::FDomainResourceDialect,
2476 > for (T0,)
2477 {
2478 #[inline]
2479 unsafe fn encode(
2480 self,
2481 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2482 offset: usize,
2483 depth: fidl::encoding::Depth,
2484 ) -> fidl::Result<()> {
2485 encoder.debug_check_bounds::<ConnectorSignalProcessingConnectRequest>(offset);
2486 self.0.encode(encoder, offset + 0, depth)?;
2490 Ok(())
2491 }
2492 }
2493
2494 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
2495 for ConnectorSignalProcessingConnectRequest
2496 {
2497 #[inline(always)]
2498 fn new_empty() -> Self {
2499 Self {
2500 protocol: fidl::new_empty!(
2501 fidl::encoding::Endpoint<
2502 fdomain_client::fidl::ServerEnd<SignalProcessingMarker>,
2503 >,
2504 fdomain_client::fidl::FDomainResourceDialect
2505 ),
2506 }
2507 }
2508
2509 #[inline]
2510 unsafe fn decode(
2511 &mut self,
2512 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
2513 offset: usize,
2514 _depth: fidl::encoding::Depth,
2515 ) -> fidl::Result<()> {
2516 decoder.debug_check_bounds::<Self>(offset);
2517 fidl::decode!(
2519 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SignalProcessingMarker>>,
2520 fdomain_client::fidl::FDomainResourceDialect,
2521 &mut self.protocol,
2522 decoder,
2523 offset + 0,
2524 _depth
2525 )?;
2526 Ok(())
2527 }
2528 }
2529}