fidl_examples_keyvaluestore_addreaditem/
fidl_examples_keyvaluestore_addreaditem.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_examples_keyvaluestore_addreaditem_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15pub struct StoreMarker;
16
17impl fidl::endpoints::ProtocolMarker for StoreMarker {
18    type Proxy = StoreProxy;
19    type RequestStream = StoreRequestStream;
20    #[cfg(target_os = "fuchsia")]
21    type SynchronousProxy = StoreSynchronousProxy;
22
23    const DEBUG_NAME: &'static str = "examples.keyvaluestore.addreaditem.Store";
24}
25impl fidl::endpoints::DiscoverableProtocolMarker for StoreMarker {}
26pub type StoreWriteItemResult = Result<(), WriteError>;
27pub type StoreReadItemResult = Result<(String, Vec<u8>), ReadError>;
28
29pub trait StoreProxyInterface: Send + Sync {
30    type WriteItemResponseFut: std::future::Future<Output = Result<StoreWriteItemResult, fidl::Error>>
31        + Send;
32    fn r#write_item(&self, attempt: &Item) -> Self::WriteItemResponseFut;
33    type ReadItemResponseFut: std::future::Future<Output = Result<StoreReadItemResult, fidl::Error>>
34        + Send;
35    fn r#read_item(&self, key: &str) -> Self::ReadItemResponseFut;
36}
37#[derive(Debug)]
38#[cfg(target_os = "fuchsia")]
39pub struct StoreSynchronousProxy {
40    client: fidl::client::sync::Client,
41}
42
43#[cfg(target_os = "fuchsia")]
44impl fidl::endpoints::SynchronousProxy for StoreSynchronousProxy {
45    type Proxy = StoreProxy;
46    type Protocol = StoreMarker;
47
48    fn from_channel(inner: fidl::Channel) -> Self {
49        Self::new(inner)
50    }
51
52    fn into_channel(self) -> fidl::Channel {
53        self.client.into_channel()
54    }
55
56    fn as_channel(&self) -> &fidl::Channel {
57        self.client.as_channel()
58    }
59}
60
61#[cfg(target_os = "fuchsia")]
62impl StoreSynchronousProxy {
63    pub fn new(channel: fidl::Channel) -> Self {
64        let protocol_name = <StoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
65        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
66    }
67
68    pub fn into_channel(self) -> fidl::Channel {
69        self.client.into_channel()
70    }
71
72    /// Waits until an event arrives and returns it. It is safe for other
73    /// threads to make concurrent requests while waiting for an event.
74    pub fn wait_for_event(
75        &self,
76        deadline: zx::MonotonicInstant,
77    ) -> Result<StoreEvent, fidl::Error> {
78        StoreEvent::decode(self.client.wait_for_event(deadline)?)
79    }
80
81    /// Writes an item to the store.
82    pub fn r#write_item(
83        &self,
84        mut attempt: &Item,
85        ___deadline: zx::MonotonicInstant,
86    ) -> Result<StoreWriteItemResult, fidl::Error> {
87        let _response = self.client.send_query::<
88            StoreWriteItemRequest,
89            fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, WriteError>,
90        >(
91            (attempt,),
92            0x4dd6bb122b2022e9,
93            fidl::encoding::DynamicFlags::FLEXIBLE,
94            ___deadline,
95        )?
96        .into_result::<StoreMarker>("write_item")?;
97        Ok(_response.map(|x| x))
98    }
99
100    /// Reads an item from the store.
101    pub fn r#read_item(
102        &self,
103        mut key: &str,
104        ___deadline: zx::MonotonicInstant,
105    ) -> Result<StoreReadItemResult, fidl::Error> {
106        let _response = self.client.send_query::<
107            StoreReadItemRequest,
108            fidl::encoding::FlexibleResultType<Item, ReadError>,
109        >(
110            (key,),
111            0x67a246d566d1139c,
112            fidl::encoding::DynamicFlags::FLEXIBLE,
113            ___deadline,
114        )?
115        .into_result::<StoreMarker>("read_item")?;
116        Ok(_response.map(|x| (x.key, x.value)))
117    }
118}
119
120#[derive(Debug, Clone)]
121pub struct StoreProxy {
122    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
123}
124
125impl fidl::endpoints::Proxy for StoreProxy {
126    type Protocol = StoreMarker;
127
128    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
129        Self::new(inner)
130    }
131
132    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
133        self.client.into_channel().map_err(|client| Self { client })
134    }
135
136    fn as_channel(&self) -> &::fidl::AsyncChannel {
137        self.client.as_channel()
138    }
139}
140
141impl StoreProxy {
142    /// Create a new Proxy for examples.keyvaluestore.addreaditem/Store.
143    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
144        let protocol_name = <StoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
145        Self { client: fidl::client::Client::new(channel, protocol_name) }
146    }
147
148    /// Get a Stream of events from the remote end of the protocol.
149    ///
150    /// # Panics
151    ///
152    /// Panics if the event stream was already taken.
153    pub fn take_event_stream(&self) -> StoreEventStream {
154        StoreEventStream { event_receiver: self.client.take_event_receiver() }
155    }
156
157    /// Writes an item to the store.
158    pub fn r#write_item(
159        &self,
160        mut attempt: &Item,
161    ) -> fidl::client::QueryResponseFut<
162        StoreWriteItemResult,
163        fidl::encoding::DefaultFuchsiaResourceDialect,
164    > {
165        StoreProxyInterface::r#write_item(self, attempt)
166    }
167
168    /// Reads an item from the store.
169    pub fn r#read_item(
170        &self,
171        mut key: &str,
172    ) -> fidl::client::QueryResponseFut<
173        StoreReadItemResult,
174        fidl::encoding::DefaultFuchsiaResourceDialect,
175    > {
176        StoreProxyInterface::r#read_item(self, key)
177    }
178}
179
180impl StoreProxyInterface for StoreProxy {
181    type WriteItemResponseFut = fidl::client::QueryResponseFut<
182        StoreWriteItemResult,
183        fidl::encoding::DefaultFuchsiaResourceDialect,
184    >;
185    fn r#write_item(&self, mut attempt: &Item) -> Self::WriteItemResponseFut {
186        fn _decode(
187            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
188        ) -> Result<StoreWriteItemResult, fidl::Error> {
189            let _response = fidl::client::decode_transaction_body::<
190                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, WriteError>,
191                fidl::encoding::DefaultFuchsiaResourceDialect,
192                0x4dd6bb122b2022e9,
193            >(_buf?)?
194            .into_result::<StoreMarker>("write_item")?;
195            Ok(_response.map(|x| x))
196        }
197        self.client.send_query_and_decode::<StoreWriteItemRequest, StoreWriteItemResult>(
198            (attempt,),
199            0x4dd6bb122b2022e9,
200            fidl::encoding::DynamicFlags::FLEXIBLE,
201            _decode,
202        )
203    }
204
205    type ReadItemResponseFut = fidl::client::QueryResponseFut<
206        StoreReadItemResult,
207        fidl::encoding::DefaultFuchsiaResourceDialect,
208    >;
209    fn r#read_item(&self, mut key: &str) -> Self::ReadItemResponseFut {
210        fn _decode(
211            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
212        ) -> Result<StoreReadItemResult, fidl::Error> {
213            let _response = fidl::client::decode_transaction_body::<
214                fidl::encoding::FlexibleResultType<Item, ReadError>,
215                fidl::encoding::DefaultFuchsiaResourceDialect,
216                0x67a246d566d1139c,
217            >(_buf?)?
218            .into_result::<StoreMarker>("read_item")?;
219            Ok(_response.map(|x| (x.key, x.value)))
220        }
221        self.client.send_query_and_decode::<StoreReadItemRequest, StoreReadItemResult>(
222            (key,),
223            0x67a246d566d1139c,
224            fidl::encoding::DynamicFlags::FLEXIBLE,
225            _decode,
226        )
227    }
228}
229
230pub struct StoreEventStream {
231    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
232}
233
234impl std::marker::Unpin for StoreEventStream {}
235
236impl futures::stream::FusedStream for StoreEventStream {
237    fn is_terminated(&self) -> bool {
238        self.event_receiver.is_terminated()
239    }
240}
241
242impl futures::Stream for StoreEventStream {
243    type Item = Result<StoreEvent, fidl::Error>;
244
245    fn poll_next(
246        mut self: std::pin::Pin<&mut Self>,
247        cx: &mut std::task::Context<'_>,
248    ) -> std::task::Poll<Option<Self::Item>> {
249        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
250            &mut self.event_receiver,
251            cx
252        )?) {
253            Some(buf) => std::task::Poll::Ready(Some(StoreEvent::decode(buf))),
254            None => std::task::Poll::Ready(None),
255        }
256    }
257}
258
259#[derive(Debug)]
260pub enum StoreEvent {
261    #[non_exhaustive]
262    _UnknownEvent {
263        /// Ordinal of the event that was sent.
264        ordinal: u64,
265    },
266}
267
268impl StoreEvent {
269    /// Decodes a message buffer as a [`StoreEvent`].
270    fn decode(
271        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
272    ) -> Result<StoreEvent, fidl::Error> {
273        let (bytes, _handles) = buf.split_mut();
274        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
275        debug_assert_eq!(tx_header.tx_id, 0);
276        match tx_header.ordinal {
277            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
278                Ok(StoreEvent::_UnknownEvent { ordinal: tx_header.ordinal })
279            }
280            _ => Err(fidl::Error::UnknownOrdinal {
281                ordinal: tx_header.ordinal,
282                protocol_name: <StoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
283            }),
284        }
285    }
286}
287
288/// A Stream of incoming requests for examples.keyvaluestore.addreaditem/Store.
289pub struct StoreRequestStream {
290    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
291    is_terminated: bool,
292}
293
294impl std::marker::Unpin for StoreRequestStream {}
295
296impl futures::stream::FusedStream for StoreRequestStream {
297    fn is_terminated(&self) -> bool {
298        self.is_terminated
299    }
300}
301
302impl fidl::endpoints::RequestStream for StoreRequestStream {
303    type Protocol = StoreMarker;
304    type ControlHandle = StoreControlHandle;
305
306    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
307        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
308    }
309
310    fn control_handle(&self) -> Self::ControlHandle {
311        StoreControlHandle { inner: self.inner.clone() }
312    }
313
314    fn into_inner(
315        self,
316    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
317    {
318        (self.inner, self.is_terminated)
319    }
320
321    fn from_inner(
322        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
323        is_terminated: bool,
324    ) -> Self {
325        Self { inner, is_terminated }
326    }
327}
328
329impl futures::Stream for StoreRequestStream {
330    type Item = Result<StoreRequest, fidl::Error>;
331
332    fn poll_next(
333        mut self: std::pin::Pin<&mut Self>,
334        cx: &mut std::task::Context<'_>,
335    ) -> std::task::Poll<Option<Self::Item>> {
336        let this = &mut *self;
337        if this.inner.check_shutdown(cx) {
338            this.is_terminated = true;
339            return std::task::Poll::Ready(None);
340        }
341        if this.is_terminated {
342            panic!("polled StoreRequestStream after completion");
343        }
344        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
345            |bytes, handles| {
346                match this.inner.channel().read_etc(cx, bytes, handles) {
347                    std::task::Poll::Ready(Ok(())) => {}
348                    std::task::Poll::Pending => return std::task::Poll::Pending,
349                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
350                        this.is_terminated = true;
351                        return std::task::Poll::Ready(None);
352                    }
353                    std::task::Poll::Ready(Err(e)) => {
354                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
355                            e.into(),
356                        ))))
357                    }
358                }
359
360                // A message has been received from the channel
361                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
362
363                std::task::Poll::Ready(Some(match header.ordinal {
364                    0x4dd6bb122b2022e9 => {
365                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
366                        let mut req = fidl::new_empty!(
367                            StoreWriteItemRequest,
368                            fidl::encoding::DefaultFuchsiaResourceDialect
369                        );
370                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<StoreWriteItemRequest>(&header, _body_bytes, handles, &mut req)?;
371                        let control_handle = StoreControlHandle { inner: this.inner.clone() };
372                        Ok(StoreRequest::WriteItem {
373                            attempt: req.attempt,
374
375                            responder: StoreWriteItemResponder {
376                                control_handle: std::mem::ManuallyDrop::new(control_handle),
377                                tx_id: header.tx_id,
378                            },
379                        })
380                    }
381                    0x67a246d566d1139c => {
382                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
383                        let mut req = fidl::new_empty!(
384                            StoreReadItemRequest,
385                            fidl::encoding::DefaultFuchsiaResourceDialect
386                        );
387                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<StoreReadItemRequest>(&header, _body_bytes, handles, &mut req)?;
388                        let control_handle = StoreControlHandle { inner: this.inner.clone() };
389                        Ok(StoreRequest::ReadItem {
390                            key: req.key,
391
392                            responder: StoreReadItemResponder {
393                                control_handle: std::mem::ManuallyDrop::new(control_handle),
394                                tx_id: header.tx_id,
395                            },
396                        })
397                    }
398                    _ if header.tx_id == 0
399                        && header
400                            .dynamic_flags()
401                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
402                    {
403                        Ok(StoreRequest::_UnknownMethod {
404                            ordinal: header.ordinal,
405                            control_handle: StoreControlHandle { inner: this.inner.clone() },
406                            method_type: fidl::MethodType::OneWay,
407                        })
408                    }
409                    _ if header
410                        .dynamic_flags()
411                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
412                    {
413                        this.inner.send_framework_err(
414                            fidl::encoding::FrameworkErr::UnknownMethod,
415                            header.tx_id,
416                            header.ordinal,
417                            header.dynamic_flags(),
418                            (bytes, handles),
419                        )?;
420                        Ok(StoreRequest::_UnknownMethod {
421                            ordinal: header.ordinal,
422                            control_handle: StoreControlHandle { inner: this.inner.clone() },
423                            method_type: fidl::MethodType::TwoWay,
424                        })
425                    }
426                    _ => Err(fidl::Error::UnknownOrdinal {
427                        ordinal: header.ordinal,
428                        protocol_name: <StoreMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
429                    }),
430                }))
431            },
432        )
433    }
434}
435
436/// A very basic key-value store - so basic, in fact, that one may only write to it, never read!
437#[derive(Debug)]
438pub enum StoreRequest {
439    /// Writes an item to the store.
440    WriteItem { attempt: Item, responder: StoreWriteItemResponder },
441    /// Reads an item from the store.
442    ReadItem { key: String, responder: StoreReadItemResponder },
443    /// An interaction was received which does not match any known method.
444    #[non_exhaustive]
445    _UnknownMethod {
446        /// Ordinal of the method that was called.
447        ordinal: u64,
448        control_handle: StoreControlHandle,
449        method_type: fidl::MethodType,
450    },
451}
452
453impl StoreRequest {
454    #[allow(irrefutable_let_patterns)]
455    pub fn into_write_item(self) -> Option<(Item, StoreWriteItemResponder)> {
456        if let StoreRequest::WriteItem { attempt, responder } = self {
457            Some((attempt, responder))
458        } else {
459            None
460        }
461    }
462
463    #[allow(irrefutable_let_patterns)]
464    pub fn into_read_item(self) -> Option<(String, StoreReadItemResponder)> {
465        if let StoreRequest::ReadItem { key, responder } = self {
466            Some((key, responder))
467        } else {
468            None
469        }
470    }
471
472    /// Name of the method defined in FIDL
473    pub fn method_name(&self) -> &'static str {
474        match *self {
475            StoreRequest::WriteItem { .. } => "write_item",
476            StoreRequest::ReadItem { .. } => "read_item",
477            StoreRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
478                "unknown one-way method"
479            }
480            StoreRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
481                "unknown two-way method"
482            }
483        }
484    }
485}
486
487#[derive(Debug, Clone)]
488pub struct StoreControlHandle {
489    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
490}
491
492impl fidl::endpoints::ControlHandle for StoreControlHandle {
493    fn shutdown(&self) {
494        self.inner.shutdown()
495    }
496    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
497        self.inner.shutdown_with_epitaph(status)
498    }
499
500    fn is_closed(&self) -> bool {
501        self.inner.channel().is_closed()
502    }
503    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
504        self.inner.channel().on_closed()
505    }
506
507    #[cfg(target_os = "fuchsia")]
508    fn signal_peer(
509        &self,
510        clear_mask: zx::Signals,
511        set_mask: zx::Signals,
512    ) -> Result<(), zx_status::Status> {
513        use fidl::Peered;
514        self.inner.channel().signal_peer(clear_mask, set_mask)
515    }
516}
517
518impl StoreControlHandle {}
519
520#[must_use = "FIDL methods require a response to be sent"]
521#[derive(Debug)]
522pub struct StoreWriteItemResponder {
523    control_handle: std::mem::ManuallyDrop<StoreControlHandle>,
524    tx_id: u32,
525}
526
527/// Set the the channel to be shutdown (see [`StoreControlHandle::shutdown`])
528/// if the responder is dropped without sending a response, so that the client
529/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
530impl std::ops::Drop for StoreWriteItemResponder {
531    fn drop(&mut self) {
532        self.control_handle.shutdown();
533        // Safety: drops once, never accessed again
534        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
535    }
536}
537
538impl fidl::endpoints::Responder for StoreWriteItemResponder {
539    type ControlHandle = StoreControlHandle;
540
541    fn control_handle(&self) -> &StoreControlHandle {
542        &self.control_handle
543    }
544
545    fn drop_without_shutdown(mut self) {
546        // Safety: drops once, never accessed again due to mem::forget
547        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
548        // Prevent Drop from running (which would shut down the channel)
549        std::mem::forget(self);
550    }
551}
552
553impl StoreWriteItemResponder {
554    /// Sends a response to the FIDL transaction.
555    ///
556    /// Sets the channel to shutdown if an error occurs.
557    pub fn send(self, mut result: Result<(), WriteError>) -> Result<(), fidl::Error> {
558        let _result = self.send_raw(result);
559        if _result.is_err() {
560            self.control_handle.shutdown();
561        }
562        self.drop_without_shutdown();
563        _result
564    }
565
566    /// Similar to "send" but does not shutdown the channel if an error occurs.
567    pub fn send_no_shutdown_on_err(
568        self,
569        mut result: Result<(), WriteError>,
570    ) -> Result<(), fidl::Error> {
571        let _result = self.send_raw(result);
572        self.drop_without_shutdown();
573        _result
574    }
575
576    fn send_raw(&self, mut result: Result<(), WriteError>) -> Result<(), fidl::Error> {
577        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
578            fidl::encoding::EmptyStruct,
579            WriteError,
580        >>(
581            fidl::encoding::FlexibleResult::new(result),
582            self.tx_id,
583            0x4dd6bb122b2022e9,
584            fidl::encoding::DynamicFlags::FLEXIBLE,
585        )
586    }
587}
588
589#[must_use = "FIDL methods require a response to be sent"]
590#[derive(Debug)]
591pub struct StoreReadItemResponder {
592    control_handle: std::mem::ManuallyDrop<StoreControlHandle>,
593    tx_id: u32,
594}
595
596/// Set the the channel to be shutdown (see [`StoreControlHandle::shutdown`])
597/// if the responder is dropped without sending a response, so that the client
598/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
599impl std::ops::Drop for StoreReadItemResponder {
600    fn drop(&mut self) {
601        self.control_handle.shutdown();
602        // Safety: drops once, never accessed again
603        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
604    }
605}
606
607impl fidl::endpoints::Responder for StoreReadItemResponder {
608    type ControlHandle = StoreControlHandle;
609
610    fn control_handle(&self) -> &StoreControlHandle {
611        &self.control_handle
612    }
613
614    fn drop_without_shutdown(mut self) {
615        // Safety: drops once, never accessed again due to mem::forget
616        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
617        // Prevent Drop from running (which would shut down the channel)
618        std::mem::forget(self);
619    }
620}
621
622impl StoreReadItemResponder {
623    /// Sends a response to the FIDL transaction.
624    ///
625    /// Sets the channel to shutdown if an error occurs.
626    pub fn send(self, mut result: Result<(&str, &[u8]), ReadError>) -> Result<(), fidl::Error> {
627        let _result = self.send_raw(result);
628        if _result.is_err() {
629            self.control_handle.shutdown();
630        }
631        self.drop_without_shutdown();
632        _result
633    }
634
635    /// Similar to "send" but does not shutdown the channel if an error occurs.
636    pub fn send_no_shutdown_on_err(
637        self,
638        mut result: Result<(&str, &[u8]), ReadError>,
639    ) -> Result<(), fidl::Error> {
640        let _result = self.send_raw(result);
641        self.drop_without_shutdown();
642        _result
643    }
644
645    fn send_raw(&self, mut result: Result<(&str, &[u8]), ReadError>) -> Result<(), fidl::Error> {
646        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<Item, ReadError>>(
647            fidl::encoding::FlexibleResult::new(result),
648            self.tx_id,
649            0x67a246d566d1139c,
650            fidl::encoding::DynamicFlags::FLEXIBLE,
651        )
652    }
653}
654
655mod internal {
656    use super::*;
657}