// @generated by Thrift for thrift/compiler/test/fixtures/interactions/src/module.thrift // This file is probably not the place you want to edit! //! Thrift service definitions for `module`. /// Service definitions for `MyInteraction`. pub mod my_interaction { #[derive(Clone, Debug)] pub enum FrobnicateExn { ex(crate::types::CustomException), ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for FrobnicateExn { fn from(exn: crate::types::CustomException) -> Self { Self::ex(exn) } } 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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), Self::ex(exn) => exn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), Self::ex(exn) => exn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { 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::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, Self::ex(_exn) => fbthrift::ResultType::Error, } } } impl ::fbthrift::help::SerializeExn for FrobnicateExn { type Success = ::std::primitive::i32; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::I32, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ex(inner)) => { p.write_field_begin( "ex", ::fbthrift::TType::Struct, 1, ); ::fbthrift::Serialize::write(inner, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum PingExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: PingExn) -> Self { match err { PingExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for PingExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => PingExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for PingExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for PingExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum TruthifyStreamExn { ApplicationException(::fbthrift::ApplicationException), } impl ::fbthrift::ExceptionInfo for TruthifyStreamExn { fn exn_name(&self) -> &'static ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for TruthifyStreamExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { 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::help::SerializeExn for TruthifyStreamExn { type Success = ::std::primitive::bool; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(success) => { p.write_field_begin( "Success", ::fbthrift::TType::Bool, 0i16, ); ::fbthrift::Serialize::write(success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum TruthifyExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: TruthifyExn) -> Self { match err { TruthifyExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for TruthifyExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => TruthifyExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for TruthifyExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for TruthifyExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } } /// Service definitions for `MyInteractionFast`. pub mod my_interaction_fast { #[derive(Clone, Debug)] pub enum FrobnicateExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: FrobnicateExn) -> Self { match err { FrobnicateExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for FrobnicateExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => FrobnicateExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for FrobnicateExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for FrobnicateExn { type Success = ::std::primitive::i32; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::I32, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum PingExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: PingExn) -> Self { match err { PingExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for PingExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => PingExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for PingExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for PingExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum TruthifyStreamExn { ApplicationException(::fbthrift::ApplicationException), } impl ::fbthrift::ExceptionInfo for TruthifyStreamExn { fn exn_name(&self) -> &'static ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for TruthifyStreamExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { 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::help::SerializeExn for TruthifyStreamExn { type Success = ::std::primitive::bool; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(success) => { p.write_field_begin( "Success", ::fbthrift::TType::Bool, 0i16, ); ::fbthrift::Serialize::write(success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum TruthifyExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: TruthifyExn) -> Self { match err { TruthifyExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for TruthifyExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => TruthifyExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for TruthifyExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for TruthifyExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } } /// Service definitions for `SerialInteraction`. pub mod serial_interaction { #[derive(Clone, Debug)] pub enum FrobnicateExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: FrobnicateExn) -> Self { match err { FrobnicateExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for FrobnicateExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => FrobnicateExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for FrobnicateExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for FrobnicateExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } } /// Service definitions for `MyService`. pub mod my_service { #[derive(Clone, Debug)] pub enum FooExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: FooExn) -> Self { match err { FooExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for FooExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => FooExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for FooExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for FooExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum InteractExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: InteractExn) -> Self { match err { InteractExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for InteractExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => InteractExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for InteractExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for InteractExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum InteractFastExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: InteractFastExn) -> Self { match err { InteractFastExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for InteractFastExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => InteractFastExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for InteractFastExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for InteractFastExn { type Success = ::std::primitive::i32; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::I32, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum SerializeStreamExn { ApplicationException(::fbthrift::ApplicationException), } impl ::fbthrift::ExceptionInfo for SerializeStreamExn { fn exn_name(&self) -> &'static ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for SerializeStreamExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { 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::help::SerializeExn for SerializeStreamExn { type Success = ::std::primitive::i32; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(success) => { p.write_field_begin( "Success", ::fbthrift::TType::I32, 0i16, ); ::fbthrift::Serialize::write(success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum SerializeExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: SerializeExn) -> Self { match err { SerializeExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for SerializeExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => SerializeExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for SerializeExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for SerializeExn { type Success = ::std::primitive::i32; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::I32, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } } /// Service definitions for `Factories`. pub mod factories { #[derive(Clone, Debug)] pub enum FooExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: FooExn) -> Self { match err { FooExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for FooExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => FooExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for FooExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for FooExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum InteractExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: InteractExn) -> Self { match err { InteractExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for InteractExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => InteractExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for InteractExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for InteractExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum InteractFastExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: InteractFastExn) -> Self { match err { InteractFastExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for InteractFastExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => InteractFastExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for InteractFastExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for InteractFastExn { type Success = ::std::primitive::i32; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::I32, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum SerializeStreamExn { ApplicationException(::fbthrift::ApplicationException), } impl ::fbthrift::ExceptionInfo for SerializeStreamExn { fn exn_name(&self) -> &'static ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for SerializeStreamExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { 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::help::SerializeExn for SerializeStreamExn { type Success = ::std::primitive::i32; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(success) => { p.write_field_begin( "Success", ::fbthrift::TType::I32, 0i16, ); ::fbthrift::Serialize::write(success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum SerializeExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: SerializeExn) -> Self { match err { SerializeExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for SerializeExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => SerializeExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for SerializeExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for SerializeExn { type Success = ::std::primitive::i32; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::I32, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } } /// Service definitions for `Perform`. pub mod perform { #[derive(Clone, Debug)] pub enum FooExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: FooExn) -> Self { match err { FooExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for FooExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => FooExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::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 ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for FooExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for FooExn { type Success = (); fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Void, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } } /// Service definitions for `InteractWithShared`. pub mod interact_with_shared { #[derive(Clone, Debug)] pub enum DoSomeSimilarThingsExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: DoSomeSimilarThingsExn) -> Self { match err { DoSomeSimilarThingsExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for DoSomeSimilarThingsExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => DoSomeSimilarThingsExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => DoSomeSimilarThingsExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for DoSomeSimilarThingsExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for DoSomeSimilarThingsExn { fn exn_name(&self) -> &'static ::std::primitive::str { match self { Self::ApplicationException(aexn) => aexn.exn_name(), } } fn exn_value(&self) -> String { match self { Self::ApplicationException(aexn) => aexn.exn_value(), } } fn exn_is_declared(&self) -> bool { match self { Self::ApplicationException(aexn) => aexn.exn_is_declared(), } } } impl ::fbthrift::ResultInfo for DoSomeSimilarThingsExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for DoSomeSimilarThingsExn { type Success = shared__types::DoSomethingResult; fn write_result

( res: ::std::result::Result<&Self::Success, &Self>, p: &mut P, function_name: &'static ::std::primitive::str, ) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin(function_name); match res { ::std::result::Result::Ok(_success) => { p.write_field_begin("Success", ::fbthrift::TType::Struct, 0i16); ::fbthrift::Serialize::write(_success, p); p.write_field_end(); } ::std::result::Result::Err(Self::ApplicationException(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } }