#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use bitflags::bitflags;
use fidl::client::QueryResponseFut;
use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
use fidl::endpoints::{ControlHandle as _, Responder as _};
use futures::future::{self, MaybeDone, TryFutureExt};
use zx_status;
pub const CLIENT_SUITE_VERSION: u64 = 1;
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum FidlErrorKind {
OtherError = 1,
DecodingError = 2,
ChannelPeerClosed = 3,
UnknownMethod = 4,
UnexpectedMessage = 5,
}
impl FidlErrorKind {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::OtherError),
2 => Some(Self::DecodingError),
3 => Some(Self::ChannelPeerClosed),
4 => Some(Self::UnknownMethod),
5 => Some(Self::UnexpectedMessage),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum IoStyle {
Sync = 1,
Async = 2,
}
impl IoStyle {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::Sync),
2 => Some(Self::Async),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum Test {
Setup,
TwoWayNoPayload,
TwoWayStructPayload,
TwoWayTablePayload,
TwoWayUnionPayload,
TwoWayResultWithPayload,
TwoWayResultWithError,
TwoWayStructRequest,
TwoWayTableRequest,
TwoWayUnionRequest,
OneWayNoRequest,
OneWayStructRequest,
OneWayTableRequest,
OneWayUnionRequest,
ReceiveEventNoPayload,
ReceiveEventStructPayload,
ReceiveEventTablePayload,
ReceiveEventUnionPayload,
GracefulFailureDuringCallAfterPeerClose,
ReceiveEventBadMagicNumber,
ReceiveEventUnexpectedTxid,
ReceiveEventUnknownOrdinal,
ReceiveResponseBadMagicNumber,
ReceiveResponseUnexpectedTxid,
ReceiveResponseWrongOrdinalKnown,
ReceiveResponseWrongOrdinalUnknown,
V1TwoWayNoPayload,
V1TwoWayStructPayload,
OneWayCallDoNotReportPeerClosed,
OneWayStrictSend,
OneWayFlexibleSend,
TwoWayStrictSend,
TwoWayStrictSendMismatchedStrictness,
TwoWayStrictSendNonEmptyPayload,
TwoWayStrictErrorSyntaxSendSuccessResponse,
TwoWayStrictErrorSyntaxSendErrorResponse,
TwoWayStrictErrorSyntaxSendUnknownMethodResponse,
TwoWayStrictErrorSyntaxSendMismatchedStrictnessUnknownMethodResponse,
TwoWayStrictErrorSyntaxSendNonEmptyPayload,
TwoWayFlexibleSendSuccessResponse,
TwoWayFlexibleSendErrorResponse,
TwoWayFlexibleSendUnknownMethodResponse,
TwoWayFlexibleSendMismatchedStrictnessUnknownMethodResponse,
TwoWayFlexibleSendOtherFrameworkErrResponse,
TwoWayFlexibleSendNonEmptyPayloadSuccessResponse,
TwoWayFlexibleSendNonEmptyPayloadUnknownMethodResponse,
TwoWayFlexibleErrorSyntaxSendSuccessResponse,
TwoWayFlexibleErrorSyntaxSendErrorResponse,
TwoWayFlexibleErrorSyntaxSendUnknownMethodResponse,
TwoWayFlexibleErrorSyntaxSendMismatchedStrictnessUnknownMethodResponse,
TwoWayFlexibleErrorSyntaxSendOtherFrameworkErrResponse,
TwoWayFlexibleErrorSyntaxSendNonEmptyPayloadSuccessResponse,
TwoWayFlexibleErrorSyntaxSendNonEmptyPayloadUnknownMethodResponse,
ReceiveStrictEvent,
ReceiveStrictEventMismatchedStrictness,
ReceiveFlexibleEvent,
ReceiveFlexibleEventMismatchedStrictness,
UnknownStrictEventOpenProtocol,
UnknownFlexibleEventOpenProtocol,
UnknownStrictEventAjarProtocol,
UnknownFlexibleEventAjarProtocol,
UnknownStrictEventClosedProtocol,
UnknownFlexibleEventClosedProtocol,
UnknownStrictServerInitiatedTwoWay,
UnknownFlexibleServerInitiatedTwoWay,
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u32,
},
}
#[macro_export]
macro_rules! TestUnknown {
() => {
_
};
}
impl Test {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::Setup),
2 => Some(Self::TwoWayNoPayload),
42 => Some(Self::TwoWayStructPayload),
43 => Some(Self::TwoWayTablePayload),
44 => Some(Self::TwoWayUnionPayload),
45 => Some(Self::TwoWayResultWithPayload),
46 => Some(Self::TwoWayResultWithError),
52 => Some(Self::TwoWayStructRequest),
53 => Some(Self::TwoWayTableRequest),
54 => Some(Self::TwoWayUnionRequest),
48 => Some(Self::OneWayNoRequest),
49 => Some(Self::OneWayStructRequest),
50 => Some(Self::OneWayTableRequest),
51 => Some(Self::OneWayUnionRequest),
55 => Some(Self::ReceiveEventNoPayload),
56 => Some(Self::ReceiveEventStructPayload),
57 => Some(Self::ReceiveEventTablePayload),
58 => Some(Self::ReceiveEventUnionPayload),
3 => Some(Self::GracefulFailureDuringCallAfterPeerClose),
60 => Some(Self::ReceiveEventBadMagicNumber),
61 => Some(Self::ReceiveEventUnexpectedTxid),
62 => Some(Self::ReceiveEventUnknownOrdinal),
63 => Some(Self::ReceiveResponseBadMagicNumber),
64 => Some(Self::ReceiveResponseUnexpectedTxid),
65 => Some(Self::ReceiveResponseWrongOrdinalKnown),
67 => Some(Self::ReceiveResponseWrongOrdinalUnknown),
40 => Some(Self::V1TwoWayNoPayload),
41 => Some(Self::V1TwoWayStructPayload),
59 => Some(Self::OneWayCallDoNotReportPeerClosed),
4 => Some(Self::OneWayStrictSend),
5 => Some(Self::OneWayFlexibleSend),
6 => Some(Self::TwoWayStrictSend),
7 => Some(Self::TwoWayStrictSendMismatchedStrictness),
38 => Some(Self::TwoWayStrictSendNonEmptyPayload),
8 => Some(Self::TwoWayStrictErrorSyntaxSendSuccessResponse),
9 => Some(Self::TwoWayStrictErrorSyntaxSendErrorResponse),
10 => Some(Self::TwoWayStrictErrorSyntaxSendUnknownMethodResponse),
11 => Some(Self::TwoWayStrictErrorSyntaxSendMismatchedStrictnessUnknownMethodResponse),
39 => Some(Self::TwoWayStrictErrorSyntaxSendNonEmptyPayload),
12 => Some(Self::TwoWayFlexibleSendSuccessResponse),
13 => Some(Self::TwoWayFlexibleSendErrorResponse),
14 => Some(Self::TwoWayFlexibleSendUnknownMethodResponse),
15 => Some(Self::TwoWayFlexibleSendMismatchedStrictnessUnknownMethodResponse),
16 => Some(Self::TwoWayFlexibleSendOtherFrameworkErrResponse),
17 => Some(Self::TwoWayFlexibleSendNonEmptyPayloadSuccessResponse),
18 => Some(Self::TwoWayFlexibleSendNonEmptyPayloadUnknownMethodResponse),
19 => Some(Self::TwoWayFlexibleErrorSyntaxSendSuccessResponse),
20 => Some(Self::TwoWayFlexibleErrorSyntaxSendErrorResponse),
21 => Some(Self::TwoWayFlexibleErrorSyntaxSendUnknownMethodResponse),
22 => {
Some(Self::TwoWayFlexibleErrorSyntaxSendMismatchedStrictnessUnknownMethodResponse)
}
23 => Some(Self::TwoWayFlexibleErrorSyntaxSendOtherFrameworkErrResponse),
24 => Some(Self::TwoWayFlexibleErrorSyntaxSendNonEmptyPayloadSuccessResponse),
25 => Some(Self::TwoWayFlexibleErrorSyntaxSendNonEmptyPayloadUnknownMethodResponse),
26 => Some(Self::ReceiveStrictEvent),
27 => Some(Self::ReceiveStrictEventMismatchedStrictness),
28 => Some(Self::ReceiveFlexibleEvent),
29 => Some(Self::ReceiveFlexibleEventMismatchedStrictness),
30 => Some(Self::UnknownStrictEventOpenProtocol),
31 => Some(Self::UnknownFlexibleEventOpenProtocol),
32 => Some(Self::UnknownStrictEventAjarProtocol),
33 => Some(Self::UnknownFlexibleEventAjarProtocol),
34 => Some(Self::UnknownStrictEventClosedProtocol),
35 => Some(Self::UnknownFlexibleEventClosedProtocol),
36 => Some(Self::UnknownStrictServerInitiatedTwoWay),
37 => Some(Self::UnknownFlexibleServerInitiatedTwoWay),
_ => None,
}
}
#[inline]
pub fn from_primitive_allow_unknown(prim: u32) -> Self {
match prim {
1 => Self::Setup,
2 => Self::TwoWayNoPayload,
42 => Self::TwoWayStructPayload,
43 => Self::TwoWayTablePayload,
44 => Self::TwoWayUnionPayload,
45 => Self::TwoWayResultWithPayload,
46 => Self::TwoWayResultWithError,
52 => Self::TwoWayStructRequest,
53 => Self::TwoWayTableRequest,
54 => Self::TwoWayUnionRequest,
48 => Self::OneWayNoRequest,
49 => Self::OneWayStructRequest,
50 => Self::OneWayTableRequest,
51 => Self::OneWayUnionRequest,
55 => Self::ReceiveEventNoPayload,
56 => Self::ReceiveEventStructPayload,
57 => Self::ReceiveEventTablePayload,
58 => Self::ReceiveEventUnionPayload,
3 => Self::GracefulFailureDuringCallAfterPeerClose,
60 => Self::ReceiveEventBadMagicNumber,
61 => Self::ReceiveEventUnexpectedTxid,
62 => Self::ReceiveEventUnknownOrdinal,
63 => Self::ReceiveResponseBadMagicNumber,
64 => Self::ReceiveResponseUnexpectedTxid,
65 => Self::ReceiveResponseWrongOrdinalKnown,
67 => Self::ReceiveResponseWrongOrdinalUnknown,
40 => Self::V1TwoWayNoPayload,
41 => Self::V1TwoWayStructPayload,
59 => Self::OneWayCallDoNotReportPeerClosed,
4 => Self::OneWayStrictSend,
5 => Self::OneWayFlexibleSend,
6 => Self::TwoWayStrictSend,
7 => Self::TwoWayStrictSendMismatchedStrictness,
38 => Self::TwoWayStrictSendNonEmptyPayload,
8 => Self::TwoWayStrictErrorSyntaxSendSuccessResponse,
9 => Self::TwoWayStrictErrorSyntaxSendErrorResponse,
10 => Self::TwoWayStrictErrorSyntaxSendUnknownMethodResponse,
11 => Self::TwoWayStrictErrorSyntaxSendMismatchedStrictnessUnknownMethodResponse,
39 => Self::TwoWayStrictErrorSyntaxSendNonEmptyPayload,
12 => Self::TwoWayFlexibleSendSuccessResponse,
13 => Self::TwoWayFlexibleSendErrorResponse,
14 => Self::TwoWayFlexibleSendUnknownMethodResponse,
15 => Self::TwoWayFlexibleSendMismatchedStrictnessUnknownMethodResponse,
16 => Self::TwoWayFlexibleSendOtherFrameworkErrResponse,
17 => Self::TwoWayFlexibleSendNonEmptyPayloadSuccessResponse,
18 => Self::TwoWayFlexibleSendNonEmptyPayloadUnknownMethodResponse,
19 => Self::TwoWayFlexibleErrorSyntaxSendSuccessResponse,
20 => Self::TwoWayFlexibleErrorSyntaxSendErrorResponse,
21 => Self::TwoWayFlexibleErrorSyntaxSendUnknownMethodResponse,
22 => Self::TwoWayFlexibleErrorSyntaxSendMismatchedStrictnessUnknownMethodResponse,
23 => Self::TwoWayFlexibleErrorSyntaxSendOtherFrameworkErrResponse,
24 => Self::TwoWayFlexibleErrorSyntaxSendNonEmptyPayloadSuccessResponse,
25 => Self::TwoWayFlexibleErrorSyntaxSendNonEmptyPayloadUnknownMethodResponse,
26 => Self::ReceiveStrictEvent,
27 => Self::ReceiveStrictEventMismatchedStrictness,
28 => Self::ReceiveFlexibleEvent,
29 => Self::ReceiveFlexibleEventMismatchedStrictness,
30 => Self::UnknownStrictEventOpenProtocol,
31 => Self::UnknownFlexibleEventOpenProtocol,
32 => Self::UnknownStrictEventAjarProtocol,
33 => Self::UnknownFlexibleEventAjarProtocol,
34 => Self::UnknownStrictEventClosedProtocol,
35 => Self::UnknownFlexibleEventClosedProtocol,
36 => Self::UnknownStrictServerInitiatedTwoWay,
37 => Self::UnknownFlexibleServerInitiatedTwoWay,
unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
}
}
#[inline]
pub fn unknown() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
}
#[inline]
pub const fn into_primitive(self) -> u32 {
match self {
Self::Setup => 1,
Self::TwoWayNoPayload => 2,
Self::TwoWayStructPayload => 42,
Self::TwoWayTablePayload => 43,
Self::TwoWayUnionPayload => 44,
Self::TwoWayResultWithPayload => 45,
Self::TwoWayResultWithError => 46,
Self::TwoWayStructRequest => 52,
Self::TwoWayTableRequest => 53,
Self::TwoWayUnionRequest => 54,
Self::OneWayNoRequest => 48,
Self::OneWayStructRequest => 49,
Self::OneWayTableRequest => 50,
Self::OneWayUnionRequest => 51,
Self::ReceiveEventNoPayload => 55,
Self::ReceiveEventStructPayload => 56,
Self::ReceiveEventTablePayload => 57,
Self::ReceiveEventUnionPayload => 58,
Self::GracefulFailureDuringCallAfterPeerClose => 3,
Self::ReceiveEventBadMagicNumber => 60,
Self::ReceiveEventUnexpectedTxid => 61,
Self::ReceiveEventUnknownOrdinal => 62,
Self::ReceiveResponseBadMagicNumber => 63,
Self::ReceiveResponseUnexpectedTxid => 64,
Self::ReceiveResponseWrongOrdinalKnown => 65,
Self::ReceiveResponseWrongOrdinalUnknown => 67,
Self::V1TwoWayNoPayload => 40,
Self::V1TwoWayStructPayload => 41,
Self::OneWayCallDoNotReportPeerClosed => 59,
Self::OneWayStrictSend => 4,
Self::OneWayFlexibleSend => 5,
Self::TwoWayStrictSend => 6,
Self::TwoWayStrictSendMismatchedStrictness => 7,
Self::TwoWayStrictSendNonEmptyPayload => 38,
Self::TwoWayStrictErrorSyntaxSendSuccessResponse => 8,
Self::TwoWayStrictErrorSyntaxSendErrorResponse => 9,
Self::TwoWayStrictErrorSyntaxSendUnknownMethodResponse => 10,
Self::TwoWayStrictErrorSyntaxSendMismatchedStrictnessUnknownMethodResponse => 11,
Self::TwoWayStrictErrorSyntaxSendNonEmptyPayload => 39,
Self::TwoWayFlexibleSendSuccessResponse => 12,
Self::TwoWayFlexibleSendErrorResponse => 13,
Self::TwoWayFlexibleSendUnknownMethodResponse => 14,
Self::TwoWayFlexibleSendMismatchedStrictnessUnknownMethodResponse => 15,
Self::TwoWayFlexibleSendOtherFrameworkErrResponse => 16,
Self::TwoWayFlexibleSendNonEmptyPayloadSuccessResponse => 17,
Self::TwoWayFlexibleSendNonEmptyPayloadUnknownMethodResponse => 18,
Self::TwoWayFlexibleErrorSyntaxSendSuccessResponse => 19,
Self::TwoWayFlexibleErrorSyntaxSendErrorResponse => 20,
Self::TwoWayFlexibleErrorSyntaxSendUnknownMethodResponse => 21,
Self::TwoWayFlexibleErrorSyntaxSendMismatchedStrictnessUnknownMethodResponse => 22,
Self::TwoWayFlexibleErrorSyntaxSendOtherFrameworkErrResponse => 23,
Self::TwoWayFlexibleErrorSyntaxSendNonEmptyPayloadSuccessResponse => 24,
Self::TwoWayFlexibleErrorSyntaxSendNonEmptyPayloadUnknownMethodResponse => 25,
Self::ReceiveStrictEvent => 26,
Self::ReceiveStrictEventMismatchedStrictness => 27,
Self::ReceiveFlexibleEvent => 28,
Self::ReceiveFlexibleEventMismatchedStrictness => 29,
Self::UnknownStrictEventOpenProtocol => 30,
Self::UnknownFlexibleEventOpenProtocol => 31,
Self::UnknownStrictEventAjarProtocol => 32,
Self::UnknownFlexibleEventAjarProtocol => 33,
Self::UnknownStrictEventClosedProtocol => 34,
Self::UnknownFlexibleEventClosedProtocol => 35,
Self::UnknownStrictServerInitiatedTwoWay => 36,
Self::UnknownFlexibleServerInitiatedTwoWay => 37,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { unknown_ordinal: _ } => true,
_ => false,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Empty;
impl fidl::Persistable for Empty {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct NonEmptyPayload {
pub some_field: i32,
}
impl fidl::Persistable for NonEmptyPayload {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallFlexibleOneWayRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallFlexibleOneWayRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallFlexibleTwoWayErrRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallFlexibleTwoWayErrRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallFlexibleTwoWayFieldsErrRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallFlexibleTwoWayFieldsErrRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallFlexibleTwoWayFieldsRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallFlexibleTwoWayFieldsRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallFlexibleTwoWayRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallFlexibleTwoWayRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallOneWayNoRequestRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallOneWayNoRequestRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallOneWayStructRequestRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
pub request: NonEmptyPayload,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallOneWayStructRequestRequest
{
}
#[derive(Debug, PartialEq)]
pub struct RunnerCallOneWayTableRequestRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
pub request: TablePayload,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallOneWayTableRequestRequest
{
}
#[derive(Debug, PartialEq)]
pub struct RunnerCallOneWayUnionRequestRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
pub request: UnionPayload,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallOneWayUnionRequestRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallStrictOneWayRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallStrictOneWayRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallStrictTwoWayErrRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallStrictTwoWayErrRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallStrictTwoWayFieldsErrRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallStrictTwoWayFieldsErrRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallStrictTwoWayFieldsRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallStrictTwoWayFieldsRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallStrictTwoWayRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallStrictTwoWayRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallTwoWayNoPayloadRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallTwoWayNoPayloadRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallTwoWayStructPayloadErrRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallTwoWayStructPayloadErrRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallTwoWayStructPayloadRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallTwoWayStructPayloadRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallTwoWayStructRequestRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
pub request: NonEmptyPayload,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallTwoWayStructRequestRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallTwoWayTablePayloadRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallTwoWayTablePayloadRequest
{
}
#[derive(Debug, PartialEq)]
pub struct RunnerCallTwoWayTableRequestRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
pub request: TablePayload,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallTwoWayTableRequestRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerCallTwoWayUnionPayloadRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallTwoWayUnionPayloadRequest
{
}
#[derive(Debug, PartialEq)]
pub struct RunnerCallTwoWayUnionRequestRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
pub request: UnionPayload,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerCallTwoWayUnionRequestRequest
{
}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct RunnerGetVersionResponse {
pub version: u64,
}
impl fidl::Persistable for RunnerGetVersionResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerIsTestEnabledRequest {
pub test: Test,
}
impl fidl::Persistable for RunnerIsTestEnabledRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerIsTestEnabledResponse {
pub is_enabled: bool,
}
impl fidl::Persistable for RunnerIsTestEnabledResponse {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerReceiveAjarEventsRequest {
pub target: fidl::endpoints::ClientEnd<AjarTargetMarker>,
pub reporter: fidl::endpoints::ClientEnd<AjarTargetEventReporterMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerReceiveAjarEventsRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerReceiveClosedEventsRequest {
pub target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
pub reporter: fidl::endpoints::ClientEnd<ClosedTargetEventReporterMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerReceiveClosedEventsRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RunnerReceiveOpenEventsRequest {
pub target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
pub reporter: fidl::endpoints::ClientEnd<OpenTargetEventReporterMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for RunnerReceiveOpenEventsRequest
{
}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct UnknownEvent {
pub ordinal: u64,
}
impl fidl::Persistable for UnknownEvent {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct BindingsProperties {
pub io_style: Option<IoStyle>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for BindingsProperties {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct TablePayload {
pub some_field: Option<i32>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for TablePayload {}
#[derive(Clone, Debug)]
pub enum AjarTargetEventReport {
FidlError(FidlErrorKind),
UnknownEvent(UnknownEvent),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! AjarTargetEventReportUnknown {
() => {
_
};
}
impl PartialEq for AjarTargetEventReport {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
(Self::UnknownEvent(x), Self::UnknownEvent(y)) => *x == *y,
_ => false,
}
}
}
impl AjarTargetEventReport {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::FidlError(_) => 1,
Self::UnknownEvent(_) => 2,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for AjarTargetEventReport {}
#[derive(Clone, Debug)]
pub enum ClosedTargetEventReport {
FidlError(FidlErrorKind),
OnEventNoPayload(Empty),
OnEventStructPayload(NonEmptyPayload),
OnEventTablePayload(TablePayload),
OnEventUnionPayload(UnionPayload),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! ClosedTargetEventReportUnknown {
() => {
_
};
}
impl PartialEq for ClosedTargetEventReport {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
(Self::OnEventNoPayload(x), Self::OnEventNoPayload(y)) => *x == *y,
(Self::OnEventStructPayload(x), Self::OnEventStructPayload(y)) => *x == *y,
(Self::OnEventTablePayload(x), Self::OnEventTablePayload(y)) => *x == *y,
(Self::OnEventUnionPayload(x), Self::OnEventUnionPayload(y)) => *x == *y,
_ => false,
}
}
}
impl ClosedTargetEventReport {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::FidlError(_) => 1,
Self::OnEventNoPayload(_) => 2,
Self::OnEventStructPayload(_) => 3,
Self::OnEventTablePayload(_) => 4,
Self::OnEventUnionPayload(_) => 5,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for ClosedTargetEventReport {}
#[derive(Clone, Debug)]
pub enum EmptyResultClassification {
Success(Empty),
FidlError(FidlErrorKind),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! EmptyResultClassificationUnknown {
() => {
_
};
}
impl PartialEq for EmptyResultClassification {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Success(x), Self::Success(y)) => *x == *y,
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
_ => false,
}
}
}
impl EmptyResultClassification {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Success(_) => 1,
Self::FidlError(_) => 3,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for EmptyResultClassification {}
#[derive(Clone, Debug)]
pub enum EmptyResultWithErrorClassification {
Success(Empty),
ApplicationError(i32),
FidlError(FidlErrorKind),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! EmptyResultWithErrorClassificationUnknown {
() => {
_
};
}
impl PartialEq for EmptyResultWithErrorClassification {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Success(x), Self::Success(y)) => *x == *y,
(Self::ApplicationError(x), Self::ApplicationError(y)) => *x == *y,
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
_ => false,
}
}
}
impl EmptyResultWithErrorClassification {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Success(_) => 1,
Self::ApplicationError(_) => 2,
Self::FidlError(_) => 3,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for EmptyResultWithErrorClassification {}
#[derive(Clone, Debug)]
pub enum NonEmptyResultClassification {
Success(NonEmptyPayload),
FidlError(FidlErrorKind),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! NonEmptyResultClassificationUnknown {
() => {
_
};
}
impl PartialEq for NonEmptyResultClassification {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Success(x), Self::Success(y)) => *x == *y,
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
_ => false,
}
}
}
impl NonEmptyResultClassification {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Success(_) => 1,
Self::FidlError(_) => 3,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for NonEmptyResultClassification {}
#[derive(Clone, Debug)]
pub enum NonEmptyResultWithErrorClassification {
Success(NonEmptyPayload),
ApplicationError(i32),
FidlError(FidlErrorKind),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! NonEmptyResultWithErrorClassificationUnknown {
() => {
_
};
}
impl PartialEq for NonEmptyResultWithErrorClassification {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Success(x), Self::Success(y)) => *x == *y,
(Self::ApplicationError(x), Self::ApplicationError(y)) => *x == *y,
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
_ => false,
}
}
}
impl NonEmptyResultWithErrorClassification {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Success(_) => 1,
Self::ApplicationError(_) => 2,
Self::FidlError(_) => 3,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for NonEmptyResultWithErrorClassification {}
#[derive(Clone, Debug)]
pub enum OpenTargetEventReport {
FidlError(FidlErrorKind),
UnknownEvent(UnknownEvent),
StrictEvent(Empty),
FlexibleEvent(Empty),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! OpenTargetEventReportUnknown {
() => {
_
};
}
impl PartialEq for OpenTargetEventReport {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
(Self::UnknownEvent(x), Self::UnknownEvent(y)) => *x == *y,
(Self::StrictEvent(x), Self::StrictEvent(y)) => *x == *y,
(Self::FlexibleEvent(x), Self::FlexibleEvent(y)) => *x == *y,
_ => false,
}
}
}
impl OpenTargetEventReport {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::FidlError(_) => 1,
Self::UnknownEvent(_) => 2,
Self::StrictEvent(_) => 3,
Self::FlexibleEvent(_) => 4,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for OpenTargetEventReport {}
#[derive(Clone, Debug)]
pub enum TableResultClassification {
Success(TablePayload),
FidlError(FidlErrorKind),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! TableResultClassificationUnknown {
() => {
_
};
}
impl PartialEq for TableResultClassification {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Success(x), Self::Success(y)) => *x == *y,
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
_ => false,
}
}
}
impl TableResultClassification {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Success(_) => 1,
Self::FidlError(_) => 3,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for TableResultClassification {}
#[derive(Clone, Debug)]
pub enum UnionPayload {
SomeVariant(i32),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! UnionPayloadUnknown {
() => {
_
};
}
impl PartialEq for UnionPayload {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::SomeVariant(x), Self::SomeVariant(y)) => *x == *y,
_ => false,
}
}
}
impl UnionPayload {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::SomeVariant(_) => 1,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for UnionPayload {}
#[derive(Clone, Debug)]
pub enum UnionResultClassification {
Success(UnionPayload),
FidlError(FidlErrorKind),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! UnionResultClassificationUnknown {
() => {
_
};
}
impl PartialEq for UnionResultClassification {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Success(x), Self::Success(y)) => *x == *y,
(Self::FidlError(x), Self::FidlError(y)) => *x == *y,
_ => false,
}
}
}
impl UnionResultClassification {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Success(_) => 1,
Self::FidlError(_) => 3,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for UnionResultClassification {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct AjarTargetMarker;
impl fidl::endpoints::ProtocolMarker for AjarTargetMarker {
type Proxy = AjarTargetProxy;
type RequestStream = AjarTargetRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = AjarTargetSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) AjarTarget";
}
pub trait AjarTargetProxyInterface: Send + Sync {}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct AjarTargetSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for AjarTargetSynchronousProxy {
type Proxy = AjarTargetProxy;
type Protocol = AjarTargetMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl AjarTargetSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<AjarTargetEvent, fidl::Error> {
AjarTargetEvent::decode(self.client.wait_for_event(deadline)?)
}
}
#[derive(Debug, Clone)]
pub struct AjarTargetProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for AjarTargetProxy {
type Protocol = AjarTargetMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl AjarTargetProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> AjarTargetEventStream {
AjarTargetEventStream { event_receiver: self.client.take_event_receiver() }
}
}
impl AjarTargetProxyInterface for AjarTargetProxy {}
pub struct AjarTargetEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for AjarTargetEventStream {}
impl futures::stream::FusedStream for AjarTargetEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for AjarTargetEventStream {
type Item = Result<AjarTargetEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(AjarTargetEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum AjarTargetEvent {
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl AjarTargetEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<AjarTargetEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
Ok(AjarTargetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct AjarTargetRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for AjarTargetRequestStream {}
impl futures::stream::FusedStream for AjarTargetRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for AjarTargetRequestStream {
type Protocol = AjarTargetMarker;
type ControlHandle = AjarTargetControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
AjarTargetControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for AjarTargetRequestStream {
type Item = Result<AjarTargetRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled AjarTargetRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
_ if header.tx_id == 0
&& header
.dynamic_flags()
.contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
{
Ok(AjarTargetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: AjarTargetControlHandle { inner: this.inner.clone() },
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum AjarTargetRequest {
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: AjarTargetControlHandle,
},
}
impl AjarTargetRequest {
pub fn method_name(&self) -> &'static str {
match *self {
AjarTargetRequest::_UnknownMethod { .. } => "unknown one-way method",
}
}
}
#[derive(Debug, Clone)]
pub struct AjarTargetControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for AjarTargetControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl AjarTargetControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct AjarTargetEventReporterMarker;
impl fidl::endpoints::ProtocolMarker for AjarTargetEventReporterMarker {
type Proxy = AjarTargetEventReporterProxy;
type RequestStream = AjarTargetEventReporterRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = AjarTargetEventReporterSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) AjarTargetEventReporter";
}
pub trait AjarTargetEventReporterProxyInterface: Send + Sync {
fn r#report_event(&self, payload: &AjarTargetEventReport) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct AjarTargetEventReporterSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for AjarTargetEventReporterSynchronousProxy {
type Proxy = AjarTargetEventReporterProxy;
type Protocol = AjarTargetEventReporterMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl AjarTargetEventReporterSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<AjarTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<AjarTargetEventReporterEvent, fidl::Error> {
AjarTargetEventReporterEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#report_event(&self, mut payload: &AjarTargetEventReport) -> Result<(), fidl::Error> {
self.client.send::<AjarTargetEventReport>(
payload,
0x477b93390be99238,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct AjarTargetEventReporterProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for AjarTargetEventReporterProxy {
type Protocol = AjarTargetEventReporterMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl AjarTargetEventReporterProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<AjarTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> AjarTargetEventReporterEventStream {
AjarTargetEventReporterEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#report_event(&self, mut payload: &AjarTargetEventReport) -> Result<(), fidl::Error> {
AjarTargetEventReporterProxyInterface::r#report_event(self, payload)
}
}
impl AjarTargetEventReporterProxyInterface for AjarTargetEventReporterProxy {
fn r#report_event(&self, mut payload: &AjarTargetEventReport) -> Result<(), fidl::Error> {
self.client.send::<AjarTargetEventReport>(
payload,
0x477b93390be99238,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct AjarTargetEventReporterEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for AjarTargetEventReporterEventStream {}
impl futures::stream::FusedStream for AjarTargetEventReporterEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for AjarTargetEventReporterEventStream {
type Item = Result<AjarTargetEventReporterEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(AjarTargetEventReporterEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum AjarTargetEventReporterEvent {}
impl AjarTargetEventReporterEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<AjarTargetEventReporterEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name:
<AjarTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct AjarTargetEventReporterRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for AjarTargetEventReporterRequestStream {}
impl futures::stream::FusedStream for AjarTargetEventReporterRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for AjarTargetEventReporterRequestStream {
type Protocol = AjarTargetEventReporterMarker;
type ControlHandle = AjarTargetEventReporterControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
AjarTargetEventReporterControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for AjarTargetEventReporterRequestStream {
type Item = Result<AjarTargetEventReporterRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled AjarTargetEventReporterRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x477b93390be99238 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(AjarTargetEventReport, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AjarTargetEventReport>(&header, _body_bytes, handles, &mut req)?;
let control_handle = AjarTargetEventReporterControlHandle {
inner: this.inner.clone(),
};
Ok(AjarTargetEventReporterRequest::ReportEvent {payload: req,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <AjarTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum AjarTargetEventReporterRequest {
ReportEvent {
payload: AjarTargetEventReport,
control_handle: AjarTargetEventReporterControlHandle,
},
}
impl AjarTargetEventReporterRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_report_event(
self,
) -> Option<(AjarTargetEventReport, AjarTargetEventReporterControlHandle)> {
if let AjarTargetEventReporterRequest::ReportEvent { payload, control_handle } = self {
Some((payload, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
AjarTargetEventReporterRequest::ReportEvent { .. } => "report_event",
}
}
}
#[derive(Debug, Clone)]
pub struct AjarTargetEventReporterControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for AjarTargetEventReporterControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl AjarTargetEventReporterControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ClosedTargetMarker;
impl fidl::endpoints::ProtocolMarker for ClosedTargetMarker {
type Proxy = ClosedTargetProxy;
type RequestStream = ClosedTargetRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = ClosedTargetSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) ClosedTarget";
}
pub type ClosedTargetTwoWayStructPayloadErrResult = Result<i32, i32>;
pub trait ClosedTargetProxyInterface: Send + Sync {
type TwoWayNoPayloadResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#two_way_no_payload(&self) -> Self::TwoWayNoPayloadResponseFut;
type TwoWayStructPayloadResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
+ Send;
fn r#two_way_struct_payload(&self) -> Self::TwoWayStructPayloadResponseFut;
type TwoWayTablePayloadResponseFut: std::future::Future<Output = Result<TablePayload, fidl::Error>>
+ Send;
fn r#two_way_table_payload(&self) -> Self::TwoWayTablePayloadResponseFut;
type TwoWayUnionPayloadResponseFut: std::future::Future<Output = Result<UnionPayload, fidl::Error>>
+ Send;
fn r#two_way_union_payload(&self) -> Self::TwoWayUnionPayloadResponseFut;
type TwoWayStructPayloadErrResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayStructPayloadErrResult, fidl::Error>>
+ Send;
fn r#two_way_struct_payload_err(&self) -> Self::TwoWayStructPayloadErrResponseFut;
type TwoWayStructRequestResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
+ Send;
fn r#two_way_struct_request(&self, some_field: i32) -> Self::TwoWayStructRequestResponseFut;
type TwoWayTableRequestResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#two_way_table_request(
&self,
payload: &TablePayload,
) -> Self::TwoWayTableRequestResponseFut;
type TwoWayUnionRequestResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#two_way_union_request(
&self,
payload: &UnionPayload,
) -> Self::TwoWayUnionRequestResponseFut;
fn r#one_way_no_request(&self) -> Result<(), fidl::Error>;
fn r#one_way_struct_request(&self, some_field: i32) -> Result<(), fidl::Error>;
fn r#one_way_table_request(&self, payload: &TablePayload) -> Result<(), fidl::Error>;
fn r#one_way_union_request(&self, payload: &UnionPayload) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct ClosedTargetSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for ClosedTargetSynchronousProxy {
type Proxy = ClosedTargetProxy;
type Protocol = ClosedTargetMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl ClosedTargetSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<ClosedTargetEvent, fidl::Error> {
ClosedTargetEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#two_way_no_payload(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
(),
0x7a722961424c1720,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#two_way_struct_payload(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<i32, fidl::Error> {
let _response = self.client.send_query::<fidl::encoding::EmptyPayload, NonEmptyPayload>(
(),
0x3a402118bad781bd,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.some_field)
}
pub fn r#two_way_table_payload(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<TablePayload, fidl::Error> {
let _response = self.client.send_query::<fidl::encoding::EmptyPayload, TablePayload>(
(),
0x53be101c241c66bc,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#two_way_union_payload(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<UnionPayload, fidl::Error> {
let _response = self.client.send_query::<fidl::encoding::EmptyPayload, UnionPayload>(
(),
0x1ff7f745ab608f8c,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#two_way_struct_payload_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<ClosedTargetTwoWayStructPayloadErrResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<NonEmptyPayload, i32>,
>(
(),
0x62b4861c443bbc0b,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.some_field))
}
pub fn r#two_way_struct_request(
&self,
mut some_field: i32,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<NonEmptyPayload, fidl::encoding::EmptyPayload>(
(some_field,),
0x4ff77b4a913be5b6,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#two_way_table_request(
&self,
mut payload: &TablePayload,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<TablePayload, fidl::encoding::EmptyPayload>(
payload,
0x3d38ad5b0f4f49cf,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#two_way_union_request(
&self,
mut payload: &UnionPayload,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<UnionPayload, fidl::encoding::EmptyPayload>(
payload,
0x7adb1c265a378e77,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#one_way_no_request(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0xc376730a2cd8a05,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#one_way_struct_request(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.client.send::<NonEmptyPayload>(
(some_field,),
0x2618da6f51e0dcd2,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#one_way_table_request(&self, mut payload: &TablePayload) -> Result<(), fidl::Error> {
self.client.send::<TablePayload>(
payload,
0x1a4b7d32eaed401f,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#one_way_union_request(&self, mut payload: &UnionPayload) -> Result<(), fidl::Error> {
self.client.send::<UnionPayload>(
payload,
0x142b3cd9ea530de5,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct ClosedTargetProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for ClosedTargetProxy {
type Protocol = ClosedTargetMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl ClosedTargetProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> ClosedTargetEventStream {
ClosedTargetEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#two_way_no_payload(
&self,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
ClosedTargetProxyInterface::r#two_way_no_payload(self)
}
pub fn r#two_way_struct_payload(
&self,
) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
ClosedTargetProxyInterface::r#two_way_struct_payload(self)
}
pub fn r#two_way_table_payload(
&self,
) -> fidl::client::QueryResponseFut<TablePayload, fidl::encoding::DefaultFuchsiaResourceDialect>
{
ClosedTargetProxyInterface::r#two_way_table_payload(self)
}
pub fn r#two_way_union_payload(
&self,
) -> fidl::client::QueryResponseFut<UnionPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
{
ClosedTargetProxyInterface::r#two_way_union_payload(self)
}
pub fn r#two_way_struct_payload_err(
&self,
) -> fidl::client::QueryResponseFut<
ClosedTargetTwoWayStructPayloadErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
ClosedTargetProxyInterface::r#two_way_struct_payload_err(self)
}
pub fn r#two_way_struct_request(
&self,
mut some_field: i32,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
ClosedTargetProxyInterface::r#two_way_struct_request(self, some_field)
}
pub fn r#two_way_table_request(
&self,
mut payload: &TablePayload,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
ClosedTargetProxyInterface::r#two_way_table_request(self, payload)
}
pub fn r#two_way_union_request(
&self,
mut payload: &UnionPayload,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
ClosedTargetProxyInterface::r#two_way_union_request(self, payload)
}
pub fn r#one_way_no_request(&self) -> Result<(), fidl::Error> {
ClosedTargetProxyInterface::r#one_way_no_request(self)
}
pub fn r#one_way_struct_request(&self, mut some_field: i32) -> Result<(), fidl::Error> {
ClosedTargetProxyInterface::r#one_way_struct_request(self, some_field)
}
pub fn r#one_way_table_request(&self, mut payload: &TablePayload) -> Result<(), fidl::Error> {
ClosedTargetProxyInterface::r#one_way_table_request(self, payload)
}
pub fn r#one_way_union_request(&self, mut payload: &UnionPayload) -> Result<(), fidl::Error> {
ClosedTargetProxyInterface::r#one_way_union_request(self, payload)
}
}
impl ClosedTargetProxyInterface for ClosedTargetProxy {
type TwoWayNoPayloadResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#two_way_no_payload(&self) -> Self::TwoWayNoPayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x7a722961424c1720,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x7a722961424c1720,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type TwoWayStructPayloadResponseFut =
fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#two_way_struct_payload(&self) -> Self::TwoWayStructPayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<i32, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
NonEmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x3a402118bad781bd,
>(_buf?)?;
Ok(_response.some_field)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
(),
0x3a402118bad781bd,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type TwoWayTablePayloadResponseFut =
fidl::client::QueryResponseFut<TablePayload, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#two_way_table_payload(&self) -> Self::TwoWayTablePayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<TablePayload, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
TablePayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x53be101c241c66bc,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, TablePayload>(
(),
0x53be101c241c66bc,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type TwoWayUnionPayloadResponseFut =
fidl::client::QueryResponseFut<UnionPayload, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#two_way_union_payload(&self) -> Self::TwoWayUnionPayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<UnionPayload, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
UnionPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x1ff7f745ab608f8c,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, UnionPayload>(
(),
0x1ff7f745ab608f8c,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type TwoWayStructPayloadErrResponseFut = fidl::client::QueryResponseFut<
ClosedTargetTwoWayStructPayloadErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#two_way_struct_payload_err(&self) -> Self::TwoWayStructPayloadErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ClosedTargetTwoWayStructPayloadErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<NonEmptyPayload, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x62b4861c443bbc0b,
>(_buf?)?;
Ok(_response.map(|x| x.some_field))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
ClosedTargetTwoWayStructPayloadErrResult,
>(
(),
0x62b4861c443bbc0b,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type TwoWayStructRequestResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#two_way_struct_request(
&self,
mut some_field: i32,
) -> Self::TwoWayStructRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x4ff77b4a913be5b6,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<NonEmptyPayload, ()>(
(some_field,),
0x4ff77b4a913be5b6,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type TwoWayTableRequestResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#two_way_table_request(
&self,
mut payload: &TablePayload,
) -> Self::TwoWayTableRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x3d38ad5b0f4f49cf,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<TablePayload, ()>(
payload,
0x3d38ad5b0f4f49cf,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type TwoWayUnionRequestResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#two_way_union_request(
&self,
mut payload: &UnionPayload,
) -> Self::TwoWayUnionRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x7adb1c265a378e77,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<UnionPayload, ()>(
payload,
0x7adb1c265a378e77,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
fn r#one_way_no_request(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0xc376730a2cd8a05,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#one_way_struct_request(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.client.send::<NonEmptyPayload>(
(some_field,),
0x2618da6f51e0dcd2,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#one_way_table_request(&self, mut payload: &TablePayload) -> Result<(), fidl::Error> {
self.client.send::<TablePayload>(
payload,
0x1a4b7d32eaed401f,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#one_way_union_request(&self, mut payload: &UnionPayload) -> Result<(), fidl::Error> {
self.client.send::<UnionPayload>(
payload,
0x142b3cd9ea530de5,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct ClosedTargetEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for ClosedTargetEventStream {}
impl futures::stream::FusedStream for ClosedTargetEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for ClosedTargetEventStream {
type Item = Result<ClosedTargetEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(ClosedTargetEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum ClosedTargetEvent {
OnEventNoPayload {},
OnEventStructPayload { some_field: i32 },
OnEventTablePayload { payload: TablePayload },
OnEventUnionPayload { payload: UnionPayload },
}
impl ClosedTargetEvent {
#[allow(irrefutable_let_patterns)]
pub fn into_on_event_no_payload(self) -> Option<()> {
if let ClosedTargetEvent::OnEventNoPayload {} = self {
Some(())
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_event_struct_payload(self) -> Option<i32> {
if let ClosedTargetEvent::OnEventStructPayload { some_field } = self {
Some((some_field))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_event_table_payload(self) -> Option<TablePayload> {
if let ClosedTargetEvent::OnEventTablePayload { payload } = self {
Some((payload))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_event_union_payload(self) -> Option<UnionPayload> {
if let ClosedTargetEvent::OnEventUnionPayload { payload } = self {
Some((payload))
} else {
None
}
}
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<ClosedTargetEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
0x4ee7b8d3e6bb36a6 => {
let mut out = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ClosedTargetEvent::OnEventNoPayload {}))
}
0x48e8c897893ae266 => {
let mut out = fidl::new_empty!(
NonEmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NonEmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ClosedTargetEvent::OnEventStructPayload { some_field: out.some_field }))
}
0x72837525f4f3e746 => {
let mut out =
fidl::new_empty!(TablePayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<TablePayload>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ClosedTargetEvent::OnEventTablePayload { payload: out }))
}
0x69c6390e1ac48ea0 => {
let mut out =
fidl::new_empty!(UnionPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnionPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ClosedTargetEvent::OnEventUnionPayload { payload: out }))
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct ClosedTargetRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for ClosedTargetRequestStream {}
impl futures::stream::FusedStream for ClosedTargetRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for ClosedTargetRequestStream {
type Protocol = ClosedTargetMarker;
type ControlHandle = ClosedTargetControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
ClosedTargetControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for ClosedTargetRequestStream {
type Item = Result<ClosedTargetRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled ClosedTargetRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x7a722961424c1720 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::TwoWayNoPayload {
responder: ClosedTargetTwoWayNoPayloadResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3a402118bad781bd => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::TwoWayStructPayload {
responder: ClosedTargetTwoWayStructPayloadResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x53be101c241c66bc => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::TwoWayTablePayload {
responder: ClosedTargetTwoWayTablePayloadResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x1ff7f745ab608f8c => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::TwoWayUnionPayload {
responder: ClosedTargetTwoWayUnionPayloadResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x62b4861c443bbc0b => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::TwoWayStructPayloadErr {
responder: ClosedTargetTwoWayStructPayloadErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4ff77b4a913be5b6 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
NonEmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NonEmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::TwoWayStructRequest {
some_field: req.some_field,
responder: ClosedTargetTwoWayStructRequestResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3d38ad5b0f4f49cf => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
TablePayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<TablePayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::TwoWayTableRequest {
payload: req,
responder: ClosedTargetTwoWayTableRequestResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7adb1c265a378e77 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
UnionPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnionPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::TwoWayUnionRequest {
payload: req,
responder: ClosedTargetTwoWayUnionRequestResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0xc376730a2cd8a05 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::OneWayNoRequest { control_handle })
}
0x2618da6f51e0dcd2 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
NonEmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NonEmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::OneWayStructRequest {
some_field: req.some_field,
control_handle,
})
}
0x1a4b7d32eaed401f => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
TablePayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<TablePayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::OneWayTableRequest { payload: req, control_handle })
}
0x142b3cd9ea530de5 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
UnionPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnionPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
ClosedTargetControlHandle { inner: this.inner.clone() };
Ok(ClosedTargetRequest::OneWayUnionRequest { payload: req, control_handle })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum ClosedTargetRequest {
TwoWayNoPayload { responder: ClosedTargetTwoWayNoPayloadResponder },
TwoWayStructPayload { responder: ClosedTargetTwoWayStructPayloadResponder },
TwoWayTablePayload { responder: ClosedTargetTwoWayTablePayloadResponder },
TwoWayUnionPayload { responder: ClosedTargetTwoWayUnionPayloadResponder },
TwoWayStructPayloadErr { responder: ClosedTargetTwoWayStructPayloadErrResponder },
TwoWayStructRequest { some_field: i32, responder: ClosedTargetTwoWayStructRequestResponder },
TwoWayTableRequest { payload: TablePayload, responder: ClosedTargetTwoWayTableRequestResponder },
TwoWayUnionRequest { payload: UnionPayload, responder: ClosedTargetTwoWayUnionRequestResponder },
OneWayNoRequest { control_handle: ClosedTargetControlHandle },
OneWayStructRequest { some_field: i32, control_handle: ClosedTargetControlHandle },
OneWayTableRequest { payload: TablePayload, control_handle: ClosedTargetControlHandle },
OneWayUnionRequest { payload: UnionPayload, control_handle: ClosedTargetControlHandle },
}
impl ClosedTargetRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_two_way_no_payload(self) -> Option<(ClosedTargetTwoWayNoPayloadResponder)> {
if let ClosedTargetRequest::TwoWayNoPayload { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_two_way_struct_payload(self) -> Option<(ClosedTargetTwoWayStructPayloadResponder)> {
if let ClosedTargetRequest::TwoWayStructPayload { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_two_way_table_payload(self) -> Option<(ClosedTargetTwoWayTablePayloadResponder)> {
if let ClosedTargetRequest::TwoWayTablePayload { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_two_way_union_payload(self) -> Option<(ClosedTargetTwoWayUnionPayloadResponder)> {
if let ClosedTargetRequest::TwoWayUnionPayload { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_two_way_struct_payload_err(
self,
) -> Option<(ClosedTargetTwoWayStructPayloadErrResponder)> {
if let ClosedTargetRequest::TwoWayStructPayloadErr { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_two_way_struct_request(
self,
) -> Option<(i32, ClosedTargetTwoWayStructRequestResponder)> {
if let ClosedTargetRequest::TwoWayStructRequest { some_field, responder } = self {
Some((some_field, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_two_way_table_request(
self,
) -> Option<(TablePayload, ClosedTargetTwoWayTableRequestResponder)> {
if let ClosedTargetRequest::TwoWayTableRequest { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_two_way_union_request(
self,
) -> Option<(UnionPayload, ClosedTargetTwoWayUnionRequestResponder)> {
if let ClosedTargetRequest::TwoWayUnionRequest { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_one_way_no_request(self) -> Option<(ClosedTargetControlHandle)> {
if let ClosedTargetRequest::OneWayNoRequest { control_handle } = self {
Some((control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_one_way_struct_request(self) -> Option<(i32, ClosedTargetControlHandle)> {
if let ClosedTargetRequest::OneWayStructRequest { some_field, control_handle } = self {
Some((some_field, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_one_way_table_request(self) -> Option<(TablePayload, ClosedTargetControlHandle)> {
if let ClosedTargetRequest::OneWayTableRequest { payload, control_handle } = self {
Some((payload, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_one_way_union_request(self) -> Option<(UnionPayload, ClosedTargetControlHandle)> {
if let ClosedTargetRequest::OneWayUnionRequest { payload, control_handle } = self {
Some((payload, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
ClosedTargetRequest::TwoWayNoPayload { .. } => "two_way_no_payload",
ClosedTargetRequest::TwoWayStructPayload { .. } => "two_way_struct_payload",
ClosedTargetRequest::TwoWayTablePayload { .. } => "two_way_table_payload",
ClosedTargetRequest::TwoWayUnionPayload { .. } => "two_way_union_payload",
ClosedTargetRequest::TwoWayStructPayloadErr { .. } => "two_way_struct_payload_err",
ClosedTargetRequest::TwoWayStructRequest { .. } => "two_way_struct_request",
ClosedTargetRequest::TwoWayTableRequest { .. } => "two_way_table_request",
ClosedTargetRequest::TwoWayUnionRequest { .. } => "two_way_union_request",
ClosedTargetRequest::OneWayNoRequest { .. } => "one_way_no_request",
ClosedTargetRequest::OneWayStructRequest { .. } => "one_way_struct_request",
ClosedTargetRequest::OneWayTableRequest { .. } => "one_way_table_request",
ClosedTargetRequest::OneWayUnionRequest { .. } => "one_way_union_request",
}
}
}
#[derive(Debug, Clone)]
pub struct ClosedTargetControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for ClosedTargetControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl ClosedTargetControlHandle {
pub fn send_on_event_no_payload(&self) -> Result<(), fidl::Error> {
self.inner.send::<fidl::encoding::EmptyPayload>(
(),
0,
0x4ee7b8d3e6bb36a6,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_event_struct_payload(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.inner.send::<NonEmptyPayload>(
(some_field,),
0,
0x48e8c897893ae266,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_event_table_payload(
&self,
mut payload: &TablePayload,
) -> Result<(), fidl::Error> {
self.inner.send::<TablePayload>(
payload,
0,
0x72837525f4f3e746,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_event_union_payload(
&self,
mut payload: &UnionPayload,
) -> Result<(), fidl::Error> {
self.inner.send::<UnionPayload>(
payload,
0,
0x69c6390e1ac48ea0,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClosedTargetTwoWayNoPayloadResponder {
control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClosedTargetTwoWayNoPayloadResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClosedTargetTwoWayNoPayloadResponder {
type ControlHandle = ClosedTargetControlHandle;
fn control_handle(&self) -> &ClosedTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClosedTargetTwoWayNoPayloadResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0x7a722961424c1720,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClosedTargetTwoWayStructPayloadResponder {
control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClosedTargetTwoWayStructPayloadResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClosedTargetTwoWayStructPayloadResponder {
type ControlHandle = ClosedTargetControlHandle;
fn control_handle(&self) -> &ClosedTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClosedTargetTwoWayStructPayloadResponder {
pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<NonEmptyPayload>(
(some_field,),
self.tx_id,
0x3a402118bad781bd,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClosedTargetTwoWayTablePayloadResponder {
control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClosedTargetTwoWayTablePayloadResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClosedTargetTwoWayTablePayloadResponder {
type ControlHandle = ClosedTargetControlHandle;
fn control_handle(&self) -> &ClosedTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClosedTargetTwoWayTablePayloadResponder {
pub fn send(self, mut payload: &TablePayload) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut payload: &TablePayload) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut payload: &TablePayload) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<TablePayload>(
payload,
self.tx_id,
0x53be101c241c66bc,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClosedTargetTwoWayUnionPayloadResponder {
control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClosedTargetTwoWayUnionPayloadResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClosedTargetTwoWayUnionPayloadResponder {
type ControlHandle = ClosedTargetControlHandle;
fn control_handle(&self) -> &ClosedTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClosedTargetTwoWayUnionPayloadResponder {
pub fn send(self, mut payload: &UnionPayload) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut payload: &UnionPayload) -> Result<(), fidl::Error> {
let _result = self.send_raw(payload);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut payload: &UnionPayload) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<UnionPayload>(
payload,
self.tx_id,
0x1ff7f745ab608f8c,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClosedTargetTwoWayStructPayloadErrResponder {
control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClosedTargetTwoWayStructPayloadErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClosedTargetTwoWayStructPayloadErrResponder {
type ControlHandle = ClosedTargetControlHandle;
fn control_handle(&self) -> &ClosedTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClosedTargetTwoWayStructPayloadErrResponder {
pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<NonEmptyPayload, i32>>(
result.map(|some_field| (some_field,)),
self.tx_id,
0x62b4861c443bbc0b,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClosedTargetTwoWayStructRequestResponder {
control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClosedTargetTwoWayStructRequestResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClosedTargetTwoWayStructRequestResponder {
type ControlHandle = ClosedTargetControlHandle;
fn control_handle(&self) -> &ClosedTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClosedTargetTwoWayStructRequestResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0x4ff77b4a913be5b6,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClosedTargetTwoWayTableRequestResponder {
control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClosedTargetTwoWayTableRequestResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClosedTargetTwoWayTableRequestResponder {
type ControlHandle = ClosedTargetControlHandle;
fn control_handle(&self) -> &ClosedTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClosedTargetTwoWayTableRequestResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0x3d38ad5b0f4f49cf,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClosedTargetTwoWayUnionRequestResponder {
control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClosedTargetTwoWayUnionRequestResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClosedTargetTwoWayUnionRequestResponder {
type ControlHandle = ClosedTargetControlHandle;
fn control_handle(&self) -> &ClosedTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClosedTargetTwoWayUnionRequestResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0x7adb1c265a378e77,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ClosedTargetEventReporterMarker;
impl fidl::endpoints::ProtocolMarker for ClosedTargetEventReporterMarker {
type Proxy = ClosedTargetEventReporterProxy;
type RequestStream = ClosedTargetEventReporterRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = ClosedTargetEventReporterSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) ClosedTargetEventReporter";
}
pub trait ClosedTargetEventReporterProxyInterface: Send + Sync {
fn r#report_event(&self, payload: &ClosedTargetEventReport) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct ClosedTargetEventReporterSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for ClosedTargetEventReporterSynchronousProxy {
type Proxy = ClosedTargetEventReporterProxy;
type Protocol = ClosedTargetEventReporterMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl ClosedTargetEventReporterSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<ClosedTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<ClosedTargetEventReporterEvent, fidl::Error> {
ClosedTargetEventReporterEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#report_event(&self, mut payload: &ClosedTargetEventReport) -> Result<(), fidl::Error> {
self.client.send::<ClosedTargetEventReport>(
payload,
0x63890e67649a846e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct ClosedTargetEventReporterProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for ClosedTargetEventReporterProxy {
type Protocol = ClosedTargetEventReporterMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl ClosedTargetEventReporterProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<ClosedTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> ClosedTargetEventReporterEventStream {
ClosedTargetEventReporterEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#report_event(&self, mut payload: &ClosedTargetEventReport) -> Result<(), fidl::Error> {
ClosedTargetEventReporterProxyInterface::r#report_event(self, payload)
}
}
impl ClosedTargetEventReporterProxyInterface for ClosedTargetEventReporterProxy {
fn r#report_event(&self, mut payload: &ClosedTargetEventReport) -> Result<(), fidl::Error> {
self.client.send::<ClosedTargetEventReport>(
payload,
0x63890e67649a846e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct ClosedTargetEventReporterEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for ClosedTargetEventReporterEventStream {}
impl futures::stream::FusedStream for ClosedTargetEventReporterEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for ClosedTargetEventReporterEventStream {
type Item = Result<ClosedTargetEventReporterEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(ClosedTargetEventReporterEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum ClosedTargetEventReporterEvent {}
impl ClosedTargetEventReporterEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<ClosedTargetEventReporterEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name:
<ClosedTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct ClosedTargetEventReporterRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for ClosedTargetEventReporterRequestStream {}
impl futures::stream::FusedStream for ClosedTargetEventReporterRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for ClosedTargetEventReporterRequestStream {
type Protocol = ClosedTargetEventReporterMarker;
type ControlHandle = ClosedTargetEventReporterControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
ClosedTargetEventReporterControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for ClosedTargetEventReporterRequestStream {
type Item = Result<ClosedTargetEventReporterRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled ClosedTargetEventReporterRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x63890e67649a846e => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(ClosedTargetEventReport, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetEventReport>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ClosedTargetEventReporterControlHandle {
inner: this.inner.clone(),
};
Ok(ClosedTargetEventReporterRequest::ReportEvent {payload: req,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <ClosedTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum ClosedTargetEventReporterRequest {
ReportEvent {
payload: ClosedTargetEventReport,
control_handle: ClosedTargetEventReporterControlHandle,
},
}
impl ClosedTargetEventReporterRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_report_event(
self,
) -> Option<(ClosedTargetEventReport, ClosedTargetEventReporterControlHandle)> {
if let ClosedTargetEventReporterRequest::ReportEvent { payload, control_handle } = self {
Some((payload, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
ClosedTargetEventReporterRequest::ReportEvent { .. } => "report_event",
}
}
}
#[derive(Debug, Clone)]
pub struct ClosedTargetEventReporterControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for ClosedTargetEventReporterControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl ClosedTargetEventReporterControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct OpenTargetMarker;
impl fidl::endpoints::ProtocolMarker for OpenTargetMarker {
type Proxy = OpenTargetProxy;
type RequestStream = OpenTargetRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = OpenTargetSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) OpenTarget";
}
pub type OpenTargetStrictTwoWayErrResult = Result<(), i32>;
pub type OpenTargetStrictTwoWayFieldsErrResult = Result<i32, i32>;
pub type OpenTargetFlexibleTwoWayErrResult = Result<(), i32>;
pub type OpenTargetFlexibleTwoWayFieldsErrResult = Result<i32, i32>;
pub trait OpenTargetProxyInterface: Send + Sync {
fn r#strict_one_way(&self) -> Result<(), fidl::Error>;
fn r#flexible_one_way(&self) -> Result<(), fidl::Error>;
type StrictTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut;
type StrictTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
+ Send;
fn r#strict_two_way_fields(&self) -> Self::StrictTwoWayFieldsResponseFut;
type StrictTwoWayErrResponseFut: std::future::Future<Output = Result<OpenTargetStrictTwoWayErrResult, fidl::Error>>
+ Send;
fn r#strict_two_way_err(&self) -> Self::StrictTwoWayErrResponseFut;
type StrictTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error>>
+ Send;
fn r#strict_two_way_fields_err(&self) -> Self::StrictTwoWayFieldsErrResponseFut;
type FlexibleTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut;
type FlexibleTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
+ Send;
fn r#flexible_two_way_fields(&self) -> Self::FlexibleTwoWayFieldsResponseFut;
type FlexibleTwoWayErrResponseFut: std::future::Future<Output = Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error>>
+ Send;
fn r#flexible_two_way_err(&self) -> Self::FlexibleTwoWayErrResponseFut;
type FlexibleTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error>>
+ Send;
fn r#flexible_two_way_fields_err(&self) -> Self::FlexibleTwoWayFieldsErrResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct OpenTargetSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for OpenTargetSynchronousProxy {
type Proxy = OpenTargetProxy;
type Protocol = OpenTargetMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl OpenTargetSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<OpenTargetEvent, fidl::Error> {
OpenTargetEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0x6db0bc21c4aae764,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0xf894a7eb9cc29fc,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
pub fn r#strict_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
(),
0xdcf4cef19a1c542,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#strict_two_way_fields(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<i32, fidl::Error> {
let _response = self.client.send_query::<fidl::encoding::EmptyPayload, NonEmptyPayload>(
(),
0x79c7a7803c45e2e3,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.some_field)
}
pub fn r#strict_two_way_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<OpenTargetStrictTwoWayErrResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(),
0x54259ed6c262fe88,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#strict_two_way_fields_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<NonEmptyPayload, i32>,
>(
(),
0x7dbaa8538b552711,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.some_field))
}
pub fn r#flexible_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
>(
(),
0x66552e68b99a0587,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<OpenTargetMarker>("flexible_two_way")?;
Ok(_response)
}
pub fn r#flexible_two_way_fields(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<i32, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleType<NonEmptyPayload>,
>(
(),
0x38b95648ac4e2ae4,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<OpenTargetMarker>("flexible_two_way_fields")?;
Ok(_response.some_field)
}
pub fn r#flexible_two_way_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
>(
(),
0x6e144c6e0cf2147a,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<OpenTargetMarker>("flexible_two_way_err")?;
Ok(_response.map(|x| x))
}
pub fn r#flexible_two_way_fields_err(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::FlexibleResultType<NonEmptyPayload, i32>,
>(
(),
0xe494147cda8024a,
fidl::encoding::DynamicFlags::FLEXIBLE,
___deadline,
)?
.into_result::<OpenTargetMarker>("flexible_two_way_fields_err")?;
Ok(_response.map(|x| x.some_field))
}
}
#[derive(Debug, Clone)]
pub struct OpenTargetProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for OpenTargetProxy {
type Protocol = OpenTargetMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl OpenTargetProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> OpenTargetEventStream {
OpenTargetEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
OpenTargetProxyInterface::r#strict_one_way(self)
}
pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
OpenTargetProxyInterface::r#flexible_one_way(self)
}
pub fn r#strict_two_way(
&self,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
OpenTargetProxyInterface::r#strict_two_way(self)
}
pub fn r#strict_two_way_fields(
&self,
) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
OpenTargetProxyInterface::r#strict_two_way_fields(self)
}
pub fn r#strict_two_way_err(
&self,
) -> fidl::client::QueryResponseFut<
OpenTargetStrictTwoWayErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
OpenTargetProxyInterface::r#strict_two_way_err(self)
}
pub fn r#strict_two_way_fields_err(
&self,
) -> fidl::client::QueryResponseFut<
OpenTargetStrictTwoWayFieldsErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
OpenTargetProxyInterface::r#strict_two_way_fields_err(self)
}
pub fn r#flexible_two_way(
&self,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
OpenTargetProxyInterface::r#flexible_two_way(self)
}
pub fn r#flexible_two_way_fields(
&self,
) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
OpenTargetProxyInterface::r#flexible_two_way_fields(self)
}
pub fn r#flexible_two_way_err(
&self,
) -> fidl::client::QueryResponseFut<
OpenTargetFlexibleTwoWayErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
OpenTargetProxyInterface::r#flexible_two_way_err(self)
}
pub fn r#flexible_two_way_fields_err(
&self,
) -> fidl::client::QueryResponseFut<
OpenTargetFlexibleTwoWayFieldsErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
OpenTargetProxyInterface::r#flexible_two_way_fields_err(self)
}
}
impl OpenTargetProxyInterface for OpenTargetProxy {
fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0x6db0bc21c4aae764,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0xf894a7eb9cc29fc,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
type StrictTwoWayResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0xdcf4cef19a1c542,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0xdcf4cef19a1c542,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StrictTwoWayFieldsResponseFut =
fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#strict_two_way_fields(&self) -> Self::StrictTwoWayFieldsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<i32, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
NonEmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x79c7a7803c45e2e3,
>(_buf?)?;
Ok(_response.some_field)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
(),
0x79c7a7803c45e2e3,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StrictTwoWayErrResponseFut = fidl::client::QueryResponseFut<
OpenTargetStrictTwoWayErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#strict_two_way_err(&self) -> Self::StrictTwoWayErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<OpenTargetStrictTwoWayErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x54259ed6c262fe88,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, OpenTargetStrictTwoWayErrResult>(
(),
0x54259ed6c262fe88,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StrictTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
OpenTargetStrictTwoWayFieldsErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#strict_two_way_fields_err(&self) -> Self::StrictTwoWayFieldsErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<NonEmptyPayload, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x7dbaa8538b552711,
>(_buf?)?;
Ok(_response.map(|x| x.some_field))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
OpenTargetStrictTwoWayFieldsErrResult,
>(
(),
0x7dbaa8538b552711,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type FlexibleTwoWayResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x66552e68b99a0587,
>(_buf?)?
.into_result::<OpenTargetMarker>("flexible_two_way")?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x66552e68b99a0587,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type FlexibleTwoWayFieldsResponseFut =
fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#flexible_two_way_fields(&self) -> Self::FlexibleTwoWayFieldsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<i32, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleType<NonEmptyPayload>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x38b95648ac4e2ae4,
>(_buf?)?
.into_result::<OpenTargetMarker>("flexible_two_way_fields")?;
Ok(_response.some_field)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
(),
0x38b95648ac4e2ae4,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type FlexibleTwoWayErrResponseFut = fidl::client::QueryResponseFut<
OpenTargetFlexibleTwoWayErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#flexible_two_way_err(&self) -> Self::FlexibleTwoWayErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x6e144c6e0cf2147a,
>(_buf?)?
.into_result::<OpenTargetMarker>("flexible_two_way_err")?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
OpenTargetFlexibleTwoWayErrResult,
>(
(),
0x6e144c6e0cf2147a,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
type FlexibleTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
OpenTargetFlexibleTwoWayFieldsErrResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#flexible_two_way_fields_err(&self) -> Self::FlexibleTwoWayFieldsErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::FlexibleResultType<NonEmptyPayload, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0xe494147cda8024a,
>(_buf?)?
.into_result::<OpenTargetMarker>("flexible_two_way_fields_err")?;
Ok(_response.map(|x| x.some_field))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
OpenTargetFlexibleTwoWayFieldsErrResult,
>(
(),
0xe494147cda8024a,
fidl::encoding::DynamicFlags::FLEXIBLE,
_decode,
)
}
}
pub struct OpenTargetEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for OpenTargetEventStream {}
impl futures::stream::FusedStream for OpenTargetEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for OpenTargetEventStream {
type Item = Result<OpenTargetEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(OpenTargetEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum OpenTargetEvent {
StrictEvent {},
FlexibleEvent {},
#[non_exhaustive]
_UnknownEvent {
ordinal: u64,
},
}
impl OpenTargetEvent {
#[allow(irrefutable_let_patterns)]
pub fn into_strict_event(self) -> Option<()> {
if let OpenTargetEvent::StrictEvent {} = self {
Some(())
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_event(self) -> Option<()> {
if let OpenTargetEvent::FlexibleEvent {} = self {
Some(())
} else {
None
}
}
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<OpenTargetEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
0x2b291d74321e77a0 => {
let mut out = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((OpenTargetEvent::StrictEvent {}))
}
0x50d4688058898898 => {
let mut out = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((OpenTargetEvent::FlexibleEvent {}))
}
_ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
Ok(OpenTargetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct OpenTargetRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for OpenTargetRequestStream {}
impl futures::stream::FusedStream for OpenTargetRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for OpenTargetRequestStream {
type Protocol = OpenTargetMarker;
type ControlHandle = OpenTargetControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
OpenTargetControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for OpenTargetRequestStream {
type Item = Result<OpenTargetRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled OpenTargetRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x6db0bc21c4aae764 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::StrictOneWay { control_handle })
}
0xf894a7eb9cc29fc => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::FlexibleOneWay { control_handle })
}
0xdcf4cef19a1c542 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::StrictTwoWay {
responder: OpenTargetStrictTwoWayResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x79c7a7803c45e2e3 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::StrictTwoWayFields {
responder: OpenTargetStrictTwoWayFieldsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x54259ed6c262fe88 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::StrictTwoWayErr {
responder: OpenTargetStrictTwoWayErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7dbaa8538b552711 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::StrictTwoWayFieldsErr {
responder: OpenTargetStrictTwoWayFieldsErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x66552e68b99a0587 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::FlexibleTwoWay {
responder: OpenTargetFlexibleTwoWayResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x38b95648ac4e2ae4 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::FlexibleTwoWayFields {
responder: OpenTargetFlexibleTwoWayFieldsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x6e144c6e0cf2147a => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::FlexibleTwoWayErr {
responder: OpenTargetFlexibleTwoWayErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0xe494147cda8024a => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
Ok(OpenTargetRequest::FlexibleTwoWayFieldsErr {
responder: OpenTargetFlexibleTwoWayFieldsErrResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ if header.tx_id == 0
&& header
.dynamic_flags()
.contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
{
Ok(OpenTargetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: OpenTargetControlHandle { inner: this.inner.clone() },
method_type: fidl::MethodType::OneWay,
})
}
_ if header
.dynamic_flags()
.contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
{
this.inner.send_framework_err(
fidl::encoding::FrameworkErr::UnknownMethod,
header.tx_id,
header.ordinal,
header.dynamic_flags(),
(bytes, handles),
)?;
Ok(OpenTargetRequest::_UnknownMethod {
ordinal: header.ordinal,
control_handle: OpenTargetControlHandle { inner: this.inner.clone() },
method_type: fidl::MethodType::TwoWay,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum OpenTargetRequest {
StrictOneWay {
control_handle: OpenTargetControlHandle,
},
FlexibleOneWay {
control_handle: OpenTargetControlHandle,
},
StrictTwoWay {
responder: OpenTargetStrictTwoWayResponder,
},
StrictTwoWayFields {
responder: OpenTargetStrictTwoWayFieldsResponder,
},
StrictTwoWayErr {
responder: OpenTargetStrictTwoWayErrResponder,
},
StrictTwoWayFieldsErr {
responder: OpenTargetStrictTwoWayFieldsErrResponder,
},
FlexibleTwoWay {
responder: OpenTargetFlexibleTwoWayResponder,
},
FlexibleTwoWayFields {
responder: OpenTargetFlexibleTwoWayFieldsResponder,
},
FlexibleTwoWayErr {
responder: OpenTargetFlexibleTwoWayErrResponder,
},
FlexibleTwoWayFieldsErr {
responder: OpenTargetFlexibleTwoWayFieldsErrResponder,
},
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: OpenTargetControlHandle,
method_type: fidl::MethodType,
},
}
impl OpenTargetRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_strict_one_way(self) -> Option<(OpenTargetControlHandle)> {
if let OpenTargetRequest::StrictOneWay { control_handle } = self {
Some((control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_one_way(self) -> Option<(OpenTargetControlHandle)> {
if let OpenTargetRequest::FlexibleOneWay { control_handle } = self {
Some((control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_two_way(self) -> Option<(OpenTargetStrictTwoWayResponder)> {
if let OpenTargetRequest::StrictTwoWay { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_two_way_fields(self) -> Option<(OpenTargetStrictTwoWayFieldsResponder)> {
if let OpenTargetRequest::StrictTwoWayFields { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_two_way_err(self) -> Option<(OpenTargetStrictTwoWayErrResponder)> {
if let OpenTargetRequest::StrictTwoWayErr { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_strict_two_way_fields_err(
self,
) -> Option<(OpenTargetStrictTwoWayFieldsErrResponder)> {
if let OpenTargetRequest::StrictTwoWayFieldsErr { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_two_way(self) -> Option<(OpenTargetFlexibleTwoWayResponder)> {
if let OpenTargetRequest::FlexibleTwoWay { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_two_way_fields(self) -> Option<(OpenTargetFlexibleTwoWayFieldsResponder)> {
if let OpenTargetRequest::FlexibleTwoWayFields { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_two_way_err(self) -> Option<(OpenTargetFlexibleTwoWayErrResponder)> {
if let OpenTargetRequest::FlexibleTwoWayErr { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_flexible_two_way_fields_err(
self,
) -> Option<(OpenTargetFlexibleTwoWayFieldsErrResponder)> {
if let OpenTargetRequest::FlexibleTwoWayFieldsErr { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
OpenTargetRequest::StrictOneWay { .. } => "strict_one_way",
OpenTargetRequest::FlexibleOneWay { .. } => "flexible_one_way",
OpenTargetRequest::StrictTwoWay { .. } => "strict_two_way",
OpenTargetRequest::StrictTwoWayFields { .. } => "strict_two_way_fields",
OpenTargetRequest::StrictTwoWayErr { .. } => "strict_two_way_err",
OpenTargetRequest::StrictTwoWayFieldsErr { .. } => "strict_two_way_fields_err",
OpenTargetRequest::FlexibleTwoWay { .. } => "flexible_two_way",
OpenTargetRequest::FlexibleTwoWayFields { .. } => "flexible_two_way_fields",
OpenTargetRequest::FlexibleTwoWayErr { .. } => "flexible_two_way_err",
OpenTargetRequest::FlexibleTwoWayFieldsErr { .. } => "flexible_two_way_fields_err",
OpenTargetRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
"unknown one-way method"
}
OpenTargetRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
"unknown two-way method"
}
}
}
}
#[derive(Debug, Clone)]
pub struct OpenTargetControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for OpenTargetControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl OpenTargetControlHandle {
pub fn send_strict_event(&self) -> Result<(), fidl::Error> {
self.inner.send::<fidl::encoding::EmptyPayload>(
(),
0,
0x2b291d74321e77a0,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_flexible_event(&self) -> Result<(), fidl::Error> {
self.inner.send::<fidl::encoding::EmptyPayload>(
(),
0,
0x50d4688058898898,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct OpenTargetStrictTwoWayResponder {
control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for OpenTargetStrictTwoWayResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for OpenTargetStrictTwoWayResponder {
type ControlHandle = OpenTargetControlHandle;
fn control_handle(&self) -> &OpenTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl OpenTargetStrictTwoWayResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0xdcf4cef19a1c542,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct OpenTargetStrictTwoWayFieldsResponder {
control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for OpenTargetStrictTwoWayFieldsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for OpenTargetStrictTwoWayFieldsResponder {
type ControlHandle = OpenTargetControlHandle;
fn control_handle(&self) -> &OpenTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl OpenTargetStrictTwoWayFieldsResponder {
pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<NonEmptyPayload>(
(some_field,),
self.tx_id,
0x79c7a7803c45e2e3,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct OpenTargetStrictTwoWayErrResponder {
control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for OpenTargetStrictTwoWayErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for OpenTargetStrictTwoWayErrResponder {
type ControlHandle = OpenTargetControlHandle;
fn control_handle(&self) -> &OpenTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl OpenTargetStrictTwoWayErrResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x54259ed6c262fe88,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct OpenTargetStrictTwoWayFieldsErrResponder {
control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for OpenTargetStrictTwoWayFieldsErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for OpenTargetStrictTwoWayFieldsErrResponder {
type ControlHandle = OpenTargetControlHandle;
fn control_handle(&self) -> &OpenTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl OpenTargetStrictTwoWayFieldsErrResponder {
pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<NonEmptyPayload, i32>>(
result.map(|some_field| (some_field,)),
self.tx_id,
0x7dbaa8538b552711,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct OpenTargetFlexibleTwoWayResponder {
control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for OpenTargetFlexibleTwoWayResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayResponder {
type ControlHandle = OpenTargetControlHandle;
fn control_handle(&self) -> &OpenTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl OpenTargetFlexibleTwoWayResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>>(
fidl::encoding::Flexible::new(()),
self.tx_id,
0x66552e68b99a0587,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct OpenTargetFlexibleTwoWayFieldsResponder {
control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for OpenTargetFlexibleTwoWayFieldsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayFieldsResponder {
type ControlHandle = OpenTargetControlHandle;
fn control_handle(&self) -> &OpenTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl OpenTargetFlexibleTwoWayFieldsResponder {
pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
let _result = self.send_raw(some_field);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleType<NonEmptyPayload>>(
fidl::encoding::Flexible::new((some_field,)),
self.tx_id,
0x38b95648ac4e2ae4,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct OpenTargetFlexibleTwoWayErrResponder {
control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for OpenTargetFlexibleTwoWayErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayErrResponder {
type ControlHandle = OpenTargetControlHandle;
fn control_handle(&self) -> &OpenTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl OpenTargetFlexibleTwoWayErrResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
fidl::encoding::EmptyStruct,
i32,
>>(
fidl::encoding::FlexibleResult::new(result),
self.tx_id,
0x6e144c6e0cf2147a,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct OpenTargetFlexibleTwoWayFieldsErrResponder {
control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for OpenTargetFlexibleTwoWayFieldsErrResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayFieldsErrResponder {
type ControlHandle = OpenTargetControlHandle;
fn control_handle(&self) -> &OpenTargetControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl OpenTargetFlexibleTwoWayFieldsErrResponder {
pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<NonEmptyPayload, i32>>(
fidl::encoding::FlexibleResult::new(result.map(|some_field| (some_field,))),
self.tx_id,
0xe494147cda8024a,
fidl::encoding::DynamicFlags::FLEXIBLE,
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct OpenTargetEventReporterMarker;
impl fidl::endpoints::ProtocolMarker for OpenTargetEventReporterMarker {
type Proxy = OpenTargetEventReporterProxy;
type RequestStream = OpenTargetEventReporterRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = OpenTargetEventReporterSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) OpenTargetEventReporter";
}
pub trait OpenTargetEventReporterProxyInterface: Send + Sync {
fn r#report_event(&self, payload: &OpenTargetEventReport) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct OpenTargetEventReporterSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for OpenTargetEventReporterSynchronousProxy {
type Proxy = OpenTargetEventReporterProxy;
type Protocol = OpenTargetEventReporterMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl OpenTargetEventReporterSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<OpenTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<OpenTargetEventReporterEvent, fidl::Error> {
OpenTargetEventReporterEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#report_event(&self, mut payload: &OpenTargetEventReport) -> Result<(), fidl::Error> {
self.client.send::<OpenTargetEventReport>(
payload,
0x70ab38ec0248964a,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct OpenTargetEventReporterProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for OpenTargetEventReporterProxy {
type Protocol = OpenTargetEventReporterMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl OpenTargetEventReporterProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<OpenTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> OpenTargetEventReporterEventStream {
OpenTargetEventReporterEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#report_event(&self, mut payload: &OpenTargetEventReport) -> Result<(), fidl::Error> {
OpenTargetEventReporterProxyInterface::r#report_event(self, payload)
}
}
impl OpenTargetEventReporterProxyInterface for OpenTargetEventReporterProxy {
fn r#report_event(&self, mut payload: &OpenTargetEventReport) -> Result<(), fidl::Error> {
self.client.send::<OpenTargetEventReport>(
payload,
0x70ab38ec0248964a,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct OpenTargetEventReporterEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for OpenTargetEventReporterEventStream {}
impl futures::stream::FusedStream for OpenTargetEventReporterEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for OpenTargetEventReporterEventStream {
type Item = Result<OpenTargetEventReporterEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(OpenTargetEventReporterEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum OpenTargetEventReporterEvent {}
impl OpenTargetEventReporterEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<OpenTargetEventReporterEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name:
<OpenTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct OpenTargetEventReporterRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for OpenTargetEventReporterRequestStream {}
impl futures::stream::FusedStream for OpenTargetEventReporterRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for OpenTargetEventReporterRequestStream {
type Protocol = OpenTargetEventReporterMarker;
type ControlHandle = OpenTargetEventReporterControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
OpenTargetEventReporterControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for OpenTargetEventReporterRequestStream {
type Item = Result<OpenTargetEventReporterRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled OpenTargetEventReporterRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x70ab38ec0248964a => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(OpenTargetEventReport, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetEventReport>(&header, _body_bytes, handles, &mut req)?;
let control_handle = OpenTargetEventReporterControlHandle {
inner: this.inner.clone(),
};
Ok(OpenTargetEventReporterRequest::ReportEvent {payload: req,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <OpenTargetEventReporterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum OpenTargetEventReporterRequest {
ReportEvent {
payload: OpenTargetEventReport,
control_handle: OpenTargetEventReporterControlHandle,
},
}
impl OpenTargetEventReporterRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_report_event(
self,
) -> Option<(OpenTargetEventReport, OpenTargetEventReporterControlHandle)> {
if let OpenTargetEventReporterRequest::ReportEvent { payload, control_handle } = self {
Some((payload, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
OpenTargetEventReporterRequest::ReportEvent { .. } => "report_event",
}
}
}
#[derive(Debug, Clone)]
pub struct OpenTargetEventReporterControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for OpenTargetEventReporterControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl OpenTargetEventReporterControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct RunnerMarker;
impl fidl::endpoints::ProtocolMarker for RunnerMarker {
type Proxy = RunnerProxy;
type RequestStream = RunnerRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = RunnerSynchronousProxy;
const DEBUG_NAME: &'static str = "fidl.clientsuite.Runner";
}
impl fidl::endpoints::DiscoverableProtocolMarker for RunnerMarker {}
pub trait RunnerProxyInterface: Send + Sync {
type GetVersionResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
fn r#get_version(&self) -> Self::GetVersionResponseFut;
type IsTestEnabledResponseFut: std::future::Future<Output = Result<bool, fidl::Error>> + Send;
fn r#is_test_enabled(&self, test: Test) -> Self::IsTestEnabledResponseFut;
type CheckAliveResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#check_alive(&self) -> Self::CheckAliveResponseFut;
type GetBindingsPropertiesResponseFut: std::future::Future<Output = Result<BindingsProperties, fidl::Error>>
+ Send;
fn r#get_bindings_properties(&self) -> Self::GetBindingsPropertiesResponseFut;
type CallTwoWayNoPayloadResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_two_way_no_payload(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayNoPayloadResponseFut;
type CallTwoWayStructPayloadResponseFut: std::future::Future<Output = Result<NonEmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_two_way_struct_payload(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayStructPayloadResponseFut;
type CallTwoWayTablePayloadResponseFut: std::future::Future<Output = Result<TableResultClassification, fidl::Error>>
+ Send;
fn r#call_two_way_table_payload(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayTablePayloadResponseFut;
type CallTwoWayUnionPayloadResponseFut: std::future::Future<Output = Result<UnionResultClassification, fidl::Error>>
+ Send;
fn r#call_two_way_union_payload(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayUnionPayloadResponseFut;
type CallTwoWayStructPayloadErrResponseFut: std::future::Future<Output = Result<NonEmptyResultWithErrorClassification, fidl::Error>>
+ Send;
fn r#call_two_way_struct_payload_err(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayStructPayloadErrResponseFut;
type CallTwoWayStructRequestResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_two_way_struct_request(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
request: &NonEmptyPayload,
) -> Self::CallTwoWayStructRequestResponseFut;
type CallTwoWayTableRequestResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_two_way_table_request(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
request: &TablePayload,
) -> Self::CallTwoWayTableRequestResponseFut;
type CallTwoWayUnionRequestResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_two_way_union_request(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
request: &UnionPayload,
) -> Self::CallTwoWayUnionRequestResponseFut;
type CallOneWayNoRequestResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_one_way_no_request(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallOneWayNoRequestResponseFut;
type CallOneWayStructRequestResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_one_way_struct_request(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
request: &NonEmptyPayload,
) -> Self::CallOneWayStructRequestResponseFut;
type CallOneWayTableRequestResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_one_way_table_request(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
request: &TablePayload,
) -> Self::CallOneWayTableRequestResponseFut;
type CallOneWayUnionRequestResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_one_way_union_request(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
request: &UnionPayload,
) -> Self::CallOneWayUnionRequestResponseFut;
type CallStrictOneWayResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_strict_one_way(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallStrictOneWayResponseFut;
type CallFlexibleOneWayResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_flexible_one_way(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallFlexibleOneWayResponseFut;
type CallStrictTwoWayResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_strict_two_way(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallStrictTwoWayResponseFut;
type CallStrictTwoWayFieldsResponseFut: std::future::Future<Output = Result<NonEmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_strict_two_way_fields(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallStrictTwoWayFieldsResponseFut;
type CallStrictTwoWayErrResponseFut: std::future::Future<Output = Result<EmptyResultWithErrorClassification, fidl::Error>>
+ Send;
fn r#call_strict_two_way_err(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallStrictTwoWayErrResponseFut;
type CallStrictTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<NonEmptyResultWithErrorClassification, fidl::Error>>
+ Send;
fn r#call_strict_two_way_fields_err(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallStrictTwoWayFieldsErrResponseFut;
type CallFlexibleTwoWayResponseFut: std::future::Future<Output = Result<EmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_flexible_two_way(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallFlexibleTwoWayResponseFut;
type CallFlexibleTwoWayFieldsResponseFut: std::future::Future<Output = Result<NonEmptyResultClassification, fidl::Error>>
+ Send;
fn r#call_flexible_two_way_fields(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallFlexibleTwoWayFieldsResponseFut;
type CallFlexibleTwoWayErrResponseFut: std::future::Future<Output = Result<EmptyResultWithErrorClassification, fidl::Error>>
+ Send;
fn r#call_flexible_two_way_err(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallFlexibleTwoWayErrResponseFut;
type CallFlexibleTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<NonEmptyResultWithErrorClassification, fidl::Error>>
+ Send;
fn r#call_flexible_two_way_fields_err(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> Self::CallFlexibleTwoWayFieldsErrResponseFut;
type ReceiveClosedEventsResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
+ Send;
fn r#receive_closed_events(
&self,
target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
reporter: fidl::endpoints::ClientEnd<ClosedTargetEventReporterMarker>,
) -> Self::ReceiveClosedEventsResponseFut;
type ReceiveAjarEventsResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#receive_ajar_events(
&self,
target: fidl::endpoints::ClientEnd<AjarTargetMarker>,
reporter: fidl::endpoints::ClientEnd<AjarTargetEventReporterMarker>,
) -> Self::ReceiveAjarEventsResponseFut;
type ReceiveOpenEventsResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#receive_open_events(
&self,
target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
reporter: fidl::endpoints::ClientEnd<OpenTargetEventReporterMarker>,
) -> Self::ReceiveOpenEventsResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct RunnerSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for RunnerSynchronousProxy {
type Proxy = RunnerProxy;
type Protocol = RunnerMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl RunnerSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<RunnerEvent, fidl::Error> {
RunnerEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_version(&self, ___deadline: zx::MonotonicInstant) -> Result<u64, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, RunnerGetVersionResponse>(
(),
0x555d1430b913cdd4,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.version)
}
pub fn r#is_test_enabled(
&self,
mut test: Test,
___deadline: zx::MonotonicInstant,
) -> Result<bool, fidl::Error> {
let _response =
self.client.send_query::<RunnerIsTestEnabledRequest, RunnerIsTestEnabledResponse>(
(test,),
0x755bc493368d7c50,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.is_enabled)
}
pub fn r#check_alive(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
(),
0x5a77b04abdfde130,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#get_bindings_properties(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<BindingsProperties, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, BindingsProperties>(
(),
0x76b5610bfd4fa636,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_two_way_no_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response =
self.client.send_query::<RunnerCallTwoWayNoPayloadRequest, EmptyResultClassification>(
(target,),
0x53ac710c20b320a1,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_two_way_struct_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<NonEmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallTwoWayStructPayloadRequest, NonEmptyResultClassification>(
(target,),
0x24e98c668499b946,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_two_way_table_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<TableResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallTwoWayTablePayloadRequest, TableResultClassification>(
(target,),
0x72e428e1605b76a,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_two_way_union_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<UnionResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallTwoWayUnionPayloadRequest, UnionResultClassification>(
(target,),
0x7dc9d67218343860,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_two_way_struct_payload_err(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<NonEmptyResultWithErrorClassification, fidl::Error> {
let _response = self.client.send_query::<
RunnerCallTwoWayStructPayloadErrRequest,
NonEmptyResultWithErrorClassification,
>(
(target,),
0x2b07a57942c5f6e5,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_two_way_struct_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &NonEmptyPayload,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallTwoWayStructRequestRequest, EmptyResultClassification>(
(target, request),
0x7c00a6ba2e6c9b45,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_two_way_table_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &TablePayload,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallTwoWayTableRequestRequest, EmptyResultClassification>(
(target, request),
0x641763237d3885be,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_two_way_union_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &UnionPayload,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallTwoWayUnionRequestRequest, EmptyResultClassification>(
(target, request),
0x4be5f061df42619e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_one_way_no_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response =
self.client.send_query::<RunnerCallOneWayNoRequestRequest, EmptyResultClassification>(
(target,),
0x24b6eea8cbdccc09,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_one_way_struct_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &NonEmptyPayload,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallOneWayStructRequestRequest, EmptyResultClassification>(
(target, request),
0x352a2907a0fcb420,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_one_way_table_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &TablePayload,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallOneWayTableRequestRequest, EmptyResultClassification>(
(target, request),
0x734121bf8bf336ef,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_one_way_union_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &UnionPayload,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallOneWayUnionRequestRequest, EmptyResultClassification>(
(target, request),
0x9be8e5eb7d50eb6,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_strict_one_way(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response =
self.client.send_query::<RunnerCallStrictOneWayRequest, EmptyResultClassification>(
(target,),
0x4edd0b6f52c0446b,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_flexible_one_way(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response =
self.client.send_query::<RunnerCallFlexibleOneWayRequest, EmptyResultClassification>(
(target,),
0x7253f10a77dfe817,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_strict_two_way(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response =
self.client.send_query::<RunnerCallStrictTwoWayRequest, EmptyResultClassification>(
(target,),
0x1fa9fb7414aedd27,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_strict_two_way_fields(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<NonEmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallStrictTwoWayFieldsRequest, NonEmptyResultClassification>(
(target,),
0x6f690e00ebf6f123,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_strict_two_way_err(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultWithErrorClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallStrictTwoWayErrRequest, EmptyResultWithErrorClassification>(
(target,),
0x51d6bc7cf6cbaf1a,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_strict_two_way_fields_err(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<NonEmptyResultWithErrorClassification, fidl::Error> {
let _response = self.client.send_query::<
RunnerCallStrictTwoWayFieldsErrRequest,
NonEmptyResultWithErrorClassification,
>(
(target,),
0x6fa31ced05074c05,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_flexible_two_way(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response =
self.client.send_query::<RunnerCallFlexibleTwoWayRequest, EmptyResultClassification>(
(target,),
0x411f70724876d49,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_flexible_two_way_fields(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<NonEmptyResultClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallFlexibleTwoWayFieldsRequest, NonEmptyResultClassification>(
(target,),
0x330996b623598eed,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_flexible_two_way_err(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<EmptyResultWithErrorClassification, fidl::Error> {
let _response = self
.client
.send_query::<RunnerCallFlexibleTwoWayErrRequest, EmptyResultWithErrorClassification>(
(target,),
0x5ddbf88a353a2a57,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#call_flexible_two_way_fields_err(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<NonEmptyResultWithErrorClassification, fidl::Error> {
let _response = self.client.send_query::<
RunnerCallFlexibleTwoWayFieldsErrRequest,
NonEmptyResultWithErrorClassification,
>(
(target,),
0x7ae309383b07048e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#receive_closed_events(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut reporter: fidl::endpoints::ClientEnd<ClosedTargetEventReporterMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response = self
.client
.send_query::<RunnerReceiveClosedEventsRequest, fidl::encoding::EmptyPayload>(
(target, reporter),
0x48da834910571aeb,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#receive_ajar_events(
&self,
mut target: fidl::endpoints::ClientEnd<AjarTargetMarker>,
mut reporter: fidl::endpoints::ClientEnd<AjarTargetEventReporterMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response = self
.client
.send_query::<RunnerReceiveAjarEventsRequest, fidl::encoding::EmptyPayload>(
(target, reporter),
0xc5662b9a9c007a3,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#receive_open_events(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
mut reporter: fidl::endpoints::ClientEnd<OpenTargetEventReporterMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response = self
.client
.send_query::<RunnerReceiveOpenEventsRequest, fidl::encoding::EmptyPayload>(
(target, reporter),
0x79a7073fd18edbdf,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
}
#[derive(Debug, Clone)]
pub struct RunnerProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for RunnerProxy {
type Protocol = RunnerMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl RunnerProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> RunnerEventStream {
RunnerEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#get_version(
&self,
) -> fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect> {
RunnerProxyInterface::r#get_version(self)
}
pub fn r#is_test_enabled(
&self,
mut test: Test,
) -> fidl::client::QueryResponseFut<bool, fidl::encoding::DefaultFuchsiaResourceDialect> {
RunnerProxyInterface::r#is_test_enabled(self, test)
}
pub fn r#check_alive(
&self,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
RunnerProxyInterface::r#check_alive(self)
}
pub fn r#get_bindings_properties(
&self,
) -> fidl::client::QueryResponseFut<
BindingsProperties,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#get_bindings_properties(self)
}
pub fn r#call_two_way_no_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_two_way_no_payload(self, target)
}
pub fn r#call_two_way_struct_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> fidl::client::QueryResponseFut<
NonEmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_two_way_struct_payload(self, target)
}
pub fn r#call_two_way_table_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> fidl::client::QueryResponseFut<
TableResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_two_way_table_payload(self, target)
}
pub fn r#call_two_way_union_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> fidl::client::QueryResponseFut<
UnionResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_two_way_union_payload(self, target)
}
pub fn r#call_two_way_struct_payload_err(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> fidl::client::QueryResponseFut<
NonEmptyResultWithErrorClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_two_way_struct_payload_err(self, target)
}
pub fn r#call_two_way_struct_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &NonEmptyPayload,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_two_way_struct_request(self, target, request)
}
pub fn r#call_two_way_table_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &TablePayload,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_two_way_table_request(self, target, request)
}
pub fn r#call_two_way_union_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &UnionPayload,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_two_way_union_request(self, target, request)
}
pub fn r#call_one_way_no_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_one_way_no_request(self, target)
}
pub fn r#call_one_way_struct_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &NonEmptyPayload,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_one_way_struct_request(self, target, request)
}
pub fn r#call_one_way_table_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &TablePayload,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_one_way_table_request(self, target, request)
}
pub fn r#call_one_way_union_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &UnionPayload,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_one_way_union_request(self, target, request)
}
pub fn r#call_strict_one_way(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_strict_one_way(self, target)
}
pub fn r#call_flexible_one_way(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_flexible_one_way(self, target)
}
pub fn r#call_strict_two_way(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_strict_two_way(self, target)
}
pub fn r#call_strict_two_way_fields(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
NonEmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_strict_two_way_fields(self, target)
}
pub fn r#call_strict_two_way_err(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
EmptyResultWithErrorClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_strict_two_way_err(self, target)
}
pub fn r#call_strict_two_way_fields_err(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
NonEmptyResultWithErrorClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_strict_two_way_fields_err(self, target)
}
pub fn r#call_flexible_two_way(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_flexible_two_way(self, target)
}
pub fn r#call_flexible_two_way_fields(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
NonEmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_flexible_two_way_fields(self, target)
}
pub fn r#call_flexible_two_way_err(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
EmptyResultWithErrorClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_flexible_two_way_err(self, target)
}
pub fn r#call_flexible_two_way_fields_err(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
) -> fidl::client::QueryResponseFut<
NonEmptyResultWithErrorClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
RunnerProxyInterface::r#call_flexible_two_way_fields_err(self, target)
}
pub fn r#receive_closed_events(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut reporter: fidl::endpoints::ClientEnd<ClosedTargetEventReporterMarker>,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
RunnerProxyInterface::r#receive_closed_events(self, target, reporter)
}
pub fn r#receive_ajar_events(
&self,
mut target: fidl::endpoints::ClientEnd<AjarTargetMarker>,
mut reporter: fidl::endpoints::ClientEnd<AjarTargetEventReporterMarker>,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
RunnerProxyInterface::r#receive_ajar_events(self, target, reporter)
}
pub fn r#receive_open_events(
&self,
mut target: fidl::endpoints::ClientEnd<OpenTargetMarker>,
mut reporter: fidl::endpoints::ClientEnd<OpenTargetEventReporterMarker>,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
RunnerProxyInterface::r#receive_open_events(self, target, reporter)
}
}
impl RunnerProxyInterface for RunnerProxy {
type GetVersionResponseFut =
fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#get_version(&self) -> Self::GetVersionResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<u64, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
RunnerGetVersionResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x555d1430b913cdd4,
>(_buf?)?;
Ok(_response.version)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
(),
0x555d1430b913cdd4,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type IsTestEnabledResponseFut =
fidl::client::QueryResponseFut<bool, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#is_test_enabled(&self, mut test: Test) -> Self::IsTestEnabledResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<bool, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
RunnerIsTestEnabledResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x755bc493368d7c50,
>(_buf?)?;
Ok(_response.is_enabled)
}
self.client.send_query_and_decode::<RunnerIsTestEnabledRequest, bool>(
(test,),
0x755bc493368d7c50,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CheckAliveResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#check_alive(&self) -> Self::CheckAliveResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x5a77b04abdfde130,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x5a77b04abdfde130,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetBindingsPropertiesResponseFut = fidl::client::QueryResponseFut<
BindingsProperties,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_bindings_properties(&self) -> Self::GetBindingsPropertiesResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<BindingsProperties, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
BindingsProperties,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x76b5610bfd4fa636,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, BindingsProperties>(
(),
0x76b5610bfd4fa636,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallTwoWayNoPayloadResponseFut = fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_two_way_no_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayNoPayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x53ac710c20b320a1,
>(_buf?)?;
Ok(_response)
}
self.client
.send_query_and_decode::<RunnerCallTwoWayNoPayloadRequest, EmptyResultClassification>(
(target,),
0x53ac710c20b320a1,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallTwoWayStructPayloadResponseFut = fidl::client::QueryResponseFut<
NonEmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_two_way_struct_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayStructPayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<NonEmptyResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
NonEmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x24e98c668499b946,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallTwoWayStructPayloadRequest,
NonEmptyResultClassification,
>(
(target,),
0x24e98c668499b946,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallTwoWayTablePayloadResponseFut = fidl::client::QueryResponseFut<
TableResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_two_way_table_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayTablePayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<TableResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
TableResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x72e428e1605b76a,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallTwoWayTablePayloadRequest,
TableResultClassification,
>(
(target,),
0x72e428e1605b76a,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallTwoWayUnionPayloadResponseFut = fidl::client::QueryResponseFut<
UnionResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_two_way_union_payload(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayUnionPayloadResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<UnionResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
UnionResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x7dc9d67218343860,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallTwoWayUnionPayloadRequest,
UnionResultClassification,
>(
(target,),
0x7dc9d67218343860,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallTwoWayStructPayloadErrResponseFut = fidl::client::QueryResponseFut<
NonEmptyResultWithErrorClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_two_way_struct_payload_err(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallTwoWayStructPayloadErrResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<NonEmptyResultWithErrorClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
NonEmptyResultWithErrorClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x2b07a57942c5f6e5,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallTwoWayStructPayloadErrRequest,
NonEmptyResultWithErrorClassification,
>(
(target,),
0x2b07a57942c5f6e5,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallTwoWayStructRequestResponseFut = fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_two_way_struct_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &NonEmptyPayload,
) -> Self::CallTwoWayStructRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x7c00a6ba2e6c9b45,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallTwoWayStructRequestRequest,
EmptyResultClassification,
>(
(target, request,),
0x7c00a6ba2e6c9b45,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallTwoWayTableRequestResponseFut = fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_two_way_table_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &TablePayload,
) -> Self::CallTwoWayTableRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x641763237d3885be,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallTwoWayTableRequestRequest,
EmptyResultClassification,
>(
(target, request,),
0x641763237d3885be,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallTwoWayUnionRequestResponseFut = fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_two_way_union_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &UnionPayload,
) -> Self::CallTwoWayUnionRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x4be5f061df42619e,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallTwoWayUnionRequestRequest,
EmptyResultClassification,
>(
(target, request,),
0x4be5f061df42619e,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallOneWayNoRequestResponseFut = fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_one_way_no_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
) -> Self::CallOneWayNoRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x24b6eea8cbdccc09,
>(_buf?)?;
Ok(_response)
}
self.client
.send_query_and_decode::<RunnerCallOneWayNoRequestRequest, EmptyResultClassification>(
(target,),
0x24b6eea8cbdccc09,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallOneWayStructRequestResponseFut = fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_one_way_struct_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &NonEmptyPayload,
) -> Self::CallOneWayStructRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x352a2907a0fcb420,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallOneWayStructRequestRequest,
EmptyResultClassification,
>(
(target, request,),
0x352a2907a0fcb420,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CallOneWayTableRequestResponseFut = fidl::client::QueryResponseFut<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#call_one_way_table_request(
&self,
mut target: fidl::endpoints::ClientEnd<ClosedTargetMarker>,
mut request: &TablePayload,
) -> Self::CallOneWayTableRequestResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<EmptyResultClassification, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
EmptyResultClassification,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x734121bf8bf336ef,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<
RunnerCallOneWayTableRequest