// @generated by Thrift for thrift/compiler/test/fixtures/basic/src/module.thrift // This file is probably not the place you want to edit! //! Thrift service definitions for `module`. /// Service definitions for `FooService`. pub mod foo_service { #[derive(Clone, Debug)] pub enum SimpleRpcExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: SimpleRpcExn) -> Self { match err { SimpleRpcExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for SimpleRpcExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => SimpleRpcExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => SimpleRpcExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for SimpleRpcExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for SimpleRpcExn { 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 SimpleRpcExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for SimpleRpcExn { 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 `FB303Service`. pub mod f_b303_service { #[derive(Clone, Debug)] pub enum SimpleRpcExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: SimpleRpcExn) -> Self { match err { SimpleRpcExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for SimpleRpcExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => SimpleRpcExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => SimpleRpcExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for SimpleRpcExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for SimpleRpcExn { 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 SimpleRpcExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for SimpleRpcExn { type Success = crate::types::ReservedKeyword; 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(); } } } /// Service definitions for `MyService`. pub mod my_service { #[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 GetRandomDataExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: GetRandomDataExn) -> Self { match err { GetRandomDataExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for GetRandomDataExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => GetRandomDataExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => GetRandomDataExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for GetRandomDataExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for GetRandomDataExn { 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 GetRandomDataExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for GetRandomDataExn { type Success = ::std::string::String; 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::String, 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 SinkExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: SinkExn) -> Self { match err { SinkExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for SinkExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => SinkExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => SinkExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for SinkExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for SinkExn { 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 SinkExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for SinkExn { 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 PutDataByIdExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: PutDataByIdExn) -> Self { match err { PutDataByIdExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for PutDataByIdExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => PutDataByIdExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => PutDataByIdExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for PutDataByIdExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for PutDataByIdExn { 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 PutDataByIdExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for PutDataByIdExn { 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 HasDataByIdExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: HasDataByIdExn) -> Self { match err { HasDataByIdExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for HasDataByIdExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => HasDataByIdExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => HasDataByIdExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for HasDataByIdExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for HasDataByIdExn { 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 HasDataByIdExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for HasDataByIdExn { 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(_aexn)) => unreachable!(), } p.write_field_stop(); p.write_struct_end(); } } #[derive(Clone, Debug)] pub enum GetDataByIdExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: GetDataByIdExn) -> Self { match err { GetDataByIdExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for GetDataByIdExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => GetDataByIdExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => GetDataByIdExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for GetDataByIdExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for GetDataByIdExn { 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 GetDataByIdExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for GetDataByIdExn { type Success = ::std::string::String; 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::String, 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 DeleteDataByIdExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: DeleteDataByIdExn) -> Self { match err { DeleteDataByIdExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for DeleteDataByIdExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => DeleteDataByIdExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => DeleteDataByIdExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for DeleteDataByIdExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for DeleteDataByIdExn { 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 DeleteDataByIdExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for DeleteDataByIdExn { 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 LobDataByIdExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: LobDataByIdExn) -> Self { match err { LobDataByIdExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for LobDataByIdExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => LobDataByIdExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => LobDataByIdExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for LobDataByIdExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for LobDataByIdExn { 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 LobDataByIdExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for LobDataByIdExn { 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 InvalidReturnForHackExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: InvalidReturnForHackExn) -> Self { match err { InvalidReturnForHackExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for InvalidReturnForHackExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => InvalidReturnForHackExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => InvalidReturnForHackExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for InvalidReturnForHackExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for InvalidReturnForHackExn { 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 InvalidReturnForHackExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for InvalidReturnForHackExn { type Success = ::std::collections::BTreeSet<::fbthrift::export::OrderedFloat<::std::primitive::f32>>; 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::Set, 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 RpcSkippedCodegenExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: RpcSkippedCodegenExn) -> Self { match err { RpcSkippedCodegenExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for RpcSkippedCodegenExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => RpcSkippedCodegenExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => RpcSkippedCodegenExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for RpcSkippedCodegenExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for RpcSkippedCodegenExn { 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 RpcSkippedCodegenExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for RpcSkippedCodegenExn { 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 `DbMixedStackArguments`. pub mod db_mixed_stack_arguments { #[derive(Clone, Debug)] pub enum GetDataByKey0Exn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: GetDataByKey0Exn) -> Self { match err { GetDataByKey0Exn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for GetDataByKey0Exn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => GetDataByKey0Exn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => GetDataByKey0Exn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for GetDataByKey0Exn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for GetDataByKey0Exn { 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 GetDataByKey0Exn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for GetDataByKey0Exn { type Success = ::std::vec::Vec<::std::primitive::u8>; 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::String, 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 GetDataByKey1Exn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: GetDataByKey1Exn) -> Self { match err { GetDataByKey1Exn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for GetDataByKey1Exn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => GetDataByKey1Exn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => GetDataByKey1Exn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for GetDataByKey1Exn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for GetDataByKey1Exn { 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 GetDataByKey1Exn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for GetDataByKey1Exn { type Success = ::std::vec::Vec<::std::primitive::u8>; 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::String, 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(); } } }