// @generated by Thrift for thrift/compiler/test/fixtures/interactions/src/module.thrift
// This file is probably not the place you want to edit!

#![recursion_limit = "100000000"]
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals, unused_crate_dependencies, clippy::all)]

pub use self::errors::*;
pub use self::types::*;

pub mod types;

#[doc(hidden)]
pub mod dependencies {
}

pub mod services {

    pub mod my_interaction {
        #[derive(Clone, Debug)]
        pub enum FrobnicateExn {
            #[doc(hidden)]
            Success(::std::primitive::i32),
            ex(crate::types::CustomException),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::types::CustomException> for FrobnicateExn {
            fn from(exn: crate::types::CustomException) -> Self {
                Self::ex(exn)
            }
        }

        impl ::std::convert::From<crate::errors::my_interaction::FrobnicateError> for FrobnicateExn {
            fn from(err: crate::errors::my_interaction::FrobnicateError) -> Self {
                match err {
                    crate::errors::my_interaction::FrobnicateError::ex(err) => FrobnicateExn::ex(err),
                    crate::errors::my_interaction::FrobnicateError::ApplicationException(aexn) => FrobnicateExn::ApplicationException(aexn),
                    crate::errors::my_interaction::FrobnicateError::ThriftError(err) => FrobnicateExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for FrobnicateExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for FrobnicateExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                    Self::ex(exn) => exn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                    Self::ex(exn) => exn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                    Self::ex(exn) => exn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for FrobnicateExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                    Self::ex(_exn) => fbthrift::ResultType::Error,
                }
            }
        }

        impl ::fbthrift::GetTType for FrobnicateExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for FrobnicateExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Frobnicate");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::I32,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ex(inner) => {
                        p.write_field_begin(
                            "ex",
                            ::fbthrift::TType::Struct,
                            1,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for FrobnicateExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::I32, 0),
                    ::fbthrift::Field::new("ex", ::fbthrift::TType::Struct, 1),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::I32, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((::fbthrift::TType::Struct, 1), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::ex(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "FrobnicateExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "FrobnicateExn"),
                    )
                    .into(),
                )
            }
        }

        #[derive(Clone, Debug)]
        pub enum PingExn {
            #[doc(hidden)]
            Success(()),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_interaction::PingError> for PingExn {
            fn from(err: crate::errors::my_interaction::PingError) -> Self {
                match err {
                    crate::errors::my_interaction::PingError::ApplicationException(aexn) => PingExn::ApplicationException(aexn),
                    crate::errors::my_interaction::PingError::ThriftError(err) => PingExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for PingExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for PingExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for PingExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for PingExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for PingExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Ping");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Void,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for PingExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Void, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = Self::Success(());
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Void, 0i32), false) => {
                            once = true;
                            alt = Self::Success(::fbthrift::Deserialize::read(p)?);
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "PingExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                ::std::result::Result::Ok(alt)
            }
        }

        #[derive(Clone, Debug)]
        pub enum TruthifyStreamExn {
            #[doc(hidden)]
            Success(::std::primitive::bool),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::fbthrift::ExceptionInfo for TruthifyStreamExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for TruthifyStreamExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for TruthifyStreamExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::GetTType for TruthifyStreamExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for TruthifyStreamExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Truthify");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Bool,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for TruthifyStreamExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Stream, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Bool, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "TruthifyStreamExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "TruthifyStreamExn"),
                    )
                    .into(),
                )
            }
        }

        #[derive(Clone, Debug)]
        pub enum TruthifyResponseExn {
            #[doc(hidden)]
            Success(()),

            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::fbthrift::ExceptionInfo for TruthifyResponseExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for TruthifyResponseExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for TruthifyResponseExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::GetTType for TruthifyResponseExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Void;
        }

        impl<P> ::fbthrift::Serialize<P> for TruthifyResponseExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Truthify");
                match self {
                    Self::Success(_inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Void,
                            0i16,
                        );
                        p.write_field_end();
                    }
                    Self::ApplicationException(_) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for TruthifyResponseExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Stream, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = Self::Success(());
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Void, 0i32), false) => {
                            once = true;
                            alt = Self::Success(::fbthrift::Deserialize::read(p)?);
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "TruthifyResponseExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                ::std::result::Result::Ok(alt)
            }
        }

        pub enum TruthifyExn {
            #[doc(hidden)]
            Success(    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::services::my_interaction::TruthifyStreamExn>>
),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_interaction::TruthifyError> for TruthifyExn {
            fn from(err: crate::errors::my_interaction::TruthifyError) -> Self {
                match err {
                    crate::errors::my_interaction::TruthifyError::ApplicationException(aexn) => TruthifyExn::ApplicationException(aexn),
                    crate::errors::my_interaction::TruthifyError::ThriftError(err) => TruthifyExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for TruthifyExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for TruthifyExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for TruthifyExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for TruthifyExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        #[derive(Clone, Debug)]
        pub enum EncodeExn {
            #[doc(hidden)]
            Success(),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_interaction::EncodeError> for EncodeExn {
            fn from(err: crate::errors::my_interaction::EncodeError) -> Self {
                match err {
                    crate::errors::my_interaction::EncodeError::ApplicationException(aexn) => EncodeExn::ApplicationException(aexn),
                    crate::errors::my_interaction::EncodeError::ThriftError(err) => EncodeExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for EncodeExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for EncodeExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for EncodeExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for EncodeExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for EncodeExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Encode");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for EncodeExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "EncodeExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "EncodeExn"),
                    )
                    .into(),
                )
            }
        }
    }

    pub mod my_interaction_fast {
        #[derive(Clone, Debug)]
        pub enum FrobnicateExn {
            #[doc(hidden)]
            Success(::std::primitive::i32),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_interaction_fast::FrobnicateError> for FrobnicateExn {
            fn from(err: crate::errors::my_interaction_fast::FrobnicateError) -> Self {
                match err {
                    crate::errors::my_interaction_fast::FrobnicateError::ApplicationException(aexn) => FrobnicateExn::ApplicationException(aexn),
                    crate::errors::my_interaction_fast::FrobnicateError::ThriftError(err) => FrobnicateExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for FrobnicateExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for FrobnicateExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for FrobnicateExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for FrobnicateExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for FrobnicateExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Frobnicate");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::I32,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for FrobnicateExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::I32, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::I32, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "FrobnicateExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "FrobnicateExn"),
                    )
                    .into(),
                )
            }
        }

        #[derive(Clone, Debug)]
        pub enum PingExn {
            #[doc(hidden)]
            Success(()),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_interaction_fast::PingError> for PingExn {
            fn from(err: crate::errors::my_interaction_fast::PingError) -> Self {
                match err {
                    crate::errors::my_interaction_fast::PingError::ApplicationException(aexn) => PingExn::ApplicationException(aexn),
                    crate::errors::my_interaction_fast::PingError::ThriftError(err) => PingExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for PingExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for PingExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for PingExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for PingExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for PingExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Ping");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Void,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for PingExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Void, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = Self::Success(());
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Void, 0i32), false) => {
                            once = true;
                            alt = Self::Success(::fbthrift::Deserialize::read(p)?);
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "PingExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                ::std::result::Result::Ok(alt)
            }
        }

        #[derive(Clone, Debug)]
        pub enum TruthifyStreamExn {
            #[doc(hidden)]
            Success(::std::primitive::bool),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::fbthrift::ExceptionInfo for TruthifyStreamExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for TruthifyStreamExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for TruthifyStreamExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::GetTType for TruthifyStreamExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for TruthifyStreamExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Truthify");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Bool,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for TruthifyStreamExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Stream, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Bool, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "TruthifyStreamExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "TruthifyStreamExn"),
                    )
                    .into(),
                )
            }
        }

        #[derive(Clone, Debug)]
        pub enum TruthifyResponseExn {
            #[doc(hidden)]
            Success(()),

            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::fbthrift::ExceptionInfo for TruthifyResponseExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for TruthifyResponseExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for TruthifyResponseExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::GetTType for TruthifyResponseExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Void;
        }

        impl<P> ::fbthrift::Serialize<P> for TruthifyResponseExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Truthify");
                match self {
                    Self::Success(_inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Void,
                            0i16,
                        );
                        p.write_field_end();
                    }
                    Self::ApplicationException(_) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for TruthifyResponseExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Stream, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = Self::Success(());
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Void, 0i32), false) => {
                            once = true;
                            alt = Self::Success(::fbthrift::Deserialize::read(p)?);
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "TruthifyResponseExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                ::std::result::Result::Ok(alt)
            }
        }

        pub enum TruthifyExn {
            #[doc(hidden)]
            Success(    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::services::my_interaction_fast::TruthifyStreamExn>>
),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_interaction_fast::TruthifyError> for TruthifyExn {
            fn from(err: crate::errors::my_interaction_fast::TruthifyError) -> Self {
                match err {
                    crate::errors::my_interaction_fast::TruthifyError::ApplicationException(aexn) => TruthifyExn::ApplicationException(aexn),
                    crate::errors::my_interaction_fast::TruthifyError::ThriftError(err) => TruthifyExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for TruthifyExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for TruthifyExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for TruthifyExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for TruthifyExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        #[derive(Clone, Debug)]
        pub enum EncodeExn {
            #[doc(hidden)]
            Success(),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_interaction_fast::EncodeError> for EncodeExn {
            fn from(err: crate::errors::my_interaction_fast::EncodeError) -> Self {
                match err {
                    crate::errors::my_interaction_fast::EncodeError::ApplicationException(aexn) => EncodeExn::ApplicationException(aexn),
                    crate::errors::my_interaction_fast::EncodeError::ThriftError(err) => EncodeExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for EncodeExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for EncodeExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for EncodeExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for EncodeExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for EncodeExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Encode");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for EncodeExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "EncodeExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "EncodeExn"),
                    )
                    .into(),
                )
            }
        }
    }

    pub mod serial_interaction {
        #[derive(Clone, Debug)]
        pub enum FrobnicateExn {
            #[doc(hidden)]
            Success(()),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::serial_interaction::FrobnicateError> for FrobnicateExn {
            fn from(err: crate::errors::serial_interaction::FrobnicateError) -> Self {
                match err {
                    crate::errors::serial_interaction::FrobnicateError::ApplicationException(aexn) => FrobnicateExn::ApplicationException(aexn),
                    crate::errors::serial_interaction::FrobnicateError::ThriftError(err) => FrobnicateExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for FrobnicateExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for FrobnicateExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for FrobnicateExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for FrobnicateExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for FrobnicateExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Frobnicate");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Void,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for FrobnicateExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Void, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = Self::Success(());
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Void, 0i32), false) => {
                            once = true;
                            alt = Self::Success(::fbthrift::Deserialize::read(p)?);
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "FrobnicateExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                ::std::result::Result::Ok(alt)
            }
        }
    }
    pub mod my_service {
        #[derive(Clone, Debug)]
        pub enum FooExn {
            #[doc(hidden)]
            Success(()),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_service::FooError> for FooExn {
            fn from(err: crate::errors::my_service::FooError) -> Self {
                match err {
                    crate::errors::my_service::FooError::ApplicationException(aexn) => FooExn::ApplicationException(aexn),
                    crate::errors::my_service::FooError::ThriftError(err) => FooExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for FooExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for FooExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for FooExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for FooExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for FooExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Foo");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Void,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for FooExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Void, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = Self::Success(());
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Void, 0i32), false) => {
                            once = true;
                            alt = Self::Success(::fbthrift::Deserialize::read(p)?);
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "FooExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                ::std::result::Result::Ok(alt)
            }
        }

        #[derive(Clone, Debug)]
        pub enum InteractExn {
            #[doc(hidden)]
            Success(()),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_service::InteractError> for InteractExn {
            fn from(err: crate::errors::my_service::InteractError) -> Self {
                match err {
                    crate::errors::my_service::InteractError::ApplicationException(aexn) => InteractExn::ApplicationException(aexn),
                    crate::errors::my_service::InteractError::ThriftError(err) => InteractExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for InteractExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for InteractExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for InteractExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for InteractExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for InteractExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Interact");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::Void,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for InteractExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Void, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = Self::Success(());
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::Void, 0i32), false) => {
                            once = true;
                            alt = Self::Success(::fbthrift::Deserialize::read(p)?);
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "InteractExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                ::std::result::Result::Ok(alt)
            }
        }

        #[derive(Clone, Debug)]
        pub enum InteractFastExn {
            #[doc(hidden)]
            Success(::std::primitive::i32),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_service::InteractFastError> for InteractFastExn {
            fn from(err: crate::errors::my_service::InteractFastError) -> Self {
                match err {
                    crate::errors::my_service::InteractFastError::ApplicationException(aexn) => InteractFastExn::ApplicationException(aexn),
                    crate::errors::my_service::InteractFastError::ThriftError(err) => InteractFastExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for InteractFastExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for InteractFastExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for InteractFastExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for InteractFastExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for InteractFastExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("InteractFast");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::I32,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_aexn) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for InteractFastExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::I32, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::I32, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "InteractFastExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "InteractFastExn"),
                    )
                    .into(),
                )
            }
        }

        #[derive(Clone, Debug)]
        pub enum SerializeStreamExn {
            #[doc(hidden)]
            Success(::std::primitive::i32),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::fbthrift::ExceptionInfo for SerializeStreamExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for SerializeStreamExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for SerializeStreamExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::GetTType for SerializeStreamExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for SerializeStreamExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Serialize");
                match self {
                    Self::Success(inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::I32,
                            0i16,
                        );
                        inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for SerializeStreamExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Stream, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::I32, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "SerializeStreamExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "SerializeStreamExn"),
                    )
                    .into(),
                )
            }
        }

        #[derive(Clone, Debug)]
        pub enum SerializeResponseExn {
            #[doc(hidden)]
            Success(::std::primitive::i32),

            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::fbthrift::ExceptionInfo for SerializeResponseExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for SerializeResponseExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for SerializeResponseExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::GetTType for SerializeResponseExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

        impl<P> ::fbthrift::Serialize<P> for SerializeResponseExn
        where
            P: ::fbthrift::ProtocolWriter,
        {
            fn write(&self, p: &mut P) {
                if let Self::ApplicationException(aexn) = self {
                    return aexn.write(p);
                }
                p.write_struct_begin("Serialize");
                match self {
                    Self::Success(_inner) => {
                        p.write_field_begin(
                            "Success",
                            ::fbthrift::TType::I32,
                            0i16,
                        );
                        _inner.write(p);
                        p.write_field_end();
                    }
                    Self::ApplicationException(_) => unreachable!(),
                }
                p.write_field_stop();
                p.write_struct_end();
            }
        }

        impl<P> ::fbthrift::Deserialize<P> for SerializeResponseExn
        where
            P: ::fbthrift::ProtocolReader,
        {
            fn read(p: &mut P) -> ::anyhow::Result<Self> {
                static RETURNS: &[::fbthrift::Field] = &[
                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Stream, 0),
                ];
                let _ = p.read_struct_begin(|_| ())?;
                let mut once = false;
                let mut alt = ::std::option::Option::None;
                loop {
                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
                    match ((fty, fid as ::std::primitive::i32), once) {
                        ((::fbthrift::TType::Stop, _), _) => {
                            p.read_field_end()?;
                            break;
                        }
                        ((::fbthrift::TType::I32, 0i32), false) => {
                            once = true;
                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
                        }
                        ((ty, _id), false) => p.skip(ty)?,
                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
                            ::fbthrift::ApplicationException::new(
                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
                                format!(
                                    "unwanted extra union {} field ty {:?} id {}",
                                    "SerializeResponseExn",
                                    badty,
                                    badid,
                                ),
                            )
                        )),
                    }
                    p.read_field_end()?;
                }
                p.read_struct_end()?;
                alt.ok_or_else(||
                    ::fbthrift::ApplicationException::new(
                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
                        format!("Empty union {}", "SerializeResponseExn"),
                    )
                    .into(),
                )
            }
        }

        pub enum SerializeExn {
            #[doc(hidden)]
            Success((
    ::std::primitive::i32,
    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::services::my_service::SerializeStreamExn>>
)
),
            ApplicationException(::fbthrift::ApplicationException),
        }

        impl ::std::convert::From<crate::errors::my_service::SerializeError> for SerializeExn {
            fn from(err: crate::errors::my_service::SerializeError) -> Self {
                match err {
                    crate::errors::my_service::SerializeError::ApplicationException(aexn) => SerializeExn::ApplicationException(aexn),
                    crate::errors::my_service::SerializeError::ThriftError(err) => SerializeExn::ApplicationException(::fbthrift::ApplicationException {
                        message: err.to_string(),
                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
                    }),
                }
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for SerializeExn {
            fn from(exn: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(exn)
            }
        }

        impl ::fbthrift::ExceptionInfo for SerializeExn {
            fn exn_name(&self) -> &'static str {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_name(),
                }
            }

            fn exn_value(&self) -> String {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_value(),
                }
            }

            fn exn_is_declared(&self) -> bool {
                match self {
                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
                }
            }
        }

        impl ::fbthrift::ResultInfo for SerializeExn {
            fn result_type(&self) -> ::fbthrift::ResultType {
                match self {
                    Self::Success(_) => ::fbthrift::ResultType::Return,
                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
                }
            }
        }

        impl ::fbthrift::GetTType for SerializeExn {
            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
        }

    }
}

/// Client implementation for each service in `module`.
pub mod client {

    pub struct MyInteractionImpl<P, T, S = ::fbthrift::NoopSpawner> {
        transport: T,
        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
    }

    impl<P, T, S> MyInteractionImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        pub fn new(
            transport: T,
        ) -> Self {
            Self {
                transport,
                _phantom: ::std::marker::PhantomData,
            }
        }

        pub fn transport(&self) -> &T {
            &self.transport
        }

        fn _frobnicate_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction::FrobnicateError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.MyInteraction.frobnicate";
            }
            let args = self::Args_MyInteraction_frobnicate {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("MyInteraction.frobnicate", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyInteraction.frobnicate"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_interaction::FrobnicateExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_interaction::FrobnicateError::ApplicationException(aexn))
                };
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyInteraction.frobnicate"))
            .boxed()
        }

        fn _ping_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction::PingError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.MyInteraction.ping";
            }
            let args = self::Args_MyInteraction_ping {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("MyInteraction.ping", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyInteraction.ping"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_interaction::PingExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_interaction::PingError::ApplicationException(aexn))
                };
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyInteraction.ping"))
            .boxed()
        }

        fn _truthify_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError>>, crate::errors::my_interaction::TruthifyError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;
            use ::futures::StreamExt as _;
            use ::fbthrift::Deserialize as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.MyInteraction.truthify";
            }
            let args = self::Args_MyInteraction_truthify {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("MyInteraction.truthify", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call_stream = transport
                .call_stream(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call_stream", method = "MyInteraction.truthify"));

            async move {
                let (initial, stream) = call_stream.await?;

                let new_stream = stream.then(|item_res| {
                    async move {
                        match item_res {
                            ::std::result::Result::Err(err) =>
                                ::std::result::Result::Err(crate::errors::my_interaction::TruthifyStreamError::from(err)),
                            ::std::result::Result::Ok(item_enc) => {
                                let res = S::spawn(move || {
                                    match item_enc {
                                        ::fbthrift::ClientStreamElement::Reply(payload) => {
                                            let mut de = P::deserializer(payload);
                                            crate::services::my_interaction::TruthifyStreamExn::read(&mut de)
                                        }
                                        ::fbthrift::ClientStreamElement::ApplicationEx(payload) => {
                                            let mut de = P::deserializer(payload);
                                            ::fbthrift::ApplicationException::read(&mut de).map(crate::services::my_interaction::TruthifyStreamExn::ApplicationException)
                                        }
                                    }
                                }).await?;

                                let item: ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError> =
                                    ::std::convert::From::from(res);
                                item
                            }
                        }
                    }
                })
                .boxed();

                let de = P::deserializer(initial);
                let res: crate::services::my_interaction::TruthifyResponseExn =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?.0?;

                let initial: ::std::result::Result<(), crate::errors::my_interaction::TruthifyError> =
                    ::std::convert::From::from(res);
                let res = initial.map(move |_| new_stream);
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyInteraction.truthify"))
            .boxed()
        }

        fn _encode_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction::EncodeError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.MyInteraction.encode";
            }
            let args = self::Args_MyInteraction_encode {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("MyInteraction.encode", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyInteraction.encode"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_interaction::EncodeExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_interaction::EncodeError::ApplicationException(aexn))
                };
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyInteraction.encode"))
            .boxed()
        }
    }

    pub trait MyInteraction: ::std::marker::Send {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction::FrobnicateError>>;

        fn ping(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction::PingError>>;

        fn truthify(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError>>, crate::errors::my_interaction::TruthifyError>>;

        fn encode(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction::EncodeError>>;
    }

    pub trait MyInteractionExt<T>: MyInteraction
    where
        T: ::fbthrift::Transport,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction::FrobnicateError>>;
        fn ping_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction::PingError>>;
        fn truthify_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError>>, crate::errors::my_interaction::TruthifyError>>;
        fn encode_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction::EncodeError>>;

        fn transport(&self) -> &T;
    }

    struct Args_MyInteraction_frobnicate<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyInteraction_frobnicate<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyInteraction.frobnicate"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyInteraction_ping<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyInteraction_ping<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyInteraction.ping"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyInteraction_truthify<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyInteraction_truthify<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyInteraction.truthify"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyInteraction_encode<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyInteraction_encode<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyInteraction.encode"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    impl<P, T, S> MyInteraction for MyInteractionImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction::FrobnicateError>> {
            let rpc_options = T::RpcOptions::default();
            self._frobnicate_impl(
                rpc_options,
            )
        }
        fn ping(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction::PingError>> {
            let rpc_options = T::RpcOptions::default();
            self._ping_impl(
                rpc_options,
            )
        }
        fn truthify(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError>>, crate::errors::my_interaction::TruthifyError>> {
            let rpc_options = T::RpcOptions::default();
            self._truthify_impl(
                rpc_options,
            )
        }
        fn encode(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction::EncodeError>> {
            let rpc_options = T::RpcOptions::default();
            self._encode_impl(
                rpc_options,
            )
        }
    }

    impl<P, T, S> MyInteractionExt<T> for MyInteractionImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction::FrobnicateError>> {
            self._frobnicate_impl(
                rpc_options,
            )
        }
        fn ping_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction::PingError>> {
            self._ping_impl(
                rpc_options,
            )
        }
        fn truthify_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError>>, crate::errors::my_interaction::TruthifyError>> {
            self._truthify_impl(
                rpc_options,
            )
        }
        fn encode_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction::EncodeError>> {
            self._encode_impl(
                rpc_options,
            )
        }

        fn transport(&self) -> &T {
          self.transport()
        }
    }

    impl<'a, S> MyInteraction for S
    where
        S: ::std::convert::AsRef<dyn MyInteraction + 'a>,
        S: ::std::marker::Send,
    {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction::FrobnicateError>> {
            self.as_ref().frobnicate(
            )
        }
        fn ping(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction::PingError>> {
            self.as_ref().ping(
            )
        }
        fn truthify(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError>>, crate::errors::my_interaction::TruthifyError>> {
            self.as_ref().truthify(
            )
        }
        fn encode(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction::EncodeError>> {
            self.as_ref().encode(
            )
        }
    }

    impl<S, T> MyInteractionExt<T> for S
    where
        S: ::std::convert::AsRef<dyn MyInteraction + 'static>,
        S: ::std::convert::AsRef<dyn MyInteractionExt<T> + 'static>,
        S: ::std::marker::Send,
        T: ::fbthrift::Transport,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction::FrobnicateError>> {
            <Self as ::std::convert::AsRef<dyn MyInteractionExt<T>>>::as_ref(self).frobnicate_with_rpc_opts(
                rpc_options,
            )
        }
        fn ping_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction::PingError>> {
            <Self as ::std::convert::AsRef<dyn MyInteractionExt<T>>>::as_ref(self).ping_with_rpc_opts(
                rpc_options,
            )
        }
        fn truthify_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError>>, crate::errors::my_interaction::TruthifyError>> {
            <Self as ::std::convert::AsRef<dyn MyInteractionExt<T>>>::as_ref(self).truthify_with_rpc_opts(
                rpc_options,
            )
        }
        fn encode_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction::EncodeError>> {
            <Self as ::std::convert::AsRef<dyn MyInteractionExt<T>>>::as_ref(self).encode_with_rpc_opts(
                rpc_options,
            )
        }

        fn transport(&self) -> &T {
            <dyn MyInteractionExt<T> as MyInteractionExt<T>>::transport(<Self as ::std::convert::AsRef<dyn MyInteractionExt<T>>>::as_ref(self))
        }
    }

    #[derive(Clone)]
    pub struct make_MyInteraction;

    /// To be called by user directly setting up a client. Avoids
    /// needing ClientFactory trait in scope, avoids unidiomatic
    /// make_Trait name.
    ///
    /// ```
    /// # const _: &str = stringify! {
    /// use bgs::client::BuckGraphService;
    ///
    /// let protocol = BinaryProtocol::new();
    /// let transport = HttpClient::new();
    /// let client = <dyn BuckGraphService>::new(protocol, transport);
    /// # };
    /// ```
    impl dyn MyInteraction {
        pub fn new<P, T>(
            protocol: P,
            transport: T,
        ) -> ::std::sync::Arc<impl MyInteraction + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
        {
            let spawner = ::fbthrift::help::NoopSpawner;
            Self::with_spawner(protocol, transport, spawner)
        }

        pub fn with_spawner<P, T, S>(
            protocol: P,
            transport: T,
            spawner: S,
        ) -> ::std::sync::Arc<impl MyInteraction + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            let _ = protocol;
            let _ = spawner;
            ::std::sync::Arc::new(MyInteractionImpl::<P, T, S>::new(transport))
        }
    }

    impl<T> dyn MyInteractionExt<T>
    where
        T: ::fbthrift::Transport,
    {
        pub fn new<P>(
            protocol: P,
            transport: T,
        ) -> ::std::sync::Arc<impl MyInteractionExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            P::Deserializer: ::std::marker::Send,
        {
            let spawner = ::fbthrift::help::NoopSpawner;
            Self::with_spawner(protocol, transport, spawner)
        }

        pub fn with_spawner<P, S>(
            protocol: P,
            transport: T,
            spawner: S,
        ) -> ::std::sync::Arc<impl MyInteractionExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            let _ = protocol;
            let _ = spawner;
            ::std::sync::Arc::new(MyInteractionImpl::<P, T, S>::new(transport))
        }
    }

    pub type MyInteractionDynClient = <make_MyInteraction as ::fbthrift::ClientFactory>::Api;
    pub type MyInteractionClient = ::std::sync::Arc<MyInteractionDynClient>;

    /// The same thing, but to be called from generic contexts where we are
    /// working with a type parameter `C: ClientFactory` to produce clients.
    impl ::fbthrift::ClientFactory for make_MyInteraction {
        type Api = dyn MyInteraction + ::std::marker::Send + ::std::marker::Sync + 'static;

        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            <dyn MyInteraction>::with_spawner(protocol, transport, spawner)
        }
    }

    pub struct MyInteractionFastImpl<P, T, S = ::fbthrift::NoopSpawner> {
        transport: T,
        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
    }

    impl<P, T, S> MyInteractionFastImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        pub fn new(
            transport: T,
        ) -> Self {
            Self {
                transport,
                _phantom: ::std::marker::PhantomData,
            }
        }

        pub fn transport(&self) -> &T {
            &self.transport
        }

        fn _frobnicate_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction_fast::FrobnicateError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.MyInteractionFast.frobnicate";
            }
            let args = self::Args_MyInteractionFast_frobnicate {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("MyInteractionFast.frobnicate", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyInteractionFast.frobnicate"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_interaction_fast::FrobnicateExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_interaction_fast::FrobnicateError::ApplicationException(aexn))
                };
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyInteractionFast.frobnicate"))
            .boxed()
        }

        fn _ping_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction_fast::PingError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.MyInteractionFast.ping";
            }
            let args = self::Args_MyInteractionFast_ping {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("MyInteractionFast.ping", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyInteractionFast.ping"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_interaction_fast::PingExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_interaction_fast::PingError::ApplicationException(aexn))
                };
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyInteractionFast.ping"))
            .boxed()
        }

        fn _truthify_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError>>, crate::errors::my_interaction_fast::TruthifyError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;
            use ::futures::StreamExt as _;
            use ::fbthrift::Deserialize as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.MyInteractionFast.truthify";
            }
            let args = self::Args_MyInteractionFast_truthify {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("MyInteractionFast.truthify", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call_stream = transport
                .call_stream(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call_stream", method = "MyInteractionFast.truthify"));

            async move {
                let (initial, stream) = call_stream.await?;

                let new_stream = stream.then(|item_res| {
                    async move {
                        match item_res {
                            ::std::result::Result::Err(err) =>
                                ::std::result::Result::Err(crate::errors::my_interaction_fast::TruthifyStreamError::from(err)),
                            ::std::result::Result::Ok(item_enc) => {
                                let res = S::spawn(move || {
                                    match item_enc {
                                        ::fbthrift::ClientStreamElement::Reply(payload) => {
                                            let mut de = P::deserializer(payload);
                                            crate::services::my_interaction_fast::TruthifyStreamExn::read(&mut de)
                                        }
                                        ::fbthrift::ClientStreamElement::ApplicationEx(payload) => {
                                            let mut de = P::deserializer(payload);
                                            ::fbthrift::ApplicationException::read(&mut de).map(crate::services::my_interaction_fast::TruthifyStreamExn::ApplicationException)
                                        }
                                    }
                                }).await?;

                                let item: ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError> =
                                    ::std::convert::From::from(res);
                                item
                            }
                        }
                    }
                })
                .boxed();

                let de = P::deserializer(initial);
                let res: crate::services::my_interaction_fast::TruthifyResponseExn =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?.0?;

                let initial: ::std::result::Result<(), crate::errors::my_interaction_fast::TruthifyError> =
                    ::std::convert::From::from(res);
                let res = initial.map(move |_| new_stream);
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyInteractionFast.truthify"))
            .boxed()
        }

        fn _encode_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction_fast::EncodeError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.MyInteractionFast.encode";
            }
            let args = self::Args_MyInteractionFast_encode {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("MyInteractionFast.encode", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyInteractionFast.encode"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_interaction_fast::EncodeExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_interaction_fast::EncodeError::ApplicationException(aexn))
                };
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyInteractionFast.encode"))
            .boxed()
        }
    }

    pub trait MyInteractionFast: ::std::marker::Send {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction_fast::FrobnicateError>>;

        fn ping(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction_fast::PingError>>;

        fn truthify(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError>>, crate::errors::my_interaction_fast::TruthifyError>>;

        fn encode(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction_fast::EncodeError>>;
    }

    pub trait MyInteractionFastExt<T>: MyInteractionFast
    where
        T: ::fbthrift::Transport,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction_fast::FrobnicateError>>;
        fn ping_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction_fast::PingError>>;
        fn truthify_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError>>, crate::errors::my_interaction_fast::TruthifyError>>;
        fn encode_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction_fast::EncodeError>>;

        fn transport(&self) -> &T;
    }

    struct Args_MyInteractionFast_frobnicate<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyInteractionFast_frobnicate<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyInteractionFast.frobnicate"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyInteractionFast_ping<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyInteractionFast_ping<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyInteractionFast.ping"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyInteractionFast_truthify<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyInteractionFast_truthify<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyInteractionFast.truthify"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyInteractionFast_encode<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyInteractionFast_encode<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyInteractionFast.encode"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    impl<P, T, S> MyInteractionFast for MyInteractionFastImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction_fast::FrobnicateError>> {
            let rpc_options = T::RpcOptions::default();
            self._frobnicate_impl(
                rpc_options,
            )
        }
        fn ping(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction_fast::PingError>> {
            let rpc_options = T::RpcOptions::default();
            self._ping_impl(
                rpc_options,
            )
        }
        fn truthify(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError>>, crate::errors::my_interaction_fast::TruthifyError>> {
            let rpc_options = T::RpcOptions::default();
            self._truthify_impl(
                rpc_options,
            )
        }
        fn encode(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction_fast::EncodeError>> {
            let rpc_options = T::RpcOptions::default();
            self._encode_impl(
                rpc_options,
            )
        }
    }

    impl<P, T, S> MyInteractionFastExt<T> for MyInteractionFastImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction_fast::FrobnicateError>> {
            self._frobnicate_impl(
                rpc_options,
            )
        }
        fn ping_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction_fast::PingError>> {
            self._ping_impl(
                rpc_options,
            )
        }
        fn truthify_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError>>, crate::errors::my_interaction_fast::TruthifyError>> {
            self._truthify_impl(
                rpc_options,
            )
        }
        fn encode_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction_fast::EncodeError>> {
            self._encode_impl(
                rpc_options,
            )
        }

        fn transport(&self) -> &T {
          self.transport()
        }
    }

    impl<'a, S> MyInteractionFast for S
    where
        S: ::std::convert::AsRef<dyn MyInteractionFast + 'a>,
        S: ::std::marker::Send,
    {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction_fast::FrobnicateError>> {
            self.as_ref().frobnicate(
            )
        }
        fn ping(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction_fast::PingError>> {
            self.as_ref().ping(
            )
        }
        fn truthify(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError>>, crate::errors::my_interaction_fast::TruthifyError>> {
            self.as_ref().truthify(
            )
        }
        fn encode(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction_fast::EncodeError>> {
            self.as_ref().encode(
            )
        }
    }

    impl<S, T> MyInteractionFastExt<T> for S
    where
        S: ::std::convert::AsRef<dyn MyInteractionFast + 'static>,
        S: ::std::convert::AsRef<dyn MyInteractionFastExt<T> + 'static>,
        S: ::std::marker::Send,
        T: ::fbthrift::Transport,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_interaction_fast::FrobnicateError>> {
            <Self as ::std::convert::AsRef<dyn MyInteractionFastExt<T>>>::as_ref(self).frobnicate_with_rpc_opts(
                rpc_options,
            )
        }
        fn ping_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_interaction_fast::PingError>> {
            <Self as ::std::convert::AsRef<dyn MyInteractionFastExt<T>>>::as_ref(self).ping_with_rpc_opts(
                rpc_options,
            )
        }
        fn truthify_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError>>, crate::errors::my_interaction_fast::TruthifyError>> {
            <Self as ::std::convert::AsRef<dyn MyInteractionFastExt<T>>>::as_ref(self).truthify_with_rpc_opts(
                rpc_options,
            )
        }
        fn encode_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<, crate::errors::my_interaction_fast::EncodeError>> {
            <Self as ::std::convert::AsRef<dyn MyInteractionFastExt<T>>>::as_ref(self).encode_with_rpc_opts(
                rpc_options,
            )
        }

        fn transport(&self) -> &T {
            <dyn MyInteractionFastExt<T> as MyInteractionFastExt<T>>::transport(<Self as ::std::convert::AsRef<dyn MyInteractionFastExt<T>>>::as_ref(self))
        }
    }

    #[derive(Clone)]
    pub struct make_MyInteractionFast;

    /// To be called by user directly setting up a client. Avoids
    /// needing ClientFactory trait in scope, avoids unidiomatic
    /// make_Trait name.
    ///
    /// ```
    /// # const _: &str = stringify! {
    /// use bgs::client::BuckGraphService;
    ///
    /// let protocol = BinaryProtocol::new();
    /// let transport = HttpClient::new();
    /// let client = <dyn BuckGraphService>::new(protocol, transport);
    /// # };
    /// ```
    impl dyn MyInteractionFast {
        pub const process_in_event_base: &'static ::std::primitive::str = "1";
        pub fn new<P, T>(
            protocol: P,
            transport: T,
        ) -> ::std::sync::Arc<impl MyInteractionFast + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
        {
            let spawner = ::fbthrift::help::NoopSpawner;
            Self::with_spawner(protocol, transport, spawner)
        }

        pub fn with_spawner<P, T, S>(
            protocol: P,
            transport: T,
            spawner: S,
        ) -> ::std::sync::Arc<impl MyInteractionFast + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            let _ = protocol;
            let _ = spawner;
            ::std::sync::Arc::new(MyInteractionFastImpl::<P, T, S>::new(transport))
        }
    }

    impl<T> dyn MyInteractionFastExt<T>
    where
        T: ::fbthrift::Transport,
    {
        pub fn new<P>(
            protocol: P,
            transport: T,
        ) -> ::std::sync::Arc<impl MyInteractionFastExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            P::Deserializer: ::std::marker::Send,
        {
            let spawner = ::fbthrift::help::NoopSpawner;
            Self::with_spawner(protocol, transport, spawner)
        }

        pub fn with_spawner<P, S>(
            protocol: P,
            transport: T,
            spawner: S,
        ) -> ::std::sync::Arc<impl MyInteractionFastExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            let _ = protocol;
            let _ = spawner;
            ::std::sync::Arc::new(MyInteractionFastImpl::<P, T, S>::new(transport))
        }
    }

    pub type MyInteractionFastDynClient = <make_MyInteractionFast as ::fbthrift::ClientFactory>::Api;
    pub type MyInteractionFastClient = ::std::sync::Arc<MyInteractionFastDynClient>;

    /// The same thing, but to be called from generic contexts where we are
    /// working with a type parameter `C: ClientFactory` to produce clients.
    impl ::fbthrift::ClientFactory for make_MyInteractionFast {
        type Api = dyn MyInteractionFast + ::std::marker::Send + ::std::marker::Sync + 'static;

        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            <dyn MyInteractionFast>::with_spawner(protocol, transport, spawner)
        }
    }

    pub struct SerialInteractionImpl<P, T, S = ::fbthrift::NoopSpawner> {
        transport: T,
        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
    }

    impl<P, T, S> SerialInteractionImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        pub fn new(
            transport: T,
        ) -> Self {
            Self {
                transport,
                _phantom: ::std::marker::PhantomData,
            }
        }

        pub fn transport(&self) -> &T {
            &self.transport
        }

        fn _frobnicate_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::serial_interaction::FrobnicateError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.SerialInteraction.frobnicate";
            }
            let args = self::Args_SerialInteraction_frobnicate {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("SerialInteraction.frobnicate", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "SerialInteraction.frobnicate"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::serial_interaction::FrobnicateExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::serial_interaction::FrobnicateError::ApplicationException(aexn))
                };
                res
            }
            .instrument(::tracing::info_span!("stream", method = "SerialInteraction.frobnicate"))
            .boxed()
        }
    }

    pub trait SerialInteraction: ::std::marker::Send {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::serial_interaction::FrobnicateError>>;
    }

    pub trait SerialInteractionExt<T>: SerialInteraction
    where
        T: ::fbthrift::Transport,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::serial_interaction::FrobnicateError>>;

        fn transport(&self) -> &T;
    }

    struct Args_SerialInteraction_frobnicate<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_SerialInteraction_frobnicate<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "SerialInteraction.frobnicate"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    impl<P, T, S> SerialInteraction for SerialInteractionImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::serial_interaction::FrobnicateError>> {
            let rpc_options = T::RpcOptions::default();
            self._frobnicate_impl(
                rpc_options,
            )
        }
    }

    impl<P, T, S> SerialInteractionExt<T> for SerialInteractionImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::serial_interaction::FrobnicateError>> {
            self._frobnicate_impl(
                rpc_options,
            )
        }

        fn transport(&self) -> &T {
          self.transport()
        }
    }

    impl<'a, S> SerialInteraction for S
    where
        S: ::std::convert::AsRef<dyn SerialInteraction + 'a>,
        S: ::std::marker::Send,
    {
        fn frobnicate(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::serial_interaction::FrobnicateError>> {
            self.as_ref().frobnicate(
            )
        }
    }

    impl<S, T> SerialInteractionExt<T> for S
    where
        S: ::std::convert::AsRef<dyn SerialInteraction + 'static>,
        S: ::std::convert::AsRef<dyn SerialInteractionExt<T> + 'static>,
        S: ::std::marker::Send,
        T: ::fbthrift::Transport,
    {
        fn frobnicate_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::serial_interaction::FrobnicateError>> {
            <Self as ::std::convert::AsRef<dyn SerialInteractionExt<T>>>::as_ref(self).frobnicate_with_rpc_opts(
                rpc_options,
            )
        }

        fn transport(&self) -> &T {
            <dyn SerialInteractionExt<T> as SerialInteractionExt<T>>::transport(<Self as ::std::convert::AsRef<dyn SerialInteractionExt<T>>>::as_ref(self))
        }
    }

    #[derive(Clone)]
    pub struct make_SerialInteraction;

    /// To be called by user directly setting up a client. Avoids
    /// needing ClientFactory trait in scope, avoids unidiomatic
    /// make_Trait name.
    ///
    /// ```
    /// # const _: &str = stringify! {
    /// use bgs::client::BuckGraphService;
    ///
    /// let protocol = BinaryProtocol::new();
    /// let transport = HttpClient::new();
    /// let client = <dyn BuckGraphService>::new(protocol, transport);
    /// # };
    /// ```
    impl dyn SerialInteraction {
        pub const serial: &'static ::std::primitive::str = "1";
        pub fn new<P, T>(
            protocol: P,
            transport: T,
        ) -> ::std::sync::Arc<impl SerialInteraction + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
        {
            let spawner = ::fbthrift::help::NoopSpawner;
            Self::with_spawner(protocol, transport, spawner)
        }

        pub fn with_spawner<P, T, S>(
            protocol: P,
            transport: T,
            spawner: S,
        ) -> ::std::sync::Arc<impl SerialInteraction + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            let _ = protocol;
            let _ = spawner;
            ::std::sync::Arc::new(SerialInteractionImpl::<P, T, S>::new(transport))
        }
    }

    impl<T> dyn SerialInteractionExt<T>
    where
        T: ::fbthrift::Transport,
    {
        pub fn new<P>(
            protocol: P,
            transport: T,
        ) -> ::std::sync::Arc<impl SerialInteractionExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            P::Deserializer: ::std::marker::Send,
        {
            let spawner = ::fbthrift::help::NoopSpawner;
            Self::with_spawner(protocol, transport, spawner)
        }

        pub fn with_spawner<P, S>(
            protocol: P,
            transport: T,
            spawner: S,
        ) -> ::std::sync::Arc<impl SerialInteractionExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            let _ = protocol;
            let _ = spawner;
            ::std::sync::Arc::new(SerialInteractionImpl::<P, T, S>::new(transport))
        }
    }

    pub type SerialInteractionDynClient = <make_SerialInteraction as ::fbthrift::ClientFactory>::Api;
    pub type SerialInteractionClient = ::std::sync::Arc<SerialInteractionDynClient>;

    /// The same thing, but to be called from generic contexts where we are
    /// working with a type parameter `C: ClientFactory` to produce clients.
    impl ::fbthrift::ClientFactory for make_SerialInteraction {
        type Api = dyn SerialInteraction + ::std::marker::Send + ::std::marker::Sync + 'static;

        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            <dyn SerialInteraction>::with_spawner(protocol, transport, spawner)
        }
    }

    pub struct MyServiceImpl<P, T, S = ::fbthrift::NoopSpawner> {
        transport: T,
        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
    }

    impl<P, T, S> MyServiceImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        pub fn new(
            transport: T,
        ) -> Self {
            Self {
                transport,
                _phantom: ::std::marker::PhantomData,
            }
        }

        pub fn transport(&self) -> &T {
            &self.transport
        }

        fn _foo_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_service::FooError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.foo";
            }
            let args = self::Args_MyService_foo {
                _phantom: ::std::marker::PhantomData,
            };

            let transport = self.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("foo", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyService.foo"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_service::FooExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_service::FooError::ApplicationException(aexn))
                };
                res
            }
            .instrument(::tracing::info_span!("stream", method = "MyService.foo"))
            .boxed()
        }

        fn _interact_impl(
            &self,
            arg_arg: ::std::primitive::i32,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::client::MyInteractionClient, crate::errors::my_service::InteractError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.interact";
                INTERACTION_NAME = "MyInteraction";
            }
            let args = self::Args_MyService_interact {
                arg: arg_arg,
                _phantom: ::std::marker::PhantomData,
            };

            let interaction_transport = match self.transport().create_interaction(INTERACTION_NAME.as_cstr()) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };
            let interaction_impl = MyInteractionImpl::<P, T, S>::new(interaction_transport);
            let transport = interaction_impl.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("interact", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyService.interact"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_service::InteractExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_service::InteractError::ApplicationException(aexn))
                };
                let interaction_client: crate::client::MyInteractionClient = ::std::sync::Arc::new(interaction_impl);
                res?;
                ::std::result::Result::Ok(interaction_client)
            }
            .instrument(::tracing::info_span!("stream", method = "MyService.interact"))
            .boxed()
        }

        fn _interactFast_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::MyInteractionFastClient, ::std::primitive::i32), crate::errors::my_service::InteractFastError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.interactFast";
                INTERACTION_NAME = "MyInteractionFast";
            }
            let args = self::Args_MyService_interactFast {
                _phantom: ::std::marker::PhantomData,
            };

            let interaction_transport = match self.transport().create_interaction(INTERACTION_NAME.as_cstr()) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };
            let interaction_impl = MyInteractionFastImpl::<P, T, S>::new(interaction_transport);
            let transport = interaction_impl.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("interactFast", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call = transport
                .call(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call", method = "MyService.interactFast"));

            async move {
                let reply_env = call.await?;

                let de = P::deserializer(reply_env);
                let (res, _de): (::std::result::Result<crate::services::my_service::InteractFastExn, _>, _) =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;

                let res = match res {
                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
                    ::std::result::Result::Err(aexn) =>
                        ::std::result::Result::Err(crate::errors::my_service::InteractFastError::ApplicationException(aexn))
                };
                let interaction_client: crate::client::MyInteractionFastClient = ::std::sync::Arc::new(interaction_impl);
                ::std::result::Result::Ok((interaction_client, res?))
            }
            .instrument(::tracing::info_span!("stream", method = "MyService.interactFast"))
            .boxed()
        }

        fn _serialize_impl(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::SerialInteractionClient, (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)), crate::errors::my_service::SerializeError>> {
            use ::const_cstr::const_cstr;
            use ::tracing::Instrument as _;
            use ::futures::FutureExt as _;
            use ::futures::StreamExt as _;
            use ::fbthrift::Deserialize as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                SERVICE_METHOD_NAME = "MyService.serialize";
                INTERACTION_NAME = "SerialInteraction";
            }
            let args = self::Args_MyService_serialize {
                _phantom: ::std::marker::PhantomData,
            };

            let interaction_transport = match self.transport().create_interaction(INTERACTION_NAME.as_cstr()) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };
            let interaction_impl = SerialInteractionImpl::<P, T, S>::new(interaction_transport);
            let transport = interaction_impl.transport();

            // need to do call setup outside of async block because T: Transport isn't Send
            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("serialize", &args) {
                ::std::result::Result::Ok(res) => res,
                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
            };

            let call_stream = transport
                .call_stream(SERVICE_NAME.as_cstr(), SERVICE_METHOD_NAME.as_cstr(), request_env, rpc_options)
                .instrument(::tracing::trace_span!("call_stream", method = "MyService.serialize"));

            async move {
                let (initial, stream) = call_stream.await?;

                let new_stream = stream.then(|item_res| {
                    async move {
                        match item_res {
                            ::std::result::Result::Err(err) =>
                                ::std::result::Result::Err(crate::errors::my_service::SerializeStreamError::from(err)),
                            ::std::result::Result::Ok(item_enc) => {
                                let res = S::spawn(move || {
                                    match item_enc {
                                        ::fbthrift::ClientStreamElement::Reply(payload) => {
                                            let mut de = P::deserializer(payload);
                                            crate::services::my_service::SerializeStreamExn::read(&mut de)
                                        }
                                        ::fbthrift::ClientStreamElement::ApplicationEx(payload) => {
                                            let mut de = P::deserializer(payload);
                                            ::fbthrift::ApplicationException::read(&mut de).map(crate::services::my_service::SerializeStreamExn::ApplicationException)
                                        }
                                    }
                                }).await?;

                                let item: ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError> =
                                    ::std::convert::From::from(res);
                                item
                            }
                        }
                    }
                })
                .boxed();

                let de = P::deserializer(initial);
                let res: crate::services::my_service::SerializeResponseExn =
                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?.0?;

                let initial: ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeError> =
                    ::std::convert::From::from(res);
                let res = initial.map(move |initial| (initial, new_stream));
                let interaction_client: crate::client::SerialInteractionClient = ::std::sync::Arc::new(interaction_impl);
                ::std::result::Result::Ok((interaction_client, res?))
            }
            .instrument(::tracing::info_span!("stream", method = "MyService.serialize"))
            .boxed()
        }
    }

    pub trait MyService: ::std::marker::Send {
        fn createMyInteraction(
            &self,
        ) -> ::std::result::Result<MyInteractionClient, ::anyhow::Error>;

        fn createMyInteractionFast(
            &self,
        ) -> ::std::result::Result<MyInteractionFastClient, ::anyhow::Error>;

        fn createSerialInteraction(
            &self,
        ) -> ::std::result::Result<SerialInteractionClient, ::anyhow::Error>;

        fn foo(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_service::FooError>>;

        fn interact(
            &self,
            arg_arg: ::std::primitive::i32,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::client::MyInteractionClient, crate::errors::my_service::InteractError>>;

        fn interactFast(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::MyInteractionFastClient, ::std::primitive::i32), crate::errors::my_service::InteractFastError>>;

        fn serialize(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::SerialInteractionClient, (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)), crate::errors::my_service::SerializeError>>;
    }

    pub trait MyServiceExt<T>: MyService
    where
        T: ::fbthrift::Transport,
    {
        fn foo_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_service::FooError>>;
        fn interact_with_rpc_opts(
            &self,
            arg_arg: ::std::primitive::i32,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::client::MyInteractionClient, crate::errors::my_service::InteractError>>;
        fn interactFast_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::MyInteractionFastClient, ::std::primitive::i32), crate::errors::my_service::InteractFastError>>;
        fn serialize_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::SerialInteractionClient, (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)), crate::errors::my_service::SerializeError>>;

        fn transport(&self) -> &T;
    }

    struct Args_MyService_foo<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyService_foo<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyService.foo"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyService_interact<'a> {
        arg: ::std::primitive::i32,
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyService_interact<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyService.interact"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_begin("arg", ::fbthrift::TType::I32, 1i16);
            ::fbthrift::Serialize::write(&self.arg, p);
            p.write_field_end();
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyService_interactFast<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyService_interactFast<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyService.interactFast"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    struct Args_MyService_serialize<'a> {
        _phantom: ::std::marker::PhantomData<&'a ()>,
    }

    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_MyService_serialize<'a> {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyService.serialize"))]
        fn write(&self, p: &mut P) {
            p.write_struct_begin("args");
            p.write_field_stop();
            p.write_struct_end();
        }
    }

    impl<P, T, S> MyService for MyServiceImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {

        fn createMyInteraction(
            &self,
        ) -> ::std::result::Result<MyInteractionClient, ::anyhow::Error> {
            use ::const_cstr::const_cstr;
            const_cstr! {
                INTERACTION_NAME = "MyInteraction";
            }
            Ok(
                ::std::sync::Arc::new(
                    MyInteractionImpl::<P, T, S>::new(
                        self.transport().create_interaction(INTERACTION_NAME.as_cstr())?
                    )
                )
            )
        }

        fn createMyInteractionFast(
            &self,
        ) -> ::std::result::Result<MyInteractionFastClient, ::anyhow::Error> {
            use ::const_cstr::const_cstr;
            const_cstr! {
                INTERACTION_NAME = "MyInteractionFast";
            }
            Ok(
                ::std::sync::Arc::new(
                    MyInteractionFastImpl::<P, T, S>::new(
                        self.transport().create_interaction(INTERACTION_NAME.as_cstr())?
                    )
                )
            )
        }

        fn createSerialInteraction(
            &self,
        ) -> ::std::result::Result<SerialInteractionClient, ::anyhow::Error> {
            use ::const_cstr::const_cstr;
            const_cstr! {
                INTERACTION_NAME = "SerialInteraction";
            }
            Ok(
                ::std::sync::Arc::new(
                    SerialInteractionImpl::<P, T, S>::new(
                        self.transport().create_interaction(INTERACTION_NAME.as_cstr())?
                    )
                )
            )
        }
        fn foo(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_service::FooError>> {
            let rpc_options = T::RpcOptions::default();
            self._foo_impl(
                rpc_options,
            )
        }
        fn interact(
            &self,
            arg_arg: ::std::primitive::i32,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::client::MyInteractionClient, crate::errors::my_service::InteractError>> {
            let rpc_options = T::RpcOptions::default();
            self._interact_impl(
                arg_arg,
                rpc_options,
            )
        }
        fn interactFast(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::MyInteractionFastClient, ::std::primitive::i32), crate::errors::my_service::InteractFastError>> {
            let rpc_options = T::RpcOptions::default();
            self._interactFast_impl(
                rpc_options,
            )
        }
        fn serialize(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::SerialInteractionClient, (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)), crate::errors::my_service::SerializeError>> {
            let rpc_options = T::RpcOptions::default();
            self._serialize_impl(
                rpc_options,
            )
        }
    }

    impl<P, T, S> MyServiceExt<T> for MyServiceImpl<P, T, S>
    where
        P: ::fbthrift::Protocol,
        T: ::fbthrift::Transport,
        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
        P::Deserializer: ::std::marker::Send,
        S: ::fbthrift::help::Spawner,
    {
        fn foo_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_service::FooError>> {
            self._foo_impl(
                rpc_options,
            )
        }
        fn interact_with_rpc_opts(
            &self,
            arg_arg: ::std::primitive::i32,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::client::MyInteractionClient, crate::errors::my_service::InteractError>> {
            self._interact_impl(
                arg_arg,
                rpc_options,
            )
        }
        fn interactFast_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::MyInteractionFastClient, ::std::primitive::i32), crate::errors::my_service::InteractFastError>> {
            self._interactFast_impl(
                rpc_options,
            )
        }
        fn serialize_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::SerialInteractionClient, (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)), crate::errors::my_service::SerializeError>> {
            self._serialize_impl(
                rpc_options,
            )
        }

        fn transport(&self) -> &T {
          self.transport()
        }
    }

    impl<'a, S> MyService for S
    where
        S: ::std::convert::AsRef<dyn MyService + 'a>,
        S: ::std::marker::Send,
    {
        fn createMyInteraction(
            &self,
        ) -> ::std::result::Result<MyInteractionClient, ::anyhow::Error> {
            self.as_ref().createMyInteraction()
        }
        fn createMyInteractionFast(
            &self,
        ) -> ::std::result::Result<MyInteractionFastClient, ::anyhow::Error> {
            self.as_ref().createMyInteractionFast()
        }
        fn createSerialInteraction(
            &self,
        ) -> ::std::result::Result<SerialInteractionClient, ::anyhow::Error> {
            self.as_ref().createSerialInteraction()
        }
        fn foo(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_service::FooError>> {
            self.as_ref().foo(
            )
        }
        fn interact(
            &self,
            arg_arg: ::std::primitive::i32,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::client::MyInteractionClient, crate::errors::my_service::InteractError>> {
            self.as_ref().interact(
                arg_arg,
            )
        }
        fn interactFast(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::MyInteractionFastClient, ::std::primitive::i32), crate::errors::my_service::InteractFastError>> {
            self.as_ref().interactFast(
            )
        }
        fn serialize(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::SerialInteractionClient, (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)), crate::errors::my_service::SerializeError>> {
            self.as_ref().serialize(
            )
        }
    }

    impl<S, T> MyServiceExt<T> for S
    where
        S: ::std::convert::AsRef<dyn MyService + 'static>,
        S: ::std::convert::AsRef<dyn MyServiceExt<T> + 'static>,
        S: ::std::marker::Send,
        T: ::fbthrift::Transport,
    {
        fn foo_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_service::FooError>> {
            <Self as ::std::convert::AsRef<dyn MyServiceExt<T>>>::as_ref(self).foo_with_rpc_opts(
                rpc_options,
            )
        }
        fn interact_with_rpc_opts(
            &self,
            arg_arg: ::std::primitive::i32,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::client::MyInteractionClient, crate::errors::my_service::InteractError>> {
            <Self as ::std::convert::AsRef<dyn MyServiceExt<T>>>::as_ref(self).interact_with_rpc_opts(
                arg_arg,
                rpc_options,
            )
        }
        fn interactFast_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::MyInteractionFastClient, ::std::primitive::i32), crate::errors::my_service::InteractFastError>> {
            <Self as ::std::convert::AsRef<dyn MyServiceExt<T>>>::as_ref(self).interactFast_with_rpc_opts(
                rpc_options,
            )
        }
        fn serialize_with_rpc_opts(
            &self,
            rpc_options: T::RpcOptions,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::SerialInteractionClient, (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)), crate::errors::my_service::SerializeError>> {
            <Self as ::std::convert::AsRef<dyn MyServiceExt<T>>>::as_ref(self).serialize_with_rpc_opts(
                rpc_options,
            )
        }

        fn transport(&self) -> &T {
            <dyn MyServiceExt<T> as MyServiceExt<T>>::transport(<Self as ::std::convert::AsRef<dyn MyServiceExt<T>>>::as_ref(self))
        }
    }

    #[derive(Clone)]
    pub struct make_MyService;

    /// To be called by user directly setting up a client. Avoids
    /// needing ClientFactory trait in scope, avoids unidiomatic
    /// make_Trait name.
    ///
    /// ```
    /// # const _: &str = stringify! {
    /// use bgs::client::BuckGraphService;
    ///
    /// let protocol = BinaryProtocol::new();
    /// let transport = HttpClient::new();
    /// let client = <dyn BuckGraphService>::new(protocol, transport);
    /// # };
    /// ```
    impl dyn MyService {
        pub fn new<P, T>(
            protocol: P,
            transport: T,
        ) -> ::std::sync::Arc<impl MyService + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
        {
            let spawner = ::fbthrift::help::NoopSpawner;
            Self::with_spawner(protocol, transport, spawner)
        }

        pub fn with_spawner<P, T, S>(
            protocol: P,
            transport: T,
            spawner: S,
        ) -> ::std::sync::Arc<impl MyService + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            let _ = protocol;
            let _ = spawner;
            ::std::sync::Arc::new(MyServiceImpl::<P, T, S>::new(transport))
        }
    }

    impl<T> dyn MyServiceExt<T>
    where
        T: ::fbthrift::Transport,
    {
        pub fn new<P>(
            protocol: P,
            transport: T,
        ) -> ::std::sync::Arc<impl MyServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            P::Deserializer: ::std::marker::Send,
        {
            let spawner = ::fbthrift::help::NoopSpawner;
            Self::with_spawner(protocol, transport, spawner)
        }

        pub fn with_spawner<P, S>(
            protocol: P,
            transport: T,
            spawner: S,
        ) -> ::std::sync::Arc<impl MyServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            let _ = protocol;
            let _ = spawner;
            ::std::sync::Arc::new(MyServiceImpl::<P, T, S>::new(transport))
        }
    }

    pub type MyServiceDynClient = <make_MyService as ::fbthrift::ClientFactory>::Api;
    pub type MyServiceClient = ::std::sync::Arc<MyServiceDynClient>;

    /// The same thing, but to be called from generic contexts where we are
    /// working with a type parameter `C: ClientFactory` to produce clients.
    impl ::fbthrift::ClientFactory for make_MyService {
        type Api = dyn MyService + ::std::marker::Send + ::std::marker::Sync + 'static;

        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
        where
            P: ::fbthrift::Protocol<Frame = T>,
            T: ::fbthrift::Transport,
            P::Deserializer: ::std::marker::Send,
            S: ::fbthrift::help::Spawner,
        {
            <dyn MyService>::with_spawner(protocol, transport, spawner)
        }
    }

}

/// Server definitions for `module`.
pub mod server {
    #[::async_trait::async_trait]
    pub trait MyInteraction: ::std::marker::Send + ::std::marker::Sync + 'static {
        async fn frobnicate(
            &self,
        ) -> ::std::result::Result<::std::primitive::i32, crate::services::my_interaction::FrobnicateExn> {
            ::std::result::Result::Err(crate::services::my_interaction::FrobnicateExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyInteraction",
                    "frobnicate",
                ),
            ))
        }
        async fn ping(
            &self,
        ) -> ::std::result::Result<(), crate::services::my_interaction::PingExn> {
            ::std::result::Result::Err(crate::services::my_interaction::PingExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyInteraction",
                    "ping",
                ),
            ))
        }
        async fn truthify(
            &self,
        ) -> ::std::result::Result<    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::services::my_interaction::TruthifyStreamExn>>
, crate::services::my_interaction::TruthifyExn> {
            ::std::result::Result::Err(crate::services::my_interaction::TruthifyExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyInteraction",
                    "truthify",
                ),
            ))
        }
        async fn encode(
            &self,
        ) -> ::std::result::Result<, crate::services::my_interaction::EncodeExn> {
            ::std::result::Result::Err(crate::services::my_interaction::EncodeExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyInteraction",
                    "encode",
                ),
            ))
        }
        async fn on_termination(&self) {}
    }

    #[::async_trait::async_trait]
    impl<T> MyInteraction for ::std::boxed::Box<T>
    where
        T: MyInteraction + Send + Sync + ?Sized,
    {
        async fn frobnicate(
            &self,
        ) -> ::std::result::Result<::std::primitive::i32, crate::services::my_interaction::FrobnicateExn> {
            (**self).frobnicate(
            ).await
        }
        async fn ping(
            &self,
        ) -> ::std::result::Result<(), crate::services::my_interaction::PingExn> {
            (**self).ping(
            ).await
        }
        async fn truthify(
            &self,
        ) -> ::std::result::Result<    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::services::my_interaction::TruthifyStreamExn>>
, crate::services::my_interaction::TruthifyExn> {
            (**self).truthify(
            ).await
        }
        async fn encode(
            &self,
        ) -> ::std::result::Result<, crate::services::my_interaction::EncodeExn> {
            (**self).encode(
            ).await
        }
        async fn on_termination(&self) {
            (**self).on_termination().await;
        }
    }

    /// Processor for MyInteraction's methods.
    #[derive(Clone, Debug)]
    pub struct MyInteractionProcessor<P, H, R, RS> {
        service: H,
        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
    }

    struct Args_MyInteraction_frobnicate {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyInteraction_frobnicate {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyInteraction.frobnicate"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    struct Args_MyInteraction_ping {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyInteraction_ping {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyInteraction.ping"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    struct Args_MyInteraction_truthify {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyInteraction_truthify {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyInteraction.truthify"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    struct Args_MyInteraction_encode {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyInteraction_encode {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyInteraction.encode"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    impl<P, H, R, RS> MyInteractionProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Frame: ::std::marker::Send + 'static,
        P::Deserializer: ::std::marker::Send,
        H: MyInteraction,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        pub fn new(service: H) -> Self {
            Self {
                service,
                supa: ::fbthrift::NullServiceProcessor::new(),
                _phantom: ::std::marker::PhantomData,
            }
        }

        pub fn into_inner(self) -> H {
            self.service
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyInteraction.frobnicate"))]
        async fn handle_frobnicate<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "MyInteraction.frobnicate";
                SERVICE_METHOD_NAME = "MyService.MyInteraction.frobnicate";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyInteraction_frobnicate = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.frobnicate(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyInteraction.frobnicate", "success");
                    crate::services::my_interaction::FrobnicateExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction::FrobnicateExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "frobnicate",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyInteraction.frobnicate", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteraction.frobnicate", exn);
                    ::tracing::error!(method = "MyInteraction.frobnicate", panic = ?aexn);
                    crate::services::my_interaction::FrobnicateExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "frobnicate",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyInteraction.ping"))]
        async fn handle_ping<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "MyInteraction.ping";
                SERVICE_METHOD_NAME = "MyService.MyInteraction.ping";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyInteraction_ping = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.ping(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyInteraction.ping", "success");
                    crate::services::my_interaction::PingExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction::PingExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "ping",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyInteraction.ping", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteraction.ping", exn);
                    ::tracing::error!(method = "MyInteraction.ping", panic = ?aexn);
                    crate::services::my_interaction::PingExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "ping",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyInteraction.truthify"))]
        async fn handle_truthify<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "MyInteraction.truthify";
                SERVICE_METHOD_NAME = "MyService.MyInteraction.truthify";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyInteraction_truthify = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.truthify(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyInteraction.truthify", "success");
                    crate::services::my_interaction::TruthifyExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction::TruthifyExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "truthify",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteraction.truthify", exn);
                    ::tracing::error!(method = "MyInteraction.truthify", panic = ?aexn);
                    crate::services::my_interaction::TruthifyExn::ApplicationException(aexn)
                }
            };

            use ::futures::StreamExt as _;

            let (response, stream) = match res {
                crate::services::my_interaction::TruthifyExn::Success(res) => {
                    let response = crate::services::my_interaction::TruthifyResponseExn::Success(());
                    let stream = res;

                    let stream = ::std::panic::AssertUnwindSafe(stream)
                        .catch_unwind()
                        .map(|item| {
                            match item {
                                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                                    let item = crate::services::my_interaction::TruthifyStreamExn::Success(res);
                                    match ::fbthrift::help::serialize_stream_item::<P, _>(item) {
                                        Ok(payload) => ::fbthrift::SerializedStreamElement::Success(payload),
                                        Err(err) => {
                                            tracing::error!(?err, method="MyInteraction.truthify", "Failed to serialize success response");
                                            ::fbthrift::SerializedStreamElement::SerializationError(err)
                                        },
                                    }
                                }
                                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction::TruthifyStreamExn::Success(_))) => {
                                    panic!("{} attempted to return success via error", "truthify");
                                }
                                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction::TruthifyStreamExn::ApplicationException(aexn))) => {
                                    tracing::info!(?aexn, method="MyInteraction.truthify", "Streaming ApplicationException");
                                    ::fbthrift::SerializedStreamElement::ApplicationException(aexn)
                                }
                                ::std::result::Result::Err(exn) => {
                                    tracing::error!(?exn, method="MyInteraction.truthify", "Streaming unwind");
                                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteraction.truthify", exn);
                                    ::fbthrift::SerializedStreamElement::ApplicationException(aexn)
                                }
                            }
                        })
                        .boxed();
                    (response, Some(stream))
                },
                crate::services::my_interaction::TruthifyExn::ApplicationException(aexn)=> {
                    let response = crate::services::my_interaction::TruthifyResponseExn::ApplicationException(aexn);
                    (response, None)
                },
            };

            let response = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                        "truthify",
                        METHOD_NAME.as_cstr(),
                        _seqid,
                        req_ctxt,
                        &mut ctx_stack,
                        response
                    )?;

            let _ = reply_state.lock().unwrap().send_stream_reply(response, stream, P::PROTOCOL_ID);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyInteraction.encode"))]
        async fn handle_encode<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "MyInteraction.encode";
                SERVICE_METHOD_NAME = "MyService.MyInteraction.encode";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyInteraction_encode = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.encode(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyInteraction.encode", "success");
                    crate::services::my_interaction::EncodeExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction::EncodeExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "encode",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyInteraction.encode", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteraction.encode", exn);
                    ::tracing::error!(method = "MyInteraction.encode", panic = ?aexn);
                    crate::services::my_interaction::EncodeExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "encode",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }
    }

    #[::async_trait::async_trait]
    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for MyInteractionProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Deserializer: ::std::marker::Send,
        H: MyInteraction,
        P::Frame: ::std::marker::Send + 'static,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        type RequestContext = R;
        type ReplyState = RS;

        #[inline]
        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
            match name {
                b"MyInteraction.frobnicate" => ::std::result::Result::Ok(0usize),
                b"MyInteraction.ping" => ::std::result::Result::Ok(1usize),
                b"MyInteraction.truthify" => ::std::result::Result::Ok(2usize),
                b"MyInteraction.encode" => ::std::result::Result::Ok(3usize),
                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
            }
        }

        #[allow(clippy::match_single_binding)]
        async fn handle_method(
            &self,
            idx: ::std::primitive::usize,
            _p: &mut P::Deserializer,
            _req: ::fbthrift::ProtocolDecoded<P>,
            _req_ctxt: &R,
            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            match idx {
                0usize => {
                    self.handle_frobnicate(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                1usize => {
                    self.handle_ping(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                2usize => {
                    self.handle_truthify(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                3usize => {
                    self.handle_encode(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                bad => panic!(
                    "{}: unexpected method idx {}",
                    "MyInteractionProcessor",
                    bad
                ),
            }
        }

        #[allow(clippy::match_single_binding)]
        #[inline]
        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
            match name {
                _ => ::anyhow::bail!("Unknown interaction"),
            }
        }

        #[allow(clippy::match_single_binding)]
        fn handle_create_interaction(
            &self,
            idx: ::std::primitive::usize,
        ) -> ::anyhow::Result<
            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
        > {
            match idx {
                bad => panic!(
                    "{}: unexpected method idx {}",
                    "MyInteractionProcessor",
                    bad
                ),
            }
        }

        async fn handle_on_termination(&self) {
            self.service.on_termination().await
        }
    }

    #[::async_trait::async_trait]
    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for MyInteractionProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Deserializer: ::std::marker::Send,
        P::Frame: ::std::marker::Send + 'static,
        H: MyInteraction,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        // Interactions have () as their handler associated type
        // to make `create_interaction` have a common return type.
        type Handler = ();
        type RequestContext = R;
        type ReplyState = RS;

        #[tracing::instrument(level="trace", skip_all, fields(service = "MyInteraction"))]
        async fn call(
            &self,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
        ) -> ::anyhow::Result<()> {
            use ::fbthrift::{ProtocolReader as _, ServiceProcessor as _};
            let mut p = P::deserializer(req.clone());
            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
            if mty != ::fbthrift::MessageType::Call {
                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
                    format!("message type {:?} not handled", mty)
                )));
            }
            let idx = match idx {
                ::std::result::Result::Ok(idx) => idx,
                ::std::result::Result::Err(_) => {
                    return self.supa.call(req, req_ctxt, reply_state).await;
                }
            };
            self.handle_method(idx, &mut p, req, req_ctxt, reply_state, seqid).await?;
            p.read_message_end()?;

            Ok(())
        }

        fn create_interaction(
            &self,
            name: &str,
        ) -> ::anyhow::Result<
            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
        > {
            use ::fbthrift::{ServiceProcessor as _};
            let idx = self.create_interaction_idx(name);
            let idx = match idx {
                ::anyhow::Result::Ok(idx) => idx,
                ::anyhow::Result::Err(_) => {
                    return self.supa.create_interaction(name);
                }
            };
            self.handle_create_interaction(idx)
        }

        fn get_method_names(&self) -> &'static [&'static str] {
            &[
                // interaction's method names are never queried directly.
                // they are always queried from the "main" processor.
            ]
        }

        async fn on_termination(&self) {
            use ::fbthrift::{ServiceProcessor as _};
            self.handle_on_termination().await
        }
    }

    #[::async_trait::async_trait]
    pub trait MyInteractionFast: ::std::marker::Send + ::std::marker::Sync + 'static {
        async fn frobnicate(
            &self,
        ) -> ::std::result::Result<::std::primitive::i32, crate::services::my_interaction_fast::FrobnicateExn> {
            ::std::result::Result::Err(crate::services::my_interaction_fast::FrobnicateExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyInteractionFast",
                    "frobnicate",
                ),
            ))
        }
        async fn ping(
            &self,
        ) -> ::std::result::Result<(), crate::services::my_interaction_fast::PingExn> {
            ::std::result::Result::Err(crate::services::my_interaction_fast::PingExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyInteractionFast",
                    "ping",
                ),
            ))
        }
        async fn truthify(
            &self,
        ) -> ::std::result::Result<    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::services::my_interaction_fast::TruthifyStreamExn>>
, crate::services::my_interaction_fast::TruthifyExn> {
            ::std::result::Result::Err(crate::services::my_interaction_fast::TruthifyExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyInteractionFast",
                    "truthify",
                ),
            ))
        }
        async fn encode(
            &self,
        ) -> ::std::result::Result<, crate::services::my_interaction_fast::EncodeExn> {
            ::std::result::Result::Err(crate::services::my_interaction_fast::EncodeExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyInteractionFast",
                    "encode",
                ),
            ))
        }
        async fn on_termination(&self) {}
    }

    #[::async_trait::async_trait]
    impl<T> MyInteractionFast for ::std::boxed::Box<T>
    where
        T: MyInteractionFast + Send + Sync + ?Sized,
    {
        async fn frobnicate(
            &self,
        ) -> ::std::result::Result<::std::primitive::i32, crate::services::my_interaction_fast::FrobnicateExn> {
            (**self).frobnicate(
            ).await
        }
        async fn ping(
            &self,
        ) -> ::std::result::Result<(), crate::services::my_interaction_fast::PingExn> {
            (**self).ping(
            ).await
        }
        async fn truthify(
            &self,
        ) -> ::std::result::Result<    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::services::my_interaction_fast::TruthifyStreamExn>>
, crate::services::my_interaction_fast::TruthifyExn> {
            (**self).truthify(
            ).await
        }
        async fn encode(
            &self,
        ) -> ::std::result::Result<, crate::services::my_interaction_fast::EncodeExn> {
            (**self).encode(
            ).await
        }
        async fn on_termination(&self) {
            (**self).on_termination().await;
        }
    }

    /// Processor for MyInteractionFast's methods.
    #[derive(Clone, Debug)]
    pub struct MyInteractionFastProcessor<P, H, R, RS> {
        service: H,
        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
    }

    struct Args_MyInteractionFast_frobnicate {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyInteractionFast_frobnicate {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyInteractionFast.frobnicate"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    struct Args_MyInteractionFast_ping {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyInteractionFast_ping {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyInteractionFast.ping"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    struct Args_MyInteractionFast_truthify {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyInteractionFast_truthify {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyInteractionFast.truthify"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    struct Args_MyInteractionFast_encode {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyInteractionFast_encode {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyInteractionFast.encode"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    impl<P, H, R, RS> MyInteractionFastProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Frame: ::std::marker::Send + 'static,
        P::Deserializer: ::std::marker::Send,
        H: MyInteractionFast,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        pub fn new(service: H) -> Self {
            Self {
                service,
                supa: ::fbthrift::NullServiceProcessor::new(),
                _phantom: ::std::marker::PhantomData,
            }
        }

        pub fn into_inner(self) -> H {
            self.service
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyInteractionFast.frobnicate"))]
        async fn handle_frobnicate<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "MyInteractionFast.frobnicate";
                SERVICE_METHOD_NAME = "MyService.MyInteractionFast.frobnicate";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyInteractionFast_frobnicate = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.frobnicate(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyInteractionFast.frobnicate", "success");
                    crate::services::my_interaction_fast::FrobnicateExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction_fast::FrobnicateExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "frobnicate",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyInteractionFast.frobnicate", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteractionFast.frobnicate", exn);
                    ::tracing::error!(method = "MyInteractionFast.frobnicate", panic = ?aexn);
                    crate::services::my_interaction_fast::FrobnicateExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "frobnicate",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyInteractionFast.ping"))]
        async fn handle_ping<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "MyInteractionFast.ping";
                SERVICE_METHOD_NAME = "MyService.MyInteractionFast.ping";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyInteractionFast_ping = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.ping(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyInteractionFast.ping", "success");
                    crate::services::my_interaction_fast::PingExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction_fast::PingExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "ping",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyInteractionFast.ping", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteractionFast.ping", exn);
                    ::tracing::error!(method = "MyInteractionFast.ping", panic = ?aexn);
                    crate::services::my_interaction_fast::PingExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "ping",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyInteractionFast.truthify"))]
        async fn handle_truthify<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "MyInteractionFast.truthify";
                SERVICE_METHOD_NAME = "MyService.MyInteractionFast.truthify";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyInteractionFast_truthify = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.truthify(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyInteractionFast.truthify", "success");
                    crate::services::my_interaction_fast::TruthifyExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction_fast::TruthifyExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "truthify",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteractionFast.truthify", exn);
                    ::tracing::error!(method = "MyInteractionFast.truthify", panic = ?aexn);
                    crate::services::my_interaction_fast::TruthifyExn::ApplicationException(aexn)
                }
            };

            use ::futures::StreamExt as _;

            let (response, stream) = match res {
                crate::services::my_interaction_fast::TruthifyExn::Success(res) => {
                    let response = crate::services::my_interaction_fast::TruthifyResponseExn::Success(());
                    let stream = res;

                    let stream = ::std::panic::AssertUnwindSafe(stream)
                        .catch_unwind()
                        .map(|item| {
                            match item {
                                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                                    let item = crate::services::my_interaction_fast::TruthifyStreamExn::Success(res);
                                    match ::fbthrift::help::serialize_stream_item::<P, _>(item) {
                                        Ok(payload) => ::fbthrift::SerializedStreamElement::Success(payload),
                                        Err(err) => {
                                            tracing::error!(?err, method="MyInteractionFast.truthify", "Failed to serialize success response");
                                            ::fbthrift::SerializedStreamElement::SerializationError(err)
                                        },
                                    }
                                }
                                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction_fast::TruthifyStreamExn::Success(_))) => {
                                    panic!("{} attempted to return success via error", "truthify");
                                }
                                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction_fast::TruthifyStreamExn::ApplicationException(aexn))) => {
                                    tracing::info!(?aexn, method="MyInteractionFast.truthify", "Streaming ApplicationException");
                                    ::fbthrift::SerializedStreamElement::ApplicationException(aexn)
                                }
                                ::std::result::Result::Err(exn) => {
                                    tracing::error!(?exn, method="MyInteractionFast.truthify", "Streaming unwind");
                                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteractionFast.truthify", exn);
                                    ::fbthrift::SerializedStreamElement::ApplicationException(aexn)
                                }
                            }
                        })
                        .boxed();
                    (response, Some(stream))
                },
                crate::services::my_interaction_fast::TruthifyExn::ApplicationException(aexn)=> {
                    let response = crate::services::my_interaction_fast::TruthifyResponseExn::ApplicationException(aexn);
                    (response, None)
                },
            };

            let response = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                        "truthify",
                        METHOD_NAME.as_cstr(),
                        _seqid,
                        req_ctxt,
                        &mut ctx_stack,
                        response
                    )?;

            let _ = reply_state.lock().unwrap().send_stream_reply(response, stream, P::PROTOCOL_ID);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyInteractionFast.encode"))]
        async fn handle_encode<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "MyInteractionFast.encode";
                SERVICE_METHOD_NAME = "MyService.MyInteractionFast.encode";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyInteractionFast_encode = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.encode(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyInteractionFast.encode", "success");
                    crate::services::my_interaction_fast::EncodeExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_interaction_fast::EncodeExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "encode",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyInteractionFast.encode", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyInteractionFast.encode", exn);
                    ::tracing::error!(method = "MyInteractionFast.encode", panic = ?aexn);
                    crate::services::my_interaction_fast::EncodeExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "encode",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }
    }

    #[::async_trait::async_trait]
    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for MyInteractionFastProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Deserializer: ::std::marker::Send,
        H: MyInteractionFast,
        P::Frame: ::std::marker::Send + 'static,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        type RequestContext = R;
        type ReplyState = RS;

        #[inline]
        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
            match name {
                b"MyInteractionFast.frobnicate" => ::std::result::Result::Ok(0usize),
                b"MyInteractionFast.ping" => ::std::result::Result::Ok(1usize),
                b"MyInteractionFast.truthify" => ::std::result::Result::Ok(2usize),
                b"MyInteractionFast.encode" => ::std::result::Result::Ok(3usize),
                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
            }
        }

        #[allow(clippy::match_single_binding)]
        async fn handle_method(
            &self,
            idx: ::std::primitive::usize,
            _p: &mut P::Deserializer,
            _req: ::fbthrift::ProtocolDecoded<P>,
            _req_ctxt: &R,
            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            match idx {
                0usize => {
                    self.handle_frobnicate(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                1usize => {
                    self.handle_ping(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                2usize => {
                    self.handle_truthify(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                3usize => {
                    self.handle_encode(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                bad => panic!(
                    "{}: unexpected method idx {}",
                    "MyInteractionFastProcessor",
                    bad
                ),
            }
        }

        #[allow(clippy::match_single_binding)]
        #[inline]
        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
            match name {
                _ => ::anyhow::bail!("Unknown interaction"),
            }
        }

        #[allow(clippy::match_single_binding)]
        fn handle_create_interaction(
            &self,
            idx: ::std::primitive::usize,
        ) -> ::anyhow::Result<
            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
        > {
            match idx {
                bad => panic!(
                    "{}: unexpected method idx {}",
                    "MyInteractionFastProcessor",
                    bad
                ),
            }
        }

        async fn handle_on_termination(&self) {
            self.service.on_termination().await
        }
    }

    #[::async_trait::async_trait]
    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for MyInteractionFastProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Deserializer: ::std::marker::Send,
        P::Frame: ::std::marker::Send + 'static,
        H: MyInteractionFast,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        // Interactions have () as their handler associated type
        // to make `create_interaction` have a common return type.
        type Handler = ();
        type RequestContext = R;
        type ReplyState = RS;

        #[tracing::instrument(level="trace", skip_all, fields(service = "MyInteractionFast"))]
        async fn call(
            &self,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
        ) -> ::anyhow::Result<()> {
            use ::fbthrift::{ProtocolReader as _, ServiceProcessor as _};
            let mut p = P::deserializer(req.clone());
            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
            if mty != ::fbthrift::MessageType::Call {
                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
                    format!("message type {:?} not handled", mty)
                )));
            }
            let idx = match idx {
                ::std::result::Result::Ok(idx) => idx,
                ::std::result::Result::Err(_) => {
                    return self.supa.call(req, req_ctxt, reply_state).await;
                }
            };
            self.handle_method(idx, &mut p, req, req_ctxt, reply_state, seqid).await?;
            p.read_message_end()?;

            Ok(())
        }

        fn create_interaction(
            &self,
            name: &str,
        ) -> ::anyhow::Result<
            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
        > {
            use ::fbthrift::{ServiceProcessor as _};
            let idx = self.create_interaction_idx(name);
            let idx = match idx {
                ::anyhow::Result::Ok(idx) => idx,
                ::anyhow::Result::Err(_) => {
                    return self.supa.create_interaction(name);
                }
            };
            self.handle_create_interaction(idx)
        }

        fn get_method_names(&self) -> &'static [&'static str] {
            &[
                // interaction's method names are never queried directly.
                // they are always queried from the "main" processor.
            ]
        }

        async fn on_termination(&self) {
            use ::fbthrift::{ServiceProcessor as _};
            self.handle_on_termination().await
        }
    }

    #[::async_trait::async_trait]
    pub trait SerialInteraction: ::std::marker::Send + ::std::marker::Sync + 'static {
        async fn frobnicate(
            &self,
        ) -> ::std::result::Result<(), crate::services::serial_interaction::FrobnicateExn> {
            ::std::result::Result::Err(crate::services::serial_interaction::FrobnicateExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "SerialInteraction",
                    "frobnicate",
                ),
            ))
        }
        async fn on_termination(&self) {}
    }

    #[::async_trait::async_trait]
    impl<T> SerialInteraction for ::std::boxed::Box<T>
    where
        T: SerialInteraction + Send + Sync + ?Sized,
    {
        async fn frobnicate(
            &self,
        ) -> ::std::result::Result<(), crate::services::serial_interaction::FrobnicateExn> {
            (**self).frobnicate(
            ).await
        }
        async fn on_termination(&self) {
            (**self).on_termination().await;
        }
    }

    /// Processor for SerialInteraction's methods.
    #[derive(Clone, Debug)]
    pub struct SerialInteractionProcessor<P, H, R, RS> {
        service: H,
        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
    }

    struct Args_SerialInteraction_frobnicate {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_SerialInteraction_frobnicate {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "SerialInteraction.frobnicate"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    impl<P, H, R, RS> SerialInteractionProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Frame: ::std::marker::Send + 'static,
        P::Deserializer: ::std::marker::Send,
        H: SerialInteraction,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        pub fn new(service: H) -> Self {
            Self {
                service,
                supa: ::fbthrift::NullServiceProcessor::new(),
                _phantom: ::std::marker::PhantomData,
            }
        }

        pub fn into_inner(self) -> H {
            self.service
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "SerialInteraction.frobnicate"))]
        async fn handle_frobnicate<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "SerialInteraction.frobnicate";
                SERVICE_METHOD_NAME = "MyService.SerialInteraction.frobnicate";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_SerialInteraction_frobnicate = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.frobnicate(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "SerialInteraction.frobnicate", "success");
                    crate::services::serial_interaction::FrobnicateExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::serial_interaction::FrobnicateExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "frobnicate",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "SerialInteraction.frobnicate", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("SerialInteraction.frobnicate", exn);
                    ::tracing::error!(method = "SerialInteraction.frobnicate", panic = ?aexn);
                    crate::services::serial_interaction::FrobnicateExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "frobnicate",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }
    }

    #[::async_trait::async_trait]
    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for SerialInteractionProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Deserializer: ::std::marker::Send,
        H: SerialInteraction,
        P::Frame: ::std::marker::Send + 'static,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        type RequestContext = R;
        type ReplyState = RS;

        #[inline]
        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
            match name {
                b"SerialInteraction.frobnicate" => ::std::result::Result::Ok(0usize),
                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
            }
        }

        #[allow(clippy::match_single_binding)]
        async fn handle_method(
            &self,
            idx: ::std::primitive::usize,
            _p: &mut P::Deserializer,
            _req: ::fbthrift::ProtocolDecoded<P>,
            _req_ctxt: &R,
            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            match idx {
                0usize => {
                    self.handle_frobnicate(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                bad => panic!(
                    "{}: unexpected method idx {}",
                    "SerialInteractionProcessor",
                    bad
                ),
            }
        }

        #[allow(clippy::match_single_binding)]
        #[inline]
        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
            match name {
                _ => ::anyhow::bail!("Unknown interaction"),
            }
        }

        #[allow(clippy::match_single_binding)]
        fn handle_create_interaction(
            &self,
            idx: ::std::primitive::usize,
        ) -> ::anyhow::Result<
            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
        > {
            match idx {
                bad => panic!(
                    "{}: unexpected method idx {}",
                    "SerialInteractionProcessor",
                    bad
                ),
            }
        }

        async fn handle_on_termination(&self) {
            self.service.on_termination().await
        }
    }

    #[::async_trait::async_trait]
    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for SerialInteractionProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Deserializer: ::std::marker::Send,
        P::Frame: ::std::marker::Send + 'static,
        H: SerialInteraction,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        // Interactions have () as their handler associated type
        // to make `create_interaction` have a common return type.
        type Handler = ();
        type RequestContext = R;
        type ReplyState = RS;

        #[tracing::instrument(level="trace", skip_all, fields(service = "SerialInteraction"))]
        async fn call(
            &self,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
        ) -> ::anyhow::Result<()> {
            use ::fbthrift::{ProtocolReader as _, ServiceProcessor as _};
            let mut p = P::deserializer(req.clone());
            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
            if mty != ::fbthrift::MessageType::Call {
                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
                    format!("message type {:?} not handled", mty)
                )));
            }
            let idx = match idx {
                ::std::result::Result::Ok(idx) => idx,
                ::std::result::Result::Err(_) => {
                    return self.supa.call(req, req_ctxt, reply_state).await;
                }
            };
            self.handle_method(idx, &mut p, req, req_ctxt, reply_state, seqid).await?;
            p.read_message_end()?;

            Ok(())
        }

        fn create_interaction(
            &self,
            name: &str,
        ) -> ::anyhow::Result<
            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
        > {
            use ::fbthrift::{ServiceProcessor as _};
            let idx = self.create_interaction_idx(name);
            let idx = match idx {
                ::anyhow::Result::Ok(idx) => idx,
                ::anyhow::Result::Err(_) => {
                    return self.supa.create_interaction(name);
                }
            };
            self.handle_create_interaction(idx)
        }

        fn get_method_names(&self) -> &'static [&'static str] {
            &[
                // interaction's method names are never queried directly.
                // they are always queried from the "main" processor.
            ]
        }

        async fn on_termination(&self) {
            use ::fbthrift::{ServiceProcessor as _};
            self.handle_on_termination().await
        }
    }

    #[::async_trait::async_trait]
    pub trait MyService: ::std::marker::Send + ::std::marker::Sync + 'static {
        fn createMyInteraction(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn MyInteraction>> {
            ::anyhow::bail!("MyService.createMyInteraction not implemented");
        }
        fn createMyInteractionFast(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn MyInteractionFast>> {
            ::anyhow::bail!("MyService.createMyInteractionFast not implemented");
        }
        fn createSerialInteraction(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn SerialInteraction>> {
            ::anyhow::bail!("MyService.createSerialInteraction not implemented");
        }
        async fn foo(
            &self,
        ) -> ::std::result::Result<(), crate::services::my_service::FooExn> {
            ::std::result::Result::Err(crate::services::my_service::FooExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyService",
                    "foo",
                ),
            ))
        }
        async fn interact(
            &self,
            _arg: ::std::primitive::i32,
        ) -> ::std::result::Result<::std::boxed::Box<dyn MyInteraction>, crate::services::my_service::InteractExn> {
            ::std::result::Result::Err(crate::services::my_service::InteractExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyService",
                    "interact",
                ),
            ))
        }
        async fn interactFast(
            &self,
        ) -> ::std::result::Result<(::std::boxed::Box<dyn MyInteractionFast>, ::std::primitive::i32), crate::services::my_service::InteractFastExn> {
            ::std::result::Result::Err(crate::services::my_service::InteractFastExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyService",
                    "interactFast",
                ),
            ))
        }
        async fn serialize(
            &self,
        ) -> ::std::result::Result<(::std::boxed::Box<dyn SerialInteraction>, (
    ::std::primitive::i32,
    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::services::my_service::SerializeStreamExn>>
)
), crate::services::my_service::SerializeExn> {
            ::std::result::Result::Err(crate::services::my_service::SerializeExn::ApplicationException(
                ::fbthrift::ApplicationException::unimplemented_method(
                    "MyService",
                    "serialize",
                ),
            ))
        }
    }

    #[::async_trait::async_trait]
    impl<T> MyService for ::std::boxed::Box<T>
    where
        T: MyService + Send + Sync + ?Sized,
    {
        fn createMyInteraction(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn MyInteraction>> {
            (**self).createMyInteraction()
        }
        fn createMyInteractionFast(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn MyInteractionFast>> {
            (**self).createMyInteractionFast()
        }
        fn createSerialInteraction(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn SerialInteraction>> {
            (**self).createSerialInteraction()
        }
        async fn foo(
            &self,
        ) -> ::std::result::Result<(), crate::services::my_service::FooExn> {
            (**self).foo(
            ).await
        }
        async fn interact(
            &self,
            arg: ::std::primitive::i32,
        ) -> ::std::result::Result<::std::boxed::Box<dyn MyInteraction>, crate::services::my_service::InteractExn> {
            (**self).interact(
                arg,
            ).await
        }
        async fn interactFast(
            &self,
        ) -> ::std::result::Result<(::std::boxed::Box<dyn MyInteractionFast>, ::std::primitive::i32), crate::services::my_service::InteractFastExn> {
            (**self).interactFast(
            ).await
        }
        async fn serialize(
            &self,
        ) -> ::std::result::Result<(::std::boxed::Box<dyn SerialInteraction>, (
    ::std::primitive::i32,
    ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::services::my_service::SerializeStreamExn>>
)
), crate::services::my_service::SerializeExn> {
            (**self).serialize(
            ).await
        }
    }

    /// Processor for MyService's methods.
    #[derive(Clone, Debug)]
    pub struct MyServiceProcessor<P, H, R, RS> {
        service: H,
        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
    }

    struct Args_MyService_foo {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyService_foo {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyService.foo"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    struct Args_MyService_interact {
        arg: ::std::primitive::i32,
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyService_interact {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyService.interact"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
                ::fbthrift::Field::new("arg", ::fbthrift::TType::I32, 1),
            ];
            let mut field_arg = ::std::option::Option::None;
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (::fbthrift::TType::I32, 1) => field_arg = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
                arg: field_arg.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "MyService.interact", "arg"))?,
            })
        }
    }

    struct Args_MyService_interactFast {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyService_interactFast {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyService.interactFast"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    struct Args_MyService_serialize {
    }
    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_MyService_serialize {
        #[inline]
        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "MyService.serialize"))]
        fn read(p: &mut P) -> ::anyhow::Result<Self> {
            static ARGS: &[::fbthrift::Field] = &[
            ];
            let _ = p.read_struct_begin(|_| ())?;
            loop {
                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
                match (fty, fid as ::std::primitive::i32) {
                    (::fbthrift::TType::Stop, _) => break,
                    (fty, _) => p.skip(fty)?,
                }
                p.read_field_end()?;
            }
            p.read_struct_end()?;
            ::std::result::Result::Ok(Self {
            })
        }
    }

    impl<P, H, R, RS> MyServiceProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Frame: ::std::marker::Send + 'static,
        P::Deserializer: ::std::marker::Send,
        H: MyService,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        pub fn new(service: H) -> Self {
            Self {
                service,
                supa: ::fbthrift::NullServiceProcessor::new(),
                _phantom: ::std::marker::PhantomData,
            }
        }

        pub fn into_inner(self) -> H {
            self.service
        }

        fn handle_createMyInteraction(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn MyInteraction>> {
            self.service.createMyInteraction()
        }

        fn handle_createMyInteractionFast(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn MyInteractionFast>> {
            self.service.createMyInteractionFast()
        }

        fn handle_createSerialInteraction(
            &self,
        ) -> ::anyhow::Result<::std::boxed::Box<dyn SerialInteraction>> {
            self.service.createSerialInteraction()
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyService.foo"))]
        async fn handle_foo<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "foo";
                SERVICE_METHOD_NAME = "MyService.foo";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyService_foo = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.foo(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyService.foo", "success");
                    crate::services::my_service::FooExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_service::FooExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "foo",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyService.foo", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyService.foo", exn);
                    ::tracing::error!(method = "MyService.foo", panic = ?aexn);
                    crate::services::my_service::FooExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "foo",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyService.interact"))]
        async fn handle_interact<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "interact";
                SERVICE_METHOD_NAME = "MyService.interact";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyService_interact = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.interact(
                    _args.arg,
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyService.interact", "success");
                    let (interaction_handler, res) = (res, ());
                    let interaction_processor = ::std::sync::Arc::new(MyInteractionProcessor::<P, ::std::boxed::Box<dyn MyInteraction>, R, RS>::new(interaction_handler));
                    reply_state.lock().unwrap().set_interaction_processor(interaction_processor)?;
                    crate::services::my_service::InteractExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_service::InteractExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "interact",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyService.interact", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyService.interact", exn);
                    ::tracing::error!(method = "MyService.interact", panic = ?aexn);
                    crate::services::my_service::InteractExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "interact",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyService.interactFast"))]
        async fn handle_interactFast<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "interactFast";
                SERVICE_METHOD_NAME = "MyService.interactFast";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyService_interactFast = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.interactFast(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyService.interactFast", "success");
                    let (interaction_handler, res) = res;
                    let interaction_processor = ::std::sync::Arc::new(MyInteractionFastProcessor::<P, ::std::boxed::Box<dyn MyInteractionFast>, R, RS>::new(interaction_handler));
                    reply_state.lock().unwrap().set_interaction_processor(interaction_processor)?;
                    crate::services::my_service::InteractFastExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_service::InteractFastExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "interactFast",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    ::tracing::info!(method = "MyService.interactFast", exception = ?exn);
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyService.interactFast", exn);
                    ::tracing::error!(method = "MyService.interactFast", panic = ?aexn);
                    crate::services::my_service::InteractFastExn::ApplicationException(aexn)
                }
            };

            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                "interactFast",
                METHOD_NAME.as_cstr(),
                _seqid,
                req_ctxt,
                &mut ctx_stack,
                res
            )?;
            reply_state.lock().unwrap().send_reply(env);
            Ok(())
        }

        #[::tracing::instrument(skip_all, name = "handler", fields(method = "MyService.serialize"))]
        async fn handle_serialize<'a>(
            &'a self,
            p: &'a mut P::Deserializer,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            use ::const_cstr::const_cstr;
            use ::futures::FutureExt as _;

            const_cstr! {
                SERVICE_NAME = "MyService";
                METHOD_NAME = "serialize";
                SERVICE_METHOD_NAME = "MyService.serialize";
            }
            let mut ctx_stack = req_ctxt.get_context_stack(
                SERVICE_NAME.as_cstr(),
                SERVICE_METHOD_NAME.as_cstr(),
            )?;
            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
            let _args: self::Args_MyService_serialize = ::fbthrift::Deserialize::read(p)?;
            let bytes_read = ::fbthrift::help::buf_len(&req)?;
            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, ::fbthrift::SerializedMessage {
                protocol: P::PROTOCOL_ID,
                method_name: METHOD_NAME.as_cstr(),
                buffer: req,
            })?;
            ::fbthrift::ContextStack::post_read(&mut ctx_stack, bytes_read)?;

            let res = ::std::panic::AssertUnwindSafe(
                self.service.serialize(
                )
            )
            .catch_unwind()
            .await;

            // nested results - panic catch on the outside, method on the inside
            let res = match res {
                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                    ::tracing::trace!(method = "MyService.serialize", "success");
                    let (interaction_handler, res) = res;
                    let interaction_processor = ::std::sync::Arc::new(SerialInteractionProcessor::<P, ::std::boxed::Box<dyn SerialInteraction>, R, RS>::new(interaction_handler));
                    reply_state.lock().unwrap().set_interaction_processor(interaction_processor)?;
                    crate::services::my_service::SerializeExn::Success(res)
                }
                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_service::SerializeExn::Success(_))) => {
                    panic!(
                        "{} attempted to return success via error",
                        "serialize",
                    )
                }
                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
                    exn
                }
                ::std::result::Result::Err(exn) => {
                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyService.serialize", exn);
                    ::tracing::error!(method = "MyService.serialize", panic = ?aexn);
                    crate::services::my_service::SerializeExn::ApplicationException(aexn)
                }
            };

            use ::futures::StreamExt as _;

            let (response, stream) = match res {
                crate::services::my_service::SerializeExn::Success(res) => {
                    let (response, stream) = res;
                    let response = crate::services::my_service::SerializeResponseExn::Success(response);

                    let stream = ::std::panic::AssertUnwindSafe(stream)
                        .catch_unwind()
                        .map(|item| {
                            match item {
                                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
                                    let item = crate::services::my_service::SerializeStreamExn::Success(res);
                                    match ::fbthrift::help::serialize_stream_item::<P, _>(item) {
                                        Ok(payload) => ::fbthrift::SerializedStreamElement::Success(payload),
                                        Err(err) => {
                                            tracing::error!(?err, method="MyService.serialize", "Failed to serialize success response");
                                            ::fbthrift::SerializedStreamElement::SerializationError(err)
                                        },
                                    }
                                }
                                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_service::SerializeStreamExn::Success(_))) => {
                                    panic!("{} attempted to return success via error", "serialize");
                                }
                                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::my_service::SerializeStreamExn::ApplicationException(aexn))) => {
                                    tracing::info!(?aexn, method="MyService.serialize", "Streaming ApplicationException");
                                    ::fbthrift::SerializedStreamElement::ApplicationException(aexn)
                                }
                                ::std::result::Result::Err(exn) => {
                                    tracing::error!(?exn, method="MyService.serialize", "Streaming unwind");
                                    let aexn = ::fbthrift::ApplicationException::handler_panic("MyService.serialize", exn);
                                    ::fbthrift::SerializedStreamElement::ApplicationException(aexn)
                                }
                            }
                        })
                        .boxed();
                    (response, Some(stream))
                },
                crate::services::my_service::SerializeExn::ApplicationException(aexn)=> {
                    let response = crate::services::my_service::SerializeResponseExn::ApplicationException(aexn);
                    (response, None)
                },
            };

            let response = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
                        "serialize",
                        METHOD_NAME.as_cstr(),
                        _seqid,
                        req_ctxt,
                        &mut ctx_stack,
                        response
                    )?;

            let _ = reply_state.lock().unwrap().send_stream_reply(response, stream, P::PROTOCOL_ID);
            Ok(())
        }
    }

    #[::async_trait::async_trait]
    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for MyServiceProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Deserializer: ::std::marker::Send,
        H: MyService,
        P::Frame: ::std::marker::Send + 'static,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        type RequestContext = R;
        type ReplyState = RS;

        #[inline]
        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
            match name {
                b"foo" => ::std::result::Result::Ok(3usize),
                b"interact" => ::std::result::Result::Ok(4usize),
                b"interactFast" => ::std::result::Result::Ok(5usize),
                b"serialize" => ::std::result::Result::Ok(6usize),
                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
            }
        }

        #[allow(clippy::match_single_binding)]
        async fn handle_method(
            &self,
            idx: ::std::primitive::usize,
            _p: &mut P::Deserializer,
            _req: ::fbthrift::ProtocolDecoded<P>,
            _req_ctxt: &R,
            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
            _seqid: ::std::primitive::u32,
        ) -> ::anyhow::Result<()> {
            match idx {
                3usize => {
                    self.handle_foo(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                4usize => {
                    self.handle_interact(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                5usize => {
                    self.handle_interactFast(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                6usize => {
                    self.handle_serialize(_p, _req, _req_ctxt, _reply_state, _seqid).await
                }
                bad => panic!(
                    "{}: unexpected method idx {}",
                    "MyServiceProcessor",
                    bad
                ),
            }
        }

        #[allow(clippy::match_single_binding)]
        #[inline]
        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
            match name {
                "MyInteraction" => ::std::result::Result::Ok(0usize),
                "MyInteractionFast" => ::std::result::Result::Ok(1usize),
                "SerialInteraction" => ::std::result::Result::Ok(2usize),
                _ => ::anyhow::bail!("Unknown interaction"),
            }
        }

        #[allow(clippy::match_single_binding)]
        fn handle_create_interaction(
            &self,
            idx: ::std::primitive::usize,
        ) -> ::anyhow::Result<
            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
        > {
            match idx {
                0usize => {
                    let handler = self.handle_createMyInteraction()?;
                    let server = ::std::sync::Arc::new(MyInteractionProcessor::<P, ::std::boxed::Box<dyn MyInteraction>, R, RS>::new(handler));
                    Ok(server)
                }
                1usize => {
                    let handler = self.handle_createMyInteractionFast()?;
                    let server = ::std::sync::Arc::new(MyInteractionFastProcessor::<P, ::std::boxed::Box<dyn MyInteractionFast>, R, RS>::new(handler));
                    Ok(server)
                }
                2usize => {
                    let handler = self.handle_createSerialInteraction()?;
                    let server = ::std::sync::Arc::new(SerialInteractionProcessor::<P, ::std::boxed::Box<dyn SerialInteraction>, R, RS>::new(handler));
                    Ok(server)
                }
                bad => panic!(
                    "{}: unexpected method idx {}",
                    "MyServiceProcessor",
                    bad
                ),
            }
        }

        async fn handle_on_termination(&self) {
        }
    }

    #[::async_trait::async_trait]
    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for MyServiceProcessor<P, H, R, RS>
    where
        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
        P::Deserializer: ::std::marker::Send,
        P::Frame: ::std::marker::Send + 'static,
        H: MyService,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = <P as ::fbthrift::Protocol>::Frame>
            + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::ProtocolDecoded<P>: ::std::clone::Clone,
        ::fbthrift::ProtocolEncodedFinal<P>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        type Handler = H;
        type RequestContext = R;
        type ReplyState = RS;

        #[tracing::instrument(level="trace", skip_all, fields(service = "MyService"))]
        async fn call(
            &self,
            req: ::fbthrift::ProtocolDecoded<P>,
            req_ctxt: &R,
            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
        ) -> ::anyhow::Result<()> {
            use ::fbthrift::{ProtocolReader as _, ServiceProcessor as _};
            let mut p = P::deserializer(req.clone());
            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
            if mty != ::fbthrift::MessageType::Call {
                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
                    format!("message type {:?} not handled", mty)
                )));
            }
            let idx = match idx {
                ::std::result::Result::Ok(idx) => idx,
                ::std::result::Result::Err(_) => {
                    return self.supa.call(req, req_ctxt, reply_state).await;
                }
            };
            self.handle_method(idx, &mut p, req, req_ctxt, reply_state, seqid).await?;
            p.read_message_end()?;

            Ok(())
        }

        fn create_interaction(
            &self,
            name: &str,
        ) -> ::anyhow::Result<
            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
        > {
            use ::fbthrift::{ServiceProcessor as _};
            let idx = self.create_interaction_idx(name);
            let idx = match idx {
                ::anyhow::Result::Ok(idx) => idx,
                ::anyhow::Result::Err(_) => {
                    return self.supa.create_interaction(name);
                }
            };
            self.handle_create_interaction(idx)
        }

        fn get_method_names(&self) -> &'static [&'static str] {
            &[
                // from MyService
                "foo",
                "interact",
                "interactFast",
                "serialize",
                "MyInteraction.frobnicate",
                "MyInteraction.ping",
                "MyInteraction.truthify",
                "MyInteraction.encode",
                "MyInteractionFast.frobnicate",
                "MyInteractionFast.ping",
                "MyInteractionFast.truthify",
                "MyInteractionFast.encode",
                "SerialInteraction.frobnicate",
            ]
        }

        async fn on_termination(&self) {
            use ::fbthrift::{ServiceProcessor as _};
            self.handle_on_termination().await
        }
    }

    /// Construct a new instance of a MyService service.
    ///
    /// This is called when a new instance of a Thrift service Processor
    /// is needed for a particular Thrift protocol.
    #[::tracing::instrument(level="debug", skip_all, fields(proto = ?proto))]
    pub fn make_MyService_server<F, H, R, RS>(
        proto: ::fbthrift::ProtocolID,
        handler: H,
    ) -> ::std::result::Result<::std::boxed::Box<dyn ::fbthrift::ThriftService<F, Handler = H, RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>, ::fbthrift::ApplicationException>
    where
        F: ::fbthrift::Framing + ::std::marker::Send + ::std::marker::Sync + 'static,
        H: MyService,
        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Frame = F> + ::std::marker::Send + ::std::marker::Sync + 'static,
        RS: ::fbthrift::ReplyState<F, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
        ::fbthrift::FramingDecoded<F>: ::std::clone::Clone,
        ::fbthrift::FramingEncodedFinal<F>: ::std::clone::Clone + ::fbthrift::BufExt,
    {
        match proto {
            ::fbthrift::ProtocolID::BinaryProtocol => {
                ::std::result::Result::Ok(::std::boxed::Box::new(MyServiceProcessor::<::fbthrift::BinaryProtocol<F>, H, R, RS>::new(handler)))
            }
            ::fbthrift::ProtocolID::CompactProtocol => {
                ::std::result::Result::Ok(::std::boxed::Box::new(MyServiceProcessor::<::fbthrift::CompactProtocol<F>, H, R, RS>::new(handler)))
            }
            bad => {
                ::tracing::error!(method = "MyService.", invalid_protocol = ?bad);
                ::std::result::Result::Err(::fbthrift::ApplicationException::invalid_protocol(bad))
            }
        }
    }
}

/// Client mocks. For every service, a struct mock::TheService that implements
/// client::TheService.
///
/// As an example of the generated API, for the following thrift service:
///
/// ```thrift
/// service MyService {
///     FunctionResponse myFunction(
///         1: FunctionRequest request,
///     ) throws {
///         1: StorageException s,
///         2: NotFoundException n,
///     ),
///
///     // other functions
/// }
/// ```
///
/// we would end up with this mock object under crate::mock::MyService:
///
/// ```
/// # const _: &str = stringify! {
/// impl crate::client::MyService for MyService<'mock> {...}
///
/// pub struct MyService<'mock> {
///     pub myFunction: myFunction<'mock>,
///     // ...
/// }
///
/// impl dyn crate::client::MyService {
///     pub fn mock<'mock>() -> MyService<'mock>;
/// }
///
/// impl myFunction<'mock> {
///     // directly return the given success response
///     pub fn ret(&self, value: FunctionResponse);
///
///     // invoke closure to compute success response
///     pub fn mock(
///         &self,
///         mock: impl FnMut(FunctionRequest) -> FunctionResponse + Send + Sync + 'mock,
///     );
///
///     // invoke closure to compute response
///     pub fn mock_result(
///         &self,
///         mock: impl FnMut(FunctionRequest) -> Result<FunctionResponse, crate::services::MyService::MyFunctionExn> + Send + Sync + 'mock,
///     );
///
///     // return one of the function's declared exceptions
///     pub fn throw<E>(&self, exception: E)
///     where
///         E: Clone + Into<crate::services::MyService::MyFunctionExn> + Send + Sync + 'mock;
/// }
///
/// impl From<StorageException> for MyFunctionExn {...}
/// impl From<NotFoundException> for MyFunctionExn {...}
/// # };
/// ```
///
/// The intended usage from a test would be:
///
/// ```
/// # const _: &str = stringify! {
/// use std::sync::Arc;
/// use thrift_if::client::MyService;
///
/// #[test]
/// fn test_my_client() {
///     let mock = Arc::new(<dyn MyService>::mock());
///
///     // directly return a success response
///     let resp = FunctionResponse {...};
///     mock.myFunction.ret(resp);
///
///     // or give a closure to compute the success response
///     mock.myFunction.mock(|request| FunctionResponse {...});
///
///     // or throw one of the function's exceptions
///     mock.myFunction.throw(StorageException::ItFailed);
///
///     // or compute a Result (useful if your exceptions aren't Clone)
///     mock.myFunction.mock_result(|request| Err(...));
///
///     let out = do_the_thing(mock).wait().unwrap();
///     assert!(out.what_i_expected());
/// }
///
/// fn do_the_thing(
///     client: Arc<dyn MyService + Send + Sync + 'static>,
/// ) -> impl Future<Item = Out> {...}
/// # };
/// ```
pub mod mock {
    pub struct MyService<'mock> {
        pub foo: r#impl::my_service::foo<'mock>,
        pub interact: r#impl::my_service::interact<'mock>,
        pub interactFast: r#impl::my_service::interactFast<'mock>,
        pub serialize: r#impl::my_service::serialize<'mock>,
        _marker: ::std::marker::PhantomData<&'mock ()>,
    }

    impl dyn super::client::MyService {
        pub fn mock<'mock>() -> MyService<'mock> {
            MyService {
                foo: r#impl::my_service::foo::unimplemented(),
                interact: r#impl::my_service::interact::unimplemented(),
                interactFast: r#impl::my_service::interactFast::unimplemented(),
                serialize: r#impl::my_service::serialize::unimplemented(),
                _marker: ::std::marker::PhantomData,
            }
        }
    }

    impl<'mock> super::client::MyService for MyService<'mock> {

        fn createMyInteraction(
            &self,
        ) -> ::std::result::Result<crate::client::MyInteractionClient, ::anyhow::Error> {
            unimplemented!("Mocking interactions is not yet implemented");
        }

        fn createMyInteractionFast(
            &self,
        ) -> ::std::result::Result<crate::client::MyInteractionFastClient, ::anyhow::Error> {
            unimplemented!("Mocking interactions is not yet implemented");
        }

        fn createSerialInteraction(
            &self,
        ) -> ::std::result::Result<crate::client::SerialInteractionClient, ::anyhow::Error> {
            unimplemented!("Mocking interactions is not yet implemented");
        }
        fn foo(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_service::FooError>> {
            let mut closure = self.foo.closure.lock().unwrap();
            let closure: &mut dyn ::std::ops::FnMut() -> _ = &mut **closure;
            ::std::boxed::Box::pin(::futures::future::ready(closure()))
        }

        fn interact(
            &self,
            _arg_arg: ::std::primitive::i32,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::client::MyInteractionClient, crate::errors::my_service::InteractError>> {
            unimplemented!("Mocking interactions is not yet implemented");
        }

        fn interactFast(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::MyInteractionFastClient, ::std::primitive::i32), crate::errors::my_service::InteractFastError>> {
            unimplemented!("Mocking interactions is not yet implemented");
        }

        fn serialize(
            &self,
        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(crate::client::SerialInteractionClient, (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)), crate::errors::my_service::SerializeError>> {
            unimplemented!("Mocking interactions is not yet implemented");
        }
    }

    pub mod r#impl {
        pub mod my_service {

            pub struct foo<'mock> {
                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
                    dyn ::std::ops::FnMut() -> ::std::result::Result<
                        (),
                        crate::errors::my_service::FooError,
                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
                >>,
            }

            #[allow(clippy::redundant_closure)]
            impl<'mock> foo<'mock> {
                pub(crate) fn unimplemented() -> Self {
                    Self {
                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|| panic!(
                            "{}::{} is not mocked",
                            "MyService",
                            "foo",
                        ))),
                    }
                }

                pub fn ret(&self, value: ()) {
                    self.mock(move || value.clone());
                }

                pub fn mock(&self, mut mock: impl ::std::ops::FnMut() -> () + ::std::marker::Send + ::std::marker::Sync + 'mock) {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || ::std::result::Result::Ok(mock()));
                }

                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut() -> ::std::result::Result<(), crate::errors::my_service::FooError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || mock());
                }

                pub fn throw<E>(&self, exception: E)
                where
                    E: ::std::convert::Into<crate::errors::my_service::FooError>,
                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
                {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || ::std::result::Result::Err(exception.clone().into()));
                }
            }

            pub struct interact<'mock> {
                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
                    dyn ::std::ops::FnMut(::std::primitive::i32) -> ::std::result::Result<
                        (),
                        crate::errors::my_service::InteractError,
                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
                >>,
            }

            #[allow(clippy::redundant_closure)]
            impl<'mock> interact<'mock> {
                pub(crate) fn unimplemented() -> Self {
                    Self {
                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: ::std::primitive::i32| panic!(
                            "{}::{} is not mocked",
                            "MyService",
                            "interact",
                        ))),
                    }
                }

                pub fn ret(&self, value: ()) {
                    self.mock(move |_: ::std::primitive::i32| value.clone());
                }

                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i32) -> () + ::std::marker::Send + ::std::marker::Sync + 'mock) {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move |arg| ::std::result::Result::Ok(mock(arg)));
                }

                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i32) -> ::std::result::Result<(), crate::errors::my_service::InteractError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move |arg| mock(arg));
                }

                pub fn throw<E>(&self, exception: E)
                where
                    E: ::std::convert::Into<crate::errors::my_service::InteractError>,
                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
                {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move |_: ::std::primitive::i32| ::std::result::Result::Err(exception.clone().into()));
                }
            }

            pub struct interactFast<'mock> {
                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
                    dyn ::std::ops::FnMut() -> ::std::result::Result<
                        ::std::primitive::i32,
                        crate::errors::my_service::InteractFastError,
                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
                >>,
            }

            #[allow(clippy::redundant_closure)]
            impl<'mock> interactFast<'mock> {
                pub(crate) fn unimplemented() -> Self {
                    Self {
                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|| panic!(
                            "{}::{} is not mocked",
                            "MyService",
                            "interactFast",
                        ))),
                    }
                }

                pub fn ret(&self, value: ::std::primitive::i32) {
                    self.mock(move || value.clone());
                }

                pub fn mock(&self, mut mock: impl ::std::ops::FnMut() -> ::std::primitive::i32 + ::std::marker::Send + ::std::marker::Sync + 'mock) {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || ::std::result::Result::Ok(mock()));
                }

                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut() -> ::std::result::Result<::std::primitive::i32, crate::errors::my_service::InteractFastError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || mock());
                }

                pub fn throw<E>(&self, exception: E)
                where
                    E: ::std::convert::Into<crate::errors::my_service::InteractFastError>,
                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
                {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || ::std::result::Result::Err(exception.clone().into()));
                }
            }

            pub struct serialize<'mock> {
                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
                    dyn ::std::ops::FnMut() -> ::std::result::Result<
                        (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>),
                        crate::errors::my_service::SerializeError,
                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
                >>,
            }

            #[allow(clippy::redundant_closure)]
            impl<'mock> serialize<'mock> {
                pub(crate) fn unimplemented() -> Self {
                    Self {
                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|| panic!(
                            "{}::{} is not mocked",
                            "MyService",
                            "serialize",
                        ))),
                    }
                }

                pub fn ret(&self, _value: (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>)) {
                    unimplemented!("Mocking streams is not yet implemented, as value isn't cloneable")
                }

                pub fn mock(&self, mut mock: impl ::std::ops::FnMut() -> (::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>) + ::std::marker::Send + ::std::marker::Sync + 'mock) {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || ::std::result::Result::Ok(mock()));
                }

                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut() -> ::std::result::Result<(::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>), crate::errors::my_service::SerializeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || mock());
                }

                pub fn throw<E>(&self, exception: E)
                where
                    E: ::std::convert::Into<crate::errors::my_service::SerializeError>,
                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
                {
                    let mut closure = self.closure.lock().unwrap();
                    *closure = ::std::boxed::Box::new(move || ::std::result::Result::Err(exception.clone().into()));
                }
            }
        }
    }
}

/// Error return types.
pub mod errors {
    /// Errors for MyInteraction functions.
    pub mod my_interaction {

        pub trait AsCustomException {
            fn as_custom_exception(&self) -> Option<&crate::types::CustomException>;
        }

        impl AsCustomException for ::anyhow::Error {
            fn as_custom_exception(&self) -> Option<&crate::types::CustomException> {
                for cause in self.chain() {
                    if let Some(FrobnicateError::ex(e)) = cause.downcast_ref::<FrobnicateError>() {
                        return Some(e);
                    }
                }
                None
            }
        }

        /// Errors for frobnicate (client side).
        #[derive(Debug)]
        pub enum FrobnicateError {
            ex(crate::types::CustomException),
            ApplicationException(::fbthrift::types::ApplicationException),
            ThriftError(::anyhow::Error),
        }

        /// Human-readable string representation of the Thrift client error.
        ///
        /// By default, this will not print the full cause chain. If you would like to print the underlying error
        /// cause, either use `format!("{:?}", anyhow::Error::from(client_err))` or print this using the
        /// alternate formatter `{:#}` instead of just `{}`.
        impl ::std::fmt::Display for FrobnicateError {
            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::result::Result<(), ::std::fmt::Error> {
                match self {
                    Self::ex(inner) => {
                        if f.alternate() {
                            write!(f, "MyInteraction::frobnicate failed with variant `ex`: {:#}", inner)?;
                        } else {
                            write!(f, "MyInteraction::frobnicate failed with ex(CustomException)")?;
                        }
                    }
                    Self::ApplicationException(inner) => {
                        write!(f, "MyInteraction::frobnicate failed with ApplicationException")?;

                        if f.alternate() {
                          write!(f, ": {:#}", inner)?;
                        }
                    }
                    Self::ThriftError(inner) => {
                        write!(f, "MyInteraction::frobnicate failed with ThriftError")?;

                        if f.alternate() {
                          write!(f, ": {:#}", inner)?;
                        }
                    }
                }

                Ok(())
            }
        }

        impl ::std::error::Error for FrobnicateError {
            fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
                match self {
                    Self::ex(ref inner) => {
                        Some(inner)
                    }
                    Self::ApplicationException(ref inner) => {
                        Some(inner)
                    }
                    Self::ThriftError(ref inner) => {
                        Some(inner.as_ref())
                    }
                }
            }
        }

        impl ::std::convert::From<crate::types::CustomException> for FrobnicateError {
            fn from(e: crate::types::CustomException) -> Self {
                Self::ex(e)
            }
        }

        impl AsCustomException for FrobnicateError {
            fn as_custom_exception(&self) -> Option<&crate::types::CustomException> {
                match self {
                    Self::ex(inner) => Some(inner),
                    _ => None,
                }
            }
        }

        impl ::std::convert::From<::anyhow::Error> for FrobnicateError {
            fn from(err: ::anyhow::Error) -> Self {
                Self::ThriftError(err)
            }
        }

        impl ::std::convert::From<::fbthrift::ApplicationException> for FrobnicateError {
            fn from(ae: ::fbthrift::ApplicationException) -> Self {
                Self::ApplicationException(ae)
            }
        }
        impl ::std::convert::From<crate::services::my_interaction::FrobnicateExn> for
            ::std::result::Result<::std::primitive::i32, FrobnicateError>
        {
            fn from(e: crate::services::my_interaction::FrobnicateExn) -> Self {
                match e {
                    crate::services::my_interaction::FrobnicateExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_interaction::FrobnicateExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(FrobnicateError::ApplicationException(aexn)),
                    crate::services::my_interaction::FrobnicateExn::ex(exn) =>
                        ::std::result::Result::Err(FrobnicateError::ex(exn)),
                }
            }
        }

        pub type PingError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction::PingExn> for
            ::std::result::Result<(), PingError>
        {
            fn from(e: crate::services::my_interaction::PingExn) -> Self {
                match e {
                    crate::services::my_interaction::PingExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_interaction::PingExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(PingError::ApplicationException(aexn)),
                }
            }
        }

        pub type TruthifyError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction::TruthifyExn> for
            ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction::TruthifyStreamError>>, TruthifyError>
        {
            fn from(e: crate::services::my_interaction::TruthifyExn) -> Self {
                match e {
                    crate::services::my_interaction::TruthifyExn::Success(res) => {
                        use ::futures::stream::StreamExt;
                        let stream = res;
                        ::std::result::Result::Ok(stream.map(|res| match res {
                            ::std::result::Result::Ok(item) => ::std::result::Result::Ok(item),
                            ::std::result::Result::Err(exn) => exn.into(),
                        }).boxed())
                    }
                    crate::services::my_interaction::TruthifyExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(TruthifyError::ApplicationException(aexn)),
                }
            }
        }

        impl ::std::convert::From<crate::services::my_interaction::TruthifyResponseExn> for
            ::std::result::Result<(), TruthifyError>
        {
            fn from(e: crate::services::my_interaction::TruthifyResponseExn) -> Self {
                match e {
                    crate::services::my_interaction::TruthifyResponseExn::Success(res) =>
                        ::std::result::Result::Ok(res),
                    crate::services::my_interaction::TruthifyResponseExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(TruthifyError::ApplicationException(aexn)),
                }
            }
        }

        pub type TruthifyStreamError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction::TruthifyStreamExn> for
            ::std::result::Result<::std::primitive::bool, TruthifyStreamError>
        {
            fn from(e: crate::services::my_interaction::TruthifyStreamExn) -> Self {
                match e {
                    crate::services::my_interaction::TruthifyStreamExn::Success(res) =>
                        ::std::result::Result::Ok(res),
                    crate::services::my_interaction::TruthifyStreamExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(TruthifyStreamError::ApplicationException(aexn)),
                }
            }
        }

        pub type EncodeError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction::EncodeExn> for
            ::std::result::Result<, EncodeError>
        {
            fn from(e: crate::services::my_interaction::EncodeExn) -> Self {
                match e {
                    crate::services::my_interaction::EncodeExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_interaction::EncodeExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(EncodeError::ApplicationException(aexn)),
                }
            }
        }

    }

    /// Errors for MyInteractionFast functions.
    pub mod my_interaction_fast {

        pub type FrobnicateError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction_fast::FrobnicateExn> for
            ::std::result::Result<::std::primitive::i32, FrobnicateError>
        {
            fn from(e: crate::services::my_interaction_fast::FrobnicateExn) -> Self {
                match e {
                    crate::services::my_interaction_fast::FrobnicateExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_interaction_fast::FrobnicateExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(FrobnicateError::ApplicationException(aexn)),
                }
            }
        }

        pub type PingError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction_fast::PingExn> for
            ::std::result::Result<(), PingError>
        {
            fn from(e: crate::services::my_interaction_fast::PingExn) -> Self {
                match e {
                    crate::services::my_interaction_fast::PingExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_interaction_fast::PingExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(PingError::ApplicationException(aexn)),
                }
            }
        }

        pub type TruthifyError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction_fast::TruthifyExn> for
            ::std::result::Result<::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::bool, crate::errors::my_interaction_fast::TruthifyStreamError>>, TruthifyError>
        {
            fn from(e: crate::services::my_interaction_fast::TruthifyExn) -> Self {
                match e {
                    crate::services::my_interaction_fast::TruthifyExn::Success(res) => {
                        use ::futures::stream::StreamExt;
                        let stream = res;
                        ::std::result::Result::Ok(stream.map(|res| match res {
                            ::std::result::Result::Ok(item) => ::std::result::Result::Ok(item),
                            ::std::result::Result::Err(exn) => exn.into(),
                        }).boxed())
                    }
                    crate::services::my_interaction_fast::TruthifyExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(TruthifyError::ApplicationException(aexn)),
                }
            }
        }

        impl ::std::convert::From<crate::services::my_interaction_fast::TruthifyResponseExn> for
            ::std::result::Result<(), TruthifyError>
        {
            fn from(e: crate::services::my_interaction_fast::TruthifyResponseExn) -> Self {
                match e {
                    crate::services::my_interaction_fast::TruthifyResponseExn::Success(res) =>
                        ::std::result::Result::Ok(res),
                    crate::services::my_interaction_fast::TruthifyResponseExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(TruthifyError::ApplicationException(aexn)),
                }
            }
        }

        pub type TruthifyStreamError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction_fast::TruthifyStreamExn> for
            ::std::result::Result<::std::primitive::bool, TruthifyStreamError>
        {
            fn from(e: crate::services::my_interaction_fast::TruthifyStreamExn) -> Self {
                match e {
                    crate::services::my_interaction_fast::TruthifyStreamExn::Success(res) =>
                        ::std::result::Result::Ok(res),
                    crate::services::my_interaction_fast::TruthifyStreamExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(TruthifyStreamError::ApplicationException(aexn)),
                }
            }
        }

        pub type EncodeError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_interaction_fast::EncodeExn> for
            ::std::result::Result<, EncodeError>
        {
            fn from(e: crate::services::my_interaction_fast::EncodeExn) -> Self {
                match e {
                    crate::services::my_interaction_fast::EncodeExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_interaction_fast::EncodeExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(EncodeError::ApplicationException(aexn)),
                }
            }
        }

    }

    /// Errors for SerialInteraction functions.
    pub mod serial_interaction {

        pub type FrobnicateError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::serial_interaction::FrobnicateExn> for
            ::std::result::Result<(), FrobnicateError>
        {
            fn from(e: crate::services::serial_interaction::FrobnicateExn) -> Self {
                match e {
                    crate::services::serial_interaction::FrobnicateExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::serial_interaction::FrobnicateExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(FrobnicateError::ApplicationException(aexn)),
                }
            }
        }

    }

    /// Errors for MyService functions.
    pub mod my_service {

        pub type FooError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_service::FooExn> for
            ::std::result::Result<(), FooError>
        {
            fn from(e: crate::services::my_service::FooExn) -> Self {
                match e {
                    crate::services::my_service::FooExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_service::FooExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(FooError::ApplicationException(aexn)),
                }
            }
        }

        pub type InteractError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_service::InteractExn> for
            ::std::result::Result<(), InteractError>
        {
            fn from(e: crate::services::my_service::InteractExn) -> Self {
                match e {
                    crate::services::my_service::InteractExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_service::InteractExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(InteractError::ApplicationException(aexn)),
                }
            }
        }

        pub type InteractFastError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_service::InteractFastExn> for
            ::std::result::Result<::std::primitive::i32, InteractFastError>
        {
            fn from(e: crate::services::my_service::InteractFastExn) -> Self {
                match e {
                    crate::services::my_service::InteractFastExn::Success(res) => {
                        ::std::result::Result::Ok(res)
                    }
                    crate::services::my_service::InteractFastExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(InteractFastError::ApplicationException(aexn)),
                }
            }
        }

        pub type SerializeError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_service::SerializeExn> for
            ::std::result::Result<(::std::primitive::i32, ::futures::stream::BoxStream<'static, ::std::result::Result<::std::primitive::i32, crate::errors::my_service::SerializeStreamError>>), SerializeError>
        {
            fn from(e: crate::services::my_service::SerializeExn) -> Self {
                match e {
                    crate::services::my_service::SerializeExn::Success(res) => {
                        use ::futures::stream::StreamExt;
                        let (resp, stream) = res;
                        ::std::result::Result::Ok((resp, stream.map(|res| match res {
                            ::std::result::Result::Ok(item) => ::std::result::Result::Ok(item),
                            ::std::result::Result::Err(exn) => exn.into(),
                        }).boxed()))
                    }
                    crate::services::my_service::SerializeExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(SerializeError::ApplicationException(aexn)),
                }
            }
        }

        impl ::std::convert::From<crate::services::my_service::SerializeResponseExn> for
            ::std::result::Result<::std::primitive::i32, SerializeError>
        {
            fn from(e: crate::services::my_service::SerializeResponseExn) -> Self {
                match e {
                    crate::services::my_service::SerializeResponseExn::Success(res) =>
                        ::std::result::Result::Ok(res),
                    crate::services::my_service::SerializeResponseExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(SerializeError::ApplicationException(aexn)),
                }
            }
        }

        pub type SerializeStreamError = ::fbthrift::NonthrowingFunctionError;

        impl ::std::convert::From<crate::services::my_service::SerializeStreamExn> for
            ::std::result::Result<::std::primitive::i32, SerializeStreamError>
        {
            fn from(e: crate::services::my_service::SerializeStreamExn) -> Self {
                match e {
                    crate::services::my_service::SerializeStreamExn::Success(res) =>
                        ::std::result::Result::Ok(res),
                    crate::services::my_service::SerializeStreamExn::ApplicationException(aexn) =>
                        ::std::result::Result::Err(SerializeStreamError::ApplicationException(aexn)),
                }
            }
        }

    }

}