// @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 MapListExn { fn from(err: crate::errors::nested_containers::MapListError) -> Self { match err { crate::errors::nested_containers::MapListError::ApplicationException(aexn) => MapListExn::ApplicationException(aexn), crate::errors::nested_containers::MapListError::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 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::Serialize

for MapListExn where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { ::fbthrift::help::SerializeExn::write_result(Err(self), p); } } impl ::fbthrift::help::SerializeExn for MapListExn { type Success = (); fn write_result

(res: ::std::result::Result<&Self::Success, &Self>, p: &mut P) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin("MapList"); 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 MapSetExn { fn from(err: crate::errors::nested_containers::MapSetError) -> Self { match err { crate::errors::nested_containers::MapSetError::ApplicationException(aexn) => MapSetExn::ApplicationException(aexn), crate::errors::nested_containers::MapSetError::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 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::Serialize

for MapSetExn where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { ::fbthrift::help::SerializeExn::write_result(Err(self), p); } } impl ::fbthrift::help::SerializeExn for MapSetExn { type Success = (); fn write_result

(res: ::std::result::Result<&Self::Success, &Self>, p: &mut P) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin("MapSet"); 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 ListMapExn { fn from(err: crate::errors::nested_containers::ListMapError) -> Self { match err { crate::errors::nested_containers::ListMapError::ApplicationException(aexn) => ListMapExn::ApplicationException(aexn), crate::errors::nested_containers::ListMapError::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 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::Serialize

for ListMapExn where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { ::fbthrift::help::SerializeExn::write_result(Err(self), p); } } impl ::fbthrift::help::SerializeExn for ListMapExn { type Success = (); fn write_result

(res: ::std::result::Result<&Self::Success, &Self>, p: &mut P) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin("ListMap"); 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 ListSetExn { fn from(err: crate::errors::nested_containers::ListSetError) -> Self { match err { crate::errors::nested_containers::ListSetError::ApplicationException(aexn) => ListSetExn::ApplicationException(aexn), crate::errors::nested_containers::ListSetError::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 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::Serialize

for ListSetExn where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { ::fbthrift::help::SerializeExn::write_result(Err(self), p); } } impl ::fbthrift::help::SerializeExn for ListSetExn { type Success = (); fn write_result

(res: ::std::result::Result<&Self::Success, &Self>, p: &mut P) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin("ListSet"); 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 TurtlesExn { fn from(err: crate::errors::nested_containers::TurtlesError) -> Self { match err { crate::errors::nested_containers::TurtlesError::ApplicationException(aexn) => TurtlesExn::ApplicationException(aexn), crate::errors::nested_containers::TurtlesError::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 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::Serialize

for TurtlesExn where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { ::fbthrift::help::SerializeExn::write_result(Err(self), p); } } impl ::fbthrift::help::SerializeExn for TurtlesExn { type Success = (); fn write_result

(res: ::std::result::Result<&Self::Success, &Self>, p: &mut P) where P: ::fbthrift::ProtocolWriter, { if let ::std::result::Result::Err(Self::ApplicationException(aexn)) = res { ::fbthrift::Serialize::write(aexn, p); return; } p.write_struct_begin("Turtles"); 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(); } } }