// @generated by Thrift for thrift/compiler/test/fixtures/params/src/module.thrift // This file is probably not the place you want to edit! //! Thrift service definitions for `module`. /// Service definitions for `NestedContainers`. pub mod nested_containers { #[derive(Clone, Debug)] pub enum MapListExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: MapListExn) -> Self { match err { MapListExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for MapListExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => MapListExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => MapListExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for MapListExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for MapListExn { 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 MapListExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for MapListExn { 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 MapSetExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: MapSetExn) -> Self { match err { MapSetExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for MapSetExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => MapSetExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => MapSetExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for MapSetExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for MapSetExn { 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 MapSetExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for MapSetExn { 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 ListMapExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: ListMapExn) -> Self { match err { ListMapExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for ListMapExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => ListMapExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => ListMapExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for ListMapExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for ListMapExn { 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 ListMapExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for ListMapExn { 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 ListSetExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: ListSetExn) -> Self { match err { ListSetExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for ListSetExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => ListSetExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => ListSetExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for ListSetExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for ListSetExn { 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 ListSetExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for ListSetExn { 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 TurtlesExn { ApplicationException(::fbthrift::ApplicationException), } impl ::std::convert::From for ::fbthrift::NonthrowingFunctionError { fn from(err: TurtlesExn) -> Self { match err { TurtlesExn::ApplicationException(aexn) => ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn), } } } impl ::std::convert::From<::fbthrift::NonthrowingFunctionError> for TurtlesExn { fn from(err: ::fbthrift::NonthrowingFunctionError) -> Self { match err { ::fbthrift::NonthrowingFunctionError::ApplicationException(aexn) => TurtlesExn::ApplicationException(aexn), ::fbthrift::NonthrowingFunctionError::ThriftError(err) => TurtlesExn::ApplicationException(::fbthrift::ApplicationException { message: err.to_string(), type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError, }), } } } impl ::std::convert::From<::fbthrift::ApplicationException> for TurtlesExn { fn from(exn: ::fbthrift::ApplicationException) -> Self { Self::ApplicationException(exn) } } impl ::fbthrift::ExceptionInfo for TurtlesExn { 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 TurtlesExn { fn result_type(&self) -> ::fbthrift::ResultType { match self { Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception, } } } impl ::fbthrift::help::SerializeExn for TurtlesExn { 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(); } } }