// @generated by Thrift for thrift/compiler/test/fixtures/basic/src/module.thrift // This file is probably not the place you want to edit! //! Thrift error definitions for `module`. /// Error definitions for `FooService`. pub mod foo_service { pub type SimpleRpcError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<(), SimpleRpcError> { fn from(e: crate::services::foo_service::SimpleRpcExn) -> Self { match e { crate::services::foo_service::SimpleRpcExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::foo_service::SimpleRpcExn::ApplicationException(aexn) => ::std::result::Result::Err(SimpleRpcError::ApplicationException(aexn)), } } } } /// Error definitions for `FB303Service`. pub mod f_b303_service { pub type SimpleRpcError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result { fn from(e: crate::services::f_b303_service::SimpleRpcExn) -> Self { match e { crate::services::f_b303_service::SimpleRpcExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::f_b303_service::SimpleRpcExn::ApplicationException(aexn) => ::std::result::Result::Err(SimpleRpcError::ApplicationException(aexn)), } } } } /// Error definitions for `MyService`. pub mod my_service { pub type PingError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<(), PingError> { fn from(e: crate::services::my_service::PingExn) -> Self { match e { crate::services::my_service::PingExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::PingExn::ApplicationException(aexn) => ::std::result::Result::Err(PingError::ApplicationException(aexn)), } } } pub type GetRandomDataError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<::std::string::String, GetRandomDataError> { fn from(e: crate::services::my_service::GetRandomDataExn) -> Self { match e { crate::services::my_service::GetRandomDataExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::GetRandomDataExn::ApplicationException(aexn) => ::std::result::Result::Err(GetRandomDataError::ApplicationException(aexn)), } } } pub type SinkError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<(), SinkError> { fn from(e: crate::services::my_service::SinkExn) -> Self { match e { crate::services::my_service::SinkExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::SinkExn::ApplicationException(aexn) => ::std::result::Result::Err(SinkError::ApplicationException(aexn)), } } } pub type PutDataByIdError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<(), PutDataByIdError> { fn from(e: crate::services::my_service::PutDataByIdExn) -> Self { match e { crate::services::my_service::PutDataByIdExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::PutDataByIdExn::ApplicationException(aexn) => ::std::result::Result::Err(PutDataByIdError::ApplicationException(aexn)), } } } pub type HasDataByIdError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<::std::primitive::bool, HasDataByIdError> { fn from(e: crate::services::my_service::HasDataByIdExn) -> Self { match e { crate::services::my_service::HasDataByIdExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::HasDataByIdExn::ApplicationException(aexn) => ::std::result::Result::Err(HasDataByIdError::ApplicationException(aexn)), } } } pub type GetDataByIdError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<::std::string::String, GetDataByIdError> { fn from(e: crate::services::my_service::GetDataByIdExn) -> Self { match e { crate::services::my_service::GetDataByIdExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::GetDataByIdExn::ApplicationException(aexn) => ::std::result::Result::Err(GetDataByIdError::ApplicationException(aexn)), } } } pub type DeleteDataByIdError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<(), DeleteDataByIdError> { fn from(e: crate::services::my_service::DeleteDataByIdExn) -> Self { match e { crate::services::my_service::DeleteDataByIdExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::DeleteDataByIdExn::ApplicationException(aexn) => ::std::result::Result::Err(DeleteDataByIdError::ApplicationException(aexn)), } } } pub type LobDataByIdError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<(), LobDataByIdError> { fn from(e: crate::services::my_service::LobDataByIdExn) -> Self { match e { crate::services::my_service::LobDataByIdExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::LobDataByIdExn::ApplicationException(aexn) => ::std::result::Result::Err(LobDataByIdError::ApplicationException(aexn)), } } } pub type InvalidReturnForHackError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<::std::collections::BTreeSet<::fbthrift::export::OrderedFloat<::std::primitive::f32>>, InvalidReturnForHackError> { fn from(e: crate::services::my_service::InvalidReturnForHackExn) -> Self { match e { crate::services::my_service::InvalidReturnForHackExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::InvalidReturnForHackExn::ApplicationException(aexn) => ::std::result::Result::Err(InvalidReturnForHackError::ApplicationException(aexn)), } } } pub type RpcSkippedCodegenError = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<(), RpcSkippedCodegenError> { fn from(e: crate::services::my_service::RpcSkippedCodegenExn) -> Self { match e { crate::services::my_service::RpcSkippedCodegenExn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::my_service::RpcSkippedCodegenExn::ApplicationException(aexn) => ::std::result::Result::Err(RpcSkippedCodegenError::ApplicationException(aexn)), } } } } /// Error definitions for `DbMixedStackArguments`. pub mod db_mixed_stack_arguments { pub type GetDataByKey0Error = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, GetDataByKey0Error> { fn from(e: crate::services::db_mixed_stack_arguments::GetDataByKey0Exn) -> Self { match e { crate::services::db_mixed_stack_arguments::GetDataByKey0Exn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::db_mixed_stack_arguments::GetDataByKey0Exn::ApplicationException(aexn) => ::std::result::Result::Err(GetDataByKey0Error::ApplicationException(aexn)), } } } pub type GetDataByKey1Error = ::fbthrift::NonthrowingFunctionError; impl ::std::convert::From for ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, GetDataByKey1Error> { fn from(e: crate::services::db_mixed_stack_arguments::GetDataByKey1Exn) -> Self { match e { crate::services::db_mixed_stack_arguments::GetDataByKey1Exn::Success(res) => { ::std::result::Result::Ok(res) } crate::services::db_mixed_stack_arguments::GetDataByKey1Exn::ApplicationException(aexn) => ::std::result::Result::Err(GetDataByKey1Error::ApplicationException(aexn)), } } } }