nebula_fbthrift_storage_v2/
lib.rs

1// @generated by Thrift for src/interface/storage.thrift
2// This file is probably not the place you want to edit!
3
4#![recursion_limit = "100000000"]
5#![allow(bare_trait_objects)]
6#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals, unused_crate_dependencies, clippy::all)]
7
8pub use self::errors::*;
9pub use self::types::*;
10
11pub mod types;
12
13#[doc(hidden)]
14pub mod dependencies {
15    pub use common as common;
16    pub use meta as meta;
17}
18
19pub mod services {
20    pub mod graph_storage_service {
21        #[derive(Clone, Debug)]
22        pub enum GetNeighborsExn {
23            #[doc(hidden)]
24            Success(crate::types::GetNeighborsResponse),
25            ApplicationException(::fbthrift::ApplicationException),
26        }
27
28        impl ::std::convert::From<crate::errors::graph_storage_service::GetNeighborsError> for GetNeighborsExn {
29            fn from(err: crate::errors::graph_storage_service::GetNeighborsError) -> Self {
30                match err {
31                    crate::errors::graph_storage_service::GetNeighborsError::ApplicationException(aexn) => GetNeighborsExn::ApplicationException(aexn),
32                    crate::errors::graph_storage_service::GetNeighborsError::ThriftError(err) => GetNeighborsExn::ApplicationException(::fbthrift::ApplicationException {
33                        message: err.to_string(),
34                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
35                    }),
36                }
37            }
38        }
39
40        impl ::std::convert::From<::fbthrift::ApplicationException> for GetNeighborsExn {
41            fn from(exn: ::fbthrift::ApplicationException) -> Self {
42                Self::ApplicationException(exn)
43            }
44        }
45
46        impl ::fbthrift::ExceptionInfo for GetNeighborsExn {
47            fn exn_name(&self) -> &'static str {
48                match self {
49                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
50                    Self::ApplicationException(aexn) => aexn.exn_name(),
51                }
52            }
53
54            fn exn_value(&self) -> String {
55                match self {
56                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
57                    Self::ApplicationException(aexn) => aexn.exn_value(),
58                }
59            }
60
61            fn exn_is_declared(&self) -> bool {
62                match self {
63                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
64                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
65                }
66            }
67        }
68
69        impl ::fbthrift::ResultInfo for GetNeighborsExn {
70            fn result_type(&self) -> ::fbthrift::ResultType {
71                match self {
72                    Self::Success(_) => ::fbthrift::ResultType::Return,
73                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
74                }
75            }
76        }
77
78        impl ::fbthrift::GetTType for GetNeighborsExn {
79            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
80        }
81
82        impl<P> ::fbthrift::Serialize<P> for GetNeighborsExn
83        where
84            P: ::fbthrift::ProtocolWriter,
85        {
86            fn write(&self, p: &mut P) {
87                if let Self::ApplicationException(aexn) = self {
88                    return aexn.write(p);
89                }
90                p.write_struct_begin("GetNeighbors");
91                match self {
92                    Self::Success(inner) => {
93                        p.write_field_begin(
94                            "Success",
95                            ::fbthrift::TType::Struct,
96                            0i16,
97                        );
98                        inner.write(p);
99                        p.write_field_end();
100                    }
101                    Self::ApplicationException(_aexn) => unreachable!(),
102                }
103                p.write_field_stop();
104                p.write_struct_end();
105            }
106        }
107
108        impl<P> ::fbthrift::Deserialize<P> for GetNeighborsExn
109        where
110            P: ::fbthrift::ProtocolReader,
111        {
112            fn read(p: &mut P) -> ::anyhow::Result<Self> {
113                static RETURNS: &[::fbthrift::Field] = &[
114                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
115                ];
116                let _ = p.read_struct_begin(|_| ())?;
117                let mut once = false;
118                let mut alt = ::std::option::Option::None;
119                loop {
120                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
121                    match ((fty, fid as ::std::primitive::i32), once) {
122                        ((::fbthrift::TType::Stop, _), _) => {
123                            p.read_field_end()?;
124                            break;
125                        }
126                        ((::fbthrift::TType::Struct, 0i32), false) => {
127                            once = true;
128                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
129                        }
130                        ((ty, _id), false) => p.skip(ty)?,
131                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
132                            ::fbthrift::ApplicationException::new(
133                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
134                                format!(
135                                    "unwanted extra union {} field ty {:?} id {}",
136                                    "GetNeighborsExn",
137                                    badty,
138                                    badid,
139                                ),
140                            )
141                        )),
142                    }
143                    p.read_field_end()?;
144                }
145                p.read_struct_end()?;
146                alt.ok_or_else(||
147                    ::fbthrift::ApplicationException::new(
148                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
149                        format!("Empty union {}", "GetNeighborsExn"),
150                    )
151                    .into(),
152                )
153            }
154        }
155
156        #[derive(Clone, Debug)]
157        pub enum GetPropsExn {
158            #[doc(hidden)]
159            Success(crate::types::GetPropResponse),
160            ApplicationException(::fbthrift::ApplicationException),
161        }
162
163        impl ::std::convert::From<crate::errors::graph_storage_service::GetPropsError> for GetPropsExn {
164            fn from(err: crate::errors::graph_storage_service::GetPropsError) -> Self {
165                match err {
166                    crate::errors::graph_storage_service::GetPropsError::ApplicationException(aexn) => GetPropsExn::ApplicationException(aexn),
167                    crate::errors::graph_storage_service::GetPropsError::ThriftError(err) => GetPropsExn::ApplicationException(::fbthrift::ApplicationException {
168                        message: err.to_string(),
169                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
170                    }),
171                }
172            }
173        }
174
175        impl ::std::convert::From<::fbthrift::ApplicationException> for GetPropsExn {
176            fn from(exn: ::fbthrift::ApplicationException) -> Self {
177                Self::ApplicationException(exn)
178            }
179        }
180
181        impl ::fbthrift::ExceptionInfo for GetPropsExn {
182            fn exn_name(&self) -> &'static str {
183                match self {
184                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
185                    Self::ApplicationException(aexn) => aexn.exn_name(),
186                }
187            }
188
189            fn exn_value(&self) -> String {
190                match self {
191                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
192                    Self::ApplicationException(aexn) => aexn.exn_value(),
193                }
194            }
195
196            fn exn_is_declared(&self) -> bool {
197                match self {
198                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
199                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
200                }
201            }
202        }
203
204        impl ::fbthrift::ResultInfo for GetPropsExn {
205            fn result_type(&self) -> ::fbthrift::ResultType {
206                match self {
207                    Self::Success(_) => ::fbthrift::ResultType::Return,
208                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
209                }
210            }
211        }
212
213        impl ::fbthrift::GetTType for GetPropsExn {
214            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
215        }
216
217        impl<P> ::fbthrift::Serialize<P> for GetPropsExn
218        where
219            P: ::fbthrift::ProtocolWriter,
220        {
221            fn write(&self, p: &mut P) {
222                if let Self::ApplicationException(aexn) = self {
223                    return aexn.write(p);
224                }
225                p.write_struct_begin("GetProps");
226                match self {
227                    Self::Success(inner) => {
228                        p.write_field_begin(
229                            "Success",
230                            ::fbthrift::TType::Struct,
231                            0i16,
232                        );
233                        inner.write(p);
234                        p.write_field_end();
235                    }
236                    Self::ApplicationException(_aexn) => unreachable!(),
237                }
238                p.write_field_stop();
239                p.write_struct_end();
240            }
241        }
242
243        impl<P> ::fbthrift::Deserialize<P> for GetPropsExn
244        where
245            P: ::fbthrift::ProtocolReader,
246        {
247            fn read(p: &mut P) -> ::anyhow::Result<Self> {
248                static RETURNS: &[::fbthrift::Field] = &[
249                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
250                ];
251                let _ = p.read_struct_begin(|_| ())?;
252                let mut once = false;
253                let mut alt = ::std::option::Option::None;
254                loop {
255                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
256                    match ((fty, fid as ::std::primitive::i32), once) {
257                        ((::fbthrift::TType::Stop, _), _) => {
258                            p.read_field_end()?;
259                            break;
260                        }
261                        ((::fbthrift::TType::Struct, 0i32), false) => {
262                            once = true;
263                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
264                        }
265                        ((ty, _id), false) => p.skip(ty)?,
266                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
267                            ::fbthrift::ApplicationException::new(
268                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
269                                format!(
270                                    "unwanted extra union {} field ty {:?} id {}",
271                                    "GetPropsExn",
272                                    badty,
273                                    badid,
274                                ),
275                            )
276                        )),
277                    }
278                    p.read_field_end()?;
279                }
280                p.read_struct_end()?;
281                alt.ok_or_else(||
282                    ::fbthrift::ApplicationException::new(
283                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
284                        format!("Empty union {}", "GetPropsExn"),
285                    )
286                    .into(),
287                )
288            }
289        }
290
291        #[derive(Clone, Debug)]
292        pub enum AddVerticesExn {
293            #[doc(hidden)]
294            Success(crate::types::ExecResponse),
295            ApplicationException(::fbthrift::ApplicationException),
296        }
297
298        impl ::std::convert::From<crate::errors::graph_storage_service::AddVerticesError> for AddVerticesExn {
299            fn from(err: crate::errors::graph_storage_service::AddVerticesError) -> Self {
300                match err {
301                    crate::errors::graph_storage_service::AddVerticesError::ApplicationException(aexn) => AddVerticesExn::ApplicationException(aexn),
302                    crate::errors::graph_storage_service::AddVerticesError::ThriftError(err) => AddVerticesExn::ApplicationException(::fbthrift::ApplicationException {
303                        message: err.to_string(),
304                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
305                    }),
306                }
307            }
308        }
309
310        impl ::std::convert::From<::fbthrift::ApplicationException> for AddVerticesExn {
311            fn from(exn: ::fbthrift::ApplicationException) -> Self {
312                Self::ApplicationException(exn)
313            }
314        }
315
316        impl ::fbthrift::ExceptionInfo for AddVerticesExn {
317            fn exn_name(&self) -> &'static str {
318                match self {
319                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
320                    Self::ApplicationException(aexn) => aexn.exn_name(),
321                }
322            }
323
324            fn exn_value(&self) -> String {
325                match self {
326                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
327                    Self::ApplicationException(aexn) => aexn.exn_value(),
328                }
329            }
330
331            fn exn_is_declared(&self) -> bool {
332                match self {
333                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
334                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
335                }
336            }
337        }
338
339        impl ::fbthrift::ResultInfo for AddVerticesExn {
340            fn result_type(&self) -> ::fbthrift::ResultType {
341                match self {
342                    Self::Success(_) => ::fbthrift::ResultType::Return,
343                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
344                }
345            }
346        }
347
348        impl ::fbthrift::GetTType for AddVerticesExn {
349            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
350        }
351
352        impl<P> ::fbthrift::Serialize<P> for AddVerticesExn
353        where
354            P: ::fbthrift::ProtocolWriter,
355        {
356            fn write(&self, p: &mut P) {
357                if let Self::ApplicationException(aexn) = self {
358                    return aexn.write(p);
359                }
360                p.write_struct_begin("AddVertices");
361                match self {
362                    Self::Success(inner) => {
363                        p.write_field_begin(
364                            "Success",
365                            ::fbthrift::TType::Struct,
366                            0i16,
367                        );
368                        inner.write(p);
369                        p.write_field_end();
370                    }
371                    Self::ApplicationException(_aexn) => unreachable!(),
372                }
373                p.write_field_stop();
374                p.write_struct_end();
375            }
376        }
377
378        impl<P> ::fbthrift::Deserialize<P> for AddVerticesExn
379        where
380            P: ::fbthrift::ProtocolReader,
381        {
382            fn read(p: &mut P) -> ::anyhow::Result<Self> {
383                static RETURNS: &[::fbthrift::Field] = &[
384                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
385                ];
386                let _ = p.read_struct_begin(|_| ())?;
387                let mut once = false;
388                let mut alt = ::std::option::Option::None;
389                loop {
390                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
391                    match ((fty, fid as ::std::primitive::i32), once) {
392                        ((::fbthrift::TType::Stop, _), _) => {
393                            p.read_field_end()?;
394                            break;
395                        }
396                        ((::fbthrift::TType::Struct, 0i32), false) => {
397                            once = true;
398                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
399                        }
400                        ((ty, _id), false) => p.skip(ty)?,
401                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
402                            ::fbthrift::ApplicationException::new(
403                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
404                                format!(
405                                    "unwanted extra union {} field ty {:?} id {}",
406                                    "AddVerticesExn",
407                                    badty,
408                                    badid,
409                                ),
410                            )
411                        )),
412                    }
413                    p.read_field_end()?;
414                }
415                p.read_struct_end()?;
416                alt.ok_or_else(||
417                    ::fbthrift::ApplicationException::new(
418                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
419                        format!("Empty union {}", "AddVerticesExn"),
420                    )
421                    .into(),
422                )
423            }
424        }
425
426        #[derive(Clone, Debug)]
427        pub enum AddEdgesExn {
428            #[doc(hidden)]
429            Success(crate::types::ExecResponse),
430            ApplicationException(::fbthrift::ApplicationException),
431        }
432
433        impl ::std::convert::From<crate::errors::graph_storage_service::AddEdgesError> for AddEdgesExn {
434            fn from(err: crate::errors::graph_storage_service::AddEdgesError) -> Self {
435                match err {
436                    crate::errors::graph_storage_service::AddEdgesError::ApplicationException(aexn) => AddEdgesExn::ApplicationException(aexn),
437                    crate::errors::graph_storage_service::AddEdgesError::ThriftError(err) => AddEdgesExn::ApplicationException(::fbthrift::ApplicationException {
438                        message: err.to_string(),
439                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
440                    }),
441                }
442            }
443        }
444
445        impl ::std::convert::From<::fbthrift::ApplicationException> for AddEdgesExn {
446            fn from(exn: ::fbthrift::ApplicationException) -> Self {
447                Self::ApplicationException(exn)
448            }
449        }
450
451        impl ::fbthrift::ExceptionInfo for AddEdgesExn {
452            fn exn_name(&self) -> &'static str {
453                match self {
454                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
455                    Self::ApplicationException(aexn) => aexn.exn_name(),
456                }
457            }
458
459            fn exn_value(&self) -> String {
460                match self {
461                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
462                    Self::ApplicationException(aexn) => aexn.exn_value(),
463                }
464            }
465
466            fn exn_is_declared(&self) -> bool {
467                match self {
468                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
469                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
470                }
471            }
472        }
473
474        impl ::fbthrift::ResultInfo for AddEdgesExn {
475            fn result_type(&self) -> ::fbthrift::ResultType {
476                match self {
477                    Self::Success(_) => ::fbthrift::ResultType::Return,
478                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
479                }
480            }
481        }
482
483        impl ::fbthrift::GetTType for AddEdgesExn {
484            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
485        }
486
487        impl<P> ::fbthrift::Serialize<P> for AddEdgesExn
488        where
489            P: ::fbthrift::ProtocolWriter,
490        {
491            fn write(&self, p: &mut P) {
492                if let Self::ApplicationException(aexn) = self {
493                    return aexn.write(p);
494                }
495                p.write_struct_begin("AddEdges");
496                match self {
497                    Self::Success(inner) => {
498                        p.write_field_begin(
499                            "Success",
500                            ::fbthrift::TType::Struct,
501                            0i16,
502                        );
503                        inner.write(p);
504                        p.write_field_end();
505                    }
506                    Self::ApplicationException(_aexn) => unreachable!(),
507                }
508                p.write_field_stop();
509                p.write_struct_end();
510            }
511        }
512
513        impl<P> ::fbthrift::Deserialize<P> for AddEdgesExn
514        where
515            P: ::fbthrift::ProtocolReader,
516        {
517            fn read(p: &mut P) -> ::anyhow::Result<Self> {
518                static RETURNS: &[::fbthrift::Field] = &[
519                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
520                ];
521                let _ = p.read_struct_begin(|_| ())?;
522                let mut once = false;
523                let mut alt = ::std::option::Option::None;
524                loop {
525                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
526                    match ((fty, fid as ::std::primitive::i32), once) {
527                        ((::fbthrift::TType::Stop, _), _) => {
528                            p.read_field_end()?;
529                            break;
530                        }
531                        ((::fbthrift::TType::Struct, 0i32), false) => {
532                            once = true;
533                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
534                        }
535                        ((ty, _id), false) => p.skip(ty)?,
536                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
537                            ::fbthrift::ApplicationException::new(
538                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
539                                format!(
540                                    "unwanted extra union {} field ty {:?} id {}",
541                                    "AddEdgesExn",
542                                    badty,
543                                    badid,
544                                ),
545                            )
546                        )),
547                    }
548                    p.read_field_end()?;
549                }
550                p.read_struct_end()?;
551                alt.ok_or_else(||
552                    ::fbthrift::ApplicationException::new(
553                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
554                        format!("Empty union {}", "AddEdgesExn"),
555                    )
556                    .into(),
557                )
558            }
559        }
560
561        #[derive(Clone, Debug)]
562        pub enum DeleteEdgesExn {
563            #[doc(hidden)]
564            Success(crate::types::ExecResponse),
565            ApplicationException(::fbthrift::ApplicationException),
566        }
567
568        impl ::std::convert::From<crate::errors::graph_storage_service::DeleteEdgesError> for DeleteEdgesExn {
569            fn from(err: crate::errors::graph_storage_service::DeleteEdgesError) -> Self {
570                match err {
571                    crate::errors::graph_storage_service::DeleteEdgesError::ApplicationException(aexn) => DeleteEdgesExn::ApplicationException(aexn),
572                    crate::errors::graph_storage_service::DeleteEdgesError::ThriftError(err) => DeleteEdgesExn::ApplicationException(::fbthrift::ApplicationException {
573                        message: err.to_string(),
574                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
575                    }),
576                }
577            }
578        }
579
580        impl ::std::convert::From<::fbthrift::ApplicationException> for DeleteEdgesExn {
581            fn from(exn: ::fbthrift::ApplicationException) -> Self {
582                Self::ApplicationException(exn)
583            }
584        }
585
586        impl ::fbthrift::ExceptionInfo for DeleteEdgesExn {
587            fn exn_name(&self) -> &'static str {
588                match self {
589                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
590                    Self::ApplicationException(aexn) => aexn.exn_name(),
591                }
592            }
593
594            fn exn_value(&self) -> String {
595                match self {
596                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
597                    Self::ApplicationException(aexn) => aexn.exn_value(),
598                }
599            }
600
601            fn exn_is_declared(&self) -> bool {
602                match self {
603                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
604                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
605                }
606            }
607        }
608
609        impl ::fbthrift::ResultInfo for DeleteEdgesExn {
610            fn result_type(&self) -> ::fbthrift::ResultType {
611                match self {
612                    Self::Success(_) => ::fbthrift::ResultType::Return,
613                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
614                }
615            }
616        }
617
618        impl ::fbthrift::GetTType for DeleteEdgesExn {
619            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
620        }
621
622        impl<P> ::fbthrift::Serialize<P> for DeleteEdgesExn
623        where
624            P: ::fbthrift::ProtocolWriter,
625        {
626            fn write(&self, p: &mut P) {
627                if let Self::ApplicationException(aexn) = self {
628                    return aexn.write(p);
629                }
630                p.write_struct_begin("DeleteEdges");
631                match self {
632                    Self::Success(inner) => {
633                        p.write_field_begin(
634                            "Success",
635                            ::fbthrift::TType::Struct,
636                            0i16,
637                        );
638                        inner.write(p);
639                        p.write_field_end();
640                    }
641                    Self::ApplicationException(_aexn) => unreachable!(),
642                }
643                p.write_field_stop();
644                p.write_struct_end();
645            }
646        }
647
648        impl<P> ::fbthrift::Deserialize<P> for DeleteEdgesExn
649        where
650            P: ::fbthrift::ProtocolReader,
651        {
652            fn read(p: &mut P) -> ::anyhow::Result<Self> {
653                static RETURNS: &[::fbthrift::Field] = &[
654                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
655                ];
656                let _ = p.read_struct_begin(|_| ())?;
657                let mut once = false;
658                let mut alt = ::std::option::Option::None;
659                loop {
660                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
661                    match ((fty, fid as ::std::primitive::i32), once) {
662                        ((::fbthrift::TType::Stop, _), _) => {
663                            p.read_field_end()?;
664                            break;
665                        }
666                        ((::fbthrift::TType::Struct, 0i32), false) => {
667                            once = true;
668                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
669                        }
670                        ((ty, _id), false) => p.skip(ty)?,
671                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
672                            ::fbthrift::ApplicationException::new(
673                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
674                                format!(
675                                    "unwanted extra union {} field ty {:?} id {}",
676                                    "DeleteEdgesExn",
677                                    badty,
678                                    badid,
679                                ),
680                            )
681                        )),
682                    }
683                    p.read_field_end()?;
684                }
685                p.read_struct_end()?;
686                alt.ok_or_else(||
687                    ::fbthrift::ApplicationException::new(
688                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
689                        format!("Empty union {}", "DeleteEdgesExn"),
690                    )
691                    .into(),
692                )
693            }
694        }
695
696        #[derive(Clone, Debug)]
697        pub enum DeleteVerticesExn {
698            #[doc(hidden)]
699            Success(crate::types::ExecResponse),
700            ApplicationException(::fbthrift::ApplicationException),
701        }
702
703        impl ::std::convert::From<crate::errors::graph_storage_service::DeleteVerticesError> for DeleteVerticesExn {
704            fn from(err: crate::errors::graph_storage_service::DeleteVerticesError) -> Self {
705                match err {
706                    crate::errors::graph_storage_service::DeleteVerticesError::ApplicationException(aexn) => DeleteVerticesExn::ApplicationException(aexn),
707                    crate::errors::graph_storage_service::DeleteVerticesError::ThriftError(err) => DeleteVerticesExn::ApplicationException(::fbthrift::ApplicationException {
708                        message: err.to_string(),
709                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
710                    }),
711                }
712            }
713        }
714
715        impl ::std::convert::From<::fbthrift::ApplicationException> for DeleteVerticesExn {
716            fn from(exn: ::fbthrift::ApplicationException) -> Self {
717                Self::ApplicationException(exn)
718            }
719        }
720
721        impl ::fbthrift::ExceptionInfo for DeleteVerticesExn {
722            fn exn_name(&self) -> &'static str {
723                match self {
724                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
725                    Self::ApplicationException(aexn) => aexn.exn_name(),
726                }
727            }
728
729            fn exn_value(&self) -> String {
730                match self {
731                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
732                    Self::ApplicationException(aexn) => aexn.exn_value(),
733                }
734            }
735
736            fn exn_is_declared(&self) -> bool {
737                match self {
738                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
739                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
740                }
741            }
742        }
743
744        impl ::fbthrift::ResultInfo for DeleteVerticesExn {
745            fn result_type(&self) -> ::fbthrift::ResultType {
746                match self {
747                    Self::Success(_) => ::fbthrift::ResultType::Return,
748                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
749                }
750            }
751        }
752
753        impl ::fbthrift::GetTType for DeleteVerticesExn {
754            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
755        }
756
757        impl<P> ::fbthrift::Serialize<P> for DeleteVerticesExn
758        where
759            P: ::fbthrift::ProtocolWriter,
760        {
761            fn write(&self, p: &mut P) {
762                if let Self::ApplicationException(aexn) = self {
763                    return aexn.write(p);
764                }
765                p.write_struct_begin("DeleteVertices");
766                match self {
767                    Self::Success(inner) => {
768                        p.write_field_begin(
769                            "Success",
770                            ::fbthrift::TType::Struct,
771                            0i16,
772                        );
773                        inner.write(p);
774                        p.write_field_end();
775                    }
776                    Self::ApplicationException(_aexn) => unreachable!(),
777                }
778                p.write_field_stop();
779                p.write_struct_end();
780            }
781        }
782
783        impl<P> ::fbthrift::Deserialize<P> for DeleteVerticesExn
784        where
785            P: ::fbthrift::ProtocolReader,
786        {
787            fn read(p: &mut P) -> ::anyhow::Result<Self> {
788                static RETURNS: &[::fbthrift::Field] = &[
789                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
790                ];
791                let _ = p.read_struct_begin(|_| ())?;
792                let mut once = false;
793                let mut alt = ::std::option::Option::None;
794                loop {
795                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
796                    match ((fty, fid as ::std::primitive::i32), once) {
797                        ((::fbthrift::TType::Stop, _), _) => {
798                            p.read_field_end()?;
799                            break;
800                        }
801                        ((::fbthrift::TType::Struct, 0i32), false) => {
802                            once = true;
803                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
804                        }
805                        ((ty, _id), false) => p.skip(ty)?,
806                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
807                            ::fbthrift::ApplicationException::new(
808                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
809                                format!(
810                                    "unwanted extra union {} field ty {:?} id {}",
811                                    "DeleteVerticesExn",
812                                    badty,
813                                    badid,
814                                ),
815                            )
816                        )),
817                    }
818                    p.read_field_end()?;
819                }
820                p.read_struct_end()?;
821                alt.ok_or_else(||
822                    ::fbthrift::ApplicationException::new(
823                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
824                        format!("Empty union {}", "DeleteVerticesExn"),
825                    )
826                    .into(),
827                )
828            }
829        }
830
831        #[derive(Clone, Debug)]
832        pub enum DeleteTagsExn {
833            #[doc(hidden)]
834            Success(crate::types::ExecResponse),
835            ApplicationException(::fbthrift::ApplicationException),
836        }
837
838        impl ::std::convert::From<crate::errors::graph_storage_service::DeleteTagsError> for DeleteTagsExn {
839            fn from(err: crate::errors::graph_storage_service::DeleteTagsError) -> Self {
840                match err {
841                    crate::errors::graph_storage_service::DeleteTagsError::ApplicationException(aexn) => DeleteTagsExn::ApplicationException(aexn),
842                    crate::errors::graph_storage_service::DeleteTagsError::ThriftError(err) => DeleteTagsExn::ApplicationException(::fbthrift::ApplicationException {
843                        message: err.to_string(),
844                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
845                    }),
846                }
847            }
848        }
849
850        impl ::std::convert::From<::fbthrift::ApplicationException> for DeleteTagsExn {
851            fn from(exn: ::fbthrift::ApplicationException) -> Self {
852                Self::ApplicationException(exn)
853            }
854        }
855
856        impl ::fbthrift::ExceptionInfo for DeleteTagsExn {
857            fn exn_name(&self) -> &'static str {
858                match self {
859                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
860                    Self::ApplicationException(aexn) => aexn.exn_name(),
861                }
862            }
863
864            fn exn_value(&self) -> String {
865                match self {
866                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
867                    Self::ApplicationException(aexn) => aexn.exn_value(),
868                }
869            }
870
871            fn exn_is_declared(&self) -> bool {
872                match self {
873                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
874                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
875                }
876            }
877        }
878
879        impl ::fbthrift::ResultInfo for DeleteTagsExn {
880            fn result_type(&self) -> ::fbthrift::ResultType {
881                match self {
882                    Self::Success(_) => ::fbthrift::ResultType::Return,
883                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
884                }
885            }
886        }
887
888        impl ::fbthrift::GetTType for DeleteTagsExn {
889            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
890        }
891
892        impl<P> ::fbthrift::Serialize<P> for DeleteTagsExn
893        where
894            P: ::fbthrift::ProtocolWriter,
895        {
896            fn write(&self, p: &mut P) {
897                if let Self::ApplicationException(aexn) = self {
898                    return aexn.write(p);
899                }
900                p.write_struct_begin("DeleteTags");
901                match self {
902                    Self::Success(inner) => {
903                        p.write_field_begin(
904                            "Success",
905                            ::fbthrift::TType::Struct,
906                            0i16,
907                        );
908                        inner.write(p);
909                        p.write_field_end();
910                    }
911                    Self::ApplicationException(_aexn) => unreachable!(),
912                }
913                p.write_field_stop();
914                p.write_struct_end();
915            }
916        }
917
918        impl<P> ::fbthrift::Deserialize<P> for DeleteTagsExn
919        where
920            P: ::fbthrift::ProtocolReader,
921        {
922            fn read(p: &mut P) -> ::anyhow::Result<Self> {
923                static RETURNS: &[::fbthrift::Field] = &[
924                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
925                ];
926                let _ = p.read_struct_begin(|_| ())?;
927                let mut once = false;
928                let mut alt = ::std::option::Option::None;
929                loop {
930                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
931                    match ((fty, fid as ::std::primitive::i32), once) {
932                        ((::fbthrift::TType::Stop, _), _) => {
933                            p.read_field_end()?;
934                            break;
935                        }
936                        ((::fbthrift::TType::Struct, 0i32), false) => {
937                            once = true;
938                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
939                        }
940                        ((ty, _id), false) => p.skip(ty)?,
941                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
942                            ::fbthrift::ApplicationException::new(
943                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
944                                format!(
945                                    "unwanted extra union {} field ty {:?} id {}",
946                                    "DeleteTagsExn",
947                                    badty,
948                                    badid,
949                                ),
950                            )
951                        )),
952                    }
953                    p.read_field_end()?;
954                }
955                p.read_struct_end()?;
956                alt.ok_or_else(||
957                    ::fbthrift::ApplicationException::new(
958                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
959                        format!("Empty union {}", "DeleteTagsExn"),
960                    )
961                    .into(),
962                )
963            }
964        }
965
966        #[derive(Clone, Debug)]
967        pub enum UpdateVertexExn {
968            #[doc(hidden)]
969            Success(crate::types::UpdateResponse),
970            ApplicationException(::fbthrift::ApplicationException),
971        }
972
973        impl ::std::convert::From<crate::errors::graph_storage_service::UpdateVertexError> for UpdateVertexExn {
974            fn from(err: crate::errors::graph_storage_service::UpdateVertexError) -> Self {
975                match err {
976                    crate::errors::graph_storage_service::UpdateVertexError::ApplicationException(aexn) => UpdateVertexExn::ApplicationException(aexn),
977                    crate::errors::graph_storage_service::UpdateVertexError::ThriftError(err) => UpdateVertexExn::ApplicationException(::fbthrift::ApplicationException {
978                        message: err.to_string(),
979                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
980                    }),
981                }
982            }
983        }
984
985        impl ::std::convert::From<::fbthrift::ApplicationException> for UpdateVertexExn {
986            fn from(exn: ::fbthrift::ApplicationException) -> Self {
987                Self::ApplicationException(exn)
988            }
989        }
990
991        impl ::fbthrift::ExceptionInfo for UpdateVertexExn {
992            fn exn_name(&self) -> &'static str {
993                match self {
994                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
995                    Self::ApplicationException(aexn) => aexn.exn_name(),
996                }
997            }
998
999            fn exn_value(&self) -> String {
1000                match self {
1001                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1002                    Self::ApplicationException(aexn) => aexn.exn_value(),
1003                }
1004            }
1005
1006            fn exn_is_declared(&self) -> bool {
1007                match self {
1008                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1009                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1010                }
1011            }
1012        }
1013
1014        impl ::fbthrift::ResultInfo for UpdateVertexExn {
1015            fn result_type(&self) -> ::fbthrift::ResultType {
1016                match self {
1017                    Self::Success(_) => ::fbthrift::ResultType::Return,
1018                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1019                }
1020            }
1021        }
1022
1023        impl ::fbthrift::GetTType for UpdateVertexExn {
1024            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1025        }
1026
1027        impl<P> ::fbthrift::Serialize<P> for UpdateVertexExn
1028        where
1029            P: ::fbthrift::ProtocolWriter,
1030        {
1031            fn write(&self, p: &mut P) {
1032                if let Self::ApplicationException(aexn) = self {
1033                    return aexn.write(p);
1034                }
1035                p.write_struct_begin("UpdateVertex");
1036                match self {
1037                    Self::Success(inner) => {
1038                        p.write_field_begin(
1039                            "Success",
1040                            ::fbthrift::TType::Struct,
1041                            0i16,
1042                        );
1043                        inner.write(p);
1044                        p.write_field_end();
1045                    }
1046                    Self::ApplicationException(_aexn) => unreachable!(),
1047                }
1048                p.write_field_stop();
1049                p.write_struct_end();
1050            }
1051        }
1052
1053        impl<P> ::fbthrift::Deserialize<P> for UpdateVertexExn
1054        where
1055            P: ::fbthrift::ProtocolReader,
1056        {
1057            fn read(p: &mut P) -> ::anyhow::Result<Self> {
1058                static RETURNS: &[::fbthrift::Field] = &[
1059                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1060                ];
1061                let _ = p.read_struct_begin(|_| ())?;
1062                let mut once = false;
1063                let mut alt = ::std::option::Option::None;
1064                loop {
1065                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1066                    match ((fty, fid as ::std::primitive::i32), once) {
1067                        ((::fbthrift::TType::Stop, _), _) => {
1068                            p.read_field_end()?;
1069                            break;
1070                        }
1071                        ((::fbthrift::TType::Struct, 0i32), false) => {
1072                            once = true;
1073                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1074                        }
1075                        ((ty, _id), false) => p.skip(ty)?,
1076                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1077                            ::fbthrift::ApplicationException::new(
1078                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1079                                format!(
1080                                    "unwanted extra union {} field ty {:?} id {}",
1081                                    "UpdateVertexExn",
1082                                    badty,
1083                                    badid,
1084                                ),
1085                            )
1086                        )),
1087                    }
1088                    p.read_field_end()?;
1089                }
1090                p.read_struct_end()?;
1091                alt.ok_or_else(||
1092                    ::fbthrift::ApplicationException::new(
1093                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1094                        format!("Empty union {}", "UpdateVertexExn"),
1095                    )
1096                    .into(),
1097                )
1098            }
1099        }
1100
1101        #[derive(Clone, Debug)]
1102        pub enum UpdateEdgeExn {
1103            #[doc(hidden)]
1104            Success(crate::types::UpdateResponse),
1105            ApplicationException(::fbthrift::ApplicationException),
1106        }
1107
1108        impl ::std::convert::From<crate::errors::graph_storage_service::UpdateEdgeError> for UpdateEdgeExn {
1109            fn from(err: crate::errors::graph_storage_service::UpdateEdgeError) -> Self {
1110                match err {
1111                    crate::errors::graph_storage_service::UpdateEdgeError::ApplicationException(aexn) => UpdateEdgeExn::ApplicationException(aexn),
1112                    crate::errors::graph_storage_service::UpdateEdgeError::ThriftError(err) => UpdateEdgeExn::ApplicationException(::fbthrift::ApplicationException {
1113                        message: err.to_string(),
1114                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1115                    }),
1116                }
1117            }
1118        }
1119
1120        impl ::std::convert::From<::fbthrift::ApplicationException> for UpdateEdgeExn {
1121            fn from(exn: ::fbthrift::ApplicationException) -> Self {
1122                Self::ApplicationException(exn)
1123            }
1124        }
1125
1126        impl ::fbthrift::ExceptionInfo for UpdateEdgeExn {
1127            fn exn_name(&self) -> &'static str {
1128                match self {
1129                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1130                    Self::ApplicationException(aexn) => aexn.exn_name(),
1131                }
1132            }
1133
1134            fn exn_value(&self) -> String {
1135                match self {
1136                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1137                    Self::ApplicationException(aexn) => aexn.exn_value(),
1138                }
1139            }
1140
1141            fn exn_is_declared(&self) -> bool {
1142                match self {
1143                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1144                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1145                }
1146            }
1147        }
1148
1149        impl ::fbthrift::ResultInfo for UpdateEdgeExn {
1150            fn result_type(&self) -> ::fbthrift::ResultType {
1151                match self {
1152                    Self::Success(_) => ::fbthrift::ResultType::Return,
1153                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1154                }
1155            }
1156        }
1157
1158        impl ::fbthrift::GetTType for UpdateEdgeExn {
1159            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1160        }
1161
1162        impl<P> ::fbthrift::Serialize<P> for UpdateEdgeExn
1163        where
1164            P: ::fbthrift::ProtocolWriter,
1165        {
1166            fn write(&self, p: &mut P) {
1167                if let Self::ApplicationException(aexn) = self {
1168                    return aexn.write(p);
1169                }
1170                p.write_struct_begin("UpdateEdge");
1171                match self {
1172                    Self::Success(inner) => {
1173                        p.write_field_begin(
1174                            "Success",
1175                            ::fbthrift::TType::Struct,
1176                            0i16,
1177                        );
1178                        inner.write(p);
1179                        p.write_field_end();
1180                    }
1181                    Self::ApplicationException(_aexn) => unreachable!(),
1182                }
1183                p.write_field_stop();
1184                p.write_struct_end();
1185            }
1186        }
1187
1188        impl<P> ::fbthrift::Deserialize<P> for UpdateEdgeExn
1189        where
1190            P: ::fbthrift::ProtocolReader,
1191        {
1192            fn read(p: &mut P) -> ::anyhow::Result<Self> {
1193                static RETURNS: &[::fbthrift::Field] = &[
1194                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1195                ];
1196                let _ = p.read_struct_begin(|_| ())?;
1197                let mut once = false;
1198                let mut alt = ::std::option::Option::None;
1199                loop {
1200                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1201                    match ((fty, fid as ::std::primitive::i32), once) {
1202                        ((::fbthrift::TType::Stop, _), _) => {
1203                            p.read_field_end()?;
1204                            break;
1205                        }
1206                        ((::fbthrift::TType::Struct, 0i32), false) => {
1207                            once = true;
1208                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1209                        }
1210                        ((ty, _id), false) => p.skip(ty)?,
1211                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1212                            ::fbthrift::ApplicationException::new(
1213                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1214                                format!(
1215                                    "unwanted extra union {} field ty {:?} id {}",
1216                                    "UpdateEdgeExn",
1217                                    badty,
1218                                    badid,
1219                                ),
1220                            )
1221                        )),
1222                    }
1223                    p.read_field_end()?;
1224                }
1225                p.read_struct_end()?;
1226                alt.ok_or_else(||
1227                    ::fbthrift::ApplicationException::new(
1228                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1229                        format!("Empty union {}", "UpdateEdgeExn"),
1230                    )
1231                    .into(),
1232                )
1233            }
1234        }
1235
1236        #[derive(Clone, Debug)]
1237        pub enum ScanVertexExn {
1238            #[doc(hidden)]
1239            Success(crate::types::ScanVertexResponse),
1240            ApplicationException(::fbthrift::ApplicationException),
1241        }
1242
1243        impl ::std::convert::From<crate::errors::graph_storage_service::ScanVertexError> for ScanVertexExn {
1244            fn from(err: crate::errors::graph_storage_service::ScanVertexError) -> Self {
1245                match err {
1246                    crate::errors::graph_storage_service::ScanVertexError::ApplicationException(aexn) => ScanVertexExn::ApplicationException(aexn),
1247                    crate::errors::graph_storage_service::ScanVertexError::ThriftError(err) => ScanVertexExn::ApplicationException(::fbthrift::ApplicationException {
1248                        message: err.to_string(),
1249                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1250                    }),
1251                }
1252            }
1253        }
1254
1255        impl ::std::convert::From<::fbthrift::ApplicationException> for ScanVertexExn {
1256            fn from(exn: ::fbthrift::ApplicationException) -> Self {
1257                Self::ApplicationException(exn)
1258            }
1259        }
1260
1261        impl ::fbthrift::ExceptionInfo for ScanVertexExn {
1262            fn exn_name(&self) -> &'static str {
1263                match self {
1264                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1265                    Self::ApplicationException(aexn) => aexn.exn_name(),
1266                }
1267            }
1268
1269            fn exn_value(&self) -> String {
1270                match self {
1271                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1272                    Self::ApplicationException(aexn) => aexn.exn_value(),
1273                }
1274            }
1275
1276            fn exn_is_declared(&self) -> bool {
1277                match self {
1278                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1279                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1280                }
1281            }
1282        }
1283
1284        impl ::fbthrift::ResultInfo for ScanVertexExn {
1285            fn result_type(&self) -> ::fbthrift::ResultType {
1286                match self {
1287                    Self::Success(_) => ::fbthrift::ResultType::Return,
1288                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1289                }
1290            }
1291        }
1292
1293        impl ::fbthrift::GetTType for ScanVertexExn {
1294            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1295        }
1296
1297        impl<P> ::fbthrift::Serialize<P> for ScanVertexExn
1298        where
1299            P: ::fbthrift::ProtocolWriter,
1300        {
1301            fn write(&self, p: &mut P) {
1302                if let Self::ApplicationException(aexn) = self {
1303                    return aexn.write(p);
1304                }
1305                p.write_struct_begin("ScanVertex");
1306                match self {
1307                    Self::Success(inner) => {
1308                        p.write_field_begin(
1309                            "Success",
1310                            ::fbthrift::TType::Struct,
1311                            0i16,
1312                        );
1313                        inner.write(p);
1314                        p.write_field_end();
1315                    }
1316                    Self::ApplicationException(_aexn) => unreachable!(),
1317                }
1318                p.write_field_stop();
1319                p.write_struct_end();
1320            }
1321        }
1322
1323        impl<P> ::fbthrift::Deserialize<P> for ScanVertexExn
1324        where
1325            P: ::fbthrift::ProtocolReader,
1326        {
1327            fn read(p: &mut P) -> ::anyhow::Result<Self> {
1328                static RETURNS: &[::fbthrift::Field] = &[
1329                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1330                ];
1331                let _ = p.read_struct_begin(|_| ())?;
1332                let mut once = false;
1333                let mut alt = ::std::option::Option::None;
1334                loop {
1335                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1336                    match ((fty, fid as ::std::primitive::i32), once) {
1337                        ((::fbthrift::TType::Stop, _), _) => {
1338                            p.read_field_end()?;
1339                            break;
1340                        }
1341                        ((::fbthrift::TType::Struct, 0i32), false) => {
1342                            once = true;
1343                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1344                        }
1345                        ((ty, _id), false) => p.skip(ty)?,
1346                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1347                            ::fbthrift::ApplicationException::new(
1348                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1349                                format!(
1350                                    "unwanted extra union {} field ty {:?} id {}",
1351                                    "ScanVertexExn",
1352                                    badty,
1353                                    badid,
1354                                ),
1355                            )
1356                        )),
1357                    }
1358                    p.read_field_end()?;
1359                }
1360                p.read_struct_end()?;
1361                alt.ok_or_else(||
1362                    ::fbthrift::ApplicationException::new(
1363                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1364                        format!("Empty union {}", "ScanVertexExn"),
1365                    )
1366                    .into(),
1367                )
1368            }
1369        }
1370
1371        #[derive(Clone, Debug)]
1372        pub enum ScanEdgeExn {
1373            #[doc(hidden)]
1374            Success(crate::types::ScanEdgeResponse),
1375            ApplicationException(::fbthrift::ApplicationException),
1376        }
1377
1378        impl ::std::convert::From<crate::errors::graph_storage_service::ScanEdgeError> for ScanEdgeExn {
1379            fn from(err: crate::errors::graph_storage_service::ScanEdgeError) -> Self {
1380                match err {
1381                    crate::errors::graph_storage_service::ScanEdgeError::ApplicationException(aexn) => ScanEdgeExn::ApplicationException(aexn),
1382                    crate::errors::graph_storage_service::ScanEdgeError::ThriftError(err) => ScanEdgeExn::ApplicationException(::fbthrift::ApplicationException {
1383                        message: err.to_string(),
1384                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1385                    }),
1386                }
1387            }
1388        }
1389
1390        impl ::std::convert::From<::fbthrift::ApplicationException> for ScanEdgeExn {
1391            fn from(exn: ::fbthrift::ApplicationException) -> Self {
1392                Self::ApplicationException(exn)
1393            }
1394        }
1395
1396        impl ::fbthrift::ExceptionInfo for ScanEdgeExn {
1397            fn exn_name(&self) -> &'static str {
1398                match self {
1399                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1400                    Self::ApplicationException(aexn) => aexn.exn_name(),
1401                }
1402            }
1403
1404            fn exn_value(&self) -> String {
1405                match self {
1406                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1407                    Self::ApplicationException(aexn) => aexn.exn_value(),
1408                }
1409            }
1410
1411            fn exn_is_declared(&self) -> bool {
1412                match self {
1413                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1414                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1415                }
1416            }
1417        }
1418
1419        impl ::fbthrift::ResultInfo for ScanEdgeExn {
1420            fn result_type(&self) -> ::fbthrift::ResultType {
1421                match self {
1422                    Self::Success(_) => ::fbthrift::ResultType::Return,
1423                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1424                }
1425            }
1426        }
1427
1428        impl ::fbthrift::GetTType for ScanEdgeExn {
1429            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1430        }
1431
1432        impl<P> ::fbthrift::Serialize<P> for ScanEdgeExn
1433        where
1434            P: ::fbthrift::ProtocolWriter,
1435        {
1436            fn write(&self, p: &mut P) {
1437                if let Self::ApplicationException(aexn) = self {
1438                    return aexn.write(p);
1439                }
1440                p.write_struct_begin("ScanEdge");
1441                match self {
1442                    Self::Success(inner) => {
1443                        p.write_field_begin(
1444                            "Success",
1445                            ::fbthrift::TType::Struct,
1446                            0i16,
1447                        );
1448                        inner.write(p);
1449                        p.write_field_end();
1450                    }
1451                    Self::ApplicationException(_aexn) => unreachable!(),
1452                }
1453                p.write_field_stop();
1454                p.write_struct_end();
1455            }
1456        }
1457
1458        impl<P> ::fbthrift::Deserialize<P> for ScanEdgeExn
1459        where
1460            P: ::fbthrift::ProtocolReader,
1461        {
1462            fn read(p: &mut P) -> ::anyhow::Result<Self> {
1463                static RETURNS: &[::fbthrift::Field] = &[
1464                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1465                ];
1466                let _ = p.read_struct_begin(|_| ())?;
1467                let mut once = false;
1468                let mut alt = ::std::option::Option::None;
1469                loop {
1470                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1471                    match ((fty, fid as ::std::primitive::i32), once) {
1472                        ((::fbthrift::TType::Stop, _), _) => {
1473                            p.read_field_end()?;
1474                            break;
1475                        }
1476                        ((::fbthrift::TType::Struct, 0i32), false) => {
1477                            once = true;
1478                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1479                        }
1480                        ((ty, _id), false) => p.skip(ty)?,
1481                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1482                            ::fbthrift::ApplicationException::new(
1483                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1484                                format!(
1485                                    "unwanted extra union {} field ty {:?} id {}",
1486                                    "ScanEdgeExn",
1487                                    badty,
1488                                    badid,
1489                                ),
1490                            )
1491                        )),
1492                    }
1493                    p.read_field_end()?;
1494                }
1495                p.read_struct_end()?;
1496                alt.ok_or_else(||
1497                    ::fbthrift::ApplicationException::new(
1498                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1499                        format!("Empty union {}", "ScanEdgeExn"),
1500                    )
1501                    .into(),
1502                )
1503            }
1504        }
1505
1506        #[derive(Clone, Debug)]
1507        pub enum GetUUIDExn {
1508            #[doc(hidden)]
1509            Success(crate::types::GetUUIDResp),
1510            ApplicationException(::fbthrift::ApplicationException),
1511        }
1512
1513        impl ::std::convert::From<crate::errors::graph_storage_service::GetUUIDError> for GetUUIDExn {
1514            fn from(err: crate::errors::graph_storage_service::GetUUIDError) -> Self {
1515                match err {
1516                    crate::errors::graph_storage_service::GetUUIDError::ApplicationException(aexn) => GetUUIDExn::ApplicationException(aexn),
1517                    crate::errors::graph_storage_service::GetUUIDError::ThriftError(err) => GetUUIDExn::ApplicationException(::fbthrift::ApplicationException {
1518                        message: err.to_string(),
1519                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1520                    }),
1521                }
1522            }
1523        }
1524
1525        impl ::std::convert::From<::fbthrift::ApplicationException> for GetUUIDExn {
1526            fn from(exn: ::fbthrift::ApplicationException) -> Self {
1527                Self::ApplicationException(exn)
1528            }
1529        }
1530
1531        impl ::fbthrift::ExceptionInfo for GetUUIDExn {
1532            fn exn_name(&self) -> &'static str {
1533                match self {
1534                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1535                    Self::ApplicationException(aexn) => aexn.exn_name(),
1536                }
1537            }
1538
1539            fn exn_value(&self) -> String {
1540                match self {
1541                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1542                    Self::ApplicationException(aexn) => aexn.exn_value(),
1543                }
1544            }
1545
1546            fn exn_is_declared(&self) -> bool {
1547                match self {
1548                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1549                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1550                }
1551            }
1552        }
1553
1554        impl ::fbthrift::ResultInfo for GetUUIDExn {
1555            fn result_type(&self) -> ::fbthrift::ResultType {
1556                match self {
1557                    Self::Success(_) => ::fbthrift::ResultType::Return,
1558                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1559                }
1560            }
1561        }
1562
1563        impl ::fbthrift::GetTType for GetUUIDExn {
1564            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1565        }
1566
1567        impl<P> ::fbthrift::Serialize<P> for GetUUIDExn
1568        where
1569            P: ::fbthrift::ProtocolWriter,
1570        {
1571            fn write(&self, p: &mut P) {
1572                if let Self::ApplicationException(aexn) = self {
1573                    return aexn.write(p);
1574                }
1575                p.write_struct_begin("GetUUID");
1576                match self {
1577                    Self::Success(inner) => {
1578                        p.write_field_begin(
1579                            "Success",
1580                            ::fbthrift::TType::Struct,
1581                            0i16,
1582                        );
1583                        inner.write(p);
1584                        p.write_field_end();
1585                    }
1586                    Self::ApplicationException(_aexn) => unreachable!(),
1587                }
1588                p.write_field_stop();
1589                p.write_struct_end();
1590            }
1591        }
1592
1593        impl<P> ::fbthrift::Deserialize<P> for GetUUIDExn
1594        where
1595            P: ::fbthrift::ProtocolReader,
1596        {
1597            fn read(p: &mut P) -> ::anyhow::Result<Self> {
1598                static RETURNS: &[::fbthrift::Field] = &[
1599                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1600                ];
1601                let _ = p.read_struct_begin(|_| ())?;
1602                let mut once = false;
1603                let mut alt = ::std::option::Option::None;
1604                loop {
1605                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1606                    match ((fty, fid as ::std::primitive::i32), once) {
1607                        ((::fbthrift::TType::Stop, _), _) => {
1608                            p.read_field_end()?;
1609                            break;
1610                        }
1611                        ((::fbthrift::TType::Struct, 0i32), false) => {
1612                            once = true;
1613                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1614                        }
1615                        ((ty, _id), false) => p.skip(ty)?,
1616                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1617                            ::fbthrift::ApplicationException::new(
1618                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1619                                format!(
1620                                    "unwanted extra union {} field ty {:?} id {}",
1621                                    "GetUUIDExn",
1622                                    badty,
1623                                    badid,
1624                                ),
1625                            )
1626                        )),
1627                    }
1628                    p.read_field_end()?;
1629                }
1630                p.read_struct_end()?;
1631                alt.ok_or_else(||
1632                    ::fbthrift::ApplicationException::new(
1633                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1634                        format!("Empty union {}", "GetUUIDExn"),
1635                    )
1636                    .into(),
1637                )
1638            }
1639        }
1640
1641        #[derive(Clone, Debug)]
1642        pub enum LookupIndexExn {
1643            #[doc(hidden)]
1644            Success(crate::types::LookupIndexResp),
1645            ApplicationException(::fbthrift::ApplicationException),
1646        }
1647
1648        impl ::std::convert::From<crate::errors::graph_storage_service::LookupIndexError> for LookupIndexExn {
1649            fn from(err: crate::errors::graph_storage_service::LookupIndexError) -> Self {
1650                match err {
1651                    crate::errors::graph_storage_service::LookupIndexError::ApplicationException(aexn) => LookupIndexExn::ApplicationException(aexn),
1652                    crate::errors::graph_storage_service::LookupIndexError::ThriftError(err) => LookupIndexExn::ApplicationException(::fbthrift::ApplicationException {
1653                        message: err.to_string(),
1654                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1655                    }),
1656                }
1657            }
1658        }
1659
1660        impl ::std::convert::From<::fbthrift::ApplicationException> for LookupIndexExn {
1661            fn from(exn: ::fbthrift::ApplicationException) -> Self {
1662                Self::ApplicationException(exn)
1663            }
1664        }
1665
1666        impl ::fbthrift::ExceptionInfo for LookupIndexExn {
1667            fn exn_name(&self) -> &'static str {
1668                match self {
1669                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1670                    Self::ApplicationException(aexn) => aexn.exn_name(),
1671                }
1672            }
1673
1674            fn exn_value(&self) -> String {
1675                match self {
1676                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1677                    Self::ApplicationException(aexn) => aexn.exn_value(),
1678                }
1679            }
1680
1681            fn exn_is_declared(&self) -> bool {
1682                match self {
1683                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1684                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1685                }
1686            }
1687        }
1688
1689        impl ::fbthrift::ResultInfo for LookupIndexExn {
1690            fn result_type(&self) -> ::fbthrift::ResultType {
1691                match self {
1692                    Self::Success(_) => ::fbthrift::ResultType::Return,
1693                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1694                }
1695            }
1696        }
1697
1698        impl ::fbthrift::GetTType for LookupIndexExn {
1699            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1700        }
1701
1702        impl<P> ::fbthrift::Serialize<P> for LookupIndexExn
1703        where
1704            P: ::fbthrift::ProtocolWriter,
1705        {
1706            fn write(&self, p: &mut P) {
1707                if let Self::ApplicationException(aexn) = self {
1708                    return aexn.write(p);
1709                }
1710                p.write_struct_begin("LookupIndex");
1711                match self {
1712                    Self::Success(inner) => {
1713                        p.write_field_begin(
1714                            "Success",
1715                            ::fbthrift::TType::Struct,
1716                            0i16,
1717                        );
1718                        inner.write(p);
1719                        p.write_field_end();
1720                    }
1721                    Self::ApplicationException(_aexn) => unreachable!(),
1722                }
1723                p.write_field_stop();
1724                p.write_struct_end();
1725            }
1726        }
1727
1728        impl<P> ::fbthrift::Deserialize<P> for LookupIndexExn
1729        where
1730            P: ::fbthrift::ProtocolReader,
1731        {
1732            fn read(p: &mut P) -> ::anyhow::Result<Self> {
1733                static RETURNS: &[::fbthrift::Field] = &[
1734                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1735                ];
1736                let _ = p.read_struct_begin(|_| ())?;
1737                let mut once = false;
1738                let mut alt = ::std::option::Option::None;
1739                loop {
1740                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1741                    match ((fty, fid as ::std::primitive::i32), once) {
1742                        ((::fbthrift::TType::Stop, _), _) => {
1743                            p.read_field_end()?;
1744                            break;
1745                        }
1746                        ((::fbthrift::TType::Struct, 0i32), false) => {
1747                            once = true;
1748                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1749                        }
1750                        ((ty, _id), false) => p.skip(ty)?,
1751                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1752                            ::fbthrift::ApplicationException::new(
1753                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1754                                format!(
1755                                    "unwanted extra union {} field ty {:?} id {}",
1756                                    "LookupIndexExn",
1757                                    badty,
1758                                    badid,
1759                                ),
1760                            )
1761                        )),
1762                    }
1763                    p.read_field_end()?;
1764                }
1765                p.read_struct_end()?;
1766                alt.ok_or_else(||
1767                    ::fbthrift::ApplicationException::new(
1768                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1769                        format!("Empty union {}", "LookupIndexExn"),
1770                    )
1771                    .into(),
1772                )
1773            }
1774        }
1775
1776        #[derive(Clone, Debug)]
1777        pub enum LookupAndTraverseExn {
1778            #[doc(hidden)]
1779            Success(crate::types::GetNeighborsResponse),
1780            ApplicationException(::fbthrift::ApplicationException),
1781        }
1782
1783        impl ::std::convert::From<crate::errors::graph_storage_service::LookupAndTraverseError> for LookupAndTraverseExn {
1784            fn from(err: crate::errors::graph_storage_service::LookupAndTraverseError) -> Self {
1785                match err {
1786                    crate::errors::graph_storage_service::LookupAndTraverseError::ApplicationException(aexn) => LookupAndTraverseExn::ApplicationException(aexn),
1787                    crate::errors::graph_storage_service::LookupAndTraverseError::ThriftError(err) => LookupAndTraverseExn::ApplicationException(::fbthrift::ApplicationException {
1788                        message: err.to_string(),
1789                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1790                    }),
1791                }
1792            }
1793        }
1794
1795        impl ::std::convert::From<::fbthrift::ApplicationException> for LookupAndTraverseExn {
1796            fn from(exn: ::fbthrift::ApplicationException) -> Self {
1797                Self::ApplicationException(exn)
1798            }
1799        }
1800
1801        impl ::fbthrift::ExceptionInfo for LookupAndTraverseExn {
1802            fn exn_name(&self) -> &'static str {
1803                match self {
1804                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1805                    Self::ApplicationException(aexn) => aexn.exn_name(),
1806                }
1807            }
1808
1809            fn exn_value(&self) -> String {
1810                match self {
1811                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1812                    Self::ApplicationException(aexn) => aexn.exn_value(),
1813                }
1814            }
1815
1816            fn exn_is_declared(&self) -> bool {
1817                match self {
1818                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1819                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1820                }
1821            }
1822        }
1823
1824        impl ::fbthrift::ResultInfo for LookupAndTraverseExn {
1825            fn result_type(&self) -> ::fbthrift::ResultType {
1826                match self {
1827                    Self::Success(_) => ::fbthrift::ResultType::Return,
1828                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1829                }
1830            }
1831        }
1832
1833        impl ::fbthrift::GetTType for LookupAndTraverseExn {
1834            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1835        }
1836
1837        impl<P> ::fbthrift::Serialize<P> for LookupAndTraverseExn
1838        where
1839            P: ::fbthrift::ProtocolWriter,
1840        {
1841            fn write(&self, p: &mut P) {
1842                if let Self::ApplicationException(aexn) = self {
1843                    return aexn.write(p);
1844                }
1845                p.write_struct_begin("LookupAndTraverse");
1846                match self {
1847                    Self::Success(inner) => {
1848                        p.write_field_begin(
1849                            "Success",
1850                            ::fbthrift::TType::Struct,
1851                            0i16,
1852                        );
1853                        inner.write(p);
1854                        p.write_field_end();
1855                    }
1856                    Self::ApplicationException(_aexn) => unreachable!(),
1857                }
1858                p.write_field_stop();
1859                p.write_struct_end();
1860            }
1861        }
1862
1863        impl<P> ::fbthrift::Deserialize<P> for LookupAndTraverseExn
1864        where
1865            P: ::fbthrift::ProtocolReader,
1866        {
1867            fn read(p: &mut P) -> ::anyhow::Result<Self> {
1868                static RETURNS: &[::fbthrift::Field] = &[
1869                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1870                ];
1871                let _ = p.read_struct_begin(|_| ())?;
1872                let mut once = false;
1873                let mut alt = ::std::option::Option::None;
1874                loop {
1875                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1876                    match ((fty, fid as ::std::primitive::i32), once) {
1877                        ((::fbthrift::TType::Stop, _), _) => {
1878                            p.read_field_end()?;
1879                            break;
1880                        }
1881                        ((::fbthrift::TType::Struct, 0i32), false) => {
1882                            once = true;
1883                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1884                        }
1885                        ((ty, _id), false) => p.skip(ty)?,
1886                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1887                            ::fbthrift::ApplicationException::new(
1888                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1889                                format!(
1890                                    "unwanted extra union {} field ty {:?} id {}",
1891                                    "LookupAndTraverseExn",
1892                                    badty,
1893                                    badid,
1894                                ),
1895                            )
1896                        )),
1897                    }
1898                    p.read_field_end()?;
1899                }
1900                p.read_struct_end()?;
1901                alt.ok_or_else(||
1902                    ::fbthrift::ApplicationException::new(
1903                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1904                        format!("Empty union {}", "LookupAndTraverseExn"),
1905                    )
1906                    .into(),
1907                )
1908            }
1909        }
1910
1911        #[derive(Clone, Debug)]
1912        pub enum ChainUpdateEdgeExn {
1913            #[doc(hidden)]
1914            Success(crate::types::UpdateResponse),
1915            ApplicationException(::fbthrift::ApplicationException),
1916        }
1917
1918        impl ::std::convert::From<crate::errors::graph_storage_service::ChainUpdateEdgeError> for ChainUpdateEdgeExn {
1919            fn from(err: crate::errors::graph_storage_service::ChainUpdateEdgeError) -> Self {
1920                match err {
1921                    crate::errors::graph_storage_service::ChainUpdateEdgeError::ApplicationException(aexn) => ChainUpdateEdgeExn::ApplicationException(aexn),
1922                    crate::errors::graph_storage_service::ChainUpdateEdgeError::ThriftError(err) => ChainUpdateEdgeExn::ApplicationException(::fbthrift::ApplicationException {
1923                        message: err.to_string(),
1924                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1925                    }),
1926                }
1927            }
1928        }
1929
1930        impl ::std::convert::From<::fbthrift::ApplicationException> for ChainUpdateEdgeExn {
1931            fn from(exn: ::fbthrift::ApplicationException) -> Self {
1932                Self::ApplicationException(exn)
1933            }
1934        }
1935
1936        impl ::fbthrift::ExceptionInfo for ChainUpdateEdgeExn {
1937            fn exn_name(&self) -> &'static str {
1938                match self {
1939                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1940                    Self::ApplicationException(aexn) => aexn.exn_name(),
1941                }
1942            }
1943
1944            fn exn_value(&self) -> String {
1945                match self {
1946                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1947                    Self::ApplicationException(aexn) => aexn.exn_value(),
1948                }
1949            }
1950
1951            fn exn_is_declared(&self) -> bool {
1952                match self {
1953                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1954                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1955                }
1956            }
1957        }
1958
1959        impl ::fbthrift::ResultInfo for ChainUpdateEdgeExn {
1960            fn result_type(&self) -> ::fbthrift::ResultType {
1961                match self {
1962                    Self::Success(_) => ::fbthrift::ResultType::Return,
1963                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1964                }
1965            }
1966        }
1967
1968        impl ::fbthrift::GetTType for ChainUpdateEdgeExn {
1969            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1970        }
1971
1972        impl<P> ::fbthrift::Serialize<P> for ChainUpdateEdgeExn
1973        where
1974            P: ::fbthrift::ProtocolWriter,
1975        {
1976            fn write(&self, p: &mut P) {
1977                if let Self::ApplicationException(aexn) = self {
1978                    return aexn.write(p);
1979                }
1980                p.write_struct_begin("ChainUpdateEdge");
1981                match self {
1982                    Self::Success(inner) => {
1983                        p.write_field_begin(
1984                            "Success",
1985                            ::fbthrift::TType::Struct,
1986                            0i16,
1987                        );
1988                        inner.write(p);
1989                        p.write_field_end();
1990                    }
1991                    Self::ApplicationException(_aexn) => unreachable!(),
1992                }
1993                p.write_field_stop();
1994                p.write_struct_end();
1995            }
1996        }
1997
1998        impl<P> ::fbthrift::Deserialize<P> for ChainUpdateEdgeExn
1999        where
2000            P: ::fbthrift::ProtocolReader,
2001        {
2002            fn read(p: &mut P) -> ::anyhow::Result<Self> {
2003                static RETURNS: &[::fbthrift::Field] = &[
2004                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2005                ];
2006                let _ = p.read_struct_begin(|_| ())?;
2007                let mut once = false;
2008                let mut alt = ::std::option::Option::None;
2009                loop {
2010                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2011                    match ((fty, fid as ::std::primitive::i32), once) {
2012                        ((::fbthrift::TType::Stop, _), _) => {
2013                            p.read_field_end()?;
2014                            break;
2015                        }
2016                        ((::fbthrift::TType::Struct, 0i32), false) => {
2017                            once = true;
2018                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2019                        }
2020                        ((ty, _id), false) => p.skip(ty)?,
2021                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2022                            ::fbthrift::ApplicationException::new(
2023                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2024                                format!(
2025                                    "unwanted extra union {} field ty {:?} id {}",
2026                                    "ChainUpdateEdgeExn",
2027                                    badty,
2028                                    badid,
2029                                ),
2030                            )
2031                        )),
2032                    }
2033                    p.read_field_end()?;
2034                }
2035                p.read_struct_end()?;
2036                alt.ok_or_else(||
2037                    ::fbthrift::ApplicationException::new(
2038                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2039                        format!("Empty union {}", "ChainUpdateEdgeExn"),
2040                    )
2041                    .into(),
2042                )
2043            }
2044        }
2045
2046        #[derive(Clone, Debug)]
2047        pub enum ChainAddEdgesExn {
2048            #[doc(hidden)]
2049            Success(crate::types::ExecResponse),
2050            ApplicationException(::fbthrift::ApplicationException),
2051        }
2052
2053        impl ::std::convert::From<crate::errors::graph_storage_service::ChainAddEdgesError> for ChainAddEdgesExn {
2054            fn from(err: crate::errors::graph_storage_service::ChainAddEdgesError) -> Self {
2055                match err {
2056                    crate::errors::graph_storage_service::ChainAddEdgesError::ApplicationException(aexn) => ChainAddEdgesExn::ApplicationException(aexn),
2057                    crate::errors::graph_storage_service::ChainAddEdgesError::ThriftError(err) => ChainAddEdgesExn::ApplicationException(::fbthrift::ApplicationException {
2058                        message: err.to_string(),
2059                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2060                    }),
2061                }
2062            }
2063        }
2064
2065        impl ::std::convert::From<::fbthrift::ApplicationException> for ChainAddEdgesExn {
2066            fn from(exn: ::fbthrift::ApplicationException) -> Self {
2067                Self::ApplicationException(exn)
2068            }
2069        }
2070
2071        impl ::fbthrift::ExceptionInfo for ChainAddEdgesExn {
2072            fn exn_name(&self) -> &'static str {
2073                match self {
2074                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2075                    Self::ApplicationException(aexn) => aexn.exn_name(),
2076                }
2077            }
2078
2079            fn exn_value(&self) -> String {
2080                match self {
2081                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2082                    Self::ApplicationException(aexn) => aexn.exn_value(),
2083                }
2084            }
2085
2086            fn exn_is_declared(&self) -> bool {
2087                match self {
2088                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2089                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2090                }
2091            }
2092        }
2093
2094        impl ::fbthrift::ResultInfo for ChainAddEdgesExn {
2095            fn result_type(&self) -> ::fbthrift::ResultType {
2096                match self {
2097                    Self::Success(_) => ::fbthrift::ResultType::Return,
2098                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2099                }
2100            }
2101        }
2102
2103        impl ::fbthrift::GetTType for ChainAddEdgesExn {
2104            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2105        }
2106
2107        impl<P> ::fbthrift::Serialize<P> for ChainAddEdgesExn
2108        where
2109            P: ::fbthrift::ProtocolWriter,
2110        {
2111            fn write(&self, p: &mut P) {
2112                if let Self::ApplicationException(aexn) = self {
2113                    return aexn.write(p);
2114                }
2115                p.write_struct_begin("ChainAddEdges");
2116                match self {
2117                    Self::Success(inner) => {
2118                        p.write_field_begin(
2119                            "Success",
2120                            ::fbthrift::TType::Struct,
2121                            0i16,
2122                        );
2123                        inner.write(p);
2124                        p.write_field_end();
2125                    }
2126                    Self::ApplicationException(_aexn) => unreachable!(),
2127                }
2128                p.write_field_stop();
2129                p.write_struct_end();
2130            }
2131        }
2132
2133        impl<P> ::fbthrift::Deserialize<P> for ChainAddEdgesExn
2134        where
2135            P: ::fbthrift::ProtocolReader,
2136        {
2137            fn read(p: &mut P) -> ::anyhow::Result<Self> {
2138                static RETURNS: &[::fbthrift::Field] = &[
2139                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2140                ];
2141                let _ = p.read_struct_begin(|_| ())?;
2142                let mut once = false;
2143                let mut alt = ::std::option::Option::None;
2144                loop {
2145                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2146                    match ((fty, fid as ::std::primitive::i32), once) {
2147                        ((::fbthrift::TType::Stop, _), _) => {
2148                            p.read_field_end()?;
2149                            break;
2150                        }
2151                        ((::fbthrift::TType::Struct, 0i32), false) => {
2152                            once = true;
2153                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2154                        }
2155                        ((ty, _id), false) => p.skip(ty)?,
2156                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2157                            ::fbthrift::ApplicationException::new(
2158                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2159                                format!(
2160                                    "unwanted extra union {} field ty {:?} id {}",
2161                                    "ChainAddEdgesExn",
2162                                    badty,
2163                                    badid,
2164                                ),
2165                            )
2166                        )),
2167                    }
2168                    p.read_field_end()?;
2169                }
2170                p.read_struct_end()?;
2171                alt.ok_or_else(||
2172                    ::fbthrift::ApplicationException::new(
2173                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2174                        format!("Empty union {}", "ChainAddEdgesExn"),
2175                    )
2176                    .into(),
2177                )
2178            }
2179        }
2180    }
2181
2182    pub mod storage_admin_service {
2183        #[derive(Clone, Debug)]
2184        pub enum TransLeaderExn {
2185            #[doc(hidden)]
2186            Success(crate::types::AdminExecResp),
2187            ApplicationException(::fbthrift::ApplicationException),
2188        }
2189
2190        impl ::std::convert::From<crate::errors::storage_admin_service::TransLeaderError> for TransLeaderExn {
2191            fn from(err: crate::errors::storage_admin_service::TransLeaderError) -> Self {
2192                match err {
2193                    crate::errors::storage_admin_service::TransLeaderError::ApplicationException(aexn) => TransLeaderExn::ApplicationException(aexn),
2194                    crate::errors::storage_admin_service::TransLeaderError::ThriftError(err) => TransLeaderExn::ApplicationException(::fbthrift::ApplicationException {
2195                        message: err.to_string(),
2196                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2197                    }),
2198                }
2199            }
2200        }
2201
2202        impl ::std::convert::From<::fbthrift::ApplicationException> for TransLeaderExn {
2203            fn from(exn: ::fbthrift::ApplicationException) -> Self {
2204                Self::ApplicationException(exn)
2205            }
2206        }
2207
2208        impl ::fbthrift::ExceptionInfo for TransLeaderExn {
2209            fn exn_name(&self) -> &'static str {
2210                match self {
2211                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2212                    Self::ApplicationException(aexn) => aexn.exn_name(),
2213                }
2214            }
2215
2216            fn exn_value(&self) -> String {
2217                match self {
2218                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2219                    Self::ApplicationException(aexn) => aexn.exn_value(),
2220                }
2221            }
2222
2223            fn exn_is_declared(&self) -> bool {
2224                match self {
2225                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2226                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2227                }
2228            }
2229        }
2230
2231        impl ::fbthrift::ResultInfo for TransLeaderExn {
2232            fn result_type(&self) -> ::fbthrift::ResultType {
2233                match self {
2234                    Self::Success(_) => ::fbthrift::ResultType::Return,
2235                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2236                }
2237            }
2238        }
2239
2240        impl ::fbthrift::GetTType for TransLeaderExn {
2241            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2242        }
2243
2244        impl<P> ::fbthrift::Serialize<P> for TransLeaderExn
2245        where
2246            P: ::fbthrift::ProtocolWriter,
2247        {
2248            fn write(&self, p: &mut P) {
2249                if let Self::ApplicationException(aexn) = self {
2250                    return aexn.write(p);
2251                }
2252                p.write_struct_begin("TransLeader");
2253                match self {
2254                    Self::Success(inner) => {
2255                        p.write_field_begin(
2256                            "Success",
2257                            ::fbthrift::TType::Struct,
2258                            0i16,
2259                        );
2260                        inner.write(p);
2261                        p.write_field_end();
2262                    }
2263                    Self::ApplicationException(_aexn) => unreachable!(),
2264                }
2265                p.write_field_stop();
2266                p.write_struct_end();
2267            }
2268        }
2269
2270        impl<P> ::fbthrift::Deserialize<P> for TransLeaderExn
2271        where
2272            P: ::fbthrift::ProtocolReader,
2273        {
2274            fn read(p: &mut P) -> ::anyhow::Result<Self> {
2275                static RETURNS: &[::fbthrift::Field] = &[
2276                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2277                ];
2278                let _ = p.read_struct_begin(|_| ())?;
2279                let mut once = false;
2280                let mut alt = ::std::option::Option::None;
2281                loop {
2282                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2283                    match ((fty, fid as ::std::primitive::i32), once) {
2284                        ((::fbthrift::TType::Stop, _), _) => {
2285                            p.read_field_end()?;
2286                            break;
2287                        }
2288                        ((::fbthrift::TType::Struct, 0i32), false) => {
2289                            once = true;
2290                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2291                        }
2292                        ((ty, _id), false) => p.skip(ty)?,
2293                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2294                            ::fbthrift::ApplicationException::new(
2295                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2296                                format!(
2297                                    "unwanted extra union {} field ty {:?} id {}",
2298                                    "TransLeaderExn",
2299                                    badty,
2300                                    badid,
2301                                ),
2302                            )
2303                        )),
2304                    }
2305                    p.read_field_end()?;
2306                }
2307                p.read_struct_end()?;
2308                alt.ok_or_else(||
2309                    ::fbthrift::ApplicationException::new(
2310                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2311                        format!("Empty union {}", "TransLeaderExn"),
2312                    )
2313                    .into(),
2314                )
2315            }
2316        }
2317
2318        #[derive(Clone, Debug)]
2319        pub enum AddPartExn {
2320            #[doc(hidden)]
2321            Success(crate::types::AdminExecResp),
2322            ApplicationException(::fbthrift::ApplicationException),
2323        }
2324
2325        impl ::std::convert::From<crate::errors::storage_admin_service::AddPartError> for AddPartExn {
2326            fn from(err: crate::errors::storage_admin_service::AddPartError) -> Self {
2327                match err {
2328                    crate::errors::storage_admin_service::AddPartError::ApplicationException(aexn) => AddPartExn::ApplicationException(aexn),
2329                    crate::errors::storage_admin_service::AddPartError::ThriftError(err) => AddPartExn::ApplicationException(::fbthrift::ApplicationException {
2330                        message: err.to_string(),
2331                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2332                    }),
2333                }
2334            }
2335        }
2336
2337        impl ::std::convert::From<::fbthrift::ApplicationException> for AddPartExn {
2338            fn from(exn: ::fbthrift::ApplicationException) -> Self {
2339                Self::ApplicationException(exn)
2340            }
2341        }
2342
2343        impl ::fbthrift::ExceptionInfo for AddPartExn {
2344            fn exn_name(&self) -> &'static str {
2345                match self {
2346                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2347                    Self::ApplicationException(aexn) => aexn.exn_name(),
2348                }
2349            }
2350
2351            fn exn_value(&self) -> String {
2352                match self {
2353                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2354                    Self::ApplicationException(aexn) => aexn.exn_value(),
2355                }
2356            }
2357
2358            fn exn_is_declared(&self) -> bool {
2359                match self {
2360                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2361                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2362                }
2363            }
2364        }
2365
2366        impl ::fbthrift::ResultInfo for AddPartExn {
2367            fn result_type(&self) -> ::fbthrift::ResultType {
2368                match self {
2369                    Self::Success(_) => ::fbthrift::ResultType::Return,
2370                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2371                }
2372            }
2373        }
2374
2375        impl ::fbthrift::GetTType for AddPartExn {
2376            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2377        }
2378
2379        impl<P> ::fbthrift::Serialize<P> for AddPartExn
2380        where
2381            P: ::fbthrift::ProtocolWriter,
2382        {
2383            fn write(&self, p: &mut P) {
2384                if let Self::ApplicationException(aexn) = self {
2385                    return aexn.write(p);
2386                }
2387                p.write_struct_begin("AddPart");
2388                match self {
2389                    Self::Success(inner) => {
2390                        p.write_field_begin(
2391                            "Success",
2392                            ::fbthrift::TType::Struct,
2393                            0i16,
2394                        );
2395                        inner.write(p);
2396                        p.write_field_end();
2397                    }
2398                    Self::ApplicationException(_aexn) => unreachable!(),
2399                }
2400                p.write_field_stop();
2401                p.write_struct_end();
2402            }
2403        }
2404
2405        impl<P> ::fbthrift::Deserialize<P> for AddPartExn
2406        where
2407            P: ::fbthrift::ProtocolReader,
2408        {
2409            fn read(p: &mut P) -> ::anyhow::Result<Self> {
2410                static RETURNS: &[::fbthrift::Field] = &[
2411                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2412                ];
2413                let _ = p.read_struct_begin(|_| ())?;
2414                let mut once = false;
2415                let mut alt = ::std::option::Option::None;
2416                loop {
2417                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2418                    match ((fty, fid as ::std::primitive::i32), once) {
2419                        ((::fbthrift::TType::Stop, _), _) => {
2420                            p.read_field_end()?;
2421                            break;
2422                        }
2423                        ((::fbthrift::TType::Struct, 0i32), false) => {
2424                            once = true;
2425                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2426                        }
2427                        ((ty, _id), false) => p.skip(ty)?,
2428                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2429                            ::fbthrift::ApplicationException::new(
2430                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2431                                format!(
2432                                    "unwanted extra union {} field ty {:?} id {}",
2433                                    "AddPartExn",
2434                                    badty,
2435                                    badid,
2436                                ),
2437                            )
2438                        )),
2439                    }
2440                    p.read_field_end()?;
2441                }
2442                p.read_struct_end()?;
2443                alt.ok_or_else(||
2444                    ::fbthrift::ApplicationException::new(
2445                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2446                        format!("Empty union {}", "AddPartExn"),
2447                    )
2448                    .into(),
2449                )
2450            }
2451        }
2452
2453        #[derive(Clone, Debug)]
2454        pub enum AddLearnerExn {
2455            #[doc(hidden)]
2456            Success(crate::types::AdminExecResp),
2457            ApplicationException(::fbthrift::ApplicationException),
2458        }
2459
2460        impl ::std::convert::From<crate::errors::storage_admin_service::AddLearnerError> for AddLearnerExn {
2461            fn from(err: crate::errors::storage_admin_service::AddLearnerError) -> Self {
2462                match err {
2463                    crate::errors::storage_admin_service::AddLearnerError::ApplicationException(aexn) => AddLearnerExn::ApplicationException(aexn),
2464                    crate::errors::storage_admin_service::AddLearnerError::ThriftError(err) => AddLearnerExn::ApplicationException(::fbthrift::ApplicationException {
2465                        message: err.to_string(),
2466                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2467                    }),
2468                }
2469            }
2470        }
2471
2472        impl ::std::convert::From<::fbthrift::ApplicationException> for AddLearnerExn {
2473            fn from(exn: ::fbthrift::ApplicationException) -> Self {
2474                Self::ApplicationException(exn)
2475            }
2476        }
2477
2478        impl ::fbthrift::ExceptionInfo for AddLearnerExn {
2479            fn exn_name(&self) -> &'static str {
2480                match self {
2481                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2482                    Self::ApplicationException(aexn) => aexn.exn_name(),
2483                }
2484            }
2485
2486            fn exn_value(&self) -> String {
2487                match self {
2488                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2489                    Self::ApplicationException(aexn) => aexn.exn_value(),
2490                }
2491            }
2492
2493            fn exn_is_declared(&self) -> bool {
2494                match self {
2495                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2496                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2497                }
2498            }
2499        }
2500
2501        impl ::fbthrift::ResultInfo for AddLearnerExn {
2502            fn result_type(&self) -> ::fbthrift::ResultType {
2503                match self {
2504                    Self::Success(_) => ::fbthrift::ResultType::Return,
2505                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2506                }
2507            }
2508        }
2509
2510        impl ::fbthrift::GetTType for AddLearnerExn {
2511            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2512        }
2513
2514        impl<P> ::fbthrift::Serialize<P> for AddLearnerExn
2515        where
2516            P: ::fbthrift::ProtocolWriter,
2517        {
2518            fn write(&self, p: &mut P) {
2519                if let Self::ApplicationException(aexn) = self {
2520                    return aexn.write(p);
2521                }
2522                p.write_struct_begin("AddLearner");
2523                match self {
2524                    Self::Success(inner) => {
2525                        p.write_field_begin(
2526                            "Success",
2527                            ::fbthrift::TType::Struct,
2528                            0i16,
2529                        );
2530                        inner.write(p);
2531                        p.write_field_end();
2532                    }
2533                    Self::ApplicationException(_aexn) => unreachable!(),
2534                }
2535                p.write_field_stop();
2536                p.write_struct_end();
2537            }
2538        }
2539
2540        impl<P> ::fbthrift::Deserialize<P> for AddLearnerExn
2541        where
2542            P: ::fbthrift::ProtocolReader,
2543        {
2544            fn read(p: &mut P) -> ::anyhow::Result<Self> {
2545                static RETURNS: &[::fbthrift::Field] = &[
2546                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2547                ];
2548                let _ = p.read_struct_begin(|_| ())?;
2549                let mut once = false;
2550                let mut alt = ::std::option::Option::None;
2551                loop {
2552                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2553                    match ((fty, fid as ::std::primitive::i32), once) {
2554                        ((::fbthrift::TType::Stop, _), _) => {
2555                            p.read_field_end()?;
2556                            break;
2557                        }
2558                        ((::fbthrift::TType::Struct, 0i32), false) => {
2559                            once = true;
2560                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2561                        }
2562                        ((ty, _id), false) => p.skip(ty)?,
2563                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2564                            ::fbthrift::ApplicationException::new(
2565                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2566                                format!(
2567                                    "unwanted extra union {} field ty {:?} id {}",
2568                                    "AddLearnerExn",
2569                                    badty,
2570                                    badid,
2571                                ),
2572                            )
2573                        )),
2574                    }
2575                    p.read_field_end()?;
2576                }
2577                p.read_struct_end()?;
2578                alt.ok_or_else(||
2579                    ::fbthrift::ApplicationException::new(
2580                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2581                        format!("Empty union {}", "AddLearnerExn"),
2582                    )
2583                    .into(),
2584                )
2585            }
2586        }
2587
2588        #[derive(Clone, Debug)]
2589        pub enum RemovePartExn {
2590            #[doc(hidden)]
2591            Success(crate::types::AdminExecResp),
2592            ApplicationException(::fbthrift::ApplicationException),
2593        }
2594
2595        impl ::std::convert::From<crate::errors::storage_admin_service::RemovePartError> for RemovePartExn {
2596            fn from(err: crate::errors::storage_admin_service::RemovePartError) -> Self {
2597                match err {
2598                    crate::errors::storage_admin_service::RemovePartError::ApplicationException(aexn) => RemovePartExn::ApplicationException(aexn),
2599                    crate::errors::storage_admin_service::RemovePartError::ThriftError(err) => RemovePartExn::ApplicationException(::fbthrift::ApplicationException {
2600                        message: err.to_string(),
2601                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2602                    }),
2603                }
2604            }
2605        }
2606
2607        impl ::std::convert::From<::fbthrift::ApplicationException> for RemovePartExn {
2608            fn from(exn: ::fbthrift::ApplicationException) -> Self {
2609                Self::ApplicationException(exn)
2610            }
2611        }
2612
2613        impl ::fbthrift::ExceptionInfo for RemovePartExn {
2614            fn exn_name(&self) -> &'static str {
2615                match self {
2616                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2617                    Self::ApplicationException(aexn) => aexn.exn_name(),
2618                }
2619            }
2620
2621            fn exn_value(&self) -> String {
2622                match self {
2623                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2624                    Self::ApplicationException(aexn) => aexn.exn_value(),
2625                }
2626            }
2627
2628            fn exn_is_declared(&self) -> bool {
2629                match self {
2630                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2631                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2632                }
2633            }
2634        }
2635
2636        impl ::fbthrift::ResultInfo for RemovePartExn {
2637            fn result_type(&self) -> ::fbthrift::ResultType {
2638                match self {
2639                    Self::Success(_) => ::fbthrift::ResultType::Return,
2640                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2641                }
2642            }
2643        }
2644
2645        impl ::fbthrift::GetTType for RemovePartExn {
2646            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2647        }
2648
2649        impl<P> ::fbthrift::Serialize<P> for RemovePartExn
2650        where
2651            P: ::fbthrift::ProtocolWriter,
2652        {
2653            fn write(&self, p: &mut P) {
2654                if let Self::ApplicationException(aexn) = self {
2655                    return aexn.write(p);
2656                }
2657                p.write_struct_begin("RemovePart");
2658                match self {
2659                    Self::Success(inner) => {
2660                        p.write_field_begin(
2661                            "Success",
2662                            ::fbthrift::TType::Struct,
2663                            0i16,
2664                        );
2665                        inner.write(p);
2666                        p.write_field_end();
2667                    }
2668                    Self::ApplicationException(_aexn) => unreachable!(),
2669                }
2670                p.write_field_stop();
2671                p.write_struct_end();
2672            }
2673        }
2674
2675        impl<P> ::fbthrift::Deserialize<P> for RemovePartExn
2676        where
2677            P: ::fbthrift::ProtocolReader,
2678        {
2679            fn read(p: &mut P) -> ::anyhow::Result<Self> {
2680                static RETURNS: &[::fbthrift::Field] = &[
2681                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2682                ];
2683                let _ = p.read_struct_begin(|_| ())?;
2684                let mut once = false;
2685                let mut alt = ::std::option::Option::None;
2686                loop {
2687                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2688                    match ((fty, fid as ::std::primitive::i32), once) {
2689                        ((::fbthrift::TType::Stop, _), _) => {
2690                            p.read_field_end()?;
2691                            break;
2692                        }
2693                        ((::fbthrift::TType::Struct, 0i32), false) => {
2694                            once = true;
2695                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2696                        }
2697                        ((ty, _id), false) => p.skip(ty)?,
2698                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2699                            ::fbthrift::ApplicationException::new(
2700                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2701                                format!(
2702                                    "unwanted extra union {} field ty {:?} id {}",
2703                                    "RemovePartExn",
2704                                    badty,
2705                                    badid,
2706                                ),
2707                            )
2708                        )),
2709                    }
2710                    p.read_field_end()?;
2711                }
2712                p.read_struct_end()?;
2713                alt.ok_or_else(||
2714                    ::fbthrift::ApplicationException::new(
2715                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2716                        format!("Empty union {}", "RemovePartExn"),
2717                    )
2718                    .into(),
2719                )
2720            }
2721        }
2722
2723        #[derive(Clone, Debug)]
2724        pub enum MemberChangeExn {
2725            #[doc(hidden)]
2726            Success(crate::types::AdminExecResp),
2727            ApplicationException(::fbthrift::ApplicationException),
2728        }
2729
2730        impl ::std::convert::From<crate::errors::storage_admin_service::MemberChangeError> for MemberChangeExn {
2731            fn from(err: crate::errors::storage_admin_service::MemberChangeError) -> Self {
2732                match err {
2733                    crate::errors::storage_admin_service::MemberChangeError::ApplicationException(aexn) => MemberChangeExn::ApplicationException(aexn),
2734                    crate::errors::storage_admin_service::MemberChangeError::ThriftError(err) => MemberChangeExn::ApplicationException(::fbthrift::ApplicationException {
2735                        message: err.to_string(),
2736                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2737                    }),
2738                }
2739            }
2740        }
2741
2742        impl ::std::convert::From<::fbthrift::ApplicationException> for MemberChangeExn {
2743            fn from(exn: ::fbthrift::ApplicationException) -> Self {
2744                Self::ApplicationException(exn)
2745            }
2746        }
2747
2748        impl ::fbthrift::ExceptionInfo for MemberChangeExn {
2749            fn exn_name(&self) -> &'static str {
2750                match self {
2751                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2752                    Self::ApplicationException(aexn) => aexn.exn_name(),
2753                }
2754            }
2755
2756            fn exn_value(&self) -> String {
2757                match self {
2758                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2759                    Self::ApplicationException(aexn) => aexn.exn_value(),
2760                }
2761            }
2762
2763            fn exn_is_declared(&self) -> bool {
2764                match self {
2765                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2766                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2767                }
2768            }
2769        }
2770
2771        impl ::fbthrift::ResultInfo for MemberChangeExn {
2772            fn result_type(&self) -> ::fbthrift::ResultType {
2773                match self {
2774                    Self::Success(_) => ::fbthrift::ResultType::Return,
2775                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2776                }
2777            }
2778        }
2779
2780        impl ::fbthrift::GetTType for MemberChangeExn {
2781            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2782        }
2783
2784        impl<P> ::fbthrift::Serialize<P> for MemberChangeExn
2785        where
2786            P: ::fbthrift::ProtocolWriter,
2787        {
2788            fn write(&self, p: &mut P) {
2789                if let Self::ApplicationException(aexn) = self {
2790                    return aexn.write(p);
2791                }
2792                p.write_struct_begin("MemberChange");
2793                match self {
2794                    Self::Success(inner) => {
2795                        p.write_field_begin(
2796                            "Success",
2797                            ::fbthrift::TType::Struct,
2798                            0i16,
2799                        );
2800                        inner.write(p);
2801                        p.write_field_end();
2802                    }
2803                    Self::ApplicationException(_aexn) => unreachable!(),
2804                }
2805                p.write_field_stop();
2806                p.write_struct_end();
2807            }
2808        }
2809
2810        impl<P> ::fbthrift::Deserialize<P> for MemberChangeExn
2811        where
2812            P: ::fbthrift::ProtocolReader,
2813        {
2814            fn read(p: &mut P) -> ::anyhow::Result<Self> {
2815                static RETURNS: &[::fbthrift::Field] = &[
2816                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2817                ];
2818                let _ = p.read_struct_begin(|_| ())?;
2819                let mut once = false;
2820                let mut alt = ::std::option::Option::None;
2821                loop {
2822                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2823                    match ((fty, fid as ::std::primitive::i32), once) {
2824                        ((::fbthrift::TType::Stop, _), _) => {
2825                            p.read_field_end()?;
2826                            break;
2827                        }
2828                        ((::fbthrift::TType::Struct, 0i32), false) => {
2829                            once = true;
2830                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2831                        }
2832                        ((ty, _id), false) => p.skip(ty)?,
2833                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2834                            ::fbthrift::ApplicationException::new(
2835                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2836                                format!(
2837                                    "unwanted extra union {} field ty {:?} id {}",
2838                                    "MemberChangeExn",
2839                                    badty,
2840                                    badid,
2841                                ),
2842                            )
2843                        )),
2844                    }
2845                    p.read_field_end()?;
2846                }
2847                p.read_struct_end()?;
2848                alt.ok_or_else(||
2849                    ::fbthrift::ApplicationException::new(
2850                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2851                        format!("Empty union {}", "MemberChangeExn"),
2852                    )
2853                    .into(),
2854                )
2855            }
2856        }
2857
2858        #[derive(Clone, Debug)]
2859        pub enum WaitingForCatchUpDataExn {
2860            #[doc(hidden)]
2861            Success(crate::types::AdminExecResp),
2862            ApplicationException(::fbthrift::ApplicationException),
2863        }
2864
2865        impl ::std::convert::From<crate::errors::storage_admin_service::WaitingForCatchUpDataError> for WaitingForCatchUpDataExn {
2866            fn from(err: crate::errors::storage_admin_service::WaitingForCatchUpDataError) -> Self {
2867                match err {
2868                    crate::errors::storage_admin_service::WaitingForCatchUpDataError::ApplicationException(aexn) => WaitingForCatchUpDataExn::ApplicationException(aexn),
2869                    crate::errors::storage_admin_service::WaitingForCatchUpDataError::ThriftError(err) => WaitingForCatchUpDataExn::ApplicationException(::fbthrift::ApplicationException {
2870                        message: err.to_string(),
2871                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2872                    }),
2873                }
2874            }
2875        }
2876
2877        impl ::std::convert::From<::fbthrift::ApplicationException> for WaitingForCatchUpDataExn {
2878            fn from(exn: ::fbthrift::ApplicationException) -> Self {
2879                Self::ApplicationException(exn)
2880            }
2881        }
2882
2883        impl ::fbthrift::ExceptionInfo for WaitingForCatchUpDataExn {
2884            fn exn_name(&self) -> &'static str {
2885                match self {
2886                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2887                    Self::ApplicationException(aexn) => aexn.exn_name(),
2888                }
2889            }
2890
2891            fn exn_value(&self) -> String {
2892                match self {
2893                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2894                    Self::ApplicationException(aexn) => aexn.exn_value(),
2895                }
2896            }
2897
2898            fn exn_is_declared(&self) -> bool {
2899                match self {
2900                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2901                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2902                }
2903            }
2904        }
2905
2906        impl ::fbthrift::ResultInfo for WaitingForCatchUpDataExn {
2907            fn result_type(&self) -> ::fbthrift::ResultType {
2908                match self {
2909                    Self::Success(_) => ::fbthrift::ResultType::Return,
2910                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2911                }
2912            }
2913        }
2914
2915        impl ::fbthrift::GetTType for WaitingForCatchUpDataExn {
2916            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2917        }
2918
2919        impl<P> ::fbthrift::Serialize<P> for WaitingForCatchUpDataExn
2920        where
2921            P: ::fbthrift::ProtocolWriter,
2922        {
2923            fn write(&self, p: &mut P) {
2924                if let Self::ApplicationException(aexn) = self {
2925                    return aexn.write(p);
2926                }
2927                p.write_struct_begin("WaitingForCatchUpData");
2928                match self {
2929                    Self::Success(inner) => {
2930                        p.write_field_begin(
2931                            "Success",
2932                            ::fbthrift::TType::Struct,
2933                            0i16,
2934                        );
2935                        inner.write(p);
2936                        p.write_field_end();
2937                    }
2938                    Self::ApplicationException(_aexn) => unreachable!(),
2939                }
2940                p.write_field_stop();
2941                p.write_struct_end();
2942            }
2943        }
2944
2945        impl<P> ::fbthrift::Deserialize<P> for WaitingForCatchUpDataExn
2946        where
2947            P: ::fbthrift::ProtocolReader,
2948        {
2949            fn read(p: &mut P) -> ::anyhow::Result<Self> {
2950                static RETURNS: &[::fbthrift::Field] = &[
2951                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2952                ];
2953                let _ = p.read_struct_begin(|_| ())?;
2954                let mut once = false;
2955                let mut alt = ::std::option::Option::None;
2956                loop {
2957                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2958                    match ((fty, fid as ::std::primitive::i32), once) {
2959                        ((::fbthrift::TType::Stop, _), _) => {
2960                            p.read_field_end()?;
2961                            break;
2962                        }
2963                        ((::fbthrift::TType::Struct, 0i32), false) => {
2964                            once = true;
2965                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2966                        }
2967                        ((ty, _id), false) => p.skip(ty)?,
2968                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2969                            ::fbthrift::ApplicationException::new(
2970                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2971                                format!(
2972                                    "unwanted extra union {} field ty {:?} id {}",
2973                                    "WaitingForCatchUpDataExn",
2974                                    badty,
2975                                    badid,
2976                                ),
2977                            )
2978                        )),
2979                    }
2980                    p.read_field_end()?;
2981                }
2982                p.read_struct_end()?;
2983                alt.ok_or_else(||
2984                    ::fbthrift::ApplicationException::new(
2985                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2986                        format!("Empty union {}", "WaitingForCatchUpDataExn"),
2987                    )
2988                    .into(),
2989                )
2990            }
2991        }
2992
2993        #[derive(Clone, Debug)]
2994        pub enum CreateCheckpointExn {
2995            #[doc(hidden)]
2996            Success(crate::types::CreateCPResp),
2997            ApplicationException(::fbthrift::ApplicationException),
2998        }
2999
3000        impl ::std::convert::From<crate::errors::storage_admin_service::CreateCheckpointError> for CreateCheckpointExn {
3001            fn from(err: crate::errors::storage_admin_service::CreateCheckpointError) -> Self {
3002                match err {
3003                    crate::errors::storage_admin_service::CreateCheckpointError::ApplicationException(aexn) => CreateCheckpointExn::ApplicationException(aexn),
3004                    crate::errors::storage_admin_service::CreateCheckpointError::ThriftError(err) => CreateCheckpointExn::ApplicationException(::fbthrift::ApplicationException {
3005                        message: err.to_string(),
3006                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3007                    }),
3008                }
3009            }
3010        }
3011
3012        impl ::std::convert::From<::fbthrift::ApplicationException> for CreateCheckpointExn {
3013            fn from(exn: ::fbthrift::ApplicationException) -> Self {
3014                Self::ApplicationException(exn)
3015            }
3016        }
3017
3018        impl ::fbthrift::ExceptionInfo for CreateCheckpointExn {
3019            fn exn_name(&self) -> &'static str {
3020                match self {
3021                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3022                    Self::ApplicationException(aexn) => aexn.exn_name(),
3023                }
3024            }
3025
3026            fn exn_value(&self) -> String {
3027                match self {
3028                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3029                    Self::ApplicationException(aexn) => aexn.exn_value(),
3030                }
3031            }
3032
3033            fn exn_is_declared(&self) -> bool {
3034                match self {
3035                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3036                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3037                }
3038            }
3039        }
3040
3041        impl ::fbthrift::ResultInfo for CreateCheckpointExn {
3042            fn result_type(&self) -> ::fbthrift::ResultType {
3043                match self {
3044                    Self::Success(_) => ::fbthrift::ResultType::Return,
3045                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3046                }
3047            }
3048        }
3049
3050        impl ::fbthrift::GetTType for CreateCheckpointExn {
3051            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3052        }
3053
3054        impl<P> ::fbthrift::Serialize<P> for CreateCheckpointExn
3055        where
3056            P: ::fbthrift::ProtocolWriter,
3057        {
3058            fn write(&self, p: &mut P) {
3059                if let Self::ApplicationException(aexn) = self {
3060                    return aexn.write(p);
3061                }
3062                p.write_struct_begin("CreateCheckpoint");
3063                match self {
3064                    Self::Success(inner) => {
3065                        p.write_field_begin(
3066                            "Success",
3067                            ::fbthrift::TType::Struct,
3068                            0i16,
3069                        );
3070                        inner.write(p);
3071                        p.write_field_end();
3072                    }
3073                    Self::ApplicationException(_aexn) => unreachable!(),
3074                }
3075                p.write_field_stop();
3076                p.write_struct_end();
3077            }
3078        }
3079
3080        impl<P> ::fbthrift::Deserialize<P> for CreateCheckpointExn
3081        where
3082            P: ::fbthrift::ProtocolReader,
3083        {
3084            fn read(p: &mut P) -> ::anyhow::Result<Self> {
3085                static RETURNS: &[::fbthrift::Field] = &[
3086                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3087                ];
3088                let _ = p.read_struct_begin(|_| ())?;
3089                let mut once = false;
3090                let mut alt = ::std::option::Option::None;
3091                loop {
3092                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3093                    match ((fty, fid as ::std::primitive::i32), once) {
3094                        ((::fbthrift::TType::Stop, _), _) => {
3095                            p.read_field_end()?;
3096                            break;
3097                        }
3098                        ((::fbthrift::TType::Struct, 0i32), false) => {
3099                            once = true;
3100                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3101                        }
3102                        ((ty, _id), false) => p.skip(ty)?,
3103                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3104                            ::fbthrift::ApplicationException::new(
3105                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3106                                format!(
3107                                    "unwanted extra union {} field ty {:?} id {}",
3108                                    "CreateCheckpointExn",
3109                                    badty,
3110                                    badid,
3111                                ),
3112                            )
3113                        )),
3114                    }
3115                    p.read_field_end()?;
3116                }
3117                p.read_struct_end()?;
3118                alt.ok_or_else(||
3119                    ::fbthrift::ApplicationException::new(
3120                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3121                        format!("Empty union {}", "CreateCheckpointExn"),
3122                    )
3123                    .into(),
3124                )
3125            }
3126        }
3127
3128        #[derive(Clone, Debug)]
3129        pub enum DropCheckpointExn {
3130            #[doc(hidden)]
3131            Success(crate::types::AdminExecResp),
3132            ApplicationException(::fbthrift::ApplicationException),
3133        }
3134
3135        impl ::std::convert::From<crate::errors::storage_admin_service::DropCheckpointError> for DropCheckpointExn {
3136            fn from(err: crate::errors::storage_admin_service::DropCheckpointError) -> Self {
3137                match err {
3138                    crate::errors::storage_admin_service::DropCheckpointError::ApplicationException(aexn) => DropCheckpointExn::ApplicationException(aexn),
3139                    crate::errors::storage_admin_service::DropCheckpointError::ThriftError(err) => DropCheckpointExn::ApplicationException(::fbthrift::ApplicationException {
3140                        message: err.to_string(),
3141                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3142                    }),
3143                }
3144            }
3145        }
3146
3147        impl ::std::convert::From<::fbthrift::ApplicationException> for DropCheckpointExn {
3148            fn from(exn: ::fbthrift::ApplicationException) -> Self {
3149                Self::ApplicationException(exn)
3150            }
3151        }
3152
3153        impl ::fbthrift::ExceptionInfo for DropCheckpointExn {
3154            fn exn_name(&self) -> &'static str {
3155                match self {
3156                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3157                    Self::ApplicationException(aexn) => aexn.exn_name(),
3158                }
3159            }
3160
3161            fn exn_value(&self) -> String {
3162                match self {
3163                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3164                    Self::ApplicationException(aexn) => aexn.exn_value(),
3165                }
3166            }
3167
3168            fn exn_is_declared(&self) -> bool {
3169                match self {
3170                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3171                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3172                }
3173            }
3174        }
3175
3176        impl ::fbthrift::ResultInfo for DropCheckpointExn {
3177            fn result_type(&self) -> ::fbthrift::ResultType {
3178                match self {
3179                    Self::Success(_) => ::fbthrift::ResultType::Return,
3180                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3181                }
3182            }
3183        }
3184
3185        impl ::fbthrift::GetTType for DropCheckpointExn {
3186            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3187        }
3188
3189        impl<P> ::fbthrift::Serialize<P> for DropCheckpointExn
3190        where
3191            P: ::fbthrift::ProtocolWriter,
3192        {
3193            fn write(&self, p: &mut P) {
3194                if let Self::ApplicationException(aexn) = self {
3195                    return aexn.write(p);
3196                }
3197                p.write_struct_begin("DropCheckpoint");
3198                match self {
3199                    Self::Success(inner) => {
3200                        p.write_field_begin(
3201                            "Success",
3202                            ::fbthrift::TType::Struct,
3203                            0i16,
3204                        );
3205                        inner.write(p);
3206                        p.write_field_end();
3207                    }
3208                    Self::ApplicationException(_aexn) => unreachable!(),
3209                }
3210                p.write_field_stop();
3211                p.write_struct_end();
3212            }
3213        }
3214
3215        impl<P> ::fbthrift::Deserialize<P> for DropCheckpointExn
3216        where
3217            P: ::fbthrift::ProtocolReader,
3218        {
3219            fn read(p: &mut P) -> ::anyhow::Result<Self> {
3220                static RETURNS: &[::fbthrift::Field] = &[
3221                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3222                ];
3223                let _ = p.read_struct_begin(|_| ())?;
3224                let mut once = false;
3225                let mut alt = ::std::option::Option::None;
3226                loop {
3227                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3228                    match ((fty, fid as ::std::primitive::i32), once) {
3229                        ((::fbthrift::TType::Stop, _), _) => {
3230                            p.read_field_end()?;
3231                            break;
3232                        }
3233                        ((::fbthrift::TType::Struct, 0i32), false) => {
3234                            once = true;
3235                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3236                        }
3237                        ((ty, _id), false) => p.skip(ty)?,
3238                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3239                            ::fbthrift::ApplicationException::new(
3240                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3241                                format!(
3242                                    "unwanted extra union {} field ty {:?} id {}",
3243                                    "DropCheckpointExn",
3244                                    badty,
3245                                    badid,
3246                                ),
3247                            )
3248                        )),
3249                    }
3250                    p.read_field_end()?;
3251                }
3252                p.read_struct_end()?;
3253                alt.ok_or_else(||
3254                    ::fbthrift::ApplicationException::new(
3255                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3256                        format!("Empty union {}", "DropCheckpointExn"),
3257                    )
3258                    .into(),
3259                )
3260            }
3261        }
3262
3263        #[derive(Clone, Debug)]
3264        pub enum BlockingWritesExn {
3265            #[doc(hidden)]
3266            Success(crate::types::AdminExecResp),
3267            ApplicationException(::fbthrift::ApplicationException),
3268        }
3269
3270        impl ::std::convert::From<crate::errors::storage_admin_service::BlockingWritesError> for BlockingWritesExn {
3271            fn from(err: crate::errors::storage_admin_service::BlockingWritesError) -> Self {
3272                match err {
3273                    crate::errors::storage_admin_service::BlockingWritesError::ApplicationException(aexn) => BlockingWritesExn::ApplicationException(aexn),
3274                    crate::errors::storage_admin_service::BlockingWritesError::ThriftError(err) => BlockingWritesExn::ApplicationException(::fbthrift::ApplicationException {
3275                        message: err.to_string(),
3276                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3277                    }),
3278                }
3279            }
3280        }
3281
3282        impl ::std::convert::From<::fbthrift::ApplicationException> for BlockingWritesExn {
3283            fn from(exn: ::fbthrift::ApplicationException) -> Self {
3284                Self::ApplicationException(exn)
3285            }
3286        }
3287
3288        impl ::fbthrift::ExceptionInfo for BlockingWritesExn {
3289            fn exn_name(&self) -> &'static str {
3290                match self {
3291                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3292                    Self::ApplicationException(aexn) => aexn.exn_name(),
3293                }
3294            }
3295
3296            fn exn_value(&self) -> String {
3297                match self {
3298                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3299                    Self::ApplicationException(aexn) => aexn.exn_value(),
3300                }
3301            }
3302
3303            fn exn_is_declared(&self) -> bool {
3304                match self {
3305                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3306                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3307                }
3308            }
3309        }
3310
3311        impl ::fbthrift::ResultInfo for BlockingWritesExn {
3312            fn result_type(&self) -> ::fbthrift::ResultType {
3313                match self {
3314                    Self::Success(_) => ::fbthrift::ResultType::Return,
3315                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3316                }
3317            }
3318        }
3319
3320        impl ::fbthrift::GetTType for BlockingWritesExn {
3321            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3322        }
3323
3324        impl<P> ::fbthrift::Serialize<P> for BlockingWritesExn
3325        where
3326            P: ::fbthrift::ProtocolWriter,
3327        {
3328            fn write(&self, p: &mut P) {
3329                if let Self::ApplicationException(aexn) = self {
3330                    return aexn.write(p);
3331                }
3332                p.write_struct_begin("BlockingWrites");
3333                match self {
3334                    Self::Success(inner) => {
3335                        p.write_field_begin(
3336                            "Success",
3337                            ::fbthrift::TType::Struct,
3338                            0i16,
3339                        );
3340                        inner.write(p);
3341                        p.write_field_end();
3342                    }
3343                    Self::ApplicationException(_aexn) => unreachable!(),
3344                }
3345                p.write_field_stop();
3346                p.write_struct_end();
3347            }
3348        }
3349
3350        impl<P> ::fbthrift::Deserialize<P> for BlockingWritesExn
3351        where
3352            P: ::fbthrift::ProtocolReader,
3353        {
3354            fn read(p: &mut P) -> ::anyhow::Result<Self> {
3355                static RETURNS: &[::fbthrift::Field] = &[
3356                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3357                ];
3358                let _ = p.read_struct_begin(|_| ())?;
3359                let mut once = false;
3360                let mut alt = ::std::option::Option::None;
3361                loop {
3362                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3363                    match ((fty, fid as ::std::primitive::i32), once) {
3364                        ((::fbthrift::TType::Stop, _), _) => {
3365                            p.read_field_end()?;
3366                            break;
3367                        }
3368                        ((::fbthrift::TType::Struct, 0i32), false) => {
3369                            once = true;
3370                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3371                        }
3372                        ((ty, _id), false) => p.skip(ty)?,
3373                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3374                            ::fbthrift::ApplicationException::new(
3375                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3376                                format!(
3377                                    "unwanted extra union {} field ty {:?} id {}",
3378                                    "BlockingWritesExn",
3379                                    badty,
3380                                    badid,
3381                                ),
3382                            )
3383                        )),
3384                    }
3385                    p.read_field_end()?;
3386                }
3387                p.read_struct_end()?;
3388                alt.ok_or_else(||
3389                    ::fbthrift::ApplicationException::new(
3390                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3391                        format!("Empty union {}", "BlockingWritesExn"),
3392                    )
3393                    .into(),
3394                )
3395            }
3396        }
3397
3398        #[derive(Clone, Debug)]
3399        pub enum RebuildTagIndexExn {
3400            #[doc(hidden)]
3401            Success(crate::types::AdminExecResp),
3402            ApplicationException(::fbthrift::ApplicationException),
3403        }
3404
3405        impl ::std::convert::From<crate::errors::storage_admin_service::RebuildTagIndexError> for RebuildTagIndexExn {
3406            fn from(err: crate::errors::storage_admin_service::RebuildTagIndexError) -> Self {
3407                match err {
3408                    crate::errors::storage_admin_service::RebuildTagIndexError::ApplicationException(aexn) => RebuildTagIndexExn::ApplicationException(aexn),
3409                    crate::errors::storage_admin_service::RebuildTagIndexError::ThriftError(err) => RebuildTagIndexExn::ApplicationException(::fbthrift::ApplicationException {
3410                        message: err.to_string(),
3411                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3412                    }),
3413                }
3414            }
3415        }
3416
3417        impl ::std::convert::From<::fbthrift::ApplicationException> for RebuildTagIndexExn {
3418            fn from(exn: ::fbthrift::ApplicationException) -> Self {
3419                Self::ApplicationException(exn)
3420            }
3421        }
3422
3423        impl ::fbthrift::ExceptionInfo for RebuildTagIndexExn {
3424            fn exn_name(&self) -> &'static str {
3425                match self {
3426                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3427                    Self::ApplicationException(aexn) => aexn.exn_name(),
3428                }
3429            }
3430
3431            fn exn_value(&self) -> String {
3432                match self {
3433                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3434                    Self::ApplicationException(aexn) => aexn.exn_value(),
3435                }
3436            }
3437
3438            fn exn_is_declared(&self) -> bool {
3439                match self {
3440                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3441                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3442                }
3443            }
3444        }
3445
3446        impl ::fbthrift::ResultInfo for RebuildTagIndexExn {
3447            fn result_type(&self) -> ::fbthrift::ResultType {
3448                match self {
3449                    Self::Success(_) => ::fbthrift::ResultType::Return,
3450                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3451                }
3452            }
3453        }
3454
3455        impl ::fbthrift::GetTType for RebuildTagIndexExn {
3456            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3457        }
3458
3459        impl<P> ::fbthrift::Serialize<P> for RebuildTagIndexExn
3460        where
3461            P: ::fbthrift::ProtocolWriter,
3462        {
3463            fn write(&self, p: &mut P) {
3464                if let Self::ApplicationException(aexn) = self {
3465                    return aexn.write(p);
3466                }
3467                p.write_struct_begin("RebuildTagIndex");
3468                match self {
3469                    Self::Success(inner) => {
3470                        p.write_field_begin(
3471                            "Success",
3472                            ::fbthrift::TType::Struct,
3473                            0i16,
3474                        );
3475                        inner.write(p);
3476                        p.write_field_end();
3477                    }
3478                    Self::ApplicationException(_aexn) => unreachable!(),
3479                }
3480                p.write_field_stop();
3481                p.write_struct_end();
3482            }
3483        }
3484
3485        impl<P> ::fbthrift::Deserialize<P> for RebuildTagIndexExn
3486        where
3487            P: ::fbthrift::ProtocolReader,
3488        {
3489            fn read(p: &mut P) -> ::anyhow::Result<Self> {
3490                static RETURNS: &[::fbthrift::Field] = &[
3491                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3492                ];
3493                let _ = p.read_struct_begin(|_| ())?;
3494                let mut once = false;
3495                let mut alt = ::std::option::Option::None;
3496                loop {
3497                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3498                    match ((fty, fid as ::std::primitive::i32), once) {
3499                        ((::fbthrift::TType::Stop, _), _) => {
3500                            p.read_field_end()?;
3501                            break;
3502                        }
3503                        ((::fbthrift::TType::Struct, 0i32), false) => {
3504                            once = true;
3505                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3506                        }
3507                        ((ty, _id), false) => p.skip(ty)?,
3508                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3509                            ::fbthrift::ApplicationException::new(
3510                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3511                                format!(
3512                                    "unwanted extra union {} field ty {:?} id {}",
3513                                    "RebuildTagIndexExn",
3514                                    badty,
3515                                    badid,
3516                                ),
3517                            )
3518                        )),
3519                    }
3520                    p.read_field_end()?;
3521                }
3522                p.read_struct_end()?;
3523                alt.ok_or_else(||
3524                    ::fbthrift::ApplicationException::new(
3525                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3526                        format!("Empty union {}", "RebuildTagIndexExn"),
3527                    )
3528                    .into(),
3529                )
3530            }
3531        }
3532
3533        #[derive(Clone, Debug)]
3534        pub enum RebuildEdgeIndexExn {
3535            #[doc(hidden)]
3536            Success(crate::types::AdminExecResp),
3537            ApplicationException(::fbthrift::ApplicationException),
3538        }
3539
3540        impl ::std::convert::From<crate::errors::storage_admin_service::RebuildEdgeIndexError> for RebuildEdgeIndexExn {
3541            fn from(err: crate::errors::storage_admin_service::RebuildEdgeIndexError) -> Self {
3542                match err {
3543                    crate::errors::storage_admin_service::RebuildEdgeIndexError::ApplicationException(aexn) => RebuildEdgeIndexExn::ApplicationException(aexn),
3544                    crate::errors::storage_admin_service::RebuildEdgeIndexError::ThriftError(err) => RebuildEdgeIndexExn::ApplicationException(::fbthrift::ApplicationException {
3545                        message: err.to_string(),
3546                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3547                    }),
3548                }
3549            }
3550        }
3551
3552        impl ::std::convert::From<::fbthrift::ApplicationException> for RebuildEdgeIndexExn {
3553            fn from(exn: ::fbthrift::ApplicationException) -> Self {
3554                Self::ApplicationException(exn)
3555            }
3556        }
3557
3558        impl ::fbthrift::ExceptionInfo for RebuildEdgeIndexExn {
3559            fn exn_name(&self) -> &'static str {
3560                match self {
3561                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3562                    Self::ApplicationException(aexn) => aexn.exn_name(),
3563                }
3564            }
3565
3566            fn exn_value(&self) -> String {
3567                match self {
3568                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3569                    Self::ApplicationException(aexn) => aexn.exn_value(),
3570                }
3571            }
3572
3573            fn exn_is_declared(&self) -> bool {
3574                match self {
3575                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3576                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3577                }
3578            }
3579        }
3580
3581        impl ::fbthrift::ResultInfo for RebuildEdgeIndexExn {
3582            fn result_type(&self) -> ::fbthrift::ResultType {
3583                match self {
3584                    Self::Success(_) => ::fbthrift::ResultType::Return,
3585                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3586                }
3587            }
3588        }
3589
3590        impl ::fbthrift::GetTType for RebuildEdgeIndexExn {
3591            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3592        }
3593
3594        impl<P> ::fbthrift::Serialize<P> for RebuildEdgeIndexExn
3595        where
3596            P: ::fbthrift::ProtocolWriter,
3597        {
3598            fn write(&self, p: &mut P) {
3599                if let Self::ApplicationException(aexn) = self {
3600                    return aexn.write(p);
3601                }
3602                p.write_struct_begin("RebuildEdgeIndex");
3603                match self {
3604                    Self::Success(inner) => {
3605                        p.write_field_begin(
3606                            "Success",
3607                            ::fbthrift::TType::Struct,
3608                            0i16,
3609                        );
3610                        inner.write(p);
3611                        p.write_field_end();
3612                    }
3613                    Self::ApplicationException(_aexn) => unreachable!(),
3614                }
3615                p.write_field_stop();
3616                p.write_struct_end();
3617            }
3618        }
3619
3620        impl<P> ::fbthrift::Deserialize<P> for RebuildEdgeIndexExn
3621        where
3622            P: ::fbthrift::ProtocolReader,
3623        {
3624            fn read(p: &mut P) -> ::anyhow::Result<Self> {
3625                static RETURNS: &[::fbthrift::Field] = &[
3626                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3627                ];
3628                let _ = p.read_struct_begin(|_| ())?;
3629                let mut once = false;
3630                let mut alt = ::std::option::Option::None;
3631                loop {
3632                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3633                    match ((fty, fid as ::std::primitive::i32), once) {
3634                        ((::fbthrift::TType::Stop, _), _) => {
3635                            p.read_field_end()?;
3636                            break;
3637                        }
3638                        ((::fbthrift::TType::Struct, 0i32), false) => {
3639                            once = true;
3640                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3641                        }
3642                        ((ty, _id), false) => p.skip(ty)?,
3643                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3644                            ::fbthrift::ApplicationException::new(
3645                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3646                                format!(
3647                                    "unwanted extra union {} field ty {:?} id {}",
3648                                    "RebuildEdgeIndexExn",
3649                                    badty,
3650                                    badid,
3651                                ),
3652                            )
3653                        )),
3654                    }
3655                    p.read_field_end()?;
3656                }
3657                p.read_struct_end()?;
3658                alt.ok_or_else(||
3659                    ::fbthrift::ApplicationException::new(
3660                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3661                        format!("Empty union {}", "RebuildEdgeIndexExn"),
3662                    )
3663                    .into(),
3664                )
3665            }
3666        }
3667
3668        #[derive(Clone, Debug)]
3669        pub enum GetLeaderPartsExn {
3670            #[doc(hidden)]
3671            Success(crate::types::GetLeaderPartsResp),
3672            ApplicationException(::fbthrift::ApplicationException),
3673        }
3674
3675        impl ::std::convert::From<crate::errors::storage_admin_service::GetLeaderPartsError> for GetLeaderPartsExn {
3676            fn from(err: crate::errors::storage_admin_service::GetLeaderPartsError) -> Self {
3677                match err {
3678                    crate::errors::storage_admin_service::GetLeaderPartsError::ApplicationException(aexn) => GetLeaderPartsExn::ApplicationException(aexn),
3679                    crate::errors::storage_admin_service::GetLeaderPartsError::ThriftError(err) => GetLeaderPartsExn::ApplicationException(::fbthrift::ApplicationException {
3680                        message: err.to_string(),
3681                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3682                    }),
3683                }
3684            }
3685        }
3686
3687        impl ::std::convert::From<::fbthrift::ApplicationException> for GetLeaderPartsExn {
3688            fn from(exn: ::fbthrift::ApplicationException) -> Self {
3689                Self::ApplicationException(exn)
3690            }
3691        }
3692
3693        impl ::fbthrift::ExceptionInfo for GetLeaderPartsExn {
3694            fn exn_name(&self) -> &'static str {
3695                match self {
3696                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3697                    Self::ApplicationException(aexn) => aexn.exn_name(),
3698                }
3699            }
3700
3701            fn exn_value(&self) -> String {
3702                match self {
3703                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3704                    Self::ApplicationException(aexn) => aexn.exn_value(),
3705                }
3706            }
3707
3708            fn exn_is_declared(&self) -> bool {
3709                match self {
3710                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3711                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3712                }
3713            }
3714        }
3715
3716        impl ::fbthrift::ResultInfo for GetLeaderPartsExn {
3717            fn result_type(&self) -> ::fbthrift::ResultType {
3718                match self {
3719                    Self::Success(_) => ::fbthrift::ResultType::Return,
3720                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3721                }
3722            }
3723        }
3724
3725        impl ::fbthrift::GetTType for GetLeaderPartsExn {
3726            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3727        }
3728
3729        impl<P> ::fbthrift::Serialize<P> for GetLeaderPartsExn
3730        where
3731            P: ::fbthrift::ProtocolWriter,
3732        {
3733            fn write(&self, p: &mut P) {
3734                if let Self::ApplicationException(aexn) = self {
3735                    return aexn.write(p);
3736                }
3737                p.write_struct_begin("GetLeaderParts");
3738                match self {
3739                    Self::Success(inner) => {
3740                        p.write_field_begin(
3741                            "Success",
3742                            ::fbthrift::TType::Struct,
3743                            0i16,
3744                        );
3745                        inner.write(p);
3746                        p.write_field_end();
3747                    }
3748                    Self::ApplicationException(_aexn) => unreachable!(),
3749                }
3750                p.write_field_stop();
3751                p.write_struct_end();
3752            }
3753        }
3754
3755        impl<P> ::fbthrift::Deserialize<P> for GetLeaderPartsExn
3756        where
3757            P: ::fbthrift::ProtocolReader,
3758        {
3759            fn read(p: &mut P) -> ::anyhow::Result<Self> {
3760                static RETURNS: &[::fbthrift::Field] = &[
3761                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3762                ];
3763                let _ = p.read_struct_begin(|_| ())?;
3764                let mut once = false;
3765                let mut alt = ::std::option::Option::None;
3766                loop {
3767                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3768                    match ((fty, fid as ::std::primitive::i32), once) {
3769                        ((::fbthrift::TType::Stop, _), _) => {
3770                            p.read_field_end()?;
3771                            break;
3772                        }
3773                        ((::fbthrift::TType::Struct, 0i32), false) => {
3774                            once = true;
3775                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3776                        }
3777                        ((ty, _id), false) => p.skip(ty)?,
3778                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3779                            ::fbthrift::ApplicationException::new(
3780                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3781                                format!(
3782                                    "unwanted extra union {} field ty {:?} id {}",
3783                                    "GetLeaderPartsExn",
3784                                    badty,
3785                                    badid,
3786                                ),
3787                            )
3788                        )),
3789                    }
3790                    p.read_field_end()?;
3791                }
3792                p.read_struct_end()?;
3793                alt.ok_or_else(||
3794                    ::fbthrift::ApplicationException::new(
3795                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3796                        format!("Empty union {}", "GetLeaderPartsExn"),
3797                    )
3798                    .into(),
3799                )
3800            }
3801        }
3802
3803        #[derive(Clone, Debug)]
3804        pub enum CheckPeersExn {
3805            #[doc(hidden)]
3806            Success(crate::types::AdminExecResp),
3807            ApplicationException(::fbthrift::ApplicationException),
3808        }
3809
3810        impl ::std::convert::From<crate::errors::storage_admin_service::CheckPeersError> for CheckPeersExn {
3811            fn from(err: crate::errors::storage_admin_service::CheckPeersError) -> Self {
3812                match err {
3813                    crate::errors::storage_admin_service::CheckPeersError::ApplicationException(aexn) => CheckPeersExn::ApplicationException(aexn),
3814                    crate::errors::storage_admin_service::CheckPeersError::ThriftError(err) => CheckPeersExn::ApplicationException(::fbthrift::ApplicationException {
3815                        message: err.to_string(),
3816                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3817                    }),
3818                }
3819            }
3820        }
3821
3822        impl ::std::convert::From<::fbthrift::ApplicationException> for CheckPeersExn {
3823            fn from(exn: ::fbthrift::ApplicationException) -> Self {
3824                Self::ApplicationException(exn)
3825            }
3826        }
3827
3828        impl ::fbthrift::ExceptionInfo for CheckPeersExn {
3829            fn exn_name(&self) -> &'static str {
3830                match self {
3831                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3832                    Self::ApplicationException(aexn) => aexn.exn_name(),
3833                }
3834            }
3835
3836            fn exn_value(&self) -> String {
3837                match self {
3838                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3839                    Self::ApplicationException(aexn) => aexn.exn_value(),
3840                }
3841            }
3842
3843            fn exn_is_declared(&self) -> bool {
3844                match self {
3845                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3846                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3847                }
3848            }
3849        }
3850
3851        impl ::fbthrift::ResultInfo for CheckPeersExn {
3852            fn result_type(&self) -> ::fbthrift::ResultType {
3853                match self {
3854                    Self::Success(_) => ::fbthrift::ResultType::Return,
3855                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3856                }
3857            }
3858        }
3859
3860        impl ::fbthrift::GetTType for CheckPeersExn {
3861            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3862        }
3863
3864        impl<P> ::fbthrift::Serialize<P> for CheckPeersExn
3865        where
3866            P: ::fbthrift::ProtocolWriter,
3867        {
3868            fn write(&self, p: &mut P) {
3869                if let Self::ApplicationException(aexn) = self {
3870                    return aexn.write(p);
3871                }
3872                p.write_struct_begin("CheckPeers");
3873                match self {
3874                    Self::Success(inner) => {
3875                        p.write_field_begin(
3876                            "Success",
3877                            ::fbthrift::TType::Struct,
3878                            0i16,
3879                        );
3880                        inner.write(p);
3881                        p.write_field_end();
3882                    }
3883                    Self::ApplicationException(_aexn) => unreachable!(),
3884                }
3885                p.write_field_stop();
3886                p.write_struct_end();
3887            }
3888        }
3889
3890        impl<P> ::fbthrift::Deserialize<P> for CheckPeersExn
3891        where
3892            P: ::fbthrift::ProtocolReader,
3893        {
3894            fn read(p: &mut P) -> ::anyhow::Result<Self> {
3895                static RETURNS: &[::fbthrift::Field] = &[
3896                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3897                ];
3898                let _ = p.read_struct_begin(|_| ())?;
3899                let mut once = false;
3900                let mut alt = ::std::option::Option::None;
3901                loop {
3902                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3903                    match ((fty, fid as ::std::primitive::i32), once) {
3904                        ((::fbthrift::TType::Stop, _), _) => {
3905                            p.read_field_end()?;
3906                            break;
3907                        }
3908                        ((::fbthrift::TType::Struct, 0i32), false) => {
3909                            once = true;
3910                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3911                        }
3912                        ((ty, _id), false) => p.skip(ty)?,
3913                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3914                            ::fbthrift::ApplicationException::new(
3915                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3916                                format!(
3917                                    "unwanted extra union {} field ty {:?} id {}",
3918                                    "CheckPeersExn",
3919                                    badty,
3920                                    badid,
3921                                ),
3922                            )
3923                        )),
3924                    }
3925                    p.read_field_end()?;
3926                }
3927                p.read_struct_end()?;
3928                alt.ok_or_else(||
3929                    ::fbthrift::ApplicationException::new(
3930                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3931                        format!("Empty union {}", "CheckPeersExn"),
3932                    )
3933                    .into(),
3934                )
3935            }
3936        }
3937
3938        #[derive(Clone, Debug)]
3939        pub enum AddAdminTaskExn {
3940            #[doc(hidden)]
3941            Success(crate::types::AdminExecResp),
3942            ApplicationException(::fbthrift::ApplicationException),
3943        }
3944
3945        impl ::std::convert::From<crate::errors::storage_admin_service::AddAdminTaskError> for AddAdminTaskExn {
3946            fn from(err: crate::errors::storage_admin_service::AddAdminTaskError) -> Self {
3947                match err {
3948                    crate::errors::storage_admin_service::AddAdminTaskError::ApplicationException(aexn) => AddAdminTaskExn::ApplicationException(aexn),
3949                    crate::errors::storage_admin_service::AddAdminTaskError::ThriftError(err) => AddAdminTaskExn::ApplicationException(::fbthrift::ApplicationException {
3950                        message: err.to_string(),
3951                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3952                    }),
3953                }
3954            }
3955        }
3956
3957        impl ::std::convert::From<::fbthrift::ApplicationException> for AddAdminTaskExn {
3958            fn from(exn: ::fbthrift::ApplicationException) -> Self {
3959                Self::ApplicationException(exn)
3960            }
3961        }
3962
3963        impl ::fbthrift::ExceptionInfo for AddAdminTaskExn {
3964            fn exn_name(&self) -> &'static str {
3965                match self {
3966                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3967                    Self::ApplicationException(aexn) => aexn.exn_name(),
3968                }
3969            }
3970
3971            fn exn_value(&self) -> String {
3972                match self {
3973                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3974                    Self::ApplicationException(aexn) => aexn.exn_value(),
3975                }
3976            }
3977
3978            fn exn_is_declared(&self) -> bool {
3979                match self {
3980                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3981                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3982                }
3983            }
3984        }
3985
3986        impl ::fbthrift::ResultInfo for AddAdminTaskExn {
3987            fn result_type(&self) -> ::fbthrift::ResultType {
3988                match self {
3989                    Self::Success(_) => ::fbthrift::ResultType::Return,
3990                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3991                }
3992            }
3993        }
3994
3995        impl ::fbthrift::GetTType for AddAdminTaskExn {
3996            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3997        }
3998
3999        impl<P> ::fbthrift::Serialize<P> for AddAdminTaskExn
4000        where
4001            P: ::fbthrift::ProtocolWriter,
4002        {
4003            fn write(&self, p: &mut P) {
4004                if let Self::ApplicationException(aexn) = self {
4005                    return aexn.write(p);
4006                }
4007                p.write_struct_begin("AddAdminTask");
4008                match self {
4009                    Self::Success(inner) => {
4010                        p.write_field_begin(
4011                            "Success",
4012                            ::fbthrift::TType::Struct,
4013                            0i16,
4014                        );
4015                        inner.write(p);
4016                        p.write_field_end();
4017                    }
4018                    Self::ApplicationException(_aexn) => unreachable!(),
4019                }
4020                p.write_field_stop();
4021                p.write_struct_end();
4022            }
4023        }
4024
4025        impl<P> ::fbthrift::Deserialize<P> for AddAdminTaskExn
4026        where
4027            P: ::fbthrift::ProtocolReader,
4028        {
4029            fn read(p: &mut P) -> ::anyhow::Result<Self> {
4030                static RETURNS: &[::fbthrift::Field] = &[
4031                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4032                ];
4033                let _ = p.read_struct_begin(|_| ())?;
4034                let mut once = false;
4035                let mut alt = ::std::option::Option::None;
4036                loop {
4037                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4038                    match ((fty, fid as ::std::primitive::i32), once) {
4039                        ((::fbthrift::TType::Stop, _), _) => {
4040                            p.read_field_end()?;
4041                            break;
4042                        }
4043                        ((::fbthrift::TType::Struct, 0i32), false) => {
4044                            once = true;
4045                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4046                        }
4047                        ((ty, _id), false) => p.skip(ty)?,
4048                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4049                            ::fbthrift::ApplicationException::new(
4050                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4051                                format!(
4052                                    "unwanted extra union {} field ty {:?} id {}",
4053                                    "AddAdminTaskExn",
4054                                    badty,
4055                                    badid,
4056                                ),
4057                            )
4058                        )),
4059                    }
4060                    p.read_field_end()?;
4061                }
4062                p.read_struct_end()?;
4063                alt.ok_or_else(||
4064                    ::fbthrift::ApplicationException::new(
4065                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4066                        format!("Empty union {}", "AddAdminTaskExn"),
4067                    )
4068                    .into(),
4069                )
4070            }
4071        }
4072
4073        #[derive(Clone, Debug)]
4074        pub enum StopAdminTaskExn {
4075            #[doc(hidden)]
4076            Success(crate::types::AdminExecResp),
4077            ApplicationException(::fbthrift::ApplicationException),
4078        }
4079
4080        impl ::std::convert::From<crate::errors::storage_admin_service::StopAdminTaskError> for StopAdminTaskExn {
4081            fn from(err: crate::errors::storage_admin_service::StopAdminTaskError) -> Self {
4082                match err {
4083                    crate::errors::storage_admin_service::StopAdminTaskError::ApplicationException(aexn) => StopAdminTaskExn::ApplicationException(aexn),
4084                    crate::errors::storage_admin_service::StopAdminTaskError::ThriftError(err) => StopAdminTaskExn::ApplicationException(::fbthrift::ApplicationException {
4085                        message: err.to_string(),
4086                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
4087                    }),
4088                }
4089            }
4090        }
4091
4092        impl ::std::convert::From<::fbthrift::ApplicationException> for StopAdminTaskExn {
4093            fn from(exn: ::fbthrift::ApplicationException) -> Self {
4094                Self::ApplicationException(exn)
4095            }
4096        }
4097
4098        impl ::fbthrift::ExceptionInfo for StopAdminTaskExn {
4099            fn exn_name(&self) -> &'static str {
4100                match self {
4101                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
4102                    Self::ApplicationException(aexn) => aexn.exn_name(),
4103                }
4104            }
4105
4106            fn exn_value(&self) -> String {
4107                match self {
4108                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
4109                    Self::ApplicationException(aexn) => aexn.exn_value(),
4110                }
4111            }
4112
4113            fn exn_is_declared(&self) -> bool {
4114                match self {
4115                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
4116                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
4117                }
4118            }
4119        }
4120
4121        impl ::fbthrift::ResultInfo for StopAdminTaskExn {
4122            fn result_type(&self) -> ::fbthrift::ResultType {
4123                match self {
4124                    Self::Success(_) => ::fbthrift::ResultType::Return,
4125                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
4126                }
4127            }
4128        }
4129
4130        impl ::fbthrift::GetTType for StopAdminTaskExn {
4131            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
4132        }
4133
4134        impl<P> ::fbthrift::Serialize<P> for StopAdminTaskExn
4135        where
4136            P: ::fbthrift::ProtocolWriter,
4137        {
4138            fn write(&self, p: &mut P) {
4139                if let Self::ApplicationException(aexn) = self {
4140                    return aexn.write(p);
4141                }
4142                p.write_struct_begin("StopAdminTask");
4143                match self {
4144                    Self::Success(inner) => {
4145                        p.write_field_begin(
4146                            "Success",
4147                            ::fbthrift::TType::Struct,
4148                            0i16,
4149                        );
4150                        inner.write(p);
4151                        p.write_field_end();
4152                    }
4153                    Self::ApplicationException(_aexn) => unreachable!(),
4154                }
4155                p.write_field_stop();
4156                p.write_struct_end();
4157            }
4158        }
4159
4160        impl<P> ::fbthrift::Deserialize<P> for StopAdminTaskExn
4161        where
4162            P: ::fbthrift::ProtocolReader,
4163        {
4164            fn read(p: &mut P) -> ::anyhow::Result<Self> {
4165                static RETURNS: &[::fbthrift::Field] = &[
4166                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4167                ];
4168                let _ = p.read_struct_begin(|_| ())?;
4169                let mut once = false;
4170                let mut alt = ::std::option::Option::None;
4171                loop {
4172                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4173                    match ((fty, fid as ::std::primitive::i32), once) {
4174                        ((::fbthrift::TType::Stop, _), _) => {
4175                            p.read_field_end()?;
4176                            break;
4177                        }
4178                        ((::fbthrift::TType::Struct, 0i32), false) => {
4179                            once = true;
4180                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4181                        }
4182                        ((ty, _id), false) => p.skip(ty)?,
4183                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4184                            ::fbthrift::ApplicationException::new(
4185                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4186                                format!(
4187                                    "unwanted extra union {} field ty {:?} id {}",
4188                                    "StopAdminTaskExn",
4189                                    badty,
4190                                    badid,
4191                                ),
4192                            )
4193                        )),
4194                    }
4195                    p.read_field_end()?;
4196                }
4197                p.read_struct_end()?;
4198                alt.ok_or_else(||
4199                    ::fbthrift::ApplicationException::new(
4200                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4201                        format!("Empty union {}", "StopAdminTaskExn"),
4202                    )
4203                    .into(),
4204                )
4205            }
4206        }
4207
4208        #[derive(Clone, Debug)]
4209        pub enum ListClusterInfoExn {
4210            #[doc(hidden)]
4211            Success(crate::types::ListClusterInfoResp),
4212            ApplicationException(::fbthrift::ApplicationException),
4213        }
4214
4215        impl ::std::convert::From<crate::errors::storage_admin_service::ListClusterInfoError> for ListClusterInfoExn {
4216            fn from(err: crate::errors::storage_admin_service::ListClusterInfoError) -> Self {
4217                match err {
4218                    crate::errors::storage_admin_service::ListClusterInfoError::ApplicationException(aexn) => ListClusterInfoExn::ApplicationException(aexn),
4219                    crate::errors::storage_admin_service::ListClusterInfoError::ThriftError(err) => ListClusterInfoExn::ApplicationException(::fbthrift::ApplicationException {
4220                        message: err.to_string(),
4221                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
4222                    }),
4223                }
4224            }
4225        }
4226
4227        impl ::std::convert::From<::fbthrift::ApplicationException> for ListClusterInfoExn {
4228            fn from(exn: ::fbthrift::ApplicationException) -> Self {
4229                Self::ApplicationException(exn)
4230            }
4231        }
4232
4233        impl ::fbthrift::ExceptionInfo for ListClusterInfoExn {
4234            fn exn_name(&self) -> &'static str {
4235                match self {
4236                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
4237                    Self::ApplicationException(aexn) => aexn.exn_name(),
4238                }
4239            }
4240
4241            fn exn_value(&self) -> String {
4242                match self {
4243                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
4244                    Self::ApplicationException(aexn) => aexn.exn_value(),
4245                }
4246            }
4247
4248            fn exn_is_declared(&self) -> bool {
4249                match self {
4250                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
4251                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
4252                }
4253            }
4254        }
4255
4256        impl ::fbthrift::ResultInfo for ListClusterInfoExn {
4257            fn result_type(&self) -> ::fbthrift::ResultType {
4258                match self {
4259                    Self::Success(_) => ::fbthrift::ResultType::Return,
4260                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
4261                }
4262            }
4263        }
4264
4265        impl ::fbthrift::GetTType for ListClusterInfoExn {
4266            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
4267        }
4268
4269        impl<P> ::fbthrift::Serialize<P> for ListClusterInfoExn
4270        where
4271            P: ::fbthrift::ProtocolWriter,
4272        {
4273            fn write(&self, p: &mut P) {
4274                if let Self::ApplicationException(aexn) = self {
4275                    return aexn.write(p);
4276                }
4277                p.write_struct_begin("ListClusterInfo");
4278                match self {
4279                    Self::Success(inner) => {
4280                        p.write_field_begin(
4281                            "Success",
4282                            ::fbthrift::TType::Struct,
4283                            0i16,
4284                        );
4285                        inner.write(p);
4286                        p.write_field_end();
4287                    }
4288                    Self::ApplicationException(_aexn) => unreachable!(),
4289                }
4290                p.write_field_stop();
4291                p.write_struct_end();
4292            }
4293        }
4294
4295        impl<P> ::fbthrift::Deserialize<P> for ListClusterInfoExn
4296        where
4297            P: ::fbthrift::ProtocolReader,
4298        {
4299            fn read(p: &mut P) -> ::anyhow::Result<Self> {
4300                static RETURNS: &[::fbthrift::Field] = &[
4301                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4302                ];
4303                let _ = p.read_struct_begin(|_| ())?;
4304                let mut once = false;
4305                let mut alt = ::std::option::Option::None;
4306                loop {
4307                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4308                    match ((fty, fid as ::std::primitive::i32), once) {
4309                        ((::fbthrift::TType::Stop, _), _) => {
4310                            p.read_field_end()?;
4311                            break;
4312                        }
4313                        ((::fbthrift::TType::Struct, 0i32), false) => {
4314                            once = true;
4315                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4316                        }
4317                        ((ty, _id), false) => p.skip(ty)?,
4318                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4319                            ::fbthrift::ApplicationException::new(
4320                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4321                                format!(
4322                                    "unwanted extra union {} field ty {:?} id {}",
4323                                    "ListClusterInfoExn",
4324                                    badty,
4325                                    badid,
4326                                ),
4327                            )
4328                        )),
4329                    }
4330                    p.read_field_end()?;
4331                }
4332                p.read_struct_end()?;
4333                alt.ok_or_else(||
4334                    ::fbthrift::ApplicationException::new(
4335                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4336                        format!("Empty union {}", "ListClusterInfoExn"),
4337                    )
4338                    .into(),
4339                )
4340            }
4341        }
4342    }
4343
4344    pub mod general_storage_service {
4345        #[derive(Clone, Debug)]
4346        pub enum GetExn {
4347            #[doc(hidden)]
4348            Success(crate::types::KVGetResponse),
4349            ApplicationException(::fbthrift::ApplicationException),
4350        }
4351
4352        impl ::std::convert::From<crate::errors::general_storage_service::GetError> for GetExn {
4353            fn from(err: crate::errors::general_storage_service::GetError) -> Self {
4354                match err {
4355                    crate::errors::general_storage_service::GetError::ApplicationException(aexn) => GetExn::ApplicationException(aexn),
4356                    crate::errors::general_storage_service::GetError::ThriftError(err) => GetExn::ApplicationException(::fbthrift::ApplicationException {
4357                        message: err.to_string(),
4358                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
4359                    }),
4360                }
4361            }
4362        }
4363
4364        impl ::std::convert::From<::fbthrift::ApplicationException> for GetExn {
4365            fn from(exn: ::fbthrift::ApplicationException) -> Self {
4366                Self::ApplicationException(exn)
4367            }
4368        }
4369
4370        impl ::fbthrift::ExceptionInfo for GetExn {
4371            fn exn_name(&self) -> &'static str {
4372                match self {
4373                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
4374                    Self::ApplicationException(aexn) => aexn.exn_name(),
4375                }
4376            }
4377
4378            fn exn_value(&self) -> String {
4379                match self {
4380                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
4381                    Self::ApplicationException(aexn) => aexn.exn_value(),
4382                }
4383            }
4384
4385            fn exn_is_declared(&self) -> bool {
4386                match self {
4387                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
4388                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
4389                }
4390            }
4391        }
4392
4393        impl ::fbthrift::ResultInfo for GetExn {
4394            fn result_type(&self) -> ::fbthrift::ResultType {
4395                match self {
4396                    Self::Success(_) => ::fbthrift::ResultType::Return,
4397                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
4398                }
4399            }
4400        }
4401
4402        impl ::fbthrift::GetTType for GetExn {
4403            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
4404        }
4405
4406        impl<P> ::fbthrift::Serialize<P> for GetExn
4407        where
4408            P: ::fbthrift::ProtocolWriter,
4409        {
4410            fn write(&self, p: &mut P) {
4411                if let Self::ApplicationException(aexn) = self {
4412                    return aexn.write(p);
4413                }
4414                p.write_struct_begin("Get");
4415                match self {
4416                    Self::Success(inner) => {
4417                        p.write_field_begin(
4418                            "Success",
4419                            ::fbthrift::TType::Struct,
4420                            0i16,
4421                        );
4422                        inner.write(p);
4423                        p.write_field_end();
4424                    }
4425                    Self::ApplicationException(_aexn) => unreachable!(),
4426                }
4427                p.write_field_stop();
4428                p.write_struct_end();
4429            }
4430        }
4431
4432        impl<P> ::fbthrift::Deserialize<P> for GetExn
4433        where
4434            P: ::fbthrift::ProtocolReader,
4435        {
4436            fn read(p: &mut P) -> ::anyhow::Result<Self> {
4437                static RETURNS: &[::fbthrift::Field] = &[
4438                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4439                ];
4440                let _ = p.read_struct_begin(|_| ())?;
4441                let mut once = false;
4442                let mut alt = ::std::option::Option::None;
4443                loop {
4444                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4445                    match ((fty, fid as ::std::primitive::i32), once) {
4446                        ((::fbthrift::TType::Stop, _), _) => {
4447                            p.read_field_end()?;
4448                            break;
4449                        }
4450                        ((::fbthrift::TType::Struct, 0i32), false) => {
4451                            once = true;
4452                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4453                        }
4454                        ((ty, _id), false) => p.skip(ty)?,
4455                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4456                            ::fbthrift::ApplicationException::new(
4457                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4458                                format!(
4459                                    "unwanted extra union {} field ty {:?} id {}",
4460                                    "GetExn",
4461                                    badty,
4462                                    badid,
4463                                ),
4464                            )
4465                        )),
4466                    }
4467                    p.read_field_end()?;
4468                }
4469                p.read_struct_end()?;
4470                alt.ok_or_else(||
4471                    ::fbthrift::ApplicationException::new(
4472                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4473                        format!("Empty union {}", "GetExn"),
4474                    )
4475                    .into(),
4476                )
4477            }
4478        }
4479
4480        #[derive(Clone, Debug)]
4481        pub enum PutExn {
4482            #[doc(hidden)]
4483            Success(crate::types::ExecResponse),
4484            ApplicationException(::fbthrift::ApplicationException),
4485        }
4486
4487        impl ::std::convert::From<crate::errors::general_storage_service::PutError> for PutExn {
4488            fn from(err: crate::errors::general_storage_service::PutError) -> Self {
4489                match err {
4490                    crate::errors::general_storage_service::PutError::ApplicationException(aexn) => PutExn::ApplicationException(aexn),
4491                    crate::errors::general_storage_service::PutError::ThriftError(err) => PutExn::ApplicationException(::fbthrift::ApplicationException {
4492                        message: err.to_string(),
4493                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
4494                    }),
4495                }
4496            }
4497        }
4498
4499        impl ::std::convert::From<::fbthrift::ApplicationException> for PutExn {
4500            fn from(exn: ::fbthrift::ApplicationException) -> Self {
4501                Self::ApplicationException(exn)
4502            }
4503        }
4504
4505        impl ::fbthrift::ExceptionInfo for PutExn {
4506            fn exn_name(&self) -> &'static str {
4507                match self {
4508                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
4509                    Self::ApplicationException(aexn) => aexn.exn_name(),
4510                }
4511            }
4512
4513            fn exn_value(&self) -> String {
4514                match self {
4515                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
4516                    Self::ApplicationException(aexn) => aexn.exn_value(),
4517                }
4518            }
4519
4520            fn exn_is_declared(&self) -> bool {
4521                match self {
4522                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
4523                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
4524                }
4525            }
4526        }
4527
4528        impl ::fbthrift::ResultInfo for PutExn {
4529            fn result_type(&self) -> ::fbthrift::ResultType {
4530                match self {
4531                    Self::Success(_) => ::fbthrift::ResultType::Return,
4532                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
4533                }
4534            }
4535        }
4536
4537        impl ::fbthrift::GetTType for PutExn {
4538            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
4539        }
4540
4541        impl<P> ::fbthrift::Serialize<P> for PutExn
4542        where
4543            P: ::fbthrift::ProtocolWriter,
4544        {
4545            fn write(&self, p: &mut P) {
4546                if let Self::ApplicationException(aexn) = self {
4547                    return aexn.write(p);
4548                }
4549                p.write_struct_begin("Put");
4550                match self {
4551                    Self::Success(inner) => {
4552                        p.write_field_begin(
4553                            "Success",
4554                            ::fbthrift::TType::Struct,
4555                            0i16,
4556                        );
4557                        inner.write(p);
4558                        p.write_field_end();
4559                    }
4560                    Self::ApplicationException(_aexn) => unreachable!(),
4561                }
4562                p.write_field_stop();
4563                p.write_struct_end();
4564            }
4565        }
4566
4567        impl<P> ::fbthrift::Deserialize<P> for PutExn
4568        where
4569            P: ::fbthrift::ProtocolReader,
4570        {
4571            fn read(p: &mut P) -> ::anyhow::Result<Self> {
4572                static RETURNS: &[::fbthrift::Field] = &[
4573                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4574                ];
4575                let _ = p.read_struct_begin(|_| ())?;
4576                let mut once = false;
4577                let mut alt = ::std::option::Option::None;
4578                loop {
4579                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4580                    match ((fty, fid as ::std::primitive::i32), once) {
4581                        ((::fbthrift::TType::Stop, _), _) => {
4582                            p.read_field_end()?;
4583                            break;
4584                        }
4585                        ((::fbthrift::TType::Struct, 0i32), false) => {
4586                            once = true;
4587                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4588                        }
4589                        ((ty, _id), false) => p.skip(ty)?,
4590                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4591                            ::fbthrift::ApplicationException::new(
4592                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4593                                format!(
4594                                    "unwanted extra union {} field ty {:?} id {}",
4595                                    "PutExn",
4596                                    badty,
4597                                    badid,
4598                                ),
4599                            )
4600                        )),
4601                    }
4602                    p.read_field_end()?;
4603                }
4604                p.read_struct_end()?;
4605                alt.ok_or_else(||
4606                    ::fbthrift::ApplicationException::new(
4607                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4608                        format!("Empty union {}", "PutExn"),
4609                    )
4610                    .into(),
4611                )
4612            }
4613        }
4614
4615        #[derive(Clone, Debug)]
4616        pub enum RemoveExn {
4617            #[doc(hidden)]
4618            Success(crate::types::ExecResponse),
4619            ApplicationException(::fbthrift::ApplicationException),
4620        }
4621
4622        impl ::std::convert::From<crate::errors::general_storage_service::RemoveError> for RemoveExn {
4623            fn from(err: crate::errors::general_storage_service::RemoveError) -> Self {
4624                match err {
4625                    crate::errors::general_storage_service::RemoveError::ApplicationException(aexn) => RemoveExn::ApplicationException(aexn),
4626                    crate::errors::general_storage_service::RemoveError::ThriftError(err) => RemoveExn::ApplicationException(::fbthrift::ApplicationException {
4627                        message: err.to_string(),
4628                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
4629                    }),
4630                }
4631            }
4632        }
4633
4634        impl ::std::convert::From<::fbthrift::ApplicationException> for RemoveExn {
4635            fn from(exn: ::fbthrift::ApplicationException) -> Self {
4636                Self::ApplicationException(exn)
4637            }
4638        }
4639
4640        impl ::fbthrift::ExceptionInfo for RemoveExn {
4641            fn exn_name(&self) -> &'static str {
4642                match self {
4643                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
4644                    Self::ApplicationException(aexn) => aexn.exn_name(),
4645                }
4646            }
4647
4648            fn exn_value(&self) -> String {
4649                match self {
4650                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
4651                    Self::ApplicationException(aexn) => aexn.exn_value(),
4652                }
4653            }
4654
4655            fn exn_is_declared(&self) -> bool {
4656                match self {
4657                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
4658                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
4659                }
4660            }
4661        }
4662
4663        impl ::fbthrift::ResultInfo for RemoveExn {
4664            fn result_type(&self) -> ::fbthrift::ResultType {
4665                match self {
4666                    Self::Success(_) => ::fbthrift::ResultType::Return,
4667                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
4668                }
4669            }
4670        }
4671
4672        impl ::fbthrift::GetTType for RemoveExn {
4673            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
4674        }
4675
4676        impl<P> ::fbthrift::Serialize<P> for RemoveExn
4677        where
4678            P: ::fbthrift::ProtocolWriter,
4679        {
4680            fn write(&self, p: &mut P) {
4681                if let Self::ApplicationException(aexn) = self {
4682                    return aexn.write(p);
4683                }
4684                p.write_struct_begin("Remove");
4685                match self {
4686                    Self::Success(inner) => {
4687                        p.write_field_begin(
4688                            "Success",
4689                            ::fbthrift::TType::Struct,
4690                            0i16,
4691                        );
4692                        inner.write(p);
4693                        p.write_field_end();
4694                    }
4695                    Self::ApplicationException(_aexn) => unreachable!(),
4696                }
4697                p.write_field_stop();
4698                p.write_struct_end();
4699            }
4700        }
4701
4702        impl<P> ::fbthrift::Deserialize<P> for RemoveExn
4703        where
4704            P: ::fbthrift::ProtocolReader,
4705        {
4706            fn read(p: &mut P) -> ::anyhow::Result<Self> {
4707                static RETURNS: &[::fbthrift::Field] = &[
4708                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4709                ];
4710                let _ = p.read_struct_begin(|_| ())?;
4711                let mut once = false;
4712                let mut alt = ::std::option::Option::None;
4713                loop {
4714                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4715                    match ((fty, fid as ::std::primitive::i32), once) {
4716                        ((::fbthrift::TType::Stop, _), _) => {
4717                            p.read_field_end()?;
4718                            break;
4719                        }
4720                        ((::fbthrift::TType::Struct, 0i32), false) => {
4721                            once = true;
4722                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4723                        }
4724                        ((ty, _id), false) => p.skip(ty)?,
4725                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4726                            ::fbthrift::ApplicationException::new(
4727                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4728                                format!(
4729                                    "unwanted extra union {} field ty {:?} id {}",
4730                                    "RemoveExn",
4731                                    badty,
4732                                    badid,
4733                                ),
4734                            )
4735                        )),
4736                    }
4737                    p.read_field_end()?;
4738                }
4739                p.read_struct_end()?;
4740                alt.ok_or_else(||
4741                    ::fbthrift::ApplicationException::new(
4742                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4743                        format!("Empty union {}", "RemoveExn"),
4744                    )
4745                    .into(),
4746                )
4747            }
4748        }
4749    }
4750
4751    pub mod internal_storage_service {
4752        #[derive(Clone, Debug)]
4753        pub enum ChainAddEdgesExn {
4754            #[doc(hidden)]
4755            Success(crate::types::ExecResponse),
4756            ApplicationException(::fbthrift::ApplicationException),
4757        }
4758
4759        impl ::std::convert::From<crate::errors::internal_storage_service::ChainAddEdgesError> for ChainAddEdgesExn {
4760            fn from(err: crate::errors::internal_storage_service::ChainAddEdgesError) -> Self {
4761                match err {
4762                    crate::errors::internal_storage_service::ChainAddEdgesError::ApplicationException(aexn) => ChainAddEdgesExn::ApplicationException(aexn),
4763                    crate::errors::internal_storage_service::ChainAddEdgesError::ThriftError(err) => ChainAddEdgesExn::ApplicationException(::fbthrift::ApplicationException {
4764                        message: err.to_string(),
4765                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
4766                    }),
4767                }
4768            }
4769        }
4770
4771        impl ::std::convert::From<::fbthrift::ApplicationException> for ChainAddEdgesExn {
4772            fn from(exn: ::fbthrift::ApplicationException) -> Self {
4773                Self::ApplicationException(exn)
4774            }
4775        }
4776
4777        impl ::fbthrift::ExceptionInfo for ChainAddEdgesExn {
4778            fn exn_name(&self) -> &'static str {
4779                match self {
4780                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
4781                    Self::ApplicationException(aexn) => aexn.exn_name(),
4782                }
4783            }
4784
4785            fn exn_value(&self) -> String {
4786                match self {
4787                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
4788                    Self::ApplicationException(aexn) => aexn.exn_value(),
4789                }
4790            }
4791
4792            fn exn_is_declared(&self) -> bool {
4793                match self {
4794                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
4795                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
4796                }
4797            }
4798        }
4799
4800        impl ::fbthrift::ResultInfo for ChainAddEdgesExn {
4801            fn result_type(&self) -> ::fbthrift::ResultType {
4802                match self {
4803                    Self::Success(_) => ::fbthrift::ResultType::Return,
4804                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
4805                }
4806            }
4807        }
4808
4809        impl ::fbthrift::GetTType for ChainAddEdgesExn {
4810            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
4811        }
4812
4813        impl<P> ::fbthrift::Serialize<P> for ChainAddEdgesExn
4814        where
4815            P: ::fbthrift::ProtocolWriter,
4816        {
4817            fn write(&self, p: &mut P) {
4818                if let Self::ApplicationException(aexn) = self {
4819                    return aexn.write(p);
4820                }
4821                p.write_struct_begin("ChainAddEdges");
4822                match self {
4823                    Self::Success(inner) => {
4824                        p.write_field_begin(
4825                            "Success",
4826                            ::fbthrift::TType::Struct,
4827                            0i16,
4828                        );
4829                        inner.write(p);
4830                        p.write_field_end();
4831                    }
4832                    Self::ApplicationException(_aexn) => unreachable!(),
4833                }
4834                p.write_field_stop();
4835                p.write_struct_end();
4836            }
4837        }
4838
4839        impl<P> ::fbthrift::Deserialize<P> for ChainAddEdgesExn
4840        where
4841            P: ::fbthrift::ProtocolReader,
4842        {
4843            fn read(p: &mut P) -> ::anyhow::Result<Self> {
4844                static RETURNS: &[::fbthrift::Field] = &[
4845                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4846                ];
4847                let _ = p.read_struct_begin(|_| ())?;
4848                let mut once = false;
4849                let mut alt = ::std::option::Option::None;
4850                loop {
4851                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4852                    match ((fty, fid as ::std::primitive::i32), once) {
4853                        ((::fbthrift::TType::Stop, _), _) => {
4854                            p.read_field_end()?;
4855                            break;
4856                        }
4857                        ((::fbthrift::TType::Struct, 0i32), false) => {
4858                            once = true;
4859                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4860                        }
4861                        ((ty, _id), false) => p.skip(ty)?,
4862                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4863                            ::fbthrift::ApplicationException::new(
4864                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4865                                format!(
4866                                    "unwanted extra union {} field ty {:?} id {}",
4867                                    "ChainAddEdgesExn",
4868                                    badty,
4869                                    badid,
4870                                ),
4871                            )
4872                        )),
4873                    }
4874                    p.read_field_end()?;
4875                }
4876                p.read_struct_end()?;
4877                alt.ok_or_else(||
4878                    ::fbthrift::ApplicationException::new(
4879                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4880                        format!("Empty union {}", "ChainAddEdgesExn"),
4881                    )
4882                    .into(),
4883                )
4884            }
4885        }
4886
4887        #[derive(Clone, Debug)]
4888        pub enum ChainUpdateEdgeExn {
4889            #[doc(hidden)]
4890            Success(crate::types::UpdateResponse),
4891            ApplicationException(::fbthrift::ApplicationException),
4892        }
4893
4894        impl ::std::convert::From<crate::errors::internal_storage_service::ChainUpdateEdgeError> for ChainUpdateEdgeExn {
4895            fn from(err: crate::errors::internal_storage_service::ChainUpdateEdgeError) -> Self {
4896                match err {
4897                    crate::errors::internal_storage_service::ChainUpdateEdgeError::ApplicationException(aexn) => ChainUpdateEdgeExn::ApplicationException(aexn),
4898                    crate::errors::internal_storage_service::ChainUpdateEdgeError::ThriftError(err) => ChainUpdateEdgeExn::ApplicationException(::fbthrift::ApplicationException {
4899                        message: err.to_string(),
4900                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
4901                    }),
4902                }
4903            }
4904        }
4905
4906        impl ::std::convert::From<::fbthrift::ApplicationException> for ChainUpdateEdgeExn {
4907            fn from(exn: ::fbthrift::ApplicationException) -> Self {
4908                Self::ApplicationException(exn)
4909            }
4910        }
4911
4912        impl ::fbthrift::ExceptionInfo for ChainUpdateEdgeExn {
4913            fn exn_name(&self) -> &'static str {
4914                match self {
4915                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
4916                    Self::ApplicationException(aexn) => aexn.exn_name(),
4917                }
4918            }
4919
4920            fn exn_value(&self) -> String {
4921                match self {
4922                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
4923                    Self::ApplicationException(aexn) => aexn.exn_value(),
4924                }
4925            }
4926
4927            fn exn_is_declared(&self) -> bool {
4928                match self {
4929                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
4930                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
4931                }
4932            }
4933        }
4934
4935        impl ::fbthrift::ResultInfo for ChainUpdateEdgeExn {
4936            fn result_type(&self) -> ::fbthrift::ResultType {
4937                match self {
4938                    Self::Success(_) => ::fbthrift::ResultType::Return,
4939                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
4940                }
4941            }
4942        }
4943
4944        impl ::fbthrift::GetTType for ChainUpdateEdgeExn {
4945            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
4946        }
4947
4948        impl<P> ::fbthrift::Serialize<P> for ChainUpdateEdgeExn
4949        where
4950            P: ::fbthrift::ProtocolWriter,
4951        {
4952            fn write(&self, p: &mut P) {
4953                if let Self::ApplicationException(aexn) = self {
4954                    return aexn.write(p);
4955                }
4956                p.write_struct_begin("ChainUpdateEdge");
4957                match self {
4958                    Self::Success(inner) => {
4959                        p.write_field_begin(
4960                            "Success",
4961                            ::fbthrift::TType::Struct,
4962                            0i16,
4963                        );
4964                        inner.write(p);
4965                        p.write_field_end();
4966                    }
4967                    Self::ApplicationException(_aexn) => unreachable!(),
4968                }
4969                p.write_field_stop();
4970                p.write_struct_end();
4971            }
4972        }
4973
4974        impl<P> ::fbthrift::Deserialize<P> for ChainUpdateEdgeExn
4975        where
4976            P: ::fbthrift::ProtocolReader,
4977        {
4978            fn read(p: &mut P) -> ::anyhow::Result<Self> {
4979                static RETURNS: &[::fbthrift::Field] = &[
4980                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4981                ];
4982                let _ = p.read_struct_begin(|_| ())?;
4983                let mut once = false;
4984                let mut alt = ::std::option::Option::None;
4985                loop {
4986                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4987                    match ((fty, fid as ::std::primitive::i32), once) {
4988                        ((::fbthrift::TType::Stop, _), _) => {
4989                            p.read_field_end()?;
4990                            break;
4991                        }
4992                        ((::fbthrift::TType::Struct, 0i32), false) => {
4993                            once = true;
4994                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4995                        }
4996                        ((ty, _id), false) => p.skip(ty)?,
4997                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4998                            ::fbthrift::ApplicationException::new(
4999                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
5000                                format!(
5001                                    "unwanted extra union {} field ty {:?} id {}",
5002                                    "ChainUpdateEdgeExn",
5003                                    badty,
5004                                    badid,
5005                                ),
5006                            )
5007                        )),
5008                    }
5009                    p.read_field_end()?;
5010                }
5011                p.read_struct_end()?;
5012                alt.ok_or_else(||
5013                    ::fbthrift::ApplicationException::new(
5014                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
5015                        format!("Empty union {}", "ChainUpdateEdgeExn"),
5016                    )
5017                    .into(),
5018                )
5019            }
5020        }
5021    }
5022}
5023
5024/// Client implementation for each service in `storage`.
5025pub mod client {
5026
5027    pub struct GraphStorageServiceImpl<P, T, S = ::fbthrift::NoopSpawner> {
5028        transport: T,
5029        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
5030    }
5031
5032    impl<P, T, S> GraphStorageServiceImpl<P, T, S>
5033    where
5034        P: ::fbthrift::Protocol,
5035        T: ::fbthrift::Transport,
5036        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
5037        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
5038        P::Deserializer: ::std::marker::Send,
5039        S: ::fbthrift::help::Spawner,
5040    {
5041        pub fn new(
5042            transport: T,
5043        ) -> Self {
5044            Self {
5045                transport,
5046                _phantom: ::std::marker::PhantomData,
5047            }
5048        }
5049
5050        pub fn transport(&self) -> &T {
5051            &self.transport
5052        }
5053
5054
5055        fn _getNeighbors_impl(
5056            &self,
5057            arg_req: &crate::types::GetNeighborsRequest,
5058            rpc_options: T::RpcOptions,
5059        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError>> {
5060            use ::const_cstr::const_cstr;
5061            use ::tracing::Instrument as _;
5062            use ::futures::FutureExt as _;
5063
5064            const_cstr! {
5065                SERVICE_NAME = "GraphStorageService";
5066                METHOD_NAME = "GraphStorageService.getNeighbors";
5067            }
5068            let args = self::Args_GraphStorageService_getNeighbors {
5069                req: arg_req,
5070                _phantom: ::std::marker::PhantomData,
5071            };
5072
5073            let transport = self.transport();
5074
5075            // need to do call setup outside of async block because T: Transport isn't Send
5076            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getNeighbors", &args) {
5077                ::std::result::Result::Ok(res) => res,
5078                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5079            };
5080
5081            let call = transport
5082                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5083                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.getNeighbors"));
5084
5085            async move {
5086                let reply_env = call.await?;
5087
5088                let de = P::deserializer(reply_env);
5089                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::GetNeighborsExn, _>, _) =
5090                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5091
5092                let res = match res {
5093                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5094                    ::std::result::Result::Err(aexn) =>
5095                        ::std::result::Result::Err(crate::errors::graph_storage_service::GetNeighborsError::ApplicationException(aexn))
5096                };
5097                res
5098            }
5099            .instrument(::tracing::info_span!("GraphStorageService.getNeighbors"))
5100            .boxed()
5101        }
5102
5103        fn _getProps_impl(
5104            &self,
5105            arg_req: &crate::types::GetPropRequest,
5106            rpc_options: T::RpcOptions,
5107        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError>> {
5108            use ::const_cstr::const_cstr;
5109            use ::tracing::Instrument as _;
5110            use ::futures::FutureExt as _;
5111
5112            const_cstr! {
5113                SERVICE_NAME = "GraphStorageService";
5114                METHOD_NAME = "GraphStorageService.getProps";
5115            }
5116            let args = self::Args_GraphStorageService_getProps {
5117                req: arg_req,
5118                _phantom: ::std::marker::PhantomData,
5119            };
5120
5121            let transport = self.transport();
5122
5123            // need to do call setup outside of async block because T: Transport isn't Send
5124            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getProps", &args) {
5125                ::std::result::Result::Ok(res) => res,
5126                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5127            };
5128
5129            let call = transport
5130                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5131                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.getProps"));
5132
5133            async move {
5134                let reply_env = call.await?;
5135
5136                let de = P::deserializer(reply_env);
5137                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::GetPropsExn, _>, _) =
5138                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5139
5140                let res = match res {
5141                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5142                    ::std::result::Result::Err(aexn) =>
5143                        ::std::result::Result::Err(crate::errors::graph_storage_service::GetPropsError::ApplicationException(aexn))
5144                };
5145                res
5146            }
5147            .instrument(::tracing::info_span!("GraphStorageService.getProps"))
5148            .boxed()
5149        }
5150
5151        fn _addVertices_impl(
5152            &self,
5153            arg_req: &crate::types::AddVerticesRequest,
5154            rpc_options: T::RpcOptions,
5155        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError>> {
5156            use ::const_cstr::const_cstr;
5157            use ::tracing::Instrument as _;
5158            use ::futures::FutureExt as _;
5159
5160            const_cstr! {
5161                SERVICE_NAME = "GraphStorageService";
5162                METHOD_NAME = "GraphStorageService.addVertices";
5163            }
5164            let args = self::Args_GraphStorageService_addVertices {
5165                req: arg_req,
5166                _phantom: ::std::marker::PhantomData,
5167            };
5168
5169            let transport = self.transport();
5170
5171            // need to do call setup outside of async block because T: Transport isn't Send
5172            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addVertices", &args) {
5173                ::std::result::Result::Ok(res) => res,
5174                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5175            };
5176
5177            let call = transport
5178                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5179                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.addVertices"));
5180
5181            async move {
5182                let reply_env = call.await?;
5183
5184                let de = P::deserializer(reply_env);
5185                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::AddVerticesExn, _>, _) =
5186                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5187
5188                let res = match res {
5189                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5190                    ::std::result::Result::Err(aexn) =>
5191                        ::std::result::Result::Err(crate::errors::graph_storage_service::AddVerticesError::ApplicationException(aexn))
5192                };
5193                res
5194            }
5195            .instrument(::tracing::info_span!("GraphStorageService.addVertices"))
5196            .boxed()
5197        }
5198
5199        fn _addEdges_impl(
5200            &self,
5201            arg_req: &crate::types::AddEdgesRequest,
5202            rpc_options: T::RpcOptions,
5203        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError>> {
5204            use ::const_cstr::const_cstr;
5205            use ::tracing::Instrument as _;
5206            use ::futures::FutureExt as _;
5207
5208            const_cstr! {
5209                SERVICE_NAME = "GraphStorageService";
5210                METHOD_NAME = "GraphStorageService.addEdges";
5211            }
5212            let args = self::Args_GraphStorageService_addEdges {
5213                req: arg_req,
5214                _phantom: ::std::marker::PhantomData,
5215            };
5216
5217            let transport = self.transport();
5218
5219            // need to do call setup outside of async block because T: Transport isn't Send
5220            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addEdges", &args) {
5221                ::std::result::Result::Ok(res) => res,
5222                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5223            };
5224
5225            let call = transport
5226                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5227                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.addEdges"));
5228
5229            async move {
5230                let reply_env = call.await?;
5231
5232                let de = P::deserializer(reply_env);
5233                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::AddEdgesExn, _>, _) =
5234                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5235
5236                let res = match res {
5237                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5238                    ::std::result::Result::Err(aexn) =>
5239                        ::std::result::Result::Err(crate::errors::graph_storage_service::AddEdgesError::ApplicationException(aexn))
5240                };
5241                res
5242            }
5243            .instrument(::tracing::info_span!("GraphStorageService.addEdges"))
5244            .boxed()
5245        }
5246
5247        fn _deleteEdges_impl(
5248            &self,
5249            arg_req: &crate::types::DeleteEdgesRequest,
5250            rpc_options: T::RpcOptions,
5251        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError>> {
5252            use ::const_cstr::const_cstr;
5253            use ::tracing::Instrument as _;
5254            use ::futures::FutureExt as _;
5255
5256            const_cstr! {
5257                SERVICE_NAME = "GraphStorageService";
5258                METHOD_NAME = "GraphStorageService.deleteEdges";
5259            }
5260            let args = self::Args_GraphStorageService_deleteEdges {
5261                req: arg_req,
5262                _phantom: ::std::marker::PhantomData,
5263            };
5264
5265            let transport = self.transport();
5266
5267            // need to do call setup outside of async block because T: Transport isn't Send
5268            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("deleteEdges", &args) {
5269                ::std::result::Result::Ok(res) => res,
5270                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5271            };
5272
5273            let call = transport
5274                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5275                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.deleteEdges"));
5276
5277            async move {
5278                let reply_env = call.await?;
5279
5280                let de = P::deserializer(reply_env);
5281                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::DeleteEdgesExn, _>, _) =
5282                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5283
5284                let res = match res {
5285                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5286                    ::std::result::Result::Err(aexn) =>
5287                        ::std::result::Result::Err(crate::errors::graph_storage_service::DeleteEdgesError::ApplicationException(aexn))
5288                };
5289                res
5290            }
5291            .instrument(::tracing::info_span!("GraphStorageService.deleteEdges"))
5292            .boxed()
5293        }
5294
5295        fn _deleteVertices_impl(
5296            &self,
5297            arg_req: &crate::types::DeleteVerticesRequest,
5298            rpc_options: T::RpcOptions,
5299        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError>> {
5300            use ::const_cstr::const_cstr;
5301            use ::tracing::Instrument as _;
5302            use ::futures::FutureExt as _;
5303
5304            const_cstr! {
5305                SERVICE_NAME = "GraphStorageService";
5306                METHOD_NAME = "GraphStorageService.deleteVertices";
5307            }
5308            let args = self::Args_GraphStorageService_deleteVertices {
5309                req: arg_req,
5310                _phantom: ::std::marker::PhantomData,
5311            };
5312
5313            let transport = self.transport();
5314
5315            // need to do call setup outside of async block because T: Transport isn't Send
5316            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("deleteVertices", &args) {
5317                ::std::result::Result::Ok(res) => res,
5318                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5319            };
5320
5321            let call = transport
5322                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5323                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.deleteVertices"));
5324
5325            async move {
5326                let reply_env = call.await?;
5327
5328                let de = P::deserializer(reply_env);
5329                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::DeleteVerticesExn, _>, _) =
5330                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5331
5332                let res = match res {
5333                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5334                    ::std::result::Result::Err(aexn) =>
5335                        ::std::result::Result::Err(crate::errors::graph_storage_service::DeleteVerticesError::ApplicationException(aexn))
5336                };
5337                res
5338            }
5339            .instrument(::tracing::info_span!("GraphStorageService.deleteVertices"))
5340            .boxed()
5341        }
5342
5343        fn _deleteTags_impl(
5344            &self,
5345            arg_req: &crate::types::DeleteTagsRequest,
5346            rpc_options: T::RpcOptions,
5347        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError>> {
5348            use ::const_cstr::const_cstr;
5349            use ::tracing::Instrument as _;
5350            use ::futures::FutureExt as _;
5351
5352            const_cstr! {
5353                SERVICE_NAME = "GraphStorageService";
5354                METHOD_NAME = "GraphStorageService.deleteTags";
5355            }
5356            let args = self::Args_GraphStorageService_deleteTags {
5357                req: arg_req,
5358                _phantom: ::std::marker::PhantomData,
5359            };
5360
5361            let transport = self.transport();
5362
5363            // need to do call setup outside of async block because T: Transport isn't Send
5364            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("deleteTags", &args) {
5365                ::std::result::Result::Ok(res) => res,
5366                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5367            };
5368
5369            let call = transport
5370                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5371                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.deleteTags"));
5372
5373            async move {
5374                let reply_env = call.await?;
5375
5376                let de = P::deserializer(reply_env);
5377                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::DeleteTagsExn, _>, _) =
5378                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5379
5380                let res = match res {
5381                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5382                    ::std::result::Result::Err(aexn) =>
5383                        ::std::result::Result::Err(crate::errors::graph_storage_service::DeleteTagsError::ApplicationException(aexn))
5384                };
5385                res
5386            }
5387            .instrument(::tracing::info_span!("GraphStorageService.deleteTags"))
5388            .boxed()
5389        }
5390
5391        fn _updateVertex_impl(
5392            &self,
5393            arg_req: &crate::types::UpdateVertexRequest,
5394            rpc_options: T::RpcOptions,
5395        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError>> {
5396            use ::const_cstr::const_cstr;
5397            use ::tracing::Instrument as _;
5398            use ::futures::FutureExt as _;
5399
5400            const_cstr! {
5401                SERVICE_NAME = "GraphStorageService";
5402                METHOD_NAME = "GraphStorageService.updateVertex";
5403            }
5404            let args = self::Args_GraphStorageService_updateVertex {
5405                req: arg_req,
5406                _phantom: ::std::marker::PhantomData,
5407            };
5408
5409            let transport = self.transport();
5410
5411            // need to do call setup outside of async block because T: Transport isn't Send
5412            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("updateVertex", &args) {
5413                ::std::result::Result::Ok(res) => res,
5414                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5415            };
5416
5417            let call = transport
5418                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5419                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.updateVertex"));
5420
5421            async move {
5422                let reply_env = call.await?;
5423
5424                let de = P::deserializer(reply_env);
5425                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::UpdateVertexExn, _>, _) =
5426                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5427
5428                let res = match res {
5429                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5430                    ::std::result::Result::Err(aexn) =>
5431                        ::std::result::Result::Err(crate::errors::graph_storage_service::UpdateVertexError::ApplicationException(aexn))
5432                };
5433                res
5434            }
5435            .instrument(::tracing::info_span!("GraphStorageService.updateVertex"))
5436            .boxed()
5437        }
5438
5439        fn _updateEdge_impl(
5440            &self,
5441            arg_req: &crate::types::UpdateEdgeRequest,
5442            rpc_options: T::RpcOptions,
5443        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError>> {
5444            use ::const_cstr::const_cstr;
5445            use ::tracing::Instrument as _;
5446            use ::futures::FutureExt as _;
5447
5448            const_cstr! {
5449                SERVICE_NAME = "GraphStorageService";
5450                METHOD_NAME = "GraphStorageService.updateEdge";
5451            }
5452            let args = self::Args_GraphStorageService_updateEdge {
5453                req: arg_req,
5454                _phantom: ::std::marker::PhantomData,
5455            };
5456
5457            let transport = self.transport();
5458
5459            // need to do call setup outside of async block because T: Transport isn't Send
5460            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("updateEdge", &args) {
5461                ::std::result::Result::Ok(res) => res,
5462                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5463            };
5464
5465            let call = transport
5466                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5467                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.updateEdge"));
5468
5469            async move {
5470                let reply_env = call.await?;
5471
5472                let de = P::deserializer(reply_env);
5473                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::UpdateEdgeExn, _>, _) =
5474                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5475
5476                let res = match res {
5477                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5478                    ::std::result::Result::Err(aexn) =>
5479                        ::std::result::Result::Err(crate::errors::graph_storage_service::UpdateEdgeError::ApplicationException(aexn))
5480                };
5481                res
5482            }
5483            .instrument(::tracing::info_span!("GraphStorageService.updateEdge"))
5484            .boxed()
5485        }
5486
5487        fn _scanVertex_impl(
5488            &self,
5489            arg_req: &crate::types::ScanVertexRequest,
5490            rpc_options: T::RpcOptions,
5491        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError>> {
5492            use ::const_cstr::const_cstr;
5493            use ::tracing::Instrument as _;
5494            use ::futures::FutureExt as _;
5495
5496            const_cstr! {
5497                SERVICE_NAME = "GraphStorageService";
5498                METHOD_NAME = "GraphStorageService.scanVertex";
5499            }
5500            let args = self::Args_GraphStorageService_scanVertex {
5501                req: arg_req,
5502                _phantom: ::std::marker::PhantomData,
5503            };
5504
5505            let transport = self.transport();
5506
5507            // need to do call setup outside of async block because T: Transport isn't Send
5508            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("scanVertex", &args) {
5509                ::std::result::Result::Ok(res) => res,
5510                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5511            };
5512
5513            let call = transport
5514                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5515                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.scanVertex"));
5516
5517            async move {
5518                let reply_env = call.await?;
5519
5520                let de = P::deserializer(reply_env);
5521                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::ScanVertexExn, _>, _) =
5522                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5523
5524                let res = match res {
5525                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5526                    ::std::result::Result::Err(aexn) =>
5527                        ::std::result::Result::Err(crate::errors::graph_storage_service::ScanVertexError::ApplicationException(aexn))
5528                };
5529                res
5530            }
5531            .instrument(::tracing::info_span!("GraphStorageService.scanVertex"))
5532            .boxed()
5533        }
5534
5535        fn _scanEdge_impl(
5536            &self,
5537            arg_req: &crate::types::ScanEdgeRequest,
5538            rpc_options: T::RpcOptions,
5539        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError>> {
5540            use ::const_cstr::const_cstr;
5541            use ::tracing::Instrument as _;
5542            use ::futures::FutureExt as _;
5543
5544            const_cstr! {
5545                SERVICE_NAME = "GraphStorageService";
5546                METHOD_NAME = "GraphStorageService.scanEdge";
5547            }
5548            let args = self::Args_GraphStorageService_scanEdge {
5549                req: arg_req,
5550                _phantom: ::std::marker::PhantomData,
5551            };
5552
5553            let transport = self.transport();
5554
5555            // need to do call setup outside of async block because T: Transport isn't Send
5556            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("scanEdge", &args) {
5557                ::std::result::Result::Ok(res) => res,
5558                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5559            };
5560
5561            let call = transport
5562                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5563                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.scanEdge"));
5564
5565            async move {
5566                let reply_env = call.await?;
5567
5568                let de = P::deserializer(reply_env);
5569                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::ScanEdgeExn, _>, _) =
5570                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5571
5572                let res = match res {
5573                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5574                    ::std::result::Result::Err(aexn) =>
5575                        ::std::result::Result::Err(crate::errors::graph_storage_service::ScanEdgeError::ApplicationException(aexn))
5576                };
5577                res
5578            }
5579            .instrument(::tracing::info_span!("GraphStorageService.scanEdge"))
5580            .boxed()
5581        }
5582
5583        fn _getUUID_impl(
5584            &self,
5585            arg_req: &crate::types::GetUUIDReq,
5586            rpc_options: T::RpcOptions,
5587        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError>> {
5588            use ::const_cstr::const_cstr;
5589            use ::tracing::Instrument as _;
5590            use ::futures::FutureExt as _;
5591
5592            const_cstr! {
5593                SERVICE_NAME = "GraphStorageService";
5594                METHOD_NAME = "GraphStorageService.getUUID";
5595            }
5596            let args = self::Args_GraphStorageService_getUUID {
5597                req: arg_req,
5598                _phantom: ::std::marker::PhantomData,
5599            };
5600
5601            let transport = self.transport();
5602
5603            // need to do call setup outside of async block because T: Transport isn't Send
5604            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getUUID", &args) {
5605                ::std::result::Result::Ok(res) => res,
5606                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5607            };
5608
5609            let call = transport
5610                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5611                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.getUUID"));
5612
5613            async move {
5614                let reply_env = call.await?;
5615
5616                let de = P::deserializer(reply_env);
5617                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::GetUUIDExn, _>, _) =
5618                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5619
5620                let res = match res {
5621                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5622                    ::std::result::Result::Err(aexn) =>
5623                        ::std::result::Result::Err(crate::errors::graph_storage_service::GetUUIDError::ApplicationException(aexn))
5624                };
5625                res
5626            }
5627            .instrument(::tracing::info_span!("GraphStorageService.getUUID"))
5628            .boxed()
5629        }
5630
5631        fn _lookupIndex_impl(
5632            &self,
5633            arg_req: &crate::types::LookupIndexRequest,
5634            rpc_options: T::RpcOptions,
5635        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError>> {
5636            use ::const_cstr::const_cstr;
5637            use ::tracing::Instrument as _;
5638            use ::futures::FutureExt as _;
5639
5640            const_cstr! {
5641                SERVICE_NAME = "GraphStorageService";
5642                METHOD_NAME = "GraphStorageService.lookupIndex";
5643            }
5644            let args = self::Args_GraphStorageService_lookupIndex {
5645                req: arg_req,
5646                _phantom: ::std::marker::PhantomData,
5647            };
5648
5649            let transport = self.transport();
5650
5651            // need to do call setup outside of async block because T: Transport isn't Send
5652            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("lookupIndex", &args) {
5653                ::std::result::Result::Ok(res) => res,
5654                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5655            };
5656
5657            let call = transport
5658                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5659                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.lookupIndex"));
5660
5661            async move {
5662                let reply_env = call.await?;
5663
5664                let de = P::deserializer(reply_env);
5665                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::LookupIndexExn, _>, _) =
5666                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5667
5668                let res = match res {
5669                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5670                    ::std::result::Result::Err(aexn) =>
5671                        ::std::result::Result::Err(crate::errors::graph_storage_service::LookupIndexError::ApplicationException(aexn))
5672                };
5673                res
5674            }
5675            .instrument(::tracing::info_span!("GraphStorageService.lookupIndex"))
5676            .boxed()
5677        }
5678
5679        fn _lookupAndTraverse_impl(
5680            &self,
5681            arg_req: &crate::types::LookupAndTraverseRequest,
5682            rpc_options: T::RpcOptions,
5683        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError>> {
5684            use ::const_cstr::const_cstr;
5685            use ::tracing::Instrument as _;
5686            use ::futures::FutureExt as _;
5687
5688            const_cstr! {
5689                SERVICE_NAME = "GraphStorageService";
5690                METHOD_NAME = "GraphStorageService.lookupAndTraverse";
5691            }
5692            let args = self::Args_GraphStorageService_lookupAndTraverse {
5693                req: arg_req,
5694                _phantom: ::std::marker::PhantomData,
5695            };
5696
5697            let transport = self.transport();
5698
5699            // need to do call setup outside of async block because T: Transport isn't Send
5700            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("lookupAndTraverse", &args) {
5701                ::std::result::Result::Ok(res) => res,
5702                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5703            };
5704
5705            let call = transport
5706                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5707                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.lookupAndTraverse"));
5708
5709            async move {
5710                let reply_env = call.await?;
5711
5712                let de = P::deserializer(reply_env);
5713                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::LookupAndTraverseExn, _>, _) =
5714                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5715
5716                let res = match res {
5717                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5718                    ::std::result::Result::Err(aexn) =>
5719                        ::std::result::Result::Err(crate::errors::graph_storage_service::LookupAndTraverseError::ApplicationException(aexn))
5720                };
5721                res
5722            }
5723            .instrument(::tracing::info_span!("GraphStorageService.lookupAndTraverse"))
5724            .boxed()
5725        }
5726
5727        fn _chainUpdateEdge_impl(
5728            &self,
5729            arg_req: &crate::types::UpdateEdgeRequest,
5730            rpc_options: T::RpcOptions,
5731        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError>> {
5732            use ::const_cstr::const_cstr;
5733            use ::tracing::Instrument as _;
5734            use ::futures::FutureExt as _;
5735
5736            const_cstr! {
5737                SERVICE_NAME = "GraphStorageService";
5738                METHOD_NAME = "GraphStorageService.chainUpdateEdge";
5739            }
5740            let args = self::Args_GraphStorageService_chainUpdateEdge {
5741                req: arg_req,
5742                _phantom: ::std::marker::PhantomData,
5743            };
5744
5745            let transport = self.transport();
5746
5747            // need to do call setup outside of async block because T: Transport isn't Send
5748            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("chainUpdateEdge", &args) {
5749                ::std::result::Result::Ok(res) => res,
5750                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5751            };
5752
5753            let call = transport
5754                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5755                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.chainUpdateEdge"));
5756
5757            async move {
5758                let reply_env = call.await?;
5759
5760                let de = P::deserializer(reply_env);
5761                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::ChainUpdateEdgeExn, _>, _) =
5762                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5763
5764                let res = match res {
5765                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5766                    ::std::result::Result::Err(aexn) =>
5767                        ::std::result::Result::Err(crate::errors::graph_storage_service::ChainUpdateEdgeError::ApplicationException(aexn))
5768                };
5769                res
5770            }
5771            .instrument(::tracing::info_span!("GraphStorageService.chainUpdateEdge"))
5772            .boxed()
5773        }
5774
5775        fn _chainAddEdges_impl(
5776            &self,
5777            arg_req: &crate::types::AddEdgesRequest,
5778            rpc_options: T::RpcOptions,
5779        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError>> {
5780            use ::const_cstr::const_cstr;
5781            use ::tracing::Instrument as _;
5782            use ::futures::FutureExt as _;
5783
5784            const_cstr! {
5785                SERVICE_NAME = "GraphStorageService";
5786                METHOD_NAME = "GraphStorageService.chainAddEdges";
5787            }
5788            let args = self::Args_GraphStorageService_chainAddEdges {
5789                req: arg_req,
5790                _phantom: ::std::marker::PhantomData,
5791            };
5792
5793            let transport = self.transport();
5794
5795            // need to do call setup outside of async block because T: Transport isn't Send
5796            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("chainAddEdges", &args) {
5797                ::std::result::Result::Ok(res) => res,
5798                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5799            };
5800
5801            let call = transport
5802                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5803                .instrument(::tracing::trace_span!("call", function = "GraphStorageService.chainAddEdges"));
5804
5805            async move {
5806                let reply_env = call.await?;
5807
5808                let de = P::deserializer(reply_env);
5809                let (res, _de): (::std::result::Result<crate::services::graph_storage_service::ChainAddEdgesExn, _>, _) =
5810                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5811
5812                let res = match res {
5813                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5814                    ::std::result::Result::Err(aexn) =>
5815                        ::std::result::Result::Err(crate::errors::graph_storage_service::ChainAddEdgesError::ApplicationException(aexn))
5816                };
5817                res
5818            }
5819            .instrument(::tracing::info_span!("GraphStorageService.chainAddEdges"))
5820            .boxed()
5821        }
5822    }
5823
5824    pub trait GraphStorageService: ::std::marker::Send {
5825        fn getNeighbors(
5826            &self,
5827            arg_req: &crate::types::GetNeighborsRequest,
5828        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError>>;
5829
5830        fn getProps(
5831            &self,
5832            arg_req: &crate::types::GetPropRequest,
5833        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError>>;
5834
5835        fn addVertices(
5836            &self,
5837            arg_req: &crate::types::AddVerticesRequest,
5838        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError>>;
5839
5840        fn addEdges(
5841            &self,
5842            arg_req: &crate::types::AddEdgesRequest,
5843        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError>>;
5844
5845        fn deleteEdges(
5846            &self,
5847            arg_req: &crate::types::DeleteEdgesRequest,
5848        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError>>;
5849
5850        fn deleteVertices(
5851            &self,
5852            arg_req: &crate::types::DeleteVerticesRequest,
5853        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError>>;
5854
5855        fn deleteTags(
5856            &self,
5857            arg_req: &crate::types::DeleteTagsRequest,
5858        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError>>;
5859
5860        fn updateVertex(
5861            &self,
5862            arg_req: &crate::types::UpdateVertexRequest,
5863        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError>>;
5864
5865        fn updateEdge(
5866            &self,
5867            arg_req: &crate::types::UpdateEdgeRequest,
5868        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError>>;
5869
5870        fn scanVertex(
5871            &self,
5872            arg_req: &crate::types::ScanVertexRequest,
5873        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError>>;
5874
5875        fn scanEdge(
5876            &self,
5877            arg_req: &crate::types::ScanEdgeRequest,
5878        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError>>;
5879
5880        fn getUUID(
5881            &self,
5882            arg_req: &crate::types::GetUUIDReq,
5883        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError>>;
5884
5885        fn lookupIndex(
5886            &self,
5887            arg_req: &crate::types::LookupIndexRequest,
5888        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError>>;
5889
5890        fn lookupAndTraverse(
5891            &self,
5892            arg_req: &crate::types::LookupAndTraverseRequest,
5893        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError>>;
5894
5895        fn chainUpdateEdge(
5896            &self,
5897            arg_req: &crate::types::UpdateEdgeRequest,
5898        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError>>;
5899
5900        fn chainAddEdges(
5901            &self,
5902            arg_req: &crate::types::AddEdgesRequest,
5903        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError>>;
5904    }
5905
5906    pub trait GraphStorageServiceExt<T>: GraphStorageService
5907    where
5908        T: ::fbthrift::Transport,
5909    {
5910        fn getNeighbors_with_rpc_opts(
5911            &self,
5912            arg_req: &crate::types::GetNeighborsRequest,
5913            rpc_options: T::RpcOptions,
5914        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError>>;
5915        fn getProps_with_rpc_opts(
5916            &self,
5917            arg_req: &crate::types::GetPropRequest,
5918            rpc_options: T::RpcOptions,
5919        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError>>;
5920        fn addVertices_with_rpc_opts(
5921            &self,
5922            arg_req: &crate::types::AddVerticesRequest,
5923            rpc_options: T::RpcOptions,
5924        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError>>;
5925        fn addEdges_with_rpc_opts(
5926            &self,
5927            arg_req: &crate::types::AddEdgesRequest,
5928            rpc_options: T::RpcOptions,
5929        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError>>;
5930        fn deleteEdges_with_rpc_opts(
5931            &self,
5932            arg_req: &crate::types::DeleteEdgesRequest,
5933            rpc_options: T::RpcOptions,
5934        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError>>;
5935        fn deleteVertices_with_rpc_opts(
5936            &self,
5937            arg_req: &crate::types::DeleteVerticesRequest,
5938            rpc_options: T::RpcOptions,
5939        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError>>;
5940        fn deleteTags_with_rpc_opts(
5941            &self,
5942            arg_req: &crate::types::DeleteTagsRequest,
5943            rpc_options: T::RpcOptions,
5944        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError>>;
5945        fn updateVertex_with_rpc_opts(
5946            &self,
5947            arg_req: &crate::types::UpdateVertexRequest,
5948            rpc_options: T::RpcOptions,
5949        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError>>;
5950        fn updateEdge_with_rpc_opts(
5951            &self,
5952            arg_req: &crate::types::UpdateEdgeRequest,
5953            rpc_options: T::RpcOptions,
5954        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError>>;
5955        fn scanVertex_with_rpc_opts(
5956            &self,
5957            arg_req: &crate::types::ScanVertexRequest,
5958            rpc_options: T::RpcOptions,
5959        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError>>;
5960        fn scanEdge_with_rpc_opts(
5961            &self,
5962            arg_req: &crate::types::ScanEdgeRequest,
5963            rpc_options: T::RpcOptions,
5964        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError>>;
5965        fn getUUID_with_rpc_opts(
5966            &self,
5967            arg_req: &crate::types::GetUUIDReq,
5968            rpc_options: T::RpcOptions,
5969        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError>>;
5970        fn lookupIndex_with_rpc_opts(
5971            &self,
5972            arg_req: &crate::types::LookupIndexRequest,
5973            rpc_options: T::RpcOptions,
5974        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError>>;
5975        fn lookupAndTraverse_with_rpc_opts(
5976            &self,
5977            arg_req: &crate::types::LookupAndTraverseRequest,
5978            rpc_options: T::RpcOptions,
5979        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError>>;
5980        fn chainUpdateEdge_with_rpc_opts(
5981            &self,
5982            arg_req: &crate::types::UpdateEdgeRequest,
5983            rpc_options: T::RpcOptions,
5984        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError>>;
5985        fn chainAddEdges_with_rpc_opts(
5986            &self,
5987            arg_req: &crate::types::AddEdgesRequest,
5988            rpc_options: T::RpcOptions,
5989        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError>>;
5990    }
5991
5992    struct Args_GraphStorageService_getNeighbors<'a> {
5993        req: &'a crate::types::GetNeighborsRequest,
5994        _phantom: ::std::marker::PhantomData<&'a ()>,
5995    }
5996
5997    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_getNeighbors<'a> {
5998        #[inline]
5999        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.getNeighbors"))]
6000        fn write(&self, p: &mut P) {
6001            p.write_struct_begin("args");
6002            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6003            ::fbthrift::Serialize::write(&self.req, p);
6004            p.write_field_end();
6005            p.write_field_stop();
6006            p.write_struct_end();
6007        }
6008    }
6009
6010    struct Args_GraphStorageService_getProps<'a> {
6011        req: &'a crate::types::GetPropRequest,
6012        _phantom: ::std::marker::PhantomData<&'a ()>,
6013    }
6014
6015    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_getProps<'a> {
6016        #[inline]
6017        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.getProps"))]
6018        fn write(&self, p: &mut P) {
6019            p.write_struct_begin("args");
6020            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6021            ::fbthrift::Serialize::write(&self.req, p);
6022            p.write_field_end();
6023            p.write_field_stop();
6024            p.write_struct_end();
6025        }
6026    }
6027
6028    struct Args_GraphStorageService_addVertices<'a> {
6029        req: &'a crate::types::AddVerticesRequest,
6030        _phantom: ::std::marker::PhantomData<&'a ()>,
6031    }
6032
6033    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_addVertices<'a> {
6034        #[inline]
6035        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.addVertices"))]
6036        fn write(&self, p: &mut P) {
6037            p.write_struct_begin("args");
6038            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6039            ::fbthrift::Serialize::write(&self.req, p);
6040            p.write_field_end();
6041            p.write_field_stop();
6042            p.write_struct_end();
6043        }
6044    }
6045
6046    struct Args_GraphStorageService_addEdges<'a> {
6047        req: &'a crate::types::AddEdgesRequest,
6048        _phantom: ::std::marker::PhantomData<&'a ()>,
6049    }
6050
6051    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_addEdges<'a> {
6052        #[inline]
6053        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.addEdges"))]
6054        fn write(&self, p: &mut P) {
6055            p.write_struct_begin("args");
6056            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6057            ::fbthrift::Serialize::write(&self.req, p);
6058            p.write_field_end();
6059            p.write_field_stop();
6060            p.write_struct_end();
6061        }
6062    }
6063
6064    struct Args_GraphStorageService_deleteEdges<'a> {
6065        req: &'a crate::types::DeleteEdgesRequest,
6066        _phantom: ::std::marker::PhantomData<&'a ()>,
6067    }
6068
6069    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_deleteEdges<'a> {
6070        #[inline]
6071        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.deleteEdges"))]
6072        fn write(&self, p: &mut P) {
6073            p.write_struct_begin("args");
6074            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6075            ::fbthrift::Serialize::write(&self.req, p);
6076            p.write_field_end();
6077            p.write_field_stop();
6078            p.write_struct_end();
6079        }
6080    }
6081
6082    struct Args_GraphStorageService_deleteVertices<'a> {
6083        req: &'a crate::types::DeleteVerticesRequest,
6084        _phantom: ::std::marker::PhantomData<&'a ()>,
6085    }
6086
6087    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_deleteVertices<'a> {
6088        #[inline]
6089        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.deleteVertices"))]
6090        fn write(&self, p: &mut P) {
6091            p.write_struct_begin("args");
6092            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6093            ::fbthrift::Serialize::write(&self.req, p);
6094            p.write_field_end();
6095            p.write_field_stop();
6096            p.write_struct_end();
6097        }
6098    }
6099
6100    struct Args_GraphStorageService_deleteTags<'a> {
6101        req: &'a crate::types::DeleteTagsRequest,
6102        _phantom: ::std::marker::PhantomData<&'a ()>,
6103    }
6104
6105    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_deleteTags<'a> {
6106        #[inline]
6107        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.deleteTags"))]
6108        fn write(&self, p: &mut P) {
6109            p.write_struct_begin("args");
6110            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6111            ::fbthrift::Serialize::write(&self.req, p);
6112            p.write_field_end();
6113            p.write_field_stop();
6114            p.write_struct_end();
6115        }
6116    }
6117
6118    struct Args_GraphStorageService_updateVertex<'a> {
6119        req: &'a crate::types::UpdateVertexRequest,
6120        _phantom: ::std::marker::PhantomData<&'a ()>,
6121    }
6122
6123    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_updateVertex<'a> {
6124        #[inline]
6125        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.updateVertex"))]
6126        fn write(&self, p: &mut P) {
6127            p.write_struct_begin("args");
6128            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6129            ::fbthrift::Serialize::write(&self.req, p);
6130            p.write_field_end();
6131            p.write_field_stop();
6132            p.write_struct_end();
6133        }
6134    }
6135
6136    struct Args_GraphStorageService_updateEdge<'a> {
6137        req: &'a crate::types::UpdateEdgeRequest,
6138        _phantom: ::std::marker::PhantomData<&'a ()>,
6139    }
6140
6141    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_updateEdge<'a> {
6142        #[inline]
6143        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.updateEdge"))]
6144        fn write(&self, p: &mut P) {
6145            p.write_struct_begin("args");
6146            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6147            ::fbthrift::Serialize::write(&self.req, p);
6148            p.write_field_end();
6149            p.write_field_stop();
6150            p.write_struct_end();
6151        }
6152    }
6153
6154    struct Args_GraphStorageService_scanVertex<'a> {
6155        req: &'a crate::types::ScanVertexRequest,
6156        _phantom: ::std::marker::PhantomData<&'a ()>,
6157    }
6158
6159    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_scanVertex<'a> {
6160        #[inline]
6161        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.scanVertex"))]
6162        fn write(&self, p: &mut P) {
6163            p.write_struct_begin("args");
6164            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6165            ::fbthrift::Serialize::write(&self.req, p);
6166            p.write_field_end();
6167            p.write_field_stop();
6168            p.write_struct_end();
6169        }
6170    }
6171
6172    struct Args_GraphStorageService_scanEdge<'a> {
6173        req: &'a crate::types::ScanEdgeRequest,
6174        _phantom: ::std::marker::PhantomData<&'a ()>,
6175    }
6176
6177    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_scanEdge<'a> {
6178        #[inline]
6179        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.scanEdge"))]
6180        fn write(&self, p: &mut P) {
6181            p.write_struct_begin("args");
6182            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6183            ::fbthrift::Serialize::write(&self.req, p);
6184            p.write_field_end();
6185            p.write_field_stop();
6186            p.write_struct_end();
6187        }
6188    }
6189
6190    struct Args_GraphStorageService_getUUID<'a> {
6191        req: &'a crate::types::GetUUIDReq,
6192        _phantom: ::std::marker::PhantomData<&'a ()>,
6193    }
6194
6195    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_getUUID<'a> {
6196        #[inline]
6197        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.getUUID"))]
6198        fn write(&self, p: &mut P) {
6199            p.write_struct_begin("args");
6200            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6201            ::fbthrift::Serialize::write(&self.req, p);
6202            p.write_field_end();
6203            p.write_field_stop();
6204            p.write_struct_end();
6205        }
6206    }
6207
6208    struct Args_GraphStorageService_lookupIndex<'a> {
6209        req: &'a crate::types::LookupIndexRequest,
6210        _phantom: ::std::marker::PhantomData<&'a ()>,
6211    }
6212
6213    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_lookupIndex<'a> {
6214        #[inline]
6215        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.lookupIndex"))]
6216        fn write(&self, p: &mut P) {
6217            p.write_struct_begin("args");
6218            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6219            ::fbthrift::Serialize::write(&self.req, p);
6220            p.write_field_end();
6221            p.write_field_stop();
6222            p.write_struct_end();
6223        }
6224    }
6225
6226    struct Args_GraphStorageService_lookupAndTraverse<'a> {
6227        req: &'a crate::types::LookupAndTraverseRequest,
6228        _phantom: ::std::marker::PhantomData<&'a ()>,
6229    }
6230
6231    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_lookupAndTraverse<'a> {
6232        #[inline]
6233        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.lookupAndTraverse"))]
6234        fn write(&self, p: &mut P) {
6235            p.write_struct_begin("args");
6236            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6237            ::fbthrift::Serialize::write(&self.req, p);
6238            p.write_field_end();
6239            p.write_field_stop();
6240            p.write_struct_end();
6241        }
6242    }
6243
6244    struct Args_GraphStorageService_chainUpdateEdge<'a> {
6245        req: &'a crate::types::UpdateEdgeRequest,
6246        _phantom: ::std::marker::PhantomData<&'a ()>,
6247    }
6248
6249    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_chainUpdateEdge<'a> {
6250        #[inline]
6251        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.chainUpdateEdge"))]
6252        fn write(&self, p: &mut P) {
6253            p.write_struct_begin("args");
6254            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6255            ::fbthrift::Serialize::write(&self.req, p);
6256            p.write_field_end();
6257            p.write_field_stop();
6258            p.write_struct_end();
6259        }
6260    }
6261
6262    struct Args_GraphStorageService_chainAddEdges<'a> {
6263        req: &'a crate::types::AddEdgesRequest,
6264        _phantom: ::std::marker::PhantomData<&'a ()>,
6265    }
6266
6267    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphStorageService_chainAddEdges<'a> {
6268        #[inline]
6269        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphStorageService.chainAddEdges"))]
6270        fn write(&self, p: &mut P) {
6271            p.write_struct_begin("args");
6272            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6273            ::fbthrift::Serialize::write(&self.req, p);
6274            p.write_field_end();
6275            p.write_field_stop();
6276            p.write_struct_end();
6277        }
6278    }
6279
6280    impl<P, T, S> GraphStorageService for GraphStorageServiceImpl<P, T, S>
6281    where
6282        P: ::fbthrift::Protocol,
6283        T: ::fbthrift::Transport,
6284        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
6285        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
6286        P::Deserializer: ::std::marker::Send,
6287        S: ::fbthrift::help::Spawner,
6288    {
6289        fn getNeighbors(
6290            &self,
6291            arg_req: &crate::types::GetNeighborsRequest,
6292        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError>> {
6293            let rpc_options = T::RpcOptions::default();
6294            self._getNeighbors_impl(
6295                arg_req,
6296                rpc_options,
6297            )
6298        }
6299        fn getProps(
6300            &self,
6301            arg_req: &crate::types::GetPropRequest,
6302        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError>> {
6303            let rpc_options = T::RpcOptions::default();
6304            self._getProps_impl(
6305                arg_req,
6306                rpc_options,
6307            )
6308        }
6309        fn addVertices(
6310            &self,
6311            arg_req: &crate::types::AddVerticesRequest,
6312        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError>> {
6313            let rpc_options = T::RpcOptions::default();
6314            self._addVertices_impl(
6315                arg_req,
6316                rpc_options,
6317            )
6318        }
6319        fn addEdges(
6320            &self,
6321            arg_req: &crate::types::AddEdgesRequest,
6322        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError>> {
6323            let rpc_options = T::RpcOptions::default();
6324            self._addEdges_impl(
6325                arg_req,
6326                rpc_options,
6327            )
6328        }
6329        fn deleteEdges(
6330            &self,
6331            arg_req: &crate::types::DeleteEdgesRequest,
6332        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError>> {
6333            let rpc_options = T::RpcOptions::default();
6334            self._deleteEdges_impl(
6335                arg_req,
6336                rpc_options,
6337            )
6338        }
6339        fn deleteVertices(
6340            &self,
6341            arg_req: &crate::types::DeleteVerticesRequest,
6342        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError>> {
6343            let rpc_options = T::RpcOptions::default();
6344            self._deleteVertices_impl(
6345                arg_req,
6346                rpc_options,
6347            )
6348        }
6349        fn deleteTags(
6350            &self,
6351            arg_req: &crate::types::DeleteTagsRequest,
6352        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError>> {
6353            let rpc_options = T::RpcOptions::default();
6354            self._deleteTags_impl(
6355                arg_req,
6356                rpc_options,
6357            )
6358        }
6359        fn updateVertex(
6360            &self,
6361            arg_req: &crate::types::UpdateVertexRequest,
6362        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError>> {
6363            let rpc_options = T::RpcOptions::default();
6364            self._updateVertex_impl(
6365                arg_req,
6366                rpc_options,
6367            )
6368        }
6369        fn updateEdge(
6370            &self,
6371            arg_req: &crate::types::UpdateEdgeRequest,
6372        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError>> {
6373            let rpc_options = T::RpcOptions::default();
6374            self._updateEdge_impl(
6375                arg_req,
6376                rpc_options,
6377            )
6378        }
6379        fn scanVertex(
6380            &self,
6381            arg_req: &crate::types::ScanVertexRequest,
6382        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError>> {
6383            let rpc_options = T::RpcOptions::default();
6384            self._scanVertex_impl(
6385                arg_req,
6386                rpc_options,
6387            )
6388        }
6389        fn scanEdge(
6390            &self,
6391            arg_req: &crate::types::ScanEdgeRequest,
6392        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError>> {
6393            let rpc_options = T::RpcOptions::default();
6394            self._scanEdge_impl(
6395                arg_req,
6396                rpc_options,
6397            )
6398        }
6399        fn getUUID(
6400            &self,
6401            arg_req: &crate::types::GetUUIDReq,
6402        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError>> {
6403            let rpc_options = T::RpcOptions::default();
6404            self._getUUID_impl(
6405                arg_req,
6406                rpc_options,
6407            )
6408        }
6409        fn lookupIndex(
6410            &self,
6411            arg_req: &crate::types::LookupIndexRequest,
6412        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError>> {
6413            let rpc_options = T::RpcOptions::default();
6414            self._lookupIndex_impl(
6415                arg_req,
6416                rpc_options,
6417            )
6418        }
6419        fn lookupAndTraverse(
6420            &self,
6421            arg_req: &crate::types::LookupAndTraverseRequest,
6422        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError>> {
6423            let rpc_options = T::RpcOptions::default();
6424            self._lookupAndTraverse_impl(
6425                arg_req,
6426                rpc_options,
6427            )
6428        }
6429        fn chainUpdateEdge(
6430            &self,
6431            arg_req: &crate::types::UpdateEdgeRequest,
6432        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError>> {
6433            let rpc_options = T::RpcOptions::default();
6434            self._chainUpdateEdge_impl(
6435                arg_req,
6436                rpc_options,
6437            )
6438        }
6439        fn chainAddEdges(
6440            &self,
6441            arg_req: &crate::types::AddEdgesRequest,
6442        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError>> {
6443            let rpc_options = T::RpcOptions::default();
6444            self._chainAddEdges_impl(
6445                arg_req,
6446                rpc_options,
6447            )
6448        }
6449    }
6450
6451    impl<P, T, S> GraphStorageServiceExt<T> for GraphStorageServiceImpl<P, T, S>
6452    where
6453        P: ::fbthrift::Protocol,
6454        T: ::fbthrift::Transport,
6455        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
6456        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
6457        P::Deserializer: ::std::marker::Send,
6458        S: ::fbthrift::help::Spawner,
6459    {
6460        fn getNeighbors_with_rpc_opts(
6461            &self,
6462            arg_req: &crate::types::GetNeighborsRequest,
6463            rpc_options: T::RpcOptions,
6464        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError>> {
6465            self._getNeighbors_impl(
6466                arg_req,
6467                rpc_options,
6468            )
6469        }
6470        fn getProps_with_rpc_opts(
6471            &self,
6472            arg_req: &crate::types::GetPropRequest,
6473            rpc_options: T::RpcOptions,
6474        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError>> {
6475            self._getProps_impl(
6476                arg_req,
6477                rpc_options,
6478            )
6479        }
6480        fn addVertices_with_rpc_opts(
6481            &self,
6482            arg_req: &crate::types::AddVerticesRequest,
6483            rpc_options: T::RpcOptions,
6484        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError>> {
6485            self._addVertices_impl(
6486                arg_req,
6487                rpc_options,
6488            )
6489        }
6490        fn addEdges_with_rpc_opts(
6491            &self,
6492            arg_req: &crate::types::AddEdgesRequest,
6493            rpc_options: T::RpcOptions,
6494        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError>> {
6495            self._addEdges_impl(
6496                arg_req,
6497                rpc_options,
6498            )
6499        }
6500        fn deleteEdges_with_rpc_opts(
6501            &self,
6502            arg_req: &crate::types::DeleteEdgesRequest,
6503            rpc_options: T::RpcOptions,
6504        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError>> {
6505            self._deleteEdges_impl(
6506                arg_req,
6507                rpc_options,
6508            )
6509        }
6510        fn deleteVertices_with_rpc_opts(
6511            &self,
6512            arg_req: &crate::types::DeleteVerticesRequest,
6513            rpc_options: T::RpcOptions,
6514        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError>> {
6515            self._deleteVertices_impl(
6516                arg_req,
6517                rpc_options,
6518            )
6519        }
6520        fn deleteTags_with_rpc_opts(
6521            &self,
6522            arg_req: &crate::types::DeleteTagsRequest,
6523            rpc_options: T::RpcOptions,
6524        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError>> {
6525            self._deleteTags_impl(
6526                arg_req,
6527                rpc_options,
6528            )
6529        }
6530        fn updateVertex_with_rpc_opts(
6531            &self,
6532            arg_req: &crate::types::UpdateVertexRequest,
6533            rpc_options: T::RpcOptions,
6534        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError>> {
6535            self._updateVertex_impl(
6536                arg_req,
6537                rpc_options,
6538            )
6539        }
6540        fn updateEdge_with_rpc_opts(
6541            &self,
6542            arg_req: &crate::types::UpdateEdgeRequest,
6543            rpc_options: T::RpcOptions,
6544        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError>> {
6545            self._updateEdge_impl(
6546                arg_req,
6547                rpc_options,
6548            )
6549        }
6550        fn scanVertex_with_rpc_opts(
6551            &self,
6552            arg_req: &crate::types::ScanVertexRequest,
6553            rpc_options: T::RpcOptions,
6554        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError>> {
6555            self._scanVertex_impl(
6556                arg_req,
6557                rpc_options,
6558            )
6559        }
6560        fn scanEdge_with_rpc_opts(
6561            &self,
6562            arg_req: &crate::types::ScanEdgeRequest,
6563            rpc_options: T::RpcOptions,
6564        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError>> {
6565            self._scanEdge_impl(
6566                arg_req,
6567                rpc_options,
6568            )
6569        }
6570        fn getUUID_with_rpc_opts(
6571            &self,
6572            arg_req: &crate::types::GetUUIDReq,
6573            rpc_options: T::RpcOptions,
6574        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError>> {
6575            self._getUUID_impl(
6576                arg_req,
6577                rpc_options,
6578            )
6579        }
6580        fn lookupIndex_with_rpc_opts(
6581            &self,
6582            arg_req: &crate::types::LookupIndexRequest,
6583            rpc_options: T::RpcOptions,
6584        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError>> {
6585            self._lookupIndex_impl(
6586                arg_req,
6587                rpc_options,
6588            )
6589        }
6590        fn lookupAndTraverse_with_rpc_opts(
6591            &self,
6592            arg_req: &crate::types::LookupAndTraverseRequest,
6593            rpc_options: T::RpcOptions,
6594        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError>> {
6595            self._lookupAndTraverse_impl(
6596                arg_req,
6597                rpc_options,
6598            )
6599        }
6600        fn chainUpdateEdge_with_rpc_opts(
6601            &self,
6602            arg_req: &crate::types::UpdateEdgeRequest,
6603            rpc_options: T::RpcOptions,
6604        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError>> {
6605            self._chainUpdateEdge_impl(
6606                arg_req,
6607                rpc_options,
6608            )
6609        }
6610        fn chainAddEdges_with_rpc_opts(
6611            &self,
6612            arg_req: &crate::types::AddEdgesRequest,
6613            rpc_options: T::RpcOptions,
6614        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError>> {
6615            self._chainAddEdges_impl(
6616                arg_req,
6617                rpc_options,
6618            )
6619        }
6620    }
6621
6622    impl<'a, S> GraphStorageService for S
6623    where
6624        S: ::std::convert::AsRef<dyn GraphStorageService + 'a>,
6625        S: ::std::marker::Send,
6626    {
6627        fn getNeighbors(
6628            &self,
6629            arg_req: &crate::types::GetNeighborsRequest,
6630        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError>> {
6631            self.as_ref().getNeighbors(
6632                arg_req,
6633            )
6634        }
6635        fn getProps(
6636            &self,
6637            arg_req: &crate::types::GetPropRequest,
6638        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError>> {
6639            self.as_ref().getProps(
6640                arg_req,
6641            )
6642        }
6643        fn addVertices(
6644            &self,
6645            arg_req: &crate::types::AddVerticesRequest,
6646        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError>> {
6647            self.as_ref().addVertices(
6648                arg_req,
6649            )
6650        }
6651        fn addEdges(
6652            &self,
6653            arg_req: &crate::types::AddEdgesRequest,
6654        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError>> {
6655            self.as_ref().addEdges(
6656                arg_req,
6657            )
6658        }
6659        fn deleteEdges(
6660            &self,
6661            arg_req: &crate::types::DeleteEdgesRequest,
6662        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError>> {
6663            self.as_ref().deleteEdges(
6664                arg_req,
6665            )
6666        }
6667        fn deleteVertices(
6668            &self,
6669            arg_req: &crate::types::DeleteVerticesRequest,
6670        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError>> {
6671            self.as_ref().deleteVertices(
6672                arg_req,
6673            )
6674        }
6675        fn deleteTags(
6676            &self,
6677            arg_req: &crate::types::DeleteTagsRequest,
6678        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError>> {
6679            self.as_ref().deleteTags(
6680                arg_req,
6681            )
6682        }
6683        fn updateVertex(
6684            &self,
6685            arg_req: &crate::types::UpdateVertexRequest,
6686        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError>> {
6687            self.as_ref().updateVertex(
6688                arg_req,
6689            )
6690        }
6691        fn updateEdge(
6692            &self,
6693            arg_req: &crate::types::UpdateEdgeRequest,
6694        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError>> {
6695            self.as_ref().updateEdge(
6696                arg_req,
6697            )
6698        }
6699        fn scanVertex(
6700            &self,
6701            arg_req: &crate::types::ScanVertexRequest,
6702        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError>> {
6703            self.as_ref().scanVertex(
6704                arg_req,
6705            )
6706        }
6707        fn scanEdge(
6708            &self,
6709            arg_req: &crate::types::ScanEdgeRequest,
6710        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError>> {
6711            self.as_ref().scanEdge(
6712                arg_req,
6713            )
6714        }
6715        fn getUUID(
6716            &self,
6717            arg_req: &crate::types::GetUUIDReq,
6718        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError>> {
6719            self.as_ref().getUUID(
6720                arg_req,
6721            )
6722        }
6723        fn lookupIndex(
6724            &self,
6725            arg_req: &crate::types::LookupIndexRequest,
6726        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError>> {
6727            self.as_ref().lookupIndex(
6728                arg_req,
6729            )
6730        }
6731        fn lookupAndTraverse(
6732            &self,
6733            arg_req: &crate::types::LookupAndTraverseRequest,
6734        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError>> {
6735            self.as_ref().lookupAndTraverse(
6736                arg_req,
6737            )
6738        }
6739        fn chainUpdateEdge(
6740            &self,
6741            arg_req: &crate::types::UpdateEdgeRequest,
6742        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError>> {
6743            self.as_ref().chainUpdateEdge(
6744                arg_req,
6745            )
6746        }
6747        fn chainAddEdges(
6748            &self,
6749            arg_req: &crate::types::AddEdgesRequest,
6750        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError>> {
6751            self.as_ref().chainAddEdges(
6752                arg_req,
6753            )
6754        }
6755    }
6756
6757    impl<'a, S, T> GraphStorageServiceExt<T> for S
6758    where
6759        S: ::std::convert::AsRef<dyn GraphStorageService + 'a>,
6760        S: ::std::convert::AsRef<dyn GraphStorageServiceExt<T> + 'a>,
6761        S: ::std::marker::Send,
6762        T: ::fbthrift::Transport,
6763    {
6764        fn getNeighbors_with_rpc_opts(
6765            &self,
6766            arg_req: &crate::types::GetNeighborsRequest,
6767            rpc_options: T::RpcOptions,
6768        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError>> {
6769            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).getNeighbors_with_rpc_opts(
6770                arg_req,
6771                rpc_options,
6772            )
6773        }
6774        fn getProps_with_rpc_opts(
6775            &self,
6776            arg_req: &crate::types::GetPropRequest,
6777            rpc_options: T::RpcOptions,
6778        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError>> {
6779            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).getProps_with_rpc_opts(
6780                arg_req,
6781                rpc_options,
6782            )
6783        }
6784        fn addVertices_with_rpc_opts(
6785            &self,
6786            arg_req: &crate::types::AddVerticesRequest,
6787            rpc_options: T::RpcOptions,
6788        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError>> {
6789            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).addVertices_with_rpc_opts(
6790                arg_req,
6791                rpc_options,
6792            )
6793        }
6794        fn addEdges_with_rpc_opts(
6795            &self,
6796            arg_req: &crate::types::AddEdgesRequest,
6797            rpc_options: T::RpcOptions,
6798        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError>> {
6799            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).addEdges_with_rpc_opts(
6800                arg_req,
6801                rpc_options,
6802            )
6803        }
6804        fn deleteEdges_with_rpc_opts(
6805            &self,
6806            arg_req: &crate::types::DeleteEdgesRequest,
6807            rpc_options: T::RpcOptions,
6808        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError>> {
6809            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).deleteEdges_with_rpc_opts(
6810                arg_req,
6811                rpc_options,
6812            )
6813        }
6814        fn deleteVertices_with_rpc_opts(
6815            &self,
6816            arg_req: &crate::types::DeleteVerticesRequest,
6817            rpc_options: T::RpcOptions,
6818        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError>> {
6819            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).deleteVertices_with_rpc_opts(
6820                arg_req,
6821                rpc_options,
6822            )
6823        }
6824        fn deleteTags_with_rpc_opts(
6825            &self,
6826            arg_req: &crate::types::DeleteTagsRequest,
6827            rpc_options: T::RpcOptions,
6828        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError>> {
6829            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).deleteTags_with_rpc_opts(
6830                arg_req,
6831                rpc_options,
6832            )
6833        }
6834        fn updateVertex_with_rpc_opts(
6835            &self,
6836            arg_req: &crate::types::UpdateVertexRequest,
6837            rpc_options: T::RpcOptions,
6838        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError>> {
6839            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).updateVertex_with_rpc_opts(
6840                arg_req,
6841                rpc_options,
6842            )
6843        }
6844        fn updateEdge_with_rpc_opts(
6845            &self,
6846            arg_req: &crate::types::UpdateEdgeRequest,
6847            rpc_options: T::RpcOptions,
6848        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError>> {
6849            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).updateEdge_with_rpc_opts(
6850                arg_req,
6851                rpc_options,
6852            )
6853        }
6854        fn scanVertex_with_rpc_opts(
6855            &self,
6856            arg_req: &crate::types::ScanVertexRequest,
6857            rpc_options: T::RpcOptions,
6858        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError>> {
6859            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).scanVertex_with_rpc_opts(
6860                arg_req,
6861                rpc_options,
6862            )
6863        }
6864        fn scanEdge_with_rpc_opts(
6865            &self,
6866            arg_req: &crate::types::ScanEdgeRequest,
6867            rpc_options: T::RpcOptions,
6868        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError>> {
6869            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).scanEdge_with_rpc_opts(
6870                arg_req,
6871                rpc_options,
6872            )
6873        }
6874        fn getUUID_with_rpc_opts(
6875            &self,
6876            arg_req: &crate::types::GetUUIDReq,
6877            rpc_options: T::RpcOptions,
6878        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError>> {
6879            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).getUUID_with_rpc_opts(
6880                arg_req,
6881                rpc_options,
6882            )
6883        }
6884        fn lookupIndex_with_rpc_opts(
6885            &self,
6886            arg_req: &crate::types::LookupIndexRequest,
6887            rpc_options: T::RpcOptions,
6888        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError>> {
6889            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).lookupIndex_with_rpc_opts(
6890                arg_req,
6891                rpc_options,
6892            )
6893        }
6894        fn lookupAndTraverse_with_rpc_opts(
6895            &self,
6896            arg_req: &crate::types::LookupAndTraverseRequest,
6897            rpc_options: T::RpcOptions,
6898        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError>> {
6899            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).lookupAndTraverse_with_rpc_opts(
6900                arg_req,
6901                rpc_options,
6902            )
6903        }
6904        fn chainUpdateEdge_with_rpc_opts(
6905            &self,
6906            arg_req: &crate::types::UpdateEdgeRequest,
6907            rpc_options: T::RpcOptions,
6908        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError>> {
6909            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).chainUpdateEdge_with_rpc_opts(
6910                arg_req,
6911                rpc_options,
6912            )
6913        }
6914        fn chainAddEdges_with_rpc_opts(
6915            &self,
6916            arg_req: &crate::types::AddEdgesRequest,
6917            rpc_options: T::RpcOptions,
6918        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError>> {
6919            <Self as ::std::convert::AsRef<dyn GraphStorageServiceExt<T>>>::as_ref(self).chainAddEdges_with_rpc_opts(
6920                arg_req,
6921                rpc_options,
6922            )
6923        }
6924    }
6925
6926    #[derive(Clone)]
6927    pub struct make_GraphStorageService;
6928
6929    /// To be called by user directly setting up a client. Avoids
6930    /// needing ClientFactory trait in scope, avoids unidiomatic
6931    /// make_Trait name.
6932    ///
6933    /// ```
6934    /// # const _: &str = stringify! {
6935    /// use bgs::client::BuckGraphService;
6936    ///
6937    /// let protocol = BinaryProtocol::new();
6938    /// let transport = HttpClient::new();
6939    /// let client = <dyn BuckGraphService>::new(protocol, transport);
6940    /// # };
6941    /// ```
6942    impl dyn GraphStorageService {
6943        pub fn new<P, T>(
6944            protocol: P,
6945            transport: T,
6946        ) -> ::std::sync::Arc<impl GraphStorageService + ::std::marker::Send + ::std::marker::Sync + 'static>
6947        where
6948            P: ::fbthrift::Protocol<Frame = T>,
6949            T: ::fbthrift::Transport,
6950            P::Deserializer: ::std::marker::Send,
6951        {
6952            let spawner = ::fbthrift::help::NoopSpawner;
6953            Self::with_spawner(protocol, transport, spawner)
6954        }
6955
6956        pub fn with_spawner<P, T, S>(
6957            protocol: P,
6958            transport: T,
6959            spawner: S,
6960        ) -> ::std::sync::Arc<impl GraphStorageService + ::std::marker::Send + ::std::marker::Sync + 'static>
6961        where
6962            P: ::fbthrift::Protocol<Frame = T>,
6963            T: ::fbthrift::Transport,
6964            P::Deserializer: ::std::marker::Send,
6965            S: ::fbthrift::help::Spawner,
6966        {
6967            let _ = protocol;
6968            let _ = spawner;
6969            ::std::sync::Arc::new(GraphStorageServiceImpl::<P, T, S>::new(transport))
6970        }
6971    }
6972
6973    impl<T> dyn GraphStorageServiceExt<T>
6974    where
6975        T: ::fbthrift::Transport,
6976    {
6977        pub fn new<P>(
6978            protocol: P,
6979            transport: T,
6980        ) -> ::std::sync::Arc<impl GraphStorageServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
6981        where
6982            P: ::fbthrift::Protocol<Frame = T>,
6983            P::Deserializer: ::std::marker::Send,
6984        {
6985            let spawner = ::fbthrift::help::NoopSpawner;
6986            Self::with_spawner(protocol, transport, spawner)
6987        }
6988
6989        pub fn with_spawner<P, S>(
6990            protocol: P,
6991            transport: T,
6992            spawner: S,
6993        ) -> ::std::sync::Arc<impl GraphStorageServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
6994        where
6995            P: ::fbthrift::Protocol<Frame = T>,
6996            P::Deserializer: ::std::marker::Send,
6997            S: ::fbthrift::help::Spawner,
6998        {
6999            let _ = protocol;
7000            let _ = spawner;
7001            ::std::sync::Arc::new(GraphStorageServiceImpl::<P, T, S>::new(transport))
7002        }
7003    }
7004
7005    pub type GraphStorageServiceDynClient = <make_GraphStorageService as ::fbthrift::ClientFactory>::Api;
7006    pub type GraphStorageServiceClient = ::std::sync::Arc<GraphStorageServiceDynClient>;
7007
7008    /// The same thing, but to be called from generic contexts where we are
7009    /// working with a type parameter `C: ClientFactory` to produce clients.
7010    impl ::fbthrift::ClientFactory for make_GraphStorageService {
7011        type Api = dyn GraphStorageService + ::std::marker::Send + ::std::marker::Sync + 'static;
7012
7013        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
7014        where
7015            P: ::fbthrift::Protocol<Frame = T>,
7016            T: ::fbthrift::Transport,
7017            P::Deserializer: ::std::marker::Send,
7018            S: ::fbthrift::help::Spawner,
7019        {
7020            <dyn GraphStorageService>::with_spawner(protocol, transport, spawner)
7021        }
7022    }
7023
7024
7025    pub struct StorageAdminServiceImpl<P, T, S = ::fbthrift::NoopSpawner> {
7026        transport: T,
7027        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
7028    }
7029
7030    impl<P, T, S> StorageAdminServiceImpl<P, T, S>
7031    where
7032        P: ::fbthrift::Protocol,
7033        T: ::fbthrift::Transport,
7034        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
7035        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
7036        P::Deserializer: ::std::marker::Send,
7037        S: ::fbthrift::help::Spawner,
7038    {
7039        pub fn new(
7040            transport: T,
7041        ) -> Self {
7042            Self {
7043                transport,
7044                _phantom: ::std::marker::PhantomData,
7045            }
7046        }
7047
7048        pub fn transport(&self) -> &T {
7049            &self.transport
7050        }
7051
7052
7053        fn _transLeader_impl(
7054            &self,
7055            arg_req: &crate::types::TransLeaderReq,
7056            rpc_options: T::RpcOptions,
7057        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError>> {
7058            use ::const_cstr::const_cstr;
7059            use ::tracing::Instrument as _;
7060            use ::futures::FutureExt as _;
7061
7062            const_cstr! {
7063                SERVICE_NAME = "StorageAdminService";
7064                METHOD_NAME = "StorageAdminService.transLeader";
7065            }
7066            let args = self::Args_StorageAdminService_transLeader {
7067                req: arg_req,
7068                _phantom: ::std::marker::PhantomData,
7069            };
7070
7071            let transport = self.transport();
7072
7073            // need to do call setup outside of async block because T: Transport isn't Send
7074            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("transLeader", &args) {
7075                ::std::result::Result::Ok(res) => res,
7076                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7077            };
7078
7079            let call = transport
7080                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7081                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.transLeader"));
7082
7083            async move {
7084                let reply_env = call.await?;
7085
7086                let de = P::deserializer(reply_env);
7087                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::TransLeaderExn, _>, _) =
7088                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7089
7090                let res = match res {
7091                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7092                    ::std::result::Result::Err(aexn) =>
7093                        ::std::result::Result::Err(crate::errors::storage_admin_service::TransLeaderError::ApplicationException(aexn))
7094                };
7095                res
7096            }
7097            .instrument(::tracing::info_span!("StorageAdminService.transLeader"))
7098            .boxed()
7099        }
7100
7101        fn _addPart_impl(
7102            &self,
7103            arg_req: &crate::types::AddPartReq,
7104            rpc_options: T::RpcOptions,
7105        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError>> {
7106            use ::const_cstr::const_cstr;
7107            use ::tracing::Instrument as _;
7108            use ::futures::FutureExt as _;
7109
7110            const_cstr! {
7111                SERVICE_NAME = "StorageAdminService";
7112                METHOD_NAME = "StorageAdminService.addPart";
7113            }
7114            let args = self::Args_StorageAdminService_addPart {
7115                req: arg_req,
7116                _phantom: ::std::marker::PhantomData,
7117            };
7118
7119            let transport = self.transport();
7120
7121            // need to do call setup outside of async block because T: Transport isn't Send
7122            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addPart", &args) {
7123                ::std::result::Result::Ok(res) => res,
7124                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7125            };
7126
7127            let call = transport
7128                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7129                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.addPart"));
7130
7131            async move {
7132                let reply_env = call.await?;
7133
7134                let de = P::deserializer(reply_env);
7135                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::AddPartExn, _>, _) =
7136                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7137
7138                let res = match res {
7139                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7140                    ::std::result::Result::Err(aexn) =>
7141                        ::std::result::Result::Err(crate::errors::storage_admin_service::AddPartError::ApplicationException(aexn))
7142                };
7143                res
7144            }
7145            .instrument(::tracing::info_span!("StorageAdminService.addPart"))
7146            .boxed()
7147        }
7148
7149        fn _addLearner_impl(
7150            &self,
7151            arg_req: &crate::types::AddLearnerReq,
7152            rpc_options: T::RpcOptions,
7153        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError>> {
7154            use ::const_cstr::const_cstr;
7155            use ::tracing::Instrument as _;
7156            use ::futures::FutureExt as _;
7157
7158            const_cstr! {
7159                SERVICE_NAME = "StorageAdminService";
7160                METHOD_NAME = "StorageAdminService.addLearner";
7161            }
7162            let args = self::Args_StorageAdminService_addLearner {
7163                req: arg_req,
7164                _phantom: ::std::marker::PhantomData,
7165            };
7166
7167            let transport = self.transport();
7168
7169            // need to do call setup outside of async block because T: Transport isn't Send
7170            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addLearner", &args) {
7171                ::std::result::Result::Ok(res) => res,
7172                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7173            };
7174
7175            let call = transport
7176                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7177                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.addLearner"));
7178
7179            async move {
7180                let reply_env = call.await?;
7181
7182                let de = P::deserializer(reply_env);
7183                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::AddLearnerExn, _>, _) =
7184                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7185
7186                let res = match res {
7187                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7188                    ::std::result::Result::Err(aexn) =>
7189                        ::std::result::Result::Err(crate::errors::storage_admin_service::AddLearnerError::ApplicationException(aexn))
7190                };
7191                res
7192            }
7193            .instrument(::tracing::info_span!("StorageAdminService.addLearner"))
7194            .boxed()
7195        }
7196
7197        fn _removePart_impl(
7198            &self,
7199            arg_req: &crate::types::RemovePartReq,
7200            rpc_options: T::RpcOptions,
7201        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError>> {
7202            use ::const_cstr::const_cstr;
7203            use ::tracing::Instrument as _;
7204            use ::futures::FutureExt as _;
7205
7206            const_cstr! {
7207                SERVICE_NAME = "StorageAdminService";
7208                METHOD_NAME = "StorageAdminService.removePart";
7209            }
7210            let args = self::Args_StorageAdminService_removePart {
7211                req: arg_req,
7212                _phantom: ::std::marker::PhantomData,
7213            };
7214
7215            let transport = self.transport();
7216
7217            // need to do call setup outside of async block because T: Transport isn't Send
7218            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("removePart", &args) {
7219                ::std::result::Result::Ok(res) => res,
7220                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7221            };
7222
7223            let call = transport
7224                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7225                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.removePart"));
7226
7227            async move {
7228                let reply_env = call.await?;
7229
7230                let de = P::deserializer(reply_env);
7231                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::RemovePartExn, _>, _) =
7232                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7233
7234                let res = match res {
7235                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7236                    ::std::result::Result::Err(aexn) =>
7237                        ::std::result::Result::Err(crate::errors::storage_admin_service::RemovePartError::ApplicationException(aexn))
7238                };
7239                res
7240            }
7241            .instrument(::tracing::info_span!("StorageAdminService.removePart"))
7242            .boxed()
7243        }
7244
7245        fn _memberChange_impl(
7246            &self,
7247            arg_req: &crate::types::MemberChangeReq,
7248            rpc_options: T::RpcOptions,
7249        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError>> {
7250            use ::const_cstr::const_cstr;
7251            use ::tracing::Instrument as _;
7252            use ::futures::FutureExt as _;
7253
7254            const_cstr! {
7255                SERVICE_NAME = "StorageAdminService";
7256                METHOD_NAME = "StorageAdminService.memberChange";
7257            }
7258            let args = self::Args_StorageAdminService_memberChange {
7259                req: arg_req,
7260                _phantom: ::std::marker::PhantomData,
7261            };
7262
7263            let transport = self.transport();
7264
7265            // need to do call setup outside of async block because T: Transport isn't Send
7266            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("memberChange", &args) {
7267                ::std::result::Result::Ok(res) => res,
7268                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7269            };
7270
7271            let call = transport
7272                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7273                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.memberChange"));
7274
7275            async move {
7276                let reply_env = call.await?;
7277
7278                let de = P::deserializer(reply_env);
7279                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::MemberChangeExn, _>, _) =
7280                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7281
7282                let res = match res {
7283                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7284                    ::std::result::Result::Err(aexn) =>
7285                        ::std::result::Result::Err(crate::errors::storage_admin_service::MemberChangeError::ApplicationException(aexn))
7286                };
7287                res
7288            }
7289            .instrument(::tracing::info_span!("StorageAdminService.memberChange"))
7290            .boxed()
7291        }
7292
7293        fn _waitingForCatchUpData_impl(
7294            &self,
7295            arg_req: &crate::types::CatchUpDataReq,
7296            rpc_options: T::RpcOptions,
7297        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError>> {
7298            use ::const_cstr::const_cstr;
7299            use ::tracing::Instrument as _;
7300            use ::futures::FutureExt as _;
7301
7302            const_cstr! {
7303                SERVICE_NAME = "StorageAdminService";
7304                METHOD_NAME = "StorageAdminService.waitingForCatchUpData";
7305            }
7306            let args = self::Args_StorageAdminService_waitingForCatchUpData {
7307                req: arg_req,
7308                _phantom: ::std::marker::PhantomData,
7309            };
7310
7311            let transport = self.transport();
7312
7313            // need to do call setup outside of async block because T: Transport isn't Send
7314            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("waitingForCatchUpData", &args) {
7315                ::std::result::Result::Ok(res) => res,
7316                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7317            };
7318
7319            let call = transport
7320                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7321                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.waitingForCatchUpData"));
7322
7323            async move {
7324                let reply_env = call.await?;
7325
7326                let de = P::deserializer(reply_env);
7327                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::WaitingForCatchUpDataExn, _>, _) =
7328                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7329
7330                let res = match res {
7331                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7332                    ::std::result::Result::Err(aexn) =>
7333                        ::std::result::Result::Err(crate::errors::storage_admin_service::WaitingForCatchUpDataError::ApplicationException(aexn))
7334                };
7335                res
7336            }
7337            .instrument(::tracing::info_span!("StorageAdminService.waitingForCatchUpData"))
7338            .boxed()
7339        }
7340
7341        fn _createCheckpoint_impl(
7342            &self,
7343            arg_req: &crate::types::CreateCPRequest,
7344            rpc_options: T::RpcOptions,
7345        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError>> {
7346            use ::const_cstr::const_cstr;
7347            use ::tracing::Instrument as _;
7348            use ::futures::FutureExt as _;
7349
7350            const_cstr! {
7351                SERVICE_NAME = "StorageAdminService";
7352                METHOD_NAME = "StorageAdminService.createCheckpoint";
7353            }
7354            let args = self::Args_StorageAdminService_createCheckpoint {
7355                req: arg_req,
7356                _phantom: ::std::marker::PhantomData,
7357            };
7358
7359            let transport = self.transport();
7360
7361            // need to do call setup outside of async block because T: Transport isn't Send
7362            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("createCheckpoint", &args) {
7363                ::std::result::Result::Ok(res) => res,
7364                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7365            };
7366
7367            let call = transport
7368                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7369                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.createCheckpoint"));
7370
7371            async move {
7372                let reply_env = call.await?;
7373
7374                let de = P::deserializer(reply_env);
7375                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::CreateCheckpointExn, _>, _) =
7376                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7377
7378                let res = match res {
7379                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7380                    ::std::result::Result::Err(aexn) =>
7381                        ::std::result::Result::Err(crate::errors::storage_admin_service::CreateCheckpointError::ApplicationException(aexn))
7382                };
7383                res
7384            }
7385            .instrument(::tracing::info_span!("StorageAdminService.createCheckpoint"))
7386            .boxed()
7387        }
7388
7389        fn _dropCheckpoint_impl(
7390            &self,
7391            arg_req: &crate::types::DropCPRequest,
7392            rpc_options: T::RpcOptions,
7393        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError>> {
7394            use ::const_cstr::const_cstr;
7395            use ::tracing::Instrument as _;
7396            use ::futures::FutureExt as _;
7397
7398            const_cstr! {
7399                SERVICE_NAME = "StorageAdminService";
7400                METHOD_NAME = "StorageAdminService.dropCheckpoint";
7401            }
7402            let args = self::Args_StorageAdminService_dropCheckpoint {
7403                req: arg_req,
7404                _phantom: ::std::marker::PhantomData,
7405            };
7406
7407            let transport = self.transport();
7408
7409            // need to do call setup outside of async block because T: Transport isn't Send
7410            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("dropCheckpoint", &args) {
7411                ::std::result::Result::Ok(res) => res,
7412                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7413            };
7414
7415            let call = transport
7416                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7417                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.dropCheckpoint"));
7418
7419            async move {
7420                let reply_env = call.await?;
7421
7422                let de = P::deserializer(reply_env);
7423                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::DropCheckpointExn, _>, _) =
7424                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7425
7426                let res = match res {
7427                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7428                    ::std::result::Result::Err(aexn) =>
7429                        ::std::result::Result::Err(crate::errors::storage_admin_service::DropCheckpointError::ApplicationException(aexn))
7430                };
7431                res
7432            }
7433            .instrument(::tracing::info_span!("StorageAdminService.dropCheckpoint"))
7434            .boxed()
7435        }
7436
7437        fn _blockingWrites_impl(
7438            &self,
7439            arg_req: &crate::types::BlockingSignRequest,
7440            rpc_options: T::RpcOptions,
7441        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError>> {
7442            use ::const_cstr::const_cstr;
7443            use ::tracing::Instrument as _;
7444            use ::futures::FutureExt as _;
7445
7446            const_cstr! {
7447                SERVICE_NAME = "StorageAdminService";
7448                METHOD_NAME = "StorageAdminService.blockingWrites";
7449            }
7450            let args = self::Args_StorageAdminService_blockingWrites {
7451                req: arg_req,
7452                _phantom: ::std::marker::PhantomData,
7453            };
7454
7455            let transport = self.transport();
7456
7457            // need to do call setup outside of async block because T: Transport isn't Send
7458            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("blockingWrites", &args) {
7459                ::std::result::Result::Ok(res) => res,
7460                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7461            };
7462
7463            let call = transport
7464                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7465                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.blockingWrites"));
7466
7467            async move {
7468                let reply_env = call.await?;
7469
7470                let de = P::deserializer(reply_env);
7471                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::BlockingWritesExn, _>, _) =
7472                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7473
7474                let res = match res {
7475                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7476                    ::std::result::Result::Err(aexn) =>
7477                        ::std::result::Result::Err(crate::errors::storage_admin_service::BlockingWritesError::ApplicationException(aexn))
7478                };
7479                res
7480            }
7481            .instrument(::tracing::info_span!("StorageAdminService.blockingWrites"))
7482            .boxed()
7483        }
7484
7485        fn _rebuildTagIndex_impl(
7486            &self,
7487            arg_req: &crate::types::RebuildIndexRequest,
7488            rpc_options: T::RpcOptions,
7489        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError>> {
7490            use ::const_cstr::const_cstr;
7491            use ::tracing::Instrument as _;
7492            use ::futures::FutureExt as _;
7493
7494            const_cstr! {
7495                SERVICE_NAME = "StorageAdminService";
7496                METHOD_NAME = "StorageAdminService.rebuildTagIndex";
7497            }
7498            let args = self::Args_StorageAdminService_rebuildTagIndex {
7499                req: arg_req,
7500                _phantom: ::std::marker::PhantomData,
7501            };
7502
7503            let transport = self.transport();
7504
7505            // need to do call setup outside of async block because T: Transport isn't Send
7506            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("rebuildTagIndex", &args) {
7507                ::std::result::Result::Ok(res) => res,
7508                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7509            };
7510
7511            let call = transport
7512                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7513                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.rebuildTagIndex"));
7514
7515            async move {
7516                let reply_env = call.await?;
7517
7518                let de = P::deserializer(reply_env);
7519                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::RebuildTagIndexExn, _>, _) =
7520                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7521
7522                let res = match res {
7523                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7524                    ::std::result::Result::Err(aexn) =>
7525                        ::std::result::Result::Err(crate::errors::storage_admin_service::RebuildTagIndexError::ApplicationException(aexn))
7526                };
7527                res
7528            }
7529            .instrument(::tracing::info_span!("StorageAdminService.rebuildTagIndex"))
7530            .boxed()
7531        }
7532
7533        fn _rebuildEdgeIndex_impl(
7534            &self,
7535            arg_req: &crate::types::RebuildIndexRequest,
7536            rpc_options: T::RpcOptions,
7537        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError>> {
7538            use ::const_cstr::const_cstr;
7539            use ::tracing::Instrument as _;
7540            use ::futures::FutureExt as _;
7541
7542            const_cstr! {
7543                SERVICE_NAME = "StorageAdminService";
7544                METHOD_NAME = "StorageAdminService.rebuildEdgeIndex";
7545            }
7546            let args = self::Args_StorageAdminService_rebuildEdgeIndex {
7547                req: arg_req,
7548                _phantom: ::std::marker::PhantomData,
7549            };
7550
7551            let transport = self.transport();
7552
7553            // need to do call setup outside of async block because T: Transport isn't Send
7554            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("rebuildEdgeIndex", &args) {
7555                ::std::result::Result::Ok(res) => res,
7556                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7557            };
7558
7559            let call = transport
7560                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7561                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.rebuildEdgeIndex"));
7562
7563            async move {
7564                let reply_env = call.await?;
7565
7566                let de = P::deserializer(reply_env);
7567                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::RebuildEdgeIndexExn, _>, _) =
7568                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7569
7570                let res = match res {
7571                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7572                    ::std::result::Result::Err(aexn) =>
7573                        ::std::result::Result::Err(crate::errors::storage_admin_service::RebuildEdgeIndexError::ApplicationException(aexn))
7574                };
7575                res
7576            }
7577            .instrument(::tracing::info_span!("StorageAdminService.rebuildEdgeIndex"))
7578            .boxed()
7579        }
7580
7581        fn _getLeaderParts_impl(
7582            &self,
7583            arg_req: &crate::types::GetLeaderReq,
7584            rpc_options: T::RpcOptions,
7585        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError>> {
7586            use ::const_cstr::const_cstr;
7587            use ::tracing::Instrument as _;
7588            use ::futures::FutureExt as _;
7589
7590            const_cstr! {
7591                SERVICE_NAME = "StorageAdminService";
7592                METHOD_NAME = "StorageAdminService.getLeaderParts";
7593            }
7594            let args = self::Args_StorageAdminService_getLeaderParts {
7595                req: arg_req,
7596                _phantom: ::std::marker::PhantomData,
7597            };
7598
7599            let transport = self.transport();
7600
7601            // need to do call setup outside of async block because T: Transport isn't Send
7602            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getLeaderParts", &args) {
7603                ::std::result::Result::Ok(res) => res,
7604                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7605            };
7606
7607            let call = transport
7608                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7609                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.getLeaderParts"));
7610
7611            async move {
7612                let reply_env = call.await?;
7613
7614                let de = P::deserializer(reply_env);
7615                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::GetLeaderPartsExn, _>, _) =
7616                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7617
7618                let res = match res {
7619                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7620                    ::std::result::Result::Err(aexn) =>
7621                        ::std::result::Result::Err(crate::errors::storage_admin_service::GetLeaderPartsError::ApplicationException(aexn))
7622                };
7623                res
7624            }
7625            .instrument(::tracing::info_span!("StorageAdminService.getLeaderParts"))
7626            .boxed()
7627        }
7628
7629        fn _checkPeers_impl(
7630            &self,
7631            arg_req: &crate::types::CheckPeersReq,
7632            rpc_options: T::RpcOptions,
7633        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError>> {
7634            use ::const_cstr::const_cstr;
7635            use ::tracing::Instrument as _;
7636            use ::futures::FutureExt as _;
7637
7638            const_cstr! {
7639                SERVICE_NAME = "StorageAdminService";
7640                METHOD_NAME = "StorageAdminService.checkPeers";
7641            }
7642            let args = self::Args_StorageAdminService_checkPeers {
7643                req: arg_req,
7644                _phantom: ::std::marker::PhantomData,
7645            };
7646
7647            let transport = self.transport();
7648
7649            // need to do call setup outside of async block because T: Transport isn't Send
7650            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("checkPeers", &args) {
7651                ::std::result::Result::Ok(res) => res,
7652                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7653            };
7654
7655            let call = transport
7656                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7657                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.checkPeers"));
7658
7659            async move {
7660                let reply_env = call.await?;
7661
7662                let de = P::deserializer(reply_env);
7663                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::CheckPeersExn, _>, _) =
7664                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7665
7666                let res = match res {
7667                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7668                    ::std::result::Result::Err(aexn) =>
7669                        ::std::result::Result::Err(crate::errors::storage_admin_service::CheckPeersError::ApplicationException(aexn))
7670                };
7671                res
7672            }
7673            .instrument(::tracing::info_span!("StorageAdminService.checkPeers"))
7674            .boxed()
7675        }
7676
7677        fn _addAdminTask_impl(
7678            &self,
7679            arg_req: &crate::types::AddAdminTaskRequest,
7680            rpc_options: T::RpcOptions,
7681        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError>> {
7682            use ::const_cstr::const_cstr;
7683            use ::tracing::Instrument as _;
7684            use ::futures::FutureExt as _;
7685
7686            const_cstr! {
7687                SERVICE_NAME = "StorageAdminService";
7688                METHOD_NAME = "StorageAdminService.addAdminTask";
7689            }
7690            let args = self::Args_StorageAdminService_addAdminTask {
7691                req: arg_req,
7692                _phantom: ::std::marker::PhantomData,
7693            };
7694
7695            let transport = self.transport();
7696
7697            // need to do call setup outside of async block because T: Transport isn't Send
7698            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addAdminTask", &args) {
7699                ::std::result::Result::Ok(res) => res,
7700                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7701            };
7702
7703            let call = transport
7704                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7705                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.addAdminTask"));
7706
7707            async move {
7708                let reply_env = call.await?;
7709
7710                let de = P::deserializer(reply_env);
7711                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::AddAdminTaskExn, _>, _) =
7712                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7713
7714                let res = match res {
7715                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7716                    ::std::result::Result::Err(aexn) =>
7717                        ::std::result::Result::Err(crate::errors::storage_admin_service::AddAdminTaskError::ApplicationException(aexn))
7718                };
7719                res
7720            }
7721            .instrument(::tracing::info_span!("StorageAdminService.addAdminTask"))
7722            .boxed()
7723        }
7724
7725        fn _stopAdminTask_impl(
7726            &self,
7727            arg_req: &crate::types::StopAdminTaskRequest,
7728            rpc_options: T::RpcOptions,
7729        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError>> {
7730            use ::const_cstr::const_cstr;
7731            use ::tracing::Instrument as _;
7732            use ::futures::FutureExt as _;
7733
7734            const_cstr! {
7735                SERVICE_NAME = "StorageAdminService";
7736                METHOD_NAME = "StorageAdminService.stopAdminTask";
7737            }
7738            let args = self::Args_StorageAdminService_stopAdminTask {
7739                req: arg_req,
7740                _phantom: ::std::marker::PhantomData,
7741            };
7742
7743            let transport = self.transport();
7744
7745            // need to do call setup outside of async block because T: Transport isn't Send
7746            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("stopAdminTask", &args) {
7747                ::std::result::Result::Ok(res) => res,
7748                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7749            };
7750
7751            let call = transport
7752                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7753                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.stopAdminTask"));
7754
7755            async move {
7756                let reply_env = call.await?;
7757
7758                let de = P::deserializer(reply_env);
7759                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::StopAdminTaskExn, _>, _) =
7760                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7761
7762                let res = match res {
7763                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7764                    ::std::result::Result::Err(aexn) =>
7765                        ::std::result::Result::Err(crate::errors::storage_admin_service::StopAdminTaskError::ApplicationException(aexn))
7766                };
7767                res
7768            }
7769            .instrument(::tracing::info_span!("StorageAdminService.stopAdminTask"))
7770            .boxed()
7771        }
7772
7773        fn _listClusterInfo_impl(
7774            &self,
7775            arg_req: &crate::types::ListClusterInfoReq,
7776            rpc_options: T::RpcOptions,
7777        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError>> {
7778            use ::const_cstr::const_cstr;
7779            use ::tracing::Instrument as _;
7780            use ::futures::FutureExt as _;
7781
7782            const_cstr! {
7783                SERVICE_NAME = "StorageAdminService";
7784                METHOD_NAME = "StorageAdminService.listClusterInfo";
7785            }
7786            let args = self::Args_StorageAdminService_listClusterInfo {
7787                req: arg_req,
7788                _phantom: ::std::marker::PhantomData,
7789            };
7790
7791            let transport = self.transport();
7792
7793            // need to do call setup outside of async block because T: Transport isn't Send
7794            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("listClusterInfo", &args) {
7795                ::std::result::Result::Ok(res) => res,
7796                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
7797            };
7798
7799            let call = transport
7800                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
7801                .instrument(::tracing::trace_span!("call", function = "StorageAdminService.listClusterInfo"));
7802
7803            async move {
7804                let reply_env = call.await?;
7805
7806                let de = P::deserializer(reply_env);
7807                let (res, _de): (::std::result::Result<crate::services::storage_admin_service::ListClusterInfoExn, _>, _) =
7808                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
7809
7810                let res = match res {
7811                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
7812                    ::std::result::Result::Err(aexn) =>
7813                        ::std::result::Result::Err(crate::errors::storage_admin_service::ListClusterInfoError::ApplicationException(aexn))
7814                };
7815                res
7816            }
7817            .instrument(::tracing::info_span!("StorageAdminService.listClusterInfo"))
7818            .boxed()
7819        }
7820    }
7821
7822    pub trait StorageAdminService: ::std::marker::Send {
7823        fn transLeader(
7824            &self,
7825            arg_req: &crate::types::TransLeaderReq,
7826        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError>>;
7827
7828        fn addPart(
7829            &self,
7830            arg_req: &crate::types::AddPartReq,
7831        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError>>;
7832
7833        fn addLearner(
7834            &self,
7835            arg_req: &crate::types::AddLearnerReq,
7836        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError>>;
7837
7838        fn removePart(
7839            &self,
7840            arg_req: &crate::types::RemovePartReq,
7841        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError>>;
7842
7843        fn memberChange(
7844            &self,
7845            arg_req: &crate::types::MemberChangeReq,
7846        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError>>;
7847
7848        fn waitingForCatchUpData(
7849            &self,
7850            arg_req: &crate::types::CatchUpDataReq,
7851        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError>>;
7852
7853        fn createCheckpoint(
7854            &self,
7855            arg_req: &crate::types::CreateCPRequest,
7856        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError>>;
7857
7858        fn dropCheckpoint(
7859            &self,
7860            arg_req: &crate::types::DropCPRequest,
7861        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError>>;
7862
7863        fn blockingWrites(
7864            &self,
7865            arg_req: &crate::types::BlockingSignRequest,
7866        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError>>;
7867
7868        fn rebuildTagIndex(
7869            &self,
7870            arg_req: &crate::types::RebuildIndexRequest,
7871        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError>>;
7872
7873        fn rebuildEdgeIndex(
7874            &self,
7875            arg_req: &crate::types::RebuildIndexRequest,
7876        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError>>;
7877
7878        fn getLeaderParts(
7879            &self,
7880            arg_req: &crate::types::GetLeaderReq,
7881        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError>>;
7882
7883        fn checkPeers(
7884            &self,
7885            arg_req: &crate::types::CheckPeersReq,
7886        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError>>;
7887
7888        fn addAdminTask(
7889            &self,
7890            arg_req: &crate::types::AddAdminTaskRequest,
7891        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError>>;
7892
7893        fn stopAdminTask(
7894            &self,
7895            arg_req: &crate::types::StopAdminTaskRequest,
7896        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError>>;
7897
7898        fn listClusterInfo(
7899            &self,
7900            arg_req: &crate::types::ListClusterInfoReq,
7901        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError>>;
7902    }
7903
7904    pub trait StorageAdminServiceExt<T>: StorageAdminService
7905    where
7906        T: ::fbthrift::Transport,
7907    {
7908        fn transLeader_with_rpc_opts(
7909            &self,
7910            arg_req: &crate::types::TransLeaderReq,
7911            rpc_options: T::RpcOptions,
7912        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError>>;
7913        fn addPart_with_rpc_opts(
7914            &self,
7915            arg_req: &crate::types::AddPartReq,
7916            rpc_options: T::RpcOptions,
7917        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError>>;
7918        fn addLearner_with_rpc_opts(
7919            &self,
7920            arg_req: &crate::types::AddLearnerReq,
7921            rpc_options: T::RpcOptions,
7922        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError>>;
7923        fn removePart_with_rpc_opts(
7924            &self,
7925            arg_req: &crate::types::RemovePartReq,
7926            rpc_options: T::RpcOptions,
7927        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError>>;
7928        fn memberChange_with_rpc_opts(
7929            &self,
7930            arg_req: &crate::types::MemberChangeReq,
7931            rpc_options: T::RpcOptions,
7932        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError>>;
7933        fn waitingForCatchUpData_with_rpc_opts(
7934            &self,
7935            arg_req: &crate::types::CatchUpDataReq,
7936            rpc_options: T::RpcOptions,
7937        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError>>;
7938        fn createCheckpoint_with_rpc_opts(
7939            &self,
7940            arg_req: &crate::types::CreateCPRequest,
7941            rpc_options: T::RpcOptions,
7942        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError>>;
7943        fn dropCheckpoint_with_rpc_opts(
7944            &self,
7945            arg_req: &crate::types::DropCPRequest,
7946            rpc_options: T::RpcOptions,
7947        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError>>;
7948        fn blockingWrites_with_rpc_opts(
7949            &self,
7950            arg_req: &crate::types::BlockingSignRequest,
7951            rpc_options: T::RpcOptions,
7952        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError>>;
7953        fn rebuildTagIndex_with_rpc_opts(
7954            &self,
7955            arg_req: &crate::types::RebuildIndexRequest,
7956            rpc_options: T::RpcOptions,
7957        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError>>;
7958        fn rebuildEdgeIndex_with_rpc_opts(
7959            &self,
7960            arg_req: &crate::types::RebuildIndexRequest,
7961            rpc_options: T::RpcOptions,
7962        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError>>;
7963        fn getLeaderParts_with_rpc_opts(
7964            &self,
7965            arg_req: &crate::types::GetLeaderReq,
7966            rpc_options: T::RpcOptions,
7967        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError>>;
7968        fn checkPeers_with_rpc_opts(
7969            &self,
7970            arg_req: &crate::types::CheckPeersReq,
7971            rpc_options: T::RpcOptions,
7972        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError>>;
7973        fn addAdminTask_with_rpc_opts(
7974            &self,
7975            arg_req: &crate::types::AddAdminTaskRequest,
7976            rpc_options: T::RpcOptions,
7977        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError>>;
7978        fn stopAdminTask_with_rpc_opts(
7979            &self,
7980            arg_req: &crate::types::StopAdminTaskRequest,
7981            rpc_options: T::RpcOptions,
7982        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError>>;
7983        fn listClusterInfo_with_rpc_opts(
7984            &self,
7985            arg_req: &crate::types::ListClusterInfoReq,
7986            rpc_options: T::RpcOptions,
7987        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError>>;
7988    }
7989
7990    struct Args_StorageAdminService_transLeader<'a> {
7991        req: &'a crate::types::TransLeaderReq,
7992        _phantom: ::std::marker::PhantomData<&'a ()>,
7993    }
7994
7995    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_transLeader<'a> {
7996        #[inline]
7997        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.transLeader"))]
7998        fn write(&self, p: &mut P) {
7999            p.write_struct_begin("args");
8000            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8001            ::fbthrift::Serialize::write(&self.req, p);
8002            p.write_field_end();
8003            p.write_field_stop();
8004            p.write_struct_end();
8005        }
8006    }
8007
8008    struct Args_StorageAdminService_addPart<'a> {
8009        req: &'a crate::types::AddPartReq,
8010        _phantom: ::std::marker::PhantomData<&'a ()>,
8011    }
8012
8013    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_addPart<'a> {
8014        #[inline]
8015        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.addPart"))]
8016        fn write(&self, p: &mut P) {
8017            p.write_struct_begin("args");
8018            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8019            ::fbthrift::Serialize::write(&self.req, p);
8020            p.write_field_end();
8021            p.write_field_stop();
8022            p.write_struct_end();
8023        }
8024    }
8025
8026    struct Args_StorageAdminService_addLearner<'a> {
8027        req: &'a crate::types::AddLearnerReq,
8028        _phantom: ::std::marker::PhantomData<&'a ()>,
8029    }
8030
8031    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_addLearner<'a> {
8032        #[inline]
8033        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.addLearner"))]
8034        fn write(&self, p: &mut P) {
8035            p.write_struct_begin("args");
8036            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8037            ::fbthrift::Serialize::write(&self.req, p);
8038            p.write_field_end();
8039            p.write_field_stop();
8040            p.write_struct_end();
8041        }
8042    }
8043
8044    struct Args_StorageAdminService_removePart<'a> {
8045        req: &'a crate::types::RemovePartReq,
8046        _phantom: ::std::marker::PhantomData<&'a ()>,
8047    }
8048
8049    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_removePart<'a> {
8050        #[inline]
8051        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.removePart"))]
8052        fn write(&self, p: &mut P) {
8053            p.write_struct_begin("args");
8054            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8055            ::fbthrift::Serialize::write(&self.req, p);
8056            p.write_field_end();
8057            p.write_field_stop();
8058            p.write_struct_end();
8059        }
8060    }
8061
8062    struct Args_StorageAdminService_memberChange<'a> {
8063        req: &'a crate::types::MemberChangeReq,
8064        _phantom: ::std::marker::PhantomData<&'a ()>,
8065    }
8066
8067    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_memberChange<'a> {
8068        #[inline]
8069        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.memberChange"))]
8070        fn write(&self, p: &mut P) {
8071            p.write_struct_begin("args");
8072            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8073            ::fbthrift::Serialize::write(&self.req, p);
8074            p.write_field_end();
8075            p.write_field_stop();
8076            p.write_struct_end();
8077        }
8078    }
8079
8080    struct Args_StorageAdminService_waitingForCatchUpData<'a> {
8081        req: &'a crate::types::CatchUpDataReq,
8082        _phantom: ::std::marker::PhantomData<&'a ()>,
8083    }
8084
8085    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_waitingForCatchUpData<'a> {
8086        #[inline]
8087        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.waitingForCatchUpData"))]
8088        fn write(&self, p: &mut P) {
8089            p.write_struct_begin("args");
8090            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8091            ::fbthrift::Serialize::write(&self.req, p);
8092            p.write_field_end();
8093            p.write_field_stop();
8094            p.write_struct_end();
8095        }
8096    }
8097
8098    struct Args_StorageAdminService_createCheckpoint<'a> {
8099        req: &'a crate::types::CreateCPRequest,
8100        _phantom: ::std::marker::PhantomData<&'a ()>,
8101    }
8102
8103    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_createCheckpoint<'a> {
8104        #[inline]
8105        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.createCheckpoint"))]
8106        fn write(&self, p: &mut P) {
8107            p.write_struct_begin("args");
8108            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8109            ::fbthrift::Serialize::write(&self.req, p);
8110            p.write_field_end();
8111            p.write_field_stop();
8112            p.write_struct_end();
8113        }
8114    }
8115
8116    struct Args_StorageAdminService_dropCheckpoint<'a> {
8117        req: &'a crate::types::DropCPRequest,
8118        _phantom: ::std::marker::PhantomData<&'a ()>,
8119    }
8120
8121    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_dropCheckpoint<'a> {
8122        #[inline]
8123        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.dropCheckpoint"))]
8124        fn write(&self, p: &mut P) {
8125            p.write_struct_begin("args");
8126            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8127            ::fbthrift::Serialize::write(&self.req, p);
8128            p.write_field_end();
8129            p.write_field_stop();
8130            p.write_struct_end();
8131        }
8132    }
8133
8134    struct Args_StorageAdminService_blockingWrites<'a> {
8135        req: &'a crate::types::BlockingSignRequest,
8136        _phantom: ::std::marker::PhantomData<&'a ()>,
8137    }
8138
8139    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_blockingWrites<'a> {
8140        #[inline]
8141        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.blockingWrites"))]
8142        fn write(&self, p: &mut P) {
8143            p.write_struct_begin("args");
8144            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8145            ::fbthrift::Serialize::write(&self.req, p);
8146            p.write_field_end();
8147            p.write_field_stop();
8148            p.write_struct_end();
8149        }
8150    }
8151
8152    struct Args_StorageAdminService_rebuildTagIndex<'a> {
8153        req: &'a crate::types::RebuildIndexRequest,
8154        _phantom: ::std::marker::PhantomData<&'a ()>,
8155    }
8156
8157    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_rebuildTagIndex<'a> {
8158        #[inline]
8159        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.rebuildTagIndex"))]
8160        fn write(&self, p: &mut P) {
8161            p.write_struct_begin("args");
8162            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8163            ::fbthrift::Serialize::write(&self.req, p);
8164            p.write_field_end();
8165            p.write_field_stop();
8166            p.write_struct_end();
8167        }
8168    }
8169
8170    struct Args_StorageAdminService_rebuildEdgeIndex<'a> {
8171        req: &'a crate::types::RebuildIndexRequest,
8172        _phantom: ::std::marker::PhantomData<&'a ()>,
8173    }
8174
8175    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_rebuildEdgeIndex<'a> {
8176        #[inline]
8177        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.rebuildEdgeIndex"))]
8178        fn write(&self, p: &mut P) {
8179            p.write_struct_begin("args");
8180            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8181            ::fbthrift::Serialize::write(&self.req, p);
8182            p.write_field_end();
8183            p.write_field_stop();
8184            p.write_struct_end();
8185        }
8186    }
8187
8188    struct Args_StorageAdminService_getLeaderParts<'a> {
8189        req: &'a crate::types::GetLeaderReq,
8190        _phantom: ::std::marker::PhantomData<&'a ()>,
8191    }
8192
8193    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_getLeaderParts<'a> {
8194        #[inline]
8195        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.getLeaderParts"))]
8196        fn write(&self, p: &mut P) {
8197            p.write_struct_begin("args");
8198            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8199            ::fbthrift::Serialize::write(&self.req, p);
8200            p.write_field_end();
8201            p.write_field_stop();
8202            p.write_struct_end();
8203        }
8204    }
8205
8206    struct Args_StorageAdminService_checkPeers<'a> {
8207        req: &'a crate::types::CheckPeersReq,
8208        _phantom: ::std::marker::PhantomData<&'a ()>,
8209    }
8210
8211    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_checkPeers<'a> {
8212        #[inline]
8213        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.checkPeers"))]
8214        fn write(&self, p: &mut P) {
8215            p.write_struct_begin("args");
8216            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8217            ::fbthrift::Serialize::write(&self.req, p);
8218            p.write_field_end();
8219            p.write_field_stop();
8220            p.write_struct_end();
8221        }
8222    }
8223
8224    struct Args_StorageAdminService_addAdminTask<'a> {
8225        req: &'a crate::types::AddAdminTaskRequest,
8226        _phantom: ::std::marker::PhantomData<&'a ()>,
8227    }
8228
8229    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_addAdminTask<'a> {
8230        #[inline]
8231        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.addAdminTask"))]
8232        fn write(&self, p: &mut P) {
8233            p.write_struct_begin("args");
8234            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8235            ::fbthrift::Serialize::write(&self.req, p);
8236            p.write_field_end();
8237            p.write_field_stop();
8238            p.write_struct_end();
8239        }
8240    }
8241
8242    struct Args_StorageAdminService_stopAdminTask<'a> {
8243        req: &'a crate::types::StopAdminTaskRequest,
8244        _phantom: ::std::marker::PhantomData<&'a ()>,
8245    }
8246
8247    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_stopAdminTask<'a> {
8248        #[inline]
8249        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.stopAdminTask"))]
8250        fn write(&self, p: &mut P) {
8251            p.write_struct_begin("args");
8252            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8253            ::fbthrift::Serialize::write(&self.req, p);
8254            p.write_field_end();
8255            p.write_field_stop();
8256            p.write_struct_end();
8257        }
8258    }
8259
8260    struct Args_StorageAdminService_listClusterInfo<'a> {
8261        req: &'a crate::types::ListClusterInfoReq,
8262        _phantom: ::std::marker::PhantomData<&'a ()>,
8263    }
8264
8265    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageAdminService_listClusterInfo<'a> {
8266        #[inline]
8267        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageAdminService.listClusterInfo"))]
8268        fn write(&self, p: &mut P) {
8269            p.write_struct_begin("args");
8270            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
8271            ::fbthrift::Serialize::write(&self.req, p);
8272            p.write_field_end();
8273            p.write_field_stop();
8274            p.write_struct_end();
8275        }
8276    }
8277
8278    impl<P, T, S> StorageAdminService for StorageAdminServiceImpl<P, T, S>
8279    where
8280        P: ::fbthrift::Protocol,
8281        T: ::fbthrift::Transport,
8282        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
8283        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
8284        P::Deserializer: ::std::marker::Send,
8285        S: ::fbthrift::help::Spawner,
8286    {
8287        fn transLeader(
8288            &self,
8289            arg_req: &crate::types::TransLeaderReq,
8290        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError>> {
8291            let rpc_options = T::RpcOptions::default();
8292            self._transLeader_impl(
8293                arg_req,
8294                rpc_options,
8295            )
8296        }
8297        fn addPart(
8298            &self,
8299            arg_req: &crate::types::AddPartReq,
8300        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError>> {
8301            let rpc_options = T::RpcOptions::default();
8302            self._addPart_impl(
8303                arg_req,
8304                rpc_options,
8305            )
8306        }
8307        fn addLearner(
8308            &self,
8309            arg_req: &crate::types::AddLearnerReq,
8310        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError>> {
8311            let rpc_options = T::RpcOptions::default();
8312            self._addLearner_impl(
8313                arg_req,
8314                rpc_options,
8315            )
8316        }
8317        fn removePart(
8318            &self,
8319            arg_req: &crate::types::RemovePartReq,
8320        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError>> {
8321            let rpc_options = T::RpcOptions::default();
8322            self._removePart_impl(
8323                arg_req,
8324                rpc_options,
8325            )
8326        }
8327        fn memberChange(
8328            &self,
8329            arg_req: &crate::types::MemberChangeReq,
8330        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError>> {
8331            let rpc_options = T::RpcOptions::default();
8332            self._memberChange_impl(
8333                arg_req,
8334                rpc_options,
8335            )
8336        }
8337        fn waitingForCatchUpData(
8338            &self,
8339            arg_req: &crate::types::CatchUpDataReq,
8340        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError>> {
8341            let rpc_options = T::RpcOptions::default();
8342            self._waitingForCatchUpData_impl(
8343                arg_req,
8344                rpc_options,
8345            )
8346        }
8347        fn createCheckpoint(
8348            &self,
8349            arg_req: &crate::types::CreateCPRequest,
8350        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError>> {
8351            let rpc_options = T::RpcOptions::default();
8352            self._createCheckpoint_impl(
8353                arg_req,
8354                rpc_options,
8355            )
8356        }
8357        fn dropCheckpoint(
8358            &self,
8359            arg_req: &crate::types::DropCPRequest,
8360        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError>> {
8361            let rpc_options = T::RpcOptions::default();
8362            self._dropCheckpoint_impl(
8363                arg_req,
8364                rpc_options,
8365            )
8366        }
8367        fn blockingWrites(
8368            &self,
8369            arg_req: &crate::types::BlockingSignRequest,
8370        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError>> {
8371            let rpc_options = T::RpcOptions::default();
8372            self._blockingWrites_impl(
8373                arg_req,
8374                rpc_options,
8375            )
8376        }
8377        fn rebuildTagIndex(
8378            &self,
8379            arg_req: &crate::types::RebuildIndexRequest,
8380        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError>> {
8381            let rpc_options = T::RpcOptions::default();
8382            self._rebuildTagIndex_impl(
8383                arg_req,
8384                rpc_options,
8385            )
8386        }
8387        fn rebuildEdgeIndex(
8388            &self,
8389            arg_req: &crate::types::RebuildIndexRequest,
8390        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError>> {
8391            let rpc_options = T::RpcOptions::default();
8392            self._rebuildEdgeIndex_impl(
8393                arg_req,
8394                rpc_options,
8395            )
8396        }
8397        fn getLeaderParts(
8398            &self,
8399            arg_req: &crate::types::GetLeaderReq,
8400        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError>> {
8401            let rpc_options = T::RpcOptions::default();
8402            self._getLeaderParts_impl(
8403                arg_req,
8404                rpc_options,
8405            )
8406        }
8407        fn checkPeers(
8408            &self,
8409            arg_req: &crate::types::CheckPeersReq,
8410        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError>> {
8411            let rpc_options = T::RpcOptions::default();
8412            self._checkPeers_impl(
8413                arg_req,
8414                rpc_options,
8415            )
8416        }
8417        fn addAdminTask(
8418            &self,
8419            arg_req: &crate::types::AddAdminTaskRequest,
8420        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError>> {
8421            let rpc_options = T::RpcOptions::default();
8422            self._addAdminTask_impl(
8423                arg_req,
8424                rpc_options,
8425            )
8426        }
8427        fn stopAdminTask(
8428            &self,
8429            arg_req: &crate::types::StopAdminTaskRequest,
8430        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError>> {
8431            let rpc_options = T::RpcOptions::default();
8432            self._stopAdminTask_impl(
8433                arg_req,
8434                rpc_options,
8435            )
8436        }
8437        fn listClusterInfo(
8438            &self,
8439            arg_req: &crate::types::ListClusterInfoReq,
8440        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError>> {
8441            let rpc_options = T::RpcOptions::default();
8442            self._listClusterInfo_impl(
8443                arg_req,
8444                rpc_options,
8445            )
8446        }
8447    }
8448
8449    impl<P, T, S> StorageAdminServiceExt<T> for StorageAdminServiceImpl<P, T, S>
8450    where
8451        P: ::fbthrift::Protocol,
8452        T: ::fbthrift::Transport,
8453        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
8454        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
8455        P::Deserializer: ::std::marker::Send,
8456        S: ::fbthrift::help::Spawner,
8457    {
8458        fn transLeader_with_rpc_opts(
8459            &self,
8460            arg_req: &crate::types::TransLeaderReq,
8461            rpc_options: T::RpcOptions,
8462        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError>> {
8463            self._transLeader_impl(
8464                arg_req,
8465                rpc_options,
8466            )
8467        }
8468        fn addPart_with_rpc_opts(
8469            &self,
8470            arg_req: &crate::types::AddPartReq,
8471            rpc_options: T::RpcOptions,
8472        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError>> {
8473            self._addPart_impl(
8474                arg_req,
8475                rpc_options,
8476            )
8477        }
8478        fn addLearner_with_rpc_opts(
8479            &self,
8480            arg_req: &crate::types::AddLearnerReq,
8481            rpc_options: T::RpcOptions,
8482        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError>> {
8483            self._addLearner_impl(
8484                arg_req,
8485                rpc_options,
8486            )
8487        }
8488        fn removePart_with_rpc_opts(
8489            &self,
8490            arg_req: &crate::types::RemovePartReq,
8491            rpc_options: T::RpcOptions,
8492        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError>> {
8493            self._removePart_impl(
8494                arg_req,
8495                rpc_options,
8496            )
8497        }
8498        fn memberChange_with_rpc_opts(
8499            &self,
8500            arg_req: &crate::types::MemberChangeReq,
8501            rpc_options: T::RpcOptions,
8502        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError>> {
8503            self._memberChange_impl(
8504                arg_req,
8505                rpc_options,
8506            )
8507        }
8508        fn waitingForCatchUpData_with_rpc_opts(
8509            &self,
8510            arg_req: &crate::types::CatchUpDataReq,
8511            rpc_options: T::RpcOptions,
8512        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError>> {
8513            self._waitingForCatchUpData_impl(
8514                arg_req,
8515                rpc_options,
8516            )
8517        }
8518        fn createCheckpoint_with_rpc_opts(
8519            &self,
8520            arg_req: &crate::types::CreateCPRequest,
8521            rpc_options: T::RpcOptions,
8522        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError>> {
8523            self._createCheckpoint_impl(
8524                arg_req,
8525                rpc_options,
8526            )
8527        }
8528        fn dropCheckpoint_with_rpc_opts(
8529            &self,
8530            arg_req: &crate::types::DropCPRequest,
8531            rpc_options: T::RpcOptions,
8532        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError>> {
8533            self._dropCheckpoint_impl(
8534                arg_req,
8535                rpc_options,
8536            )
8537        }
8538        fn blockingWrites_with_rpc_opts(
8539            &self,
8540            arg_req: &crate::types::BlockingSignRequest,
8541            rpc_options: T::RpcOptions,
8542        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError>> {
8543            self._blockingWrites_impl(
8544                arg_req,
8545                rpc_options,
8546            )
8547        }
8548        fn rebuildTagIndex_with_rpc_opts(
8549            &self,
8550            arg_req: &crate::types::RebuildIndexRequest,
8551            rpc_options: T::RpcOptions,
8552        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError>> {
8553            self._rebuildTagIndex_impl(
8554                arg_req,
8555                rpc_options,
8556            )
8557        }
8558        fn rebuildEdgeIndex_with_rpc_opts(
8559            &self,
8560            arg_req: &crate::types::RebuildIndexRequest,
8561            rpc_options: T::RpcOptions,
8562        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError>> {
8563            self._rebuildEdgeIndex_impl(
8564                arg_req,
8565                rpc_options,
8566            )
8567        }
8568        fn getLeaderParts_with_rpc_opts(
8569            &self,
8570            arg_req: &crate::types::GetLeaderReq,
8571            rpc_options: T::RpcOptions,
8572        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError>> {
8573            self._getLeaderParts_impl(
8574                arg_req,
8575                rpc_options,
8576            )
8577        }
8578        fn checkPeers_with_rpc_opts(
8579            &self,
8580            arg_req: &crate::types::CheckPeersReq,
8581            rpc_options: T::RpcOptions,
8582        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError>> {
8583            self._checkPeers_impl(
8584                arg_req,
8585                rpc_options,
8586            )
8587        }
8588        fn addAdminTask_with_rpc_opts(
8589            &self,
8590            arg_req: &crate::types::AddAdminTaskRequest,
8591            rpc_options: T::RpcOptions,
8592        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError>> {
8593            self._addAdminTask_impl(
8594                arg_req,
8595                rpc_options,
8596            )
8597        }
8598        fn stopAdminTask_with_rpc_opts(
8599            &self,
8600            arg_req: &crate::types::StopAdminTaskRequest,
8601            rpc_options: T::RpcOptions,
8602        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError>> {
8603            self._stopAdminTask_impl(
8604                arg_req,
8605                rpc_options,
8606            )
8607        }
8608        fn listClusterInfo_with_rpc_opts(
8609            &self,
8610            arg_req: &crate::types::ListClusterInfoReq,
8611            rpc_options: T::RpcOptions,
8612        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError>> {
8613            self._listClusterInfo_impl(
8614                arg_req,
8615                rpc_options,
8616            )
8617        }
8618    }
8619
8620    impl<'a, S> StorageAdminService for S
8621    where
8622        S: ::std::convert::AsRef<dyn StorageAdminService + 'a>,
8623        S: ::std::marker::Send,
8624    {
8625        fn transLeader(
8626            &self,
8627            arg_req: &crate::types::TransLeaderReq,
8628        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError>> {
8629            self.as_ref().transLeader(
8630                arg_req,
8631            )
8632        }
8633        fn addPart(
8634            &self,
8635            arg_req: &crate::types::AddPartReq,
8636        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError>> {
8637            self.as_ref().addPart(
8638                arg_req,
8639            )
8640        }
8641        fn addLearner(
8642            &self,
8643            arg_req: &crate::types::AddLearnerReq,
8644        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError>> {
8645            self.as_ref().addLearner(
8646                arg_req,
8647            )
8648        }
8649        fn removePart(
8650            &self,
8651            arg_req: &crate::types::RemovePartReq,
8652        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError>> {
8653            self.as_ref().removePart(
8654                arg_req,
8655            )
8656        }
8657        fn memberChange(
8658            &self,
8659            arg_req: &crate::types::MemberChangeReq,
8660        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError>> {
8661            self.as_ref().memberChange(
8662                arg_req,
8663            )
8664        }
8665        fn waitingForCatchUpData(
8666            &self,
8667            arg_req: &crate::types::CatchUpDataReq,
8668        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError>> {
8669            self.as_ref().waitingForCatchUpData(
8670                arg_req,
8671            )
8672        }
8673        fn createCheckpoint(
8674            &self,
8675            arg_req: &crate::types::CreateCPRequest,
8676        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError>> {
8677            self.as_ref().createCheckpoint(
8678                arg_req,
8679            )
8680        }
8681        fn dropCheckpoint(
8682            &self,
8683            arg_req: &crate::types::DropCPRequest,
8684        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError>> {
8685            self.as_ref().dropCheckpoint(
8686                arg_req,
8687            )
8688        }
8689        fn blockingWrites(
8690            &self,
8691            arg_req: &crate::types::BlockingSignRequest,
8692        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError>> {
8693            self.as_ref().blockingWrites(
8694                arg_req,
8695            )
8696        }
8697        fn rebuildTagIndex(
8698            &self,
8699            arg_req: &crate::types::RebuildIndexRequest,
8700        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError>> {
8701            self.as_ref().rebuildTagIndex(
8702                arg_req,
8703            )
8704        }
8705        fn rebuildEdgeIndex(
8706            &self,
8707            arg_req: &crate::types::RebuildIndexRequest,
8708        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError>> {
8709            self.as_ref().rebuildEdgeIndex(
8710                arg_req,
8711            )
8712        }
8713        fn getLeaderParts(
8714            &self,
8715            arg_req: &crate::types::GetLeaderReq,
8716        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError>> {
8717            self.as_ref().getLeaderParts(
8718                arg_req,
8719            )
8720        }
8721        fn checkPeers(
8722            &self,
8723            arg_req: &crate::types::CheckPeersReq,
8724        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError>> {
8725            self.as_ref().checkPeers(
8726                arg_req,
8727            )
8728        }
8729        fn addAdminTask(
8730            &self,
8731            arg_req: &crate::types::AddAdminTaskRequest,
8732        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError>> {
8733            self.as_ref().addAdminTask(
8734                arg_req,
8735            )
8736        }
8737        fn stopAdminTask(
8738            &self,
8739            arg_req: &crate::types::StopAdminTaskRequest,
8740        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError>> {
8741            self.as_ref().stopAdminTask(
8742                arg_req,
8743            )
8744        }
8745        fn listClusterInfo(
8746            &self,
8747            arg_req: &crate::types::ListClusterInfoReq,
8748        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError>> {
8749            self.as_ref().listClusterInfo(
8750                arg_req,
8751            )
8752        }
8753    }
8754
8755    impl<'a, S, T> StorageAdminServiceExt<T> for S
8756    where
8757        S: ::std::convert::AsRef<dyn StorageAdminService + 'a>,
8758        S: ::std::convert::AsRef<dyn StorageAdminServiceExt<T> + 'a>,
8759        S: ::std::marker::Send,
8760        T: ::fbthrift::Transport,
8761    {
8762        fn transLeader_with_rpc_opts(
8763            &self,
8764            arg_req: &crate::types::TransLeaderReq,
8765            rpc_options: T::RpcOptions,
8766        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError>> {
8767            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).transLeader_with_rpc_opts(
8768                arg_req,
8769                rpc_options,
8770            )
8771        }
8772        fn addPart_with_rpc_opts(
8773            &self,
8774            arg_req: &crate::types::AddPartReq,
8775            rpc_options: T::RpcOptions,
8776        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError>> {
8777            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).addPart_with_rpc_opts(
8778                arg_req,
8779                rpc_options,
8780            )
8781        }
8782        fn addLearner_with_rpc_opts(
8783            &self,
8784            arg_req: &crate::types::AddLearnerReq,
8785            rpc_options: T::RpcOptions,
8786        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError>> {
8787            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).addLearner_with_rpc_opts(
8788                arg_req,
8789                rpc_options,
8790            )
8791        }
8792        fn removePart_with_rpc_opts(
8793            &self,
8794            arg_req: &crate::types::RemovePartReq,
8795            rpc_options: T::RpcOptions,
8796        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError>> {
8797            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).removePart_with_rpc_opts(
8798                arg_req,
8799                rpc_options,
8800            )
8801        }
8802        fn memberChange_with_rpc_opts(
8803            &self,
8804            arg_req: &crate::types::MemberChangeReq,
8805            rpc_options: T::RpcOptions,
8806        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError>> {
8807            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).memberChange_with_rpc_opts(
8808                arg_req,
8809                rpc_options,
8810            )
8811        }
8812        fn waitingForCatchUpData_with_rpc_opts(
8813            &self,
8814            arg_req: &crate::types::CatchUpDataReq,
8815            rpc_options: T::RpcOptions,
8816        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError>> {
8817            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).waitingForCatchUpData_with_rpc_opts(
8818                arg_req,
8819                rpc_options,
8820            )
8821        }
8822        fn createCheckpoint_with_rpc_opts(
8823            &self,
8824            arg_req: &crate::types::CreateCPRequest,
8825            rpc_options: T::RpcOptions,
8826        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError>> {
8827            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).createCheckpoint_with_rpc_opts(
8828                arg_req,
8829                rpc_options,
8830            )
8831        }
8832        fn dropCheckpoint_with_rpc_opts(
8833            &self,
8834            arg_req: &crate::types::DropCPRequest,
8835            rpc_options: T::RpcOptions,
8836        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError>> {
8837            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).dropCheckpoint_with_rpc_opts(
8838                arg_req,
8839                rpc_options,
8840            )
8841        }
8842        fn blockingWrites_with_rpc_opts(
8843            &self,
8844            arg_req: &crate::types::BlockingSignRequest,
8845            rpc_options: T::RpcOptions,
8846        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError>> {
8847            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).blockingWrites_with_rpc_opts(
8848                arg_req,
8849                rpc_options,
8850            )
8851        }
8852        fn rebuildTagIndex_with_rpc_opts(
8853            &self,
8854            arg_req: &crate::types::RebuildIndexRequest,
8855            rpc_options: T::RpcOptions,
8856        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError>> {
8857            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).rebuildTagIndex_with_rpc_opts(
8858                arg_req,
8859                rpc_options,
8860            )
8861        }
8862        fn rebuildEdgeIndex_with_rpc_opts(
8863            &self,
8864            arg_req: &crate::types::RebuildIndexRequest,
8865            rpc_options: T::RpcOptions,
8866        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError>> {
8867            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).rebuildEdgeIndex_with_rpc_opts(
8868                arg_req,
8869                rpc_options,
8870            )
8871        }
8872        fn getLeaderParts_with_rpc_opts(
8873            &self,
8874            arg_req: &crate::types::GetLeaderReq,
8875            rpc_options: T::RpcOptions,
8876        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError>> {
8877            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).getLeaderParts_with_rpc_opts(
8878                arg_req,
8879                rpc_options,
8880            )
8881        }
8882        fn checkPeers_with_rpc_opts(
8883            &self,
8884            arg_req: &crate::types::CheckPeersReq,
8885            rpc_options: T::RpcOptions,
8886        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError>> {
8887            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).checkPeers_with_rpc_opts(
8888                arg_req,
8889                rpc_options,
8890            )
8891        }
8892        fn addAdminTask_with_rpc_opts(
8893            &self,
8894            arg_req: &crate::types::AddAdminTaskRequest,
8895            rpc_options: T::RpcOptions,
8896        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError>> {
8897            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).addAdminTask_with_rpc_opts(
8898                arg_req,
8899                rpc_options,
8900            )
8901        }
8902        fn stopAdminTask_with_rpc_opts(
8903            &self,
8904            arg_req: &crate::types::StopAdminTaskRequest,
8905            rpc_options: T::RpcOptions,
8906        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError>> {
8907            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).stopAdminTask_with_rpc_opts(
8908                arg_req,
8909                rpc_options,
8910            )
8911        }
8912        fn listClusterInfo_with_rpc_opts(
8913            &self,
8914            arg_req: &crate::types::ListClusterInfoReq,
8915            rpc_options: T::RpcOptions,
8916        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError>> {
8917            <Self as ::std::convert::AsRef<dyn StorageAdminServiceExt<T>>>::as_ref(self).listClusterInfo_with_rpc_opts(
8918                arg_req,
8919                rpc_options,
8920            )
8921        }
8922    }
8923
8924    #[derive(Clone)]
8925    pub struct make_StorageAdminService;
8926
8927    /// To be called by user directly setting up a client. Avoids
8928    /// needing ClientFactory trait in scope, avoids unidiomatic
8929    /// make_Trait name.
8930    ///
8931    /// ```
8932    /// # const _: &str = stringify! {
8933    /// use bgs::client::BuckGraphService;
8934    ///
8935    /// let protocol = BinaryProtocol::new();
8936    /// let transport = HttpClient::new();
8937    /// let client = <dyn BuckGraphService>::new(protocol, transport);
8938    /// # };
8939    /// ```
8940    impl dyn StorageAdminService {
8941        pub fn new<P, T>(
8942            protocol: P,
8943            transport: T,
8944        ) -> ::std::sync::Arc<impl StorageAdminService + ::std::marker::Send + ::std::marker::Sync + 'static>
8945        where
8946            P: ::fbthrift::Protocol<Frame = T>,
8947            T: ::fbthrift::Transport,
8948            P::Deserializer: ::std::marker::Send,
8949        {
8950            let spawner = ::fbthrift::help::NoopSpawner;
8951            Self::with_spawner(protocol, transport, spawner)
8952        }
8953
8954        pub fn with_spawner<P, T, S>(
8955            protocol: P,
8956            transport: T,
8957            spawner: S,
8958        ) -> ::std::sync::Arc<impl StorageAdminService + ::std::marker::Send + ::std::marker::Sync + 'static>
8959        where
8960            P: ::fbthrift::Protocol<Frame = T>,
8961            T: ::fbthrift::Transport,
8962            P::Deserializer: ::std::marker::Send,
8963            S: ::fbthrift::help::Spawner,
8964        {
8965            let _ = protocol;
8966            let _ = spawner;
8967            ::std::sync::Arc::new(StorageAdminServiceImpl::<P, T, S>::new(transport))
8968        }
8969    }
8970
8971    impl<T> dyn StorageAdminServiceExt<T>
8972    where
8973        T: ::fbthrift::Transport,
8974    {
8975        pub fn new<P>(
8976            protocol: P,
8977            transport: T,
8978        ) -> ::std::sync::Arc<impl StorageAdminServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
8979        where
8980            P: ::fbthrift::Protocol<Frame = T>,
8981            P::Deserializer: ::std::marker::Send,
8982        {
8983            let spawner = ::fbthrift::help::NoopSpawner;
8984            Self::with_spawner(protocol, transport, spawner)
8985        }
8986
8987        pub fn with_spawner<P, S>(
8988            protocol: P,
8989            transport: T,
8990            spawner: S,
8991        ) -> ::std::sync::Arc<impl StorageAdminServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
8992        where
8993            P: ::fbthrift::Protocol<Frame = T>,
8994            P::Deserializer: ::std::marker::Send,
8995            S: ::fbthrift::help::Spawner,
8996        {
8997            let _ = protocol;
8998            let _ = spawner;
8999            ::std::sync::Arc::new(StorageAdminServiceImpl::<P, T, S>::new(transport))
9000        }
9001    }
9002
9003    pub type StorageAdminServiceDynClient = <make_StorageAdminService as ::fbthrift::ClientFactory>::Api;
9004    pub type StorageAdminServiceClient = ::std::sync::Arc<StorageAdminServiceDynClient>;
9005
9006    /// The same thing, but to be called from generic contexts where we are
9007    /// working with a type parameter `C: ClientFactory` to produce clients.
9008    impl ::fbthrift::ClientFactory for make_StorageAdminService {
9009        type Api = dyn StorageAdminService + ::std::marker::Send + ::std::marker::Sync + 'static;
9010
9011        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
9012        where
9013            P: ::fbthrift::Protocol<Frame = T>,
9014            T: ::fbthrift::Transport,
9015            P::Deserializer: ::std::marker::Send,
9016            S: ::fbthrift::help::Spawner,
9017        {
9018            <dyn StorageAdminService>::with_spawner(protocol, transport, spawner)
9019        }
9020    }
9021
9022
9023    pub struct GeneralStorageServiceImpl<P, T, S = ::fbthrift::NoopSpawner> {
9024        transport: T,
9025        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
9026    }
9027
9028    impl<P, T, S> GeneralStorageServiceImpl<P, T, S>
9029    where
9030        P: ::fbthrift::Protocol,
9031        T: ::fbthrift::Transport,
9032        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
9033        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
9034        P::Deserializer: ::std::marker::Send,
9035        S: ::fbthrift::help::Spawner,
9036    {
9037        pub fn new(
9038            transport: T,
9039        ) -> Self {
9040            Self {
9041                transport,
9042                _phantom: ::std::marker::PhantomData,
9043            }
9044        }
9045
9046        pub fn transport(&self) -> &T {
9047            &self.transport
9048        }
9049
9050
9051        fn _get_impl(
9052            &self,
9053            arg_req: &crate::types::KVGetRequest,
9054            rpc_options: T::RpcOptions,
9055        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError>> {
9056            use ::const_cstr::const_cstr;
9057            use ::tracing::Instrument as _;
9058            use ::futures::FutureExt as _;
9059
9060            const_cstr! {
9061                SERVICE_NAME = "GeneralStorageService";
9062                METHOD_NAME = "GeneralStorageService.get";
9063            }
9064            let args = self::Args_GeneralStorageService_get {
9065                req: arg_req,
9066                _phantom: ::std::marker::PhantomData,
9067            };
9068
9069            let transport = self.transport();
9070
9071            // need to do call setup outside of async block because T: Transport isn't Send
9072            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("get", &args) {
9073                ::std::result::Result::Ok(res) => res,
9074                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
9075            };
9076
9077            let call = transport
9078                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
9079                .instrument(::tracing::trace_span!("call", function = "GeneralStorageService.get"));
9080
9081            async move {
9082                let reply_env = call.await?;
9083
9084                let de = P::deserializer(reply_env);
9085                let (res, _de): (::std::result::Result<crate::services::general_storage_service::GetExn, _>, _) =
9086                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
9087
9088                let res = match res {
9089                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
9090                    ::std::result::Result::Err(aexn) =>
9091                        ::std::result::Result::Err(crate::errors::general_storage_service::GetError::ApplicationException(aexn))
9092                };
9093                res
9094            }
9095            .instrument(::tracing::info_span!("GeneralStorageService.get"))
9096            .boxed()
9097        }
9098
9099        fn _put_impl(
9100            &self,
9101            arg_req: &crate::types::KVPutRequest,
9102            rpc_options: T::RpcOptions,
9103        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError>> {
9104            use ::const_cstr::const_cstr;
9105            use ::tracing::Instrument as _;
9106            use ::futures::FutureExt as _;
9107
9108            const_cstr! {
9109                SERVICE_NAME = "GeneralStorageService";
9110                METHOD_NAME = "GeneralStorageService.put";
9111            }
9112            let args = self::Args_GeneralStorageService_put {
9113                req: arg_req,
9114                _phantom: ::std::marker::PhantomData,
9115            };
9116
9117            let transport = self.transport();
9118
9119            // need to do call setup outside of async block because T: Transport isn't Send
9120            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("put", &args) {
9121                ::std::result::Result::Ok(res) => res,
9122                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
9123            };
9124
9125            let call = transport
9126                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
9127                .instrument(::tracing::trace_span!("call", function = "GeneralStorageService.put"));
9128
9129            async move {
9130                let reply_env = call.await?;
9131
9132                let de = P::deserializer(reply_env);
9133                let (res, _de): (::std::result::Result<crate::services::general_storage_service::PutExn, _>, _) =
9134                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
9135
9136                let res = match res {
9137                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
9138                    ::std::result::Result::Err(aexn) =>
9139                        ::std::result::Result::Err(crate::errors::general_storage_service::PutError::ApplicationException(aexn))
9140                };
9141                res
9142            }
9143            .instrument(::tracing::info_span!("GeneralStorageService.put"))
9144            .boxed()
9145        }
9146
9147        fn _remove_impl(
9148            &self,
9149            arg_req: &crate::types::KVRemoveRequest,
9150            rpc_options: T::RpcOptions,
9151        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError>> {
9152            use ::const_cstr::const_cstr;
9153            use ::tracing::Instrument as _;
9154            use ::futures::FutureExt as _;
9155
9156            const_cstr! {
9157                SERVICE_NAME = "GeneralStorageService";
9158                METHOD_NAME = "GeneralStorageService.remove";
9159            }
9160            let args = self::Args_GeneralStorageService_remove {
9161                req: arg_req,
9162                _phantom: ::std::marker::PhantomData,
9163            };
9164
9165            let transport = self.transport();
9166
9167            // need to do call setup outside of async block because T: Transport isn't Send
9168            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("remove", &args) {
9169                ::std::result::Result::Ok(res) => res,
9170                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
9171            };
9172
9173            let call = transport
9174                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
9175                .instrument(::tracing::trace_span!("call", function = "GeneralStorageService.remove"));
9176
9177            async move {
9178                let reply_env = call.await?;
9179
9180                let de = P::deserializer(reply_env);
9181                let (res, _de): (::std::result::Result<crate::services::general_storage_service::RemoveExn, _>, _) =
9182                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
9183
9184                let res = match res {
9185                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
9186                    ::std::result::Result::Err(aexn) =>
9187                        ::std::result::Result::Err(crate::errors::general_storage_service::RemoveError::ApplicationException(aexn))
9188                };
9189                res
9190            }
9191            .instrument(::tracing::info_span!("GeneralStorageService.remove"))
9192            .boxed()
9193        }
9194    }
9195
9196    pub trait GeneralStorageService: ::std::marker::Send {
9197        fn get(
9198            &self,
9199            arg_req: &crate::types::KVGetRequest,
9200        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError>>;
9201
9202        fn put(
9203            &self,
9204            arg_req: &crate::types::KVPutRequest,
9205        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError>>;
9206
9207        fn remove(
9208            &self,
9209            arg_req: &crate::types::KVRemoveRequest,
9210        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError>>;
9211    }
9212
9213    pub trait GeneralStorageServiceExt<T>: GeneralStorageService
9214    where
9215        T: ::fbthrift::Transport,
9216    {
9217        fn get_with_rpc_opts(
9218            &self,
9219            arg_req: &crate::types::KVGetRequest,
9220            rpc_options: T::RpcOptions,
9221        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError>>;
9222        fn put_with_rpc_opts(
9223            &self,
9224            arg_req: &crate::types::KVPutRequest,
9225            rpc_options: T::RpcOptions,
9226        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError>>;
9227        fn remove_with_rpc_opts(
9228            &self,
9229            arg_req: &crate::types::KVRemoveRequest,
9230            rpc_options: T::RpcOptions,
9231        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError>>;
9232    }
9233
9234    struct Args_GeneralStorageService_get<'a> {
9235        req: &'a crate::types::KVGetRequest,
9236        _phantom: ::std::marker::PhantomData<&'a ()>,
9237    }
9238
9239    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GeneralStorageService_get<'a> {
9240        #[inline]
9241        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GeneralStorageService.get"))]
9242        fn write(&self, p: &mut P) {
9243            p.write_struct_begin("args");
9244            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
9245            ::fbthrift::Serialize::write(&self.req, p);
9246            p.write_field_end();
9247            p.write_field_stop();
9248            p.write_struct_end();
9249        }
9250    }
9251
9252    struct Args_GeneralStorageService_put<'a> {
9253        req: &'a crate::types::KVPutRequest,
9254        _phantom: ::std::marker::PhantomData<&'a ()>,
9255    }
9256
9257    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GeneralStorageService_put<'a> {
9258        #[inline]
9259        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GeneralStorageService.put"))]
9260        fn write(&self, p: &mut P) {
9261            p.write_struct_begin("args");
9262            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
9263            ::fbthrift::Serialize::write(&self.req, p);
9264            p.write_field_end();
9265            p.write_field_stop();
9266            p.write_struct_end();
9267        }
9268    }
9269
9270    struct Args_GeneralStorageService_remove<'a> {
9271        req: &'a crate::types::KVRemoveRequest,
9272        _phantom: ::std::marker::PhantomData<&'a ()>,
9273    }
9274
9275    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GeneralStorageService_remove<'a> {
9276        #[inline]
9277        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GeneralStorageService.remove"))]
9278        fn write(&self, p: &mut P) {
9279            p.write_struct_begin("args");
9280            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
9281            ::fbthrift::Serialize::write(&self.req, p);
9282            p.write_field_end();
9283            p.write_field_stop();
9284            p.write_struct_end();
9285        }
9286    }
9287
9288    impl<P, T, S> GeneralStorageService for GeneralStorageServiceImpl<P, T, S>
9289    where
9290        P: ::fbthrift::Protocol,
9291        T: ::fbthrift::Transport,
9292        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
9293        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
9294        P::Deserializer: ::std::marker::Send,
9295        S: ::fbthrift::help::Spawner,
9296    {
9297        fn get(
9298            &self,
9299            arg_req: &crate::types::KVGetRequest,
9300        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError>> {
9301            let rpc_options = T::RpcOptions::default();
9302            self._get_impl(
9303                arg_req,
9304                rpc_options,
9305            )
9306        }
9307        fn put(
9308            &self,
9309            arg_req: &crate::types::KVPutRequest,
9310        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError>> {
9311            let rpc_options = T::RpcOptions::default();
9312            self._put_impl(
9313                arg_req,
9314                rpc_options,
9315            )
9316        }
9317        fn remove(
9318            &self,
9319            arg_req: &crate::types::KVRemoveRequest,
9320        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError>> {
9321            let rpc_options = T::RpcOptions::default();
9322            self._remove_impl(
9323                arg_req,
9324                rpc_options,
9325            )
9326        }
9327    }
9328
9329    impl<P, T, S> GeneralStorageServiceExt<T> for GeneralStorageServiceImpl<P, T, S>
9330    where
9331        P: ::fbthrift::Protocol,
9332        T: ::fbthrift::Transport,
9333        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
9334        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
9335        P::Deserializer: ::std::marker::Send,
9336        S: ::fbthrift::help::Spawner,
9337    {
9338        fn get_with_rpc_opts(
9339            &self,
9340            arg_req: &crate::types::KVGetRequest,
9341            rpc_options: T::RpcOptions,
9342        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError>> {
9343            self._get_impl(
9344                arg_req,
9345                rpc_options,
9346            )
9347        }
9348        fn put_with_rpc_opts(
9349            &self,
9350            arg_req: &crate::types::KVPutRequest,
9351            rpc_options: T::RpcOptions,
9352        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError>> {
9353            self._put_impl(
9354                arg_req,
9355                rpc_options,
9356            )
9357        }
9358        fn remove_with_rpc_opts(
9359            &self,
9360            arg_req: &crate::types::KVRemoveRequest,
9361            rpc_options: T::RpcOptions,
9362        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError>> {
9363            self._remove_impl(
9364                arg_req,
9365                rpc_options,
9366            )
9367        }
9368    }
9369
9370    impl<'a, S> GeneralStorageService for S
9371    where
9372        S: ::std::convert::AsRef<dyn GeneralStorageService + 'a>,
9373        S: ::std::marker::Send,
9374    {
9375        fn get(
9376            &self,
9377            arg_req: &crate::types::KVGetRequest,
9378        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError>> {
9379            self.as_ref().get(
9380                arg_req,
9381            )
9382        }
9383        fn put(
9384            &self,
9385            arg_req: &crate::types::KVPutRequest,
9386        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError>> {
9387            self.as_ref().put(
9388                arg_req,
9389            )
9390        }
9391        fn remove(
9392            &self,
9393            arg_req: &crate::types::KVRemoveRequest,
9394        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError>> {
9395            self.as_ref().remove(
9396                arg_req,
9397            )
9398        }
9399    }
9400
9401    impl<'a, S, T> GeneralStorageServiceExt<T> for S
9402    where
9403        S: ::std::convert::AsRef<dyn GeneralStorageService + 'a>,
9404        S: ::std::convert::AsRef<dyn GeneralStorageServiceExt<T> + 'a>,
9405        S: ::std::marker::Send,
9406        T: ::fbthrift::Transport,
9407    {
9408        fn get_with_rpc_opts(
9409            &self,
9410            arg_req: &crate::types::KVGetRequest,
9411            rpc_options: T::RpcOptions,
9412        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError>> {
9413            <Self as ::std::convert::AsRef<dyn GeneralStorageServiceExt<T>>>::as_ref(self).get_with_rpc_opts(
9414                arg_req,
9415                rpc_options,
9416            )
9417        }
9418        fn put_with_rpc_opts(
9419            &self,
9420            arg_req: &crate::types::KVPutRequest,
9421            rpc_options: T::RpcOptions,
9422        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError>> {
9423            <Self as ::std::convert::AsRef<dyn GeneralStorageServiceExt<T>>>::as_ref(self).put_with_rpc_opts(
9424                arg_req,
9425                rpc_options,
9426            )
9427        }
9428        fn remove_with_rpc_opts(
9429            &self,
9430            arg_req: &crate::types::KVRemoveRequest,
9431            rpc_options: T::RpcOptions,
9432        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError>> {
9433            <Self as ::std::convert::AsRef<dyn GeneralStorageServiceExt<T>>>::as_ref(self).remove_with_rpc_opts(
9434                arg_req,
9435                rpc_options,
9436            )
9437        }
9438    }
9439
9440    #[derive(Clone)]
9441    pub struct make_GeneralStorageService;
9442
9443    /// To be called by user directly setting up a client. Avoids
9444    /// needing ClientFactory trait in scope, avoids unidiomatic
9445    /// make_Trait name.
9446    ///
9447    /// ```
9448    /// # const _: &str = stringify! {
9449    /// use bgs::client::BuckGraphService;
9450    ///
9451    /// let protocol = BinaryProtocol::new();
9452    /// let transport = HttpClient::new();
9453    /// let client = <dyn BuckGraphService>::new(protocol, transport);
9454    /// # };
9455    /// ```
9456    impl dyn GeneralStorageService {
9457        pub fn new<P, T>(
9458            protocol: P,
9459            transport: T,
9460        ) -> ::std::sync::Arc<impl GeneralStorageService + ::std::marker::Send + ::std::marker::Sync + 'static>
9461        where
9462            P: ::fbthrift::Protocol<Frame = T>,
9463            T: ::fbthrift::Transport,
9464            P::Deserializer: ::std::marker::Send,
9465        {
9466            let spawner = ::fbthrift::help::NoopSpawner;
9467            Self::with_spawner(protocol, transport, spawner)
9468        }
9469
9470        pub fn with_spawner<P, T, S>(
9471            protocol: P,
9472            transport: T,
9473            spawner: S,
9474        ) -> ::std::sync::Arc<impl GeneralStorageService + ::std::marker::Send + ::std::marker::Sync + 'static>
9475        where
9476            P: ::fbthrift::Protocol<Frame = T>,
9477            T: ::fbthrift::Transport,
9478            P::Deserializer: ::std::marker::Send,
9479            S: ::fbthrift::help::Spawner,
9480        {
9481            let _ = protocol;
9482            let _ = spawner;
9483            ::std::sync::Arc::new(GeneralStorageServiceImpl::<P, T, S>::new(transport))
9484        }
9485    }
9486
9487    impl<T> dyn GeneralStorageServiceExt<T>
9488    where
9489        T: ::fbthrift::Transport,
9490    {
9491        pub fn new<P>(
9492            protocol: P,
9493            transport: T,
9494        ) -> ::std::sync::Arc<impl GeneralStorageServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
9495        where
9496            P: ::fbthrift::Protocol<Frame = T>,
9497            P::Deserializer: ::std::marker::Send,
9498        {
9499            let spawner = ::fbthrift::help::NoopSpawner;
9500            Self::with_spawner(protocol, transport, spawner)
9501        }
9502
9503        pub fn with_spawner<P, S>(
9504            protocol: P,
9505            transport: T,
9506            spawner: S,
9507        ) -> ::std::sync::Arc<impl GeneralStorageServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
9508        where
9509            P: ::fbthrift::Protocol<Frame = T>,
9510            P::Deserializer: ::std::marker::Send,
9511            S: ::fbthrift::help::Spawner,
9512        {
9513            let _ = protocol;
9514            let _ = spawner;
9515            ::std::sync::Arc::new(GeneralStorageServiceImpl::<P, T, S>::new(transport))
9516        }
9517    }
9518
9519    pub type GeneralStorageServiceDynClient = <make_GeneralStorageService as ::fbthrift::ClientFactory>::Api;
9520    pub type GeneralStorageServiceClient = ::std::sync::Arc<GeneralStorageServiceDynClient>;
9521
9522    /// The same thing, but to be called from generic contexts where we are
9523    /// working with a type parameter `C: ClientFactory` to produce clients.
9524    impl ::fbthrift::ClientFactory for make_GeneralStorageService {
9525        type Api = dyn GeneralStorageService + ::std::marker::Send + ::std::marker::Sync + 'static;
9526
9527        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
9528        where
9529            P: ::fbthrift::Protocol<Frame = T>,
9530            T: ::fbthrift::Transport,
9531            P::Deserializer: ::std::marker::Send,
9532            S: ::fbthrift::help::Spawner,
9533        {
9534            <dyn GeneralStorageService>::with_spawner(protocol, transport, spawner)
9535        }
9536    }
9537
9538
9539    pub struct InternalStorageServiceImpl<P, T, S = ::fbthrift::NoopSpawner> {
9540        transport: T,
9541        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
9542    }
9543
9544    impl<P, T, S> InternalStorageServiceImpl<P, T, S>
9545    where
9546        P: ::fbthrift::Protocol,
9547        T: ::fbthrift::Transport,
9548        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
9549        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
9550        P::Deserializer: ::std::marker::Send,
9551        S: ::fbthrift::help::Spawner,
9552    {
9553        pub fn new(
9554            transport: T,
9555        ) -> Self {
9556            Self {
9557                transport,
9558                _phantom: ::std::marker::PhantomData,
9559            }
9560        }
9561
9562        pub fn transport(&self) -> &T {
9563            &self.transport
9564        }
9565
9566
9567        fn _chainAddEdges_impl(
9568            &self,
9569            arg_req: &crate::types::ChainAddEdgesRequest,
9570            rpc_options: T::RpcOptions,
9571        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError>> {
9572            use ::const_cstr::const_cstr;
9573            use ::tracing::Instrument as _;
9574            use ::futures::FutureExt as _;
9575
9576            const_cstr! {
9577                SERVICE_NAME = "InternalStorageService";
9578                METHOD_NAME = "InternalStorageService.chainAddEdges";
9579            }
9580            let args = self::Args_InternalStorageService_chainAddEdges {
9581                req: arg_req,
9582                _phantom: ::std::marker::PhantomData,
9583            };
9584
9585            let transport = self.transport();
9586
9587            // need to do call setup outside of async block because T: Transport isn't Send
9588            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("chainAddEdges", &args) {
9589                ::std::result::Result::Ok(res) => res,
9590                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
9591            };
9592
9593            let call = transport
9594                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
9595                .instrument(::tracing::trace_span!("call", function = "InternalStorageService.chainAddEdges"));
9596
9597            async move {
9598                let reply_env = call.await?;
9599
9600                let de = P::deserializer(reply_env);
9601                let (res, _de): (::std::result::Result<crate::services::internal_storage_service::ChainAddEdgesExn, _>, _) =
9602                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
9603
9604                let res = match res {
9605                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
9606                    ::std::result::Result::Err(aexn) =>
9607                        ::std::result::Result::Err(crate::errors::internal_storage_service::ChainAddEdgesError::ApplicationException(aexn))
9608                };
9609                res
9610            }
9611            .instrument(::tracing::info_span!("InternalStorageService.chainAddEdges"))
9612            .boxed()
9613        }
9614
9615        fn _chainUpdateEdge_impl(
9616            &self,
9617            arg_req: &crate::types::ChainUpdateEdgeRequest,
9618            rpc_options: T::RpcOptions,
9619        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError>> {
9620            use ::const_cstr::const_cstr;
9621            use ::tracing::Instrument as _;
9622            use ::futures::FutureExt as _;
9623
9624            const_cstr! {
9625                SERVICE_NAME = "InternalStorageService";
9626                METHOD_NAME = "InternalStorageService.chainUpdateEdge";
9627            }
9628            let args = self::Args_InternalStorageService_chainUpdateEdge {
9629                req: arg_req,
9630                _phantom: ::std::marker::PhantomData,
9631            };
9632
9633            let transport = self.transport();
9634
9635            // need to do call setup outside of async block because T: Transport isn't Send
9636            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("chainUpdateEdge", &args) {
9637                ::std::result::Result::Ok(res) => res,
9638                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
9639            };
9640
9641            let call = transport
9642                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
9643                .instrument(::tracing::trace_span!("call", function = "InternalStorageService.chainUpdateEdge"));
9644
9645            async move {
9646                let reply_env = call.await?;
9647
9648                let de = P::deserializer(reply_env);
9649                let (res, _de): (::std::result::Result<crate::services::internal_storage_service::ChainUpdateEdgeExn, _>, _) =
9650                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
9651
9652                let res = match res {
9653                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
9654                    ::std::result::Result::Err(aexn) =>
9655                        ::std::result::Result::Err(crate::errors::internal_storage_service::ChainUpdateEdgeError::ApplicationException(aexn))
9656                };
9657                res
9658            }
9659            .instrument(::tracing::info_span!("InternalStorageService.chainUpdateEdge"))
9660            .boxed()
9661        }
9662    }
9663
9664    pub trait InternalStorageService: ::std::marker::Send {
9665        fn chainAddEdges(
9666            &self,
9667            arg_req: &crate::types::ChainAddEdgesRequest,
9668        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError>>;
9669
9670        fn chainUpdateEdge(
9671            &self,
9672            arg_req: &crate::types::ChainUpdateEdgeRequest,
9673        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError>>;
9674    }
9675
9676    pub trait InternalStorageServiceExt<T>: InternalStorageService
9677    where
9678        T: ::fbthrift::Transport,
9679    {
9680        fn chainAddEdges_with_rpc_opts(
9681            &self,
9682            arg_req: &crate::types::ChainAddEdgesRequest,
9683            rpc_options: T::RpcOptions,
9684        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError>>;
9685        fn chainUpdateEdge_with_rpc_opts(
9686            &self,
9687            arg_req: &crate::types::ChainUpdateEdgeRequest,
9688            rpc_options: T::RpcOptions,
9689        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError>>;
9690    }
9691
9692    struct Args_InternalStorageService_chainAddEdges<'a> {
9693        req: &'a crate::types::ChainAddEdgesRequest,
9694        _phantom: ::std::marker::PhantomData<&'a ()>,
9695    }
9696
9697    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_InternalStorageService_chainAddEdges<'a> {
9698        #[inline]
9699        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "InternalStorageService.chainAddEdges"))]
9700        fn write(&self, p: &mut P) {
9701            p.write_struct_begin("args");
9702            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
9703            ::fbthrift::Serialize::write(&self.req, p);
9704            p.write_field_end();
9705            p.write_field_stop();
9706            p.write_struct_end();
9707        }
9708    }
9709
9710    struct Args_InternalStorageService_chainUpdateEdge<'a> {
9711        req: &'a crate::types::ChainUpdateEdgeRequest,
9712        _phantom: ::std::marker::PhantomData<&'a ()>,
9713    }
9714
9715    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_InternalStorageService_chainUpdateEdge<'a> {
9716        #[inline]
9717        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "InternalStorageService.chainUpdateEdge"))]
9718        fn write(&self, p: &mut P) {
9719            p.write_struct_begin("args");
9720            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
9721            ::fbthrift::Serialize::write(&self.req, p);
9722            p.write_field_end();
9723            p.write_field_stop();
9724            p.write_struct_end();
9725        }
9726    }
9727
9728    impl<P, T, S> InternalStorageService for InternalStorageServiceImpl<P, T, S>
9729    where
9730        P: ::fbthrift::Protocol,
9731        T: ::fbthrift::Transport,
9732        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
9733        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
9734        P::Deserializer: ::std::marker::Send,
9735        S: ::fbthrift::help::Spawner,
9736    {
9737        fn chainAddEdges(
9738            &self,
9739            arg_req: &crate::types::ChainAddEdgesRequest,
9740        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError>> {
9741            let rpc_options = T::RpcOptions::default();
9742            self._chainAddEdges_impl(
9743                arg_req,
9744                rpc_options,
9745            )
9746        }
9747        fn chainUpdateEdge(
9748            &self,
9749            arg_req: &crate::types::ChainUpdateEdgeRequest,
9750        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError>> {
9751            let rpc_options = T::RpcOptions::default();
9752            self._chainUpdateEdge_impl(
9753                arg_req,
9754                rpc_options,
9755            )
9756        }
9757    }
9758
9759    impl<P, T, S> InternalStorageServiceExt<T> for InternalStorageServiceImpl<P, T, S>
9760    where
9761        P: ::fbthrift::Protocol,
9762        T: ::fbthrift::Transport,
9763        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
9764        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
9765        P::Deserializer: ::std::marker::Send,
9766        S: ::fbthrift::help::Spawner,
9767    {
9768        fn chainAddEdges_with_rpc_opts(
9769            &self,
9770            arg_req: &crate::types::ChainAddEdgesRequest,
9771            rpc_options: T::RpcOptions,
9772        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError>> {
9773            self._chainAddEdges_impl(
9774                arg_req,
9775                rpc_options,
9776            )
9777        }
9778        fn chainUpdateEdge_with_rpc_opts(
9779            &self,
9780            arg_req: &crate::types::ChainUpdateEdgeRequest,
9781            rpc_options: T::RpcOptions,
9782        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError>> {
9783            self._chainUpdateEdge_impl(
9784                arg_req,
9785                rpc_options,
9786            )
9787        }
9788    }
9789
9790    impl<'a, S> InternalStorageService for S
9791    where
9792        S: ::std::convert::AsRef<dyn InternalStorageService + 'a>,
9793        S: ::std::marker::Send,
9794    {
9795        fn chainAddEdges(
9796            &self,
9797            arg_req: &crate::types::ChainAddEdgesRequest,
9798        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError>> {
9799            self.as_ref().chainAddEdges(
9800                arg_req,
9801            )
9802        }
9803        fn chainUpdateEdge(
9804            &self,
9805            arg_req: &crate::types::ChainUpdateEdgeRequest,
9806        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError>> {
9807            self.as_ref().chainUpdateEdge(
9808                arg_req,
9809            )
9810        }
9811    }
9812
9813    impl<'a, S, T> InternalStorageServiceExt<T> for S
9814    where
9815        S: ::std::convert::AsRef<dyn InternalStorageService + 'a>,
9816        S: ::std::convert::AsRef<dyn InternalStorageServiceExt<T> + 'a>,
9817        S: ::std::marker::Send,
9818        T: ::fbthrift::Transport,
9819    {
9820        fn chainAddEdges_with_rpc_opts(
9821            &self,
9822            arg_req: &crate::types::ChainAddEdgesRequest,
9823            rpc_options: T::RpcOptions,
9824        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError>> {
9825            <Self as ::std::convert::AsRef<dyn InternalStorageServiceExt<T>>>::as_ref(self).chainAddEdges_with_rpc_opts(
9826                arg_req,
9827                rpc_options,
9828            )
9829        }
9830        fn chainUpdateEdge_with_rpc_opts(
9831            &self,
9832            arg_req: &crate::types::ChainUpdateEdgeRequest,
9833            rpc_options: T::RpcOptions,
9834        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError>> {
9835            <Self as ::std::convert::AsRef<dyn InternalStorageServiceExt<T>>>::as_ref(self).chainUpdateEdge_with_rpc_opts(
9836                arg_req,
9837                rpc_options,
9838            )
9839        }
9840    }
9841
9842    #[derive(Clone)]
9843    pub struct make_InternalStorageService;
9844
9845    /// To be called by user directly setting up a client. Avoids
9846    /// needing ClientFactory trait in scope, avoids unidiomatic
9847    /// make_Trait name.
9848    ///
9849    /// ```
9850    /// # const _: &str = stringify! {
9851    /// use bgs::client::BuckGraphService;
9852    ///
9853    /// let protocol = BinaryProtocol::new();
9854    /// let transport = HttpClient::new();
9855    /// let client = <dyn BuckGraphService>::new(protocol, transport);
9856    /// # };
9857    /// ```
9858    impl dyn InternalStorageService {
9859        pub fn new<P, T>(
9860            protocol: P,
9861            transport: T,
9862        ) -> ::std::sync::Arc<impl InternalStorageService + ::std::marker::Send + ::std::marker::Sync + 'static>
9863        where
9864            P: ::fbthrift::Protocol<Frame = T>,
9865            T: ::fbthrift::Transport,
9866            P::Deserializer: ::std::marker::Send,
9867        {
9868            let spawner = ::fbthrift::help::NoopSpawner;
9869            Self::with_spawner(protocol, transport, spawner)
9870        }
9871
9872        pub fn with_spawner<P, T, S>(
9873            protocol: P,
9874            transport: T,
9875            spawner: S,
9876        ) -> ::std::sync::Arc<impl InternalStorageService + ::std::marker::Send + ::std::marker::Sync + 'static>
9877        where
9878            P: ::fbthrift::Protocol<Frame = T>,
9879            T: ::fbthrift::Transport,
9880            P::Deserializer: ::std::marker::Send,
9881            S: ::fbthrift::help::Spawner,
9882        {
9883            let _ = protocol;
9884            let _ = spawner;
9885            ::std::sync::Arc::new(InternalStorageServiceImpl::<P, T, S>::new(transport))
9886        }
9887    }
9888
9889    impl<T> dyn InternalStorageServiceExt<T>
9890    where
9891        T: ::fbthrift::Transport,
9892    {
9893        pub fn new<P>(
9894            protocol: P,
9895            transport: T,
9896        ) -> ::std::sync::Arc<impl InternalStorageServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
9897        where
9898            P: ::fbthrift::Protocol<Frame = T>,
9899            P::Deserializer: ::std::marker::Send,
9900        {
9901            let spawner = ::fbthrift::help::NoopSpawner;
9902            Self::with_spawner(protocol, transport, spawner)
9903        }
9904
9905        pub fn with_spawner<P, S>(
9906            protocol: P,
9907            transport: T,
9908            spawner: S,
9909        ) -> ::std::sync::Arc<impl InternalStorageServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
9910        where
9911            P: ::fbthrift::Protocol<Frame = T>,
9912            P::Deserializer: ::std::marker::Send,
9913            S: ::fbthrift::help::Spawner,
9914        {
9915            let _ = protocol;
9916            let _ = spawner;
9917            ::std::sync::Arc::new(InternalStorageServiceImpl::<P, T, S>::new(transport))
9918        }
9919    }
9920
9921    pub type InternalStorageServiceDynClient = <make_InternalStorageService as ::fbthrift::ClientFactory>::Api;
9922    pub type InternalStorageServiceClient = ::std::sync::Arc<InternalStorageServiceDynClient>;
9923
9924    /// The same thing, but to be called from generic contexts where we are
9925    /// working with a type parameter `C: ClientFactory` to produce clients.
9926    impl ::fbthrift::ClientFactory for make_InternalStorageService {
9927        type Api = dyn InternalStorageService + ::std::marker::Send + ::std::marker::Sync + 'static;
9928
9929        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
9930        where
9931            P: ::fbthrift::Protocol<Frame = T>,
9932            T: ::fbthrift::Transport,
9933            P::Deserializer: ::std::marker::Send,
9934            S: ::fbthrift::help::Spawner,
9935        {
9936            <dyn InternalStorageService>::with_spawner(protocol, transport, spawner)
9937        }
9938    }
9939
9940}
9941
9942/// Server definitions for `storage`.
9943pub mod server {
9944    #[::async_trait::async_trait]
9945    pub trait GraphStorageService: ::std::marker::Send + ::std::marker::Sync + 'static {
9946        async fn getNeighbors(
9947            &self,
9948            _req: crate::types::GetNeighborsRequest,
9949        ) -> ::std::result::Result<crate::types::GetNeighborsResponse, crate::services::graph_storage_service::GetNeighborsExn> {
9950            ::std::result::Result::Err(crate::services::graph_storage_service::GetNeighborsExn::ApplicationException(
9951                ::fbthrift::ApplicationException::unimplemented_method(
9952                    "GraphStorageService",
9953                    "getNeighbors",
9954                ),
9955            ))
9956        }
9957        async fn getProps(
9958            &self,
9959            _req: crate::types::GetPropRequest,
9960        ) -> ::std::result::Result<crate::types::GetPropResponse, crate::services::graph_storage_service::GetPropsExn> {
9961            ::std::result::Result::Err(crate::services::graph_storage_service::GetPropsExn::ApplicationException(
9962                ::fbthrift::ApplicationException::unimplemented_method(
9963                    "GraphStorageService",
9964                    "getProps",
9965                ),
9966            ))
9967        }
9968        async fn addVertices(
9969            &self,
9970            _req: crate::types::AddVerticesRequest,
9971        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::AddVerticesExn> {
9972            ::std::result::Result::Err(crate::services::graph_storage_service::AddVerticesExn::ApplicationException(
9973                ::fbthrift::ApplicationException::unimplemented_method(
9974                    "GraphStorageService",
9975                    "addVertices",
9976                ),
9977            ))
9978        }
9979        async fn addEdges(
9980            &self,
9981            _req: crate::types::AddEdgesRequest,
9982        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::AddEdgesExn> {
9983            ::std::result::Result::Err(crate::services::graph_storage_service::AddEdgesExn::ApplicationException(
9984                ::fbthrift::ApplicationException::unimplemented_method(
9985                    "GraphStorageService",
9986                    "addEdges",
9987                ),
9988            ))
9989        }
9990        async fn deleteEdges(
9991            &self,
9992            _req: crate::types::DeleteEdgesRequest,
9993        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::DeleteEdgesExn> {
9994            ::std::result::Result::Err(crate::services::graph_storage_service::DeleteEdgesExn::ApplicationException(
9995                ::fbthrift::ApplicationException::unimplemented_method(
9996                    "GraphStorageService",
9997                    "deleteEdges",
9998                ),
9999            ))
10000        }
10001        async fn deleteVertices(
10002            &self,
10003            _req: crate::types::DeleteVerticesRequest,
10004        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::DeleteVerticesExn> {
10005            ::std::result::Result::Err(crate::services::graph_storage_service::DeleteVerticesExn::ApplicationException(
10006                ::fbthrift::ApplicationException::unimplemented_method(
10007                    "GraphStorageService",
10008                    "deleteVertices",
10009                ),
10010            ))
10011        }
10012        async fn deleteTags(
10013            &self,
10014            _req: crate::types::DeleteTagsRequest,
10015        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::DeleteTagsExn> {
10016            ::std::result::Result::Err(crate::services::graph_storage_service::DeleteTagsExn::ApplicationException(
10017                ::fbthrift::ApplicationException::unimplemented_method(
10018                    "GraphStorageService",
10019                    "deleteTags",
10020                ),
10021            ))
10022        }
10023        async fn updateVertex(
10024            &self,
10025            _req: crate::types::UpdateVertexRequest,
10026        ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::graph_storage_service::UpdateVertexExn> {
10027            ::std::result::Result::Err(crate::services::graph_storage_service::UpdateVertexExn::ApplicationException(
10028                ::fbthrift::ApplicationException::unimplemented_method(
10029                    "GraphStorageService",
10030                    "updateVertex",
10031                ),
10032            ))
10033        }
10034        async fn updateEdge(
10035            &self,
10036            _req: crate::types::UpdateEdgeRequest,
10037        ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::graph_storage_service::UpdateEdgeExn> {
10038            ::std::result::Result::Err(crate::services::graph_storage_service::UpdateEdgeExn::ApplicationException(
10039                ::fbthrift::ApplicationException::unimplemented_method(
10040                    "GraphStorageService",
10041                    "updateEdge",
10042                ),
10043            ))
10044        }
10045        async fn scanVertex(
10046            &self,
10047            _req: crate::types::ScanVertexRequest,
10048        ) -> ::std::result::Result<crate::types::ScanVertexResponse, crate::services::graph_storage_service::ScanVertexExn> {
10049            ::std::result::Result::Err(crate::services::graph_storage_service::ScanVertexExn::ApplicationException(
10050                ::fbthrift::ApplicationException::unimplemented_method(
10051                    "GraphStorageService",
10052                    "scanVertex",
10053                ),
10054            ))
10055        }
10056        async fn scanEdge(
10057            &self,
10058            _req: crate::types::ScanEdgeRequest,
10059        ) -> ::std::result::Result<crate::types::ScanEdgeResponse, crate::services::graph_storage_service::ScanEdgeExn> {
10060            ::std::result::Result::Err(crate::services::graph_storage_service::ScanEdgeExn::ApplicationException(
10061                ::fbthrift::ApplicationException::unimplemented_method(
10062                    "GraphStorageService",
10063                    "scanEdge",
10064                ),
10065            ))
10066        }
10067        async fn getUUID(
10068            &self,
10069            _req: crate::types::GetUUIDReq,
10070        ) -> ::std::result::Result<crate::types::GetUUIDResp, crate::services::graph_storage_service::GetUUIDExn> {
10071            ::std::result::Result::Err(crate::services::graph_storage_service::GetUUIDExn::ApplicationException(
10072                ::fbthrift::ApplicationException::unimplemented_method(
10073                    "GraphStorageService",
10074                    "getUUID",
10075                ),
10076            ))
10077        }
10078        async fn lookupIndex(
10079            &self,
10080            _req: crate::types::LookupIndexRequest,
10081        ) -> ::std::result::Result<crate::types::LookupIndexResp, crate::services::graph_storage_service::LookupIndexExn> {
10082            ::std::result::Result::Err(crate::services::graph_storage_service::LookupIndexExn::ApplicationException(
10083                ::fbthrift::ApplicationException::unimplemented_method(
10084                    "GraphStorageService",
10085                    "lookupIndex",
10086                ),
10087            ))
10088        }
10089        async fn lookupAndTraverse(
10090            &self,
10091            _req: crate::types::LookupAndTraverseRequest,
10092        ) -> ::std::result::Result<crate::types::GetNeighborsResponse, crate::services::graph_storage_service::LookupAndTraverseExn> {
10093            ::std::result::Result::Err(crate::services::graph_storage_service::LookupAndTraverseExn::ApplicationException(
10094                ::fbthrift::ApplicationException::unimplemented_method(
10095                    "GraphStorageService",
10096                    "lookupAndTraverse",
10097                ),
10098            ))
10099        }
10100        async fn chainUpdateEdge(
10101            &self,
10102            _req: crate::types::UpdateEdgeRequest,
10103        ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::graph_storage_service::ChainUpdateEdgeExn> {
10104            ::std::result::Result::Err(crate::services::graph_storage_service::ChainUpdateEdgeExn::ApplicationException(
10105                ::fbthrift::ApplicationException::unimplemented_method(
10106                    "GraphStorageService",
10107                    "chainUpdateEdge",
10108                ),
10109            ))
10110        }
10111        async fn chainAddEdges(
10112            &self,
10113            _req: crate::types::AddEdgesRequest,
10114        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::ChainAddEdgesExn> {
10115            ::std::result::Result::Err(crate::services::graph_storage_service::ChainAddEdgesExn::ApplicationException(
10116                ::fbthrift::ApplicationException::unimplemented_method(
10117                    "GraphStorageService",
10118                    "chainAddEdges",
10119                ),
10120            ))
10121        }
10122    }
10123
10124    #[::async_trait::async_trait]
10125    impl<T> GraphStorageService for ::std::boxed::Box<T>
10126    where
10127        T: GraphStorageService + Send + Sync + ?Sized,
10128    {
10129        async fn getNeighbors(
10130            &self,
10131            req: crate::types::GetNeighborsRequest,
10132        ) -> ::std::result::Result<crate::types::GetNeighborsResponse, crate::services::graph_storage_service::GetNeighborsExn> {
10133            (**self).getNeighbors(
10134                req,
10135            ).await
10136        }
10137        async fn getProps(
10138            &self,
10139            req: crate::types::GetPropRequest,
10140        ) -> ::std::result::Result<crate::types::GetPropResponse, crate::services::graph_storage_service::GetPropsExn> {
10141            (**self).getProps(
10142                req,
10143            ).await
10144        }
10145        async fn addVertices(
10146            &self,
10147            req: crate::types::AddVerticesRequest,
10148        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::AddVerticesExn> {
10149            (**self).addVertices(
10150                req,
10151            ).await
10152        }
10153        async fn addEdges(
10154            &self,
10155            req: crate::types::AddEdgesRequest,
10156        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::AddEdgesExn> {
10157            (**self).addEdges(
10158                req,
10159            ).await
10160        }
10161        async fn deleteEdges(
10162            &self,
10163            req: crate::types::DeleteEdgesRequest,
10164        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::DeleteEdgesExn> {
10165            (**self).deleteEdges(
10166                req,
10167            ).await
10168        }
10169        async fn deleteVertices(
10170            &self,
10171            req: crate::types::DeleteVerticesRequest,
10172        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::DeleteVerticesExn> {
10173            (**self).deleteVertices(
10174                req,
10175            ).await
10176        }
10177        async fn deleteTags(
10178            &self,
10179            req: crate::types::DeleteTagsRequest,
10180        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::DeleteTagsExn> {
10181            (**self).deleteTags(
10182                req,
10183            ).await
10184        }
10185        async fn updateVertex(
10186            &self,
10187            req: crate::types::UpdateVertexRequest,
10188        ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::graph_storage_service::UpdateVertexExn> {
10189            (**self).updateVertex(
10190                req,
10191            ).await
10192        }
10193        async fn updateEdge(
10194            &self,
10195            req: crate::types::UpdateEdgeRequest,
10196        ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::graph_storage_service::UpdateEdgeExn> {
10197            (**self).updateEdge(
10198                req,
10199            ).await
10200        }
10201        async fn scanVertex(
10202            &self,
10203            req: crate::types::ScanVertexRequest,
10204        ) -> ::std::result::Result<crate::types::ScanVertexResponse, crate::services::graph_storage_service::ScanVertexExn> {
10205            (**self).scanVertex(
10206                req,
10207            ).await
10208        }
10209        async fn scanEdge(
10210            &self,
10211            req: crate::types::ScanEdgeRequest,
10212        ) -> ::std::result::Result<crate::types::ScanEdgeResponse, crate::services::graph_storage_service::ScanEdgeExn> {
10213            (**self).scanEdge(
10214                req,
10215            ).await
10216        }
10217        async fn getUUID(
10218            &self,
10219            req: crate::types::GetUUIDReq,
10220        ) -> ::std::result::Result<crate::types::GetUUIDResp, crate::services::graph_storage_service::GetUUIDExn> {
10221            (**self).getUUID(
10222                req,
10223            ).await
10224        }
10225        async fn lookupIndex(
10226            &self,
10227            req: crate::types::LookupIndexRequest,
10228        ) -> ::std::result::Result<crate::types::LookupIndexResp, crate::services::graph_storage_service::LookupIndexExn> {
10229            (**self).lookupIndex(
10230                req,
10231            ).await
10232        }
10233        async fn lookupAndTraverse(
10234            &self,
10235            req: crate::types::LookupAndTraverseRequest,
10236        ) -> ::std::result::Result<crate::types::GetNeighborsResponse, crate::services::graph_storage_service::LookupAndTraverseExn> {
10237            (**self).lookupAndTraverse(
10238                req,
10239            ).await
10240        }
10241        async fn chainUpdateEdge(
10242            &self,
10243            req: crate::types::UpdateEdgeRequest,
10244        ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::graph_storage_service::ChainUpdateEdgeExn> {
10245            (**self).chainUpdateEdge(
10246                req,
10247            ).await
10248        }
10249        async fn chainAddEdges(
10250            &self,
10251            req: crate::types::AddEdgesRequest,
10252        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::graph_storage_service::ChainAddEdgesExn> {
10253            (**self).chainAddEdges(
10254                req,
10255            ).await
10256        }
10257    }
10258
10259    /// Processor for GraphStorageService's methods.
10260    #[derive(Clone, Debug)]
10261    pub struct GraphStorageServiceProcessor<P, H, R, RS> {
10262        service: H,
10263        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
10264        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
10265    }
10266
10267    struct Args_GraphStorageService_getNeighbors {
10268        req: crate::types::GetNeighborsRequest,
10269    }
10270    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_getNeighbors {
10271        #[inline]
10272        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.getNeighbors"))]
10273        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10274            static ARGS: &[::fbthrift::Field] = &[
10275                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10276            ];
10277            let mut field_req = ::std::option::Option::None;
10278            let _ = p.read_struct_begin(|_| ())?;
10279            loop {
10280                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10281                match (fty, fid as ::std::primitive::i32) {
10282                    (::fbthrift::TType::Stop, _) => break,
10283                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10284                    (fty, _) => p.skip(fty)?,
10285                }
10286                p.read_field_end()?;
10287            }
10288            p.read_struct_end()?;
10289            ::std::result::Result::Ok(Self {
10290                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.getNeighbors", "req"))?,
10291            })
10292        }
10293    }
10294
10295    struct Args_GraphStorageService_getProps {
10296        req: crate::types::GetPropRequest,
10297    }
10298    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_getProps {
10299        #[inline]
10300        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.getProps"))]
10301        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10302            static ARGS: &[::fbthrift::Field] = &[
10303                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10304            ];
10305            let mut field_req = ::std::option::Option::None;
10306            let _ = p.read_struct_begin(|_| ())?;
10307            loop {
10308                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10309                match (fty, fid as ::std::primitive::i32) {
10310                    (::fbthrift::TType::Stop, _) => break,
10311                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10312                    (fty, _) => p.skip(fty)?,
10313                }
10314                p.read_field_end()?;
10315            }
10316            p.read_struct_end()?;
10317            ::std::result::Result::Ok(Self {
10318                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.getProps", "req"))?,
10319            })
10320        }
10321    }
10322
10323    struct Args_GraphStorageService_addVertices {
10324        req: crate::types::AddVerticesRequest,
10325    }
10326    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_addVertices {
10327        #[inline]
10328        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.addVertices"))]
10329        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10330            static ARGS: &[::fbthrift::Field] = &[
10331                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10332            ];
10333            let mut field_req = ::std::option::Option::None;
10334            let _ = p.read_struct_begin(|_| ())?;
10335            loop {
10336                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10337                match (fty, fid as ::std::primitive::i32) {
10338                    (::fbthrift::TType::Stop, _) => break,
10339                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10340                    (fty, _) => p.skip(fty)?,
10341                }
10342                p.read_field_end()?;
10343            }
10344            p.read_struct_end()?;
10345            ::std::result::Result::Ok(Self {
10346                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.addVertices", "req"))?,
10347            })
10348        }
10349    }
10350
10351    struct Args_GraphStorageService_addEdges {
10352        req: crate::types::AddEdgesRequest,
10353    }
10354    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_addEdges {
10355        #[inline]
10356        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.addEdges"))]
10357        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10358            static ARGS: &[::fbthrift::Field] = &[
10359                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10360            ];
10361            let mut field_req = ::std::option::Option::None;
10362            let _ = p.read_struct_begin(|_| ())?;
10363            loop {
10364                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10365                match (fty, fid as ::std::primitive::i32) {
10366                    (::fbthrift::TType::Stop, _) => break,
10367                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10368                    (fty, _) => p.skip(fty)?,
10369                }
10370                p.read_field_end()?;
10371            }
10372            p.read_struct_end()?;
10373            ::std::result::Result::Ok(Self {
10374                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.addEdges", "req"))?,
10375            })
10376        }
10377    }
10378
10379    struct Args_GraphStorageService_deleteEdges {
10380        req: crate::types::DeleteEdgesRequest,
10381    }
10382    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_deleteEdges {
10383        #[inline]
10384        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.deleteEdges"))]
10385        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10386            static ARGS: &[::fbthrift::Field] = &[
10387                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10388            ];
10389            let mut field_req = ::std::option::Option::None;
10390            let _ = p.read_struct_begin(|_| ())?;
10391            loop {
10392                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10393                match (fty, fid as ::std::primitive::i32) {
10394                    (::fbthrift::TType::Stop, _) => break,
10395                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10396                    (fty, _) => p.skip(fty)?,
10397                }
10398                p.read_field_end()?;
10399            }
10400            p.read_struct_end()?;
10401            ::std::result::Result::Ok(Self {
10402                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.deleteEdges", "req"))?,
10403            })
10404        }
10405    }
10406
10407    struct Args_GraphStorageService_deleteVertices {
10408        req: crate::types::DeleteVerticesRequest,
10409    }
10410    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_deleteVertices {
10411        #[inline]
10412        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.deleteVertices"))]
10413        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10414            static ARGS: &[::fbthrift::Field] = &[
10415                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10416            ];
10417            let mut field_req = ::std::option::Option::None;
10418            let _ = p.read_struct_begin(|_| ())?;
10419            loop {
10420                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10421                match (fty, fid as ::std::primitive::i32) {
10422                    (::fbthrift::TType::Stop, _) => break,
10423                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10424                    (fty, _) => p.skip(fty)?,
10425                }
10426                p.read_field_end()?;
10427            }
10428            p.read_struct_end()?;
10429            ::std::result::Result::Ok(Self {
10430                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.deleteVertices", "req"))?,
10431            })
10432        }
10433    }
10434
10435    struct Args_GraphStorageService_deleteTags {
10436        req: crate::types::DeleteTagsRequest,
10437    }
10438    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_deleteTags {
10439        #[inline]
10440        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.deleteTags"))]
10441        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10442            static ARGS: &[::fbthrift::Field] = &[
10443                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10444            ];
10445            let mut field_req = ::std::option::Option::None;
10446            let _ = p.read_struct_begin(|_| ())?;
10447            loop {
10448                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10449                match (fty, fid as ::std::primitive::i32) {
10450                    (::fbthrift::TType::Stop, _) => break,
10451                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10452                    (fty, _) => p.skip(fty)?,
10453                }
10454                p.read_field_end()?;
10455            }
10456            p.read_struct_end()?;
10457            ::std::result::Result::Ok(Self {
10458                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.deleteTags", "req"))?,
10459            })
10460        }
10461    }
10462
10463    struct Args_GraphStorageService_updateVertex {
10464        req: crate::types::UpdateVertexRequest,
10465    }
10466    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_updateVertex {
10467        #[inline]
10468        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.updateVertex"))]
10469        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10470            static ARGS: &[::fbthrift::Field] = &[
10471                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10472            ];
10473            let mut field_req = ::std::option::Option::None;
10474            let _ = p.read_struct_begin(|_| ())?;
10475            loop {
10476                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10477                match (fty, fid as ::std::primitive::i32) {
10478                    (::fbthrift::TType::Stop, _) => break,
10479                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10480                    (fty, _) => p.skip(fty)?,
10481                }
10482                p.read_field_end()?;
10483            }
10484            p.read_struct_end()?;
10485            ::std::result::Result::Ok(Self {
10486                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.updateVertex", "req"))?,
10487            })
10488        }
10489    }
10490
10491    struct Args_GraphStorageService_updateEdge {
10492        req: crate::types::UpdateEdgeRequest,
10493    }
10494    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_updateEdge {
10495        #[inline]
10496        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.updateEdge"))]
10497        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10498            static ARGS: &[::fbthrift::Field] = &[
10499                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10500            ];
10501            let mut field_req = ::std::option::Option::None;
10502            let _ = p.read_struct_begin(|_| ())?;
10503            loop {
10504                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10505                match (fty, fid as ::std::primitive::i32) {
10506                    (::fbthrift::TType::Stop, _) => break,
10507                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10508                    (fty, _) => p.skip(fty)?,
10509                }
10510                p.read_field_end()?;
10511            }
10512            p.read_struct_end()?;
10513            ::std::result::Result::Ok(Self {
10514                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.updateEdge", "req"))?,
10515            })
10516        }
10517    }
10518
10519    struct Args_GraphStorageService_scanVertex {
10520        req: crate::types::ScanVertexRequest,
10521    }
10522    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_scanVertex {
10523        #[inline]
10524        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.scanVertex"))]
10525        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10526            static ARGS: &[::fbthrift::Field] = &[
10527                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10528            ];
10529            let mut field_req = ::std::option::Option::None;
10530            let _ = p.read_struct_begin(|_| ())?;
10531            loop {
10532                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10533                match (fty, fid as ::std::primitive::i32) {
10534                    (::fbthrift::TType::Stop, _) => break,
10535                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10536                    (fty, _) => p.skip(fty)?,
10537                }
10538                p.read_field_end()?;
10539            }
10540            p.read_struct_end()?;
10541            ::std::result::Result::Ok(Self {
10542                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.scanVertex", "req"))?,
10543            })
10544        }
10545    }
10546
10547    struct Args_GraphStorageService_scanEdge {
10548        req: crate::types::ScanEdgeRequest,
10549    }
10550    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_scanEdge {
10551        #[inline]
10552        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.scanEdge"))]
10553        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10554            static ARGS: &[::fbthrift::Field] = &[
10555                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10556            ];
10557            let mut field_req = ::std::option::Option::None;
10558            let _ = p.read_struct_begin(|_| ())?;
10559            loop {
10560                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10561                match (fty, fid as ::std::primitive::i32) {
10562                    (::fbthrift::TType::Stop, _) => break,
10563                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10564                    (fty, _) => p.skip(fty)?,
10565                }
10566                p.read_field_end()?;
10567            }
10568            p.read_struct_end()?;
10569            ::std::result::Result::Ok(Self {
10570                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.scanEdge", "req"))?,
10571            })
10572        }
10573    }
10574
10575    struct Args_GraphStorageService_getUUID {
10576        req: crate::types::GetUUIDReq,
10577    }
10578    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_getUUID {
10579        #[inline]
10580        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.getUUID"))]
10581        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10582            static ARGS: &[::fbthrift::Field] = &[
10583                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10584            ];
10585            let mut field_req = ::std::option::Option::None;
10586            let _ = p.read_struct_begin(|_| ())?;
10587            loop {
10588                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10589                match (fty, fid as ::std::primitive::i32) {
10590                    (::fbthrift::TType::Stop, _) => break,
10591                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10592                    (fty, _) => p.skip(fty)?,
10593                }
10594                p.read_field_end()?;
10595            }
10596            p.read_struct_end()?;
10597            ::std::result::Result::Ok(Self {
10598                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.getUUID", "req"))?,
10599            })
10600        }
10601    }
10602
10603    struct Args_GraphStorageService_lookupIndex {
10604        req: crate::types::LookupIndexRequest,
10605    }
10606    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_lookupIndex {
10607        #[inline]
10608        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.lookupIndex"))]
10609        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10610            static ARGS: &[::fbthrift::Field] = &[
10611                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10612            ];
10613            let mut field_req = ::std::option::Option::None;
10614            let _ = p.read_struct_begin(|_| ())?;
10615            loop {
10616                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10617                match (fty, fid as ::std::primitive::i32) {
10618                    (::fbthrift::TType::Stop, _) => break,
10619                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10620                    (fty, _) => p.skip(fty)?,
10621                }
10622                p.read_field_end()?;
10623            }
10624            p.read_struct_end()?;
10625            ::std::result::Result::Ok(Self {
10626                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.lookupIndex", "req"))?,
10627            })
10628        }
10629    }
10630
10631    struct Args_GraphStorageService_lookupAndTraverse {
10632        req: crate::types::LookupAndTraverseRequest,
10633    }
10634    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_lookupAndTraverse {
10635        #[inline]
10636        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.lookupAndTraverse"))]
10637        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10638            static ARGS: &[::fbthrift::Field] = &[
10639                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10640            ];
10641            let mut field_req = ::std::option::Option::None;
10642            let _ = p.read_struct_begin(|_| ())?;
10643            loop {
10644                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10645                match (fty, fid as ::std::primitive::i32) {
10646                    (::fbthrift::TType::Stop, _) => break,
10647                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10648                    (fty, _) => p.skip(fty)?,
10649                }
10650                p.read_field_end()?;
10651            }
10652            p.read_struct_end()?;
10653            ::std::result::Result::Ok(Self {
10654                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.lookupAndTraverse", "req"))?,
10655            })
10656        }
10657    }
10658
10659    struct Args_GraphStorageService_chainUpdateEdge {
10660        req: crate::types::UpdateEdgeRequest,
10661    }
10662    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_chainUpdateEdge {
10663        #[inline]
10664        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.chainUpdateEdge"))]
10665        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10666            static ARGS: &[::fbthrift::Field] = &[
10667                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10668            ];
10669            let mut field_req = ::std::option::Option::None;
10670            let _ = p.read_struct_begin(|_| ())?;
10671            loop {
10672                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10673                match (fty, fid as ::std::primitive::i32) {
10674                    (::fbthrift::TType::Stop, _) => break,
10675                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10676                    (fty, _) => p.skip(fty)?,
10677                }
10678                p.read_field_end()?;
10679            }
10680            p.read_struct_end()?;
10681            ::std::result::Result::Ok(Self {
10682                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.chainUpdateEdge", "req"))?,
10683            })
10684        }
10685    }
10686
10687    struct Args_GraphStorageService_chainAddEdges {
10688        req: crate::types::AddEdgesRequest,
10689    }
10690    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphStorageService_chainAddEdges {
10691        #[inline]
10692        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphStorageService.chainAddEdges"))]
10693        fn read(p: &mut P) -> ::anyhow::Result<Self> {
10694            static ARGS: &[::fbthrift::Field] = &[
10695                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
10696            ];
10697            let mut field_req = ::std::option::Option::None;
10698            let _ = p.read_struct_begin(|_| ())?;
10699            loop {
10700                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
10701                match (fty, fid as ::std::primitive::i32) {
10702                    (::fbthrift::TType::Stop, _) => break,
10703                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
10704                    (fty, _) => p.skip(fty)?,
10705                }
10706                p.read_field_end()?;
10707            }
10708            p.read_struct_end()?;
10709            ::std::result::Result::Ok(Self {
10710                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphStorageService.chainAddEdges", "req"))?,
10711            })
10712        }
10713    }
10714
10715
10716    impl<P, H, R, RS> GraphStorageServiceProcessor<P, H, R, RS>
10717    where
10718        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
10719        P::Frame: ::std::marker::Send + 'static,
10720        P::Deserializer: ::std::marker::Send,
10721        H: GraphStorageService,
10722        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
10723        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
10724        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
10725            + ::std::marker::Send + ::std::marker::Sync,
10726    {
10727        pub fn new(service: H) -> Self {
10728            Self {
10729                service,
10730                supa: ::fbthrift::NullServiceProcessor::new(),
10731                _phantom: ::std::marker::PhantomData,
10732            }
10733        }
10734
10735        pub fn into_inner(self) -> H {
10736            self.service
10737        }
10738
10739        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.getNeighbors"))]
10740        async fn handle_getNeighbors<'a>(
10741            &'a self,
10742            p: &'a mut P::Deserializer,
10743            req_ctxt: &R,
10744            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10745            _seqid: ::std::primitive::u32,
10746        ) -> ::anyhow::Result<()> {
10747            use ::const_cstr::const_cstr;
10748            use ::futures::FutureExt as _;
10749
10750            const_cstr! {
10751                SERVICE_NAME = "GraphStorageService";
10752                METHOD_NAME = "GraphStorageService.getNeighbors";
10753            }
10754            let mut ctx_stack = req_ctxt.get_context_stack(
10755                SERVICE_NAME.as_cstr(),
10756                METHOD_NAME.as_cstr(),
10757            )?;
10758            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10759            let _args: self::Args_GraphStorageService_getNeighbors = ::fbthrift::Deserialize::read(p)?;
10760            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10761                protocol: P::PROTOCOL_ID,
10762                method_name: METHOD_NAME.as_cstr(),
10763                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
10764            })?;
10765            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10766
10767            let res = ::std::panic::AssertUnwindSafe(
10768                self.service.getNeighbors(
10769                    _args.req,
10770                )
10771            )
10772            .catch_unwind()
10773            .await;
10774
10775            // nested results - panic catch on the outside, method on the inside
10776            let res = match res {
10777                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10778                    ::tracing::info!("success");
10779                    crate::services::graph_storage_service::GetNeighborsExn::Success(res)
10780                }
10781                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::GetNeighborsExn::Success(_))) => {
10782                    panic!(
10783                        "{} attempted to return success via error",
10784                        "getNeighbors",
10785                    )
10786                }
10787                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10788                    ::tracing::error!(exception = ?exn);
10789                    exn
10790                }
10791                ::std::result::Result::Err(exn) => {
10792                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.getNeighbors", exn);
10793                    crate::services::graph_storage_service::GetNeighborsExn::ApplicationException(aexn)
10794                }
10795            };
10796
10797            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10798                "getNeighbors",
10799                METHOD_NAME.as_cstr(),
10800                _seqid,
10801                req_ctxt,
10802                &mut ctx_stack,
10803                res
10804            )?;
10805            reply_state.lock().unwrap().send_reply(env);
10806            Ok(())
10807        }
10808
10809        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.getProps"))]
10810        async fn handle_getProps<'a>(
10811            &'a self,
10812            p: &'a mut P::Deserializer,
10813            req_ctxt: &R,
10814            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10815            _seqid: ::std::primitive::u32,
10816        ) -> ::anyhow::Result<()> {
10817            use ::const_cstr::const_cstr;
10818            use ::futures::FutureExt as _;
10819
10820            const_cstr! {
10821                SERVICE_NAME = "GraphStorageService";
10822                METHOD_NAME = "GraphStorageService.getProps";
10823            }
10824            let mut ctx_stack = req_ctxt.get_context_stack(
10825                SERVICE_NAME.as_cstr(),
10826                METHOD_NAME.as_cstr(),
10827            )?;
10828            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10829            let _args: self::Args_GraphStorageService_getProps = ::fbthrift::Deserialize::read(p)?;
10830            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10831                protocol: P::PROTOCOL_ID,
10832                method_name: METHOD_NAME.as_cstr(),
10833                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
10834            })?;
10835            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10836
10837            let res = ::std::panic::AssertUnwindSafe(
10838                self.service.getProps(
10839                    _args.req,
10840                )
10841            )
10842            .catch_unwind()
10843            .await;
10844
10845            // nested results - panic catch on the outside, method on the inside
10846            let res = match res {
10847                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10848                    ::tracing::info!("success");
10849                    crate::services::graph_storage_service::GetPropsExn::Success(res)
10850                }
10851                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::GetPropsExn::Success(_))) => {
10852                    panic!(
10853                        "{} attempted to return success via error",
10854                        "getProps",
10855                    )
10856                }
10857                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10858                    ::tracing::error!(exception = ?exn);
10859                    exn
10860                }
10861                ::std::result::Result::Err(exn) => {
10862                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.getProps", exn);
10863                    crate::services::graph_storage_service::GetPropsExn::ApplicationException(aexn)
10864                }
10865            };
10866
10867            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10868                "getProps",
10869                METHOD_NAME.as_cstr(),
10870                _seqid,
10871                req_ctxt,
10872                &mut ctx_stack,
10873                res
10874            )?;
10875            reply_state.lock().unwrap().send_reply(env);
10876            Ok(())
10877        }
10878
10879        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.addVertices"))]
10880        async fn handle_addVertices<'a>(
10881            &'a self,
10882            p: &'a mut P::Deserializer,
10883            req_ctxt: &R,
10884            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10885            _seqid: ::std::primitive::u32,
10886        ) -> ::anyhow::Result<()> {
10887            use ::const_cstr::const_cstr;
10888            use ::futures::FutureExt as _;
10889
10890            const_cstr! {
10891                SERVICE_NAME = "GraphStorageService";
10892                METHOD_NAME = "GraphStorageService.addVertices";
10893            }
10894            let mut ctx_stack = req_ctxt.get_context_stack(
10895                SERVICE_NAME.as_cstr(),
10896                METHOD_NAME.as_cstr(),
10897            )?;
10898            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10899            let _args: self::Args_GraphStorageService_addVertices = ::fbthrift::Deserialize::read(p)?;
10900            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10901                protocol: P::PROTOCOL_ID,
10902                method_name: METHOD_NAME.as_cstr(),
10903                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
10904            })?;
10905            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10906
10907            let res = ::std::panic::AssertUnwindSafe(
10908                self.service.addVertices(
10909                    _args.req,
10910                )
10911            )
10912            .catch_unwind()
10913            .await;
10914
10915            // nested results - panic catch on the outside, method on the inside
10916            let res = match res {
10917                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10918                    ::tracing::info!("success");
10919                    crate::services::graph_storage_service::AddVerticesExn::Success(res)
10920                }
10921                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::AddVerticesExn::Success(_))) => {
10922                    panic!(
10923                        "{} attempted to return success via error",
10924                        "addVertices",
10925                    )
10926                }
10927                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10928                    ::tracing::error!(exception = ?exn);
10929                    exn
10930                }
10931                ::std::result::Result::Err(exn) => {
10932                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.addVertices", exn);
10933                    crate::services::graph_storage_service::AddVerticesExn::ApplicationException(aexn)
10934                }
10935            };
10936
10937            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10938                "addVertices",
10939                METHOD_NAME.as_cstr(),
10940                _seqid,
10941                req_ctxt,
10942                &mut ctx_stack,
10943                res
10944            )?;
10945            reply_state.lock().unwrap().send_reply(env);
10946            Ok(())
10947        }
10948
10949        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.addEdges"))]
10950        async fn handle_addEdges<'a>(
10951            &'a self,
10952            p: &'a mut P::Deserializer,
10953            req_ctxt: &R,
10954            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10955            _seqid: ::std::primitive::u32,
10956        ) -> ::anyhow::Result<()> {
10957            use ::const_cstr::const_cstr;
10958            use ::futures::FutureExt as _;
10959
10960            const_cstr! {
10961                SERVICE_NAME = "GraphStorageService";
10962                METHOD_NAME = "GraphStorageService.addEdges";
10963            }
10964            let mut ctx_stack = req_ctxt.get_context_stack(
10965                SERVICE_NAME.as_cstr(),
10966                METHOD_NAME.as_cstr(),
10967            )?;
10968            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10969            let _args: self::Args_GraphStorageService_addEdges = ::fbthrift::Deserialize::read(p)?;
10970            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10971                protocol: P::PROTOCOL_ID,
10972                method_name: METHOD_NAME.as_cstr(),
10973                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
10974            })?;
10975            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10976
10977            let res = ::std::panic::AssertUnwindSafe(
10978                self.service.addEdges(
10979                    _args.req,
10980                )
10981            )
10982            .catch_unwind()
10983            .await;
10984
10985            // nested results - panic catch on the outside, method on the inside
10986            let res = match res {
10987                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10988                    ::tracing::info!("success");
10989                    crate::services::graph_storage_service::AddEdgesExn::Success(res)
10990                }
10991                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::AddEdgesExn::Success(_))) => {
10992                    panic!(
10993                        "{} attempted to return success via error",
10994                        "addEdges",
10995                    )
10996                }
10997                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10998                    ::tracing::error!(exception = ?exn);
10999                    exn
11000                }
11001                ::std::result::Result::Err(exn) => {
11002                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.addEdges", exn);
11003                    crate::services::graph_storage_service::AddEdgesExn::ApplicationException(aexn)
11004                }
11005            };
11006
11007            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11008                "addEdges",
11009                METHOD_NAME.as_cstr(),
11010                _seqid,
11011                req_ctxt,
11012                &mut ctx_stack,
11013                res
11014            )?;
11015            reply_state.lock().unwrap().send_reply(env);
11016            Ok(())
11017        }
11018
11019        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.deleteEdges"))]
11020        async fn handle_deleteEdges<'a>(
11021            &'a self,
11022            p: &'a mut P::Deserializer,
11023            req_ctxt: &R,
11024            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11025            _seqid: ::std::primitive::u32,
11026        ) -> ::anyhow::Result<()> {
11027            use ::const_cstr::const_cstr;
11028            use ::futures::FutureExt as _;
11029
11030            const_cstr! {
11031                SERVICE_NAME = "GraphStorageService";
11032                METHOD_NAME = "GraphStorageService.deleteEdges";
11033            }
11034            let mut ctx_stack = req_ctxt.get_context_stack(
11035                SERVICE_NAME.as_cstr(),
11036                METHOD_NAME.as_cstr(),
11037            )?;
11038            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11039            let _args: self::Args_GraphStorageService_deleteEdges = ::fbthrift::Deserialize::read(p)?;
11040            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11041                protocol: P::PROTOCOL_ID,
11042                method_name: METHOD_NAME.as_cstr(),
11043                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11044            })?;
11045            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11046
11047            let res = ::std::panic::AssertUnwindSafe(
11048                self.service.deleteEdges(
11049                    _args.req,
11050                )
11051            )
11052            .catch_unwind()
11053            .await;
11054
11055            // nested results - panic catch on the outside, method on the inside
11056            let res = match res {
11057                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11058                    ::tracing::info!("success");
11059                    crate::services::graph_storage_service::DeleteEdgesExn::Success(res)
11060                }
11061                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::DeleteEdgesExn::Success(_))) => {
11062                    panic!(
11063                        "{} attempted to return success via error",
11064                        "deleteEdges",
11065                    )
11066                }
11067                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11068                    ::tracing::error!(exception = ?exn);
11069                    exn
11070                }
11071                ::std::result::Result::Err(exn) => {
11072                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.deleteEdges", exn);
11073                    crate::services::graph_storage_service::DeleteEdgesExn::ApplicationException(aexn)
11074                }
11075            };
11076
11077            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11078                "deleteEdges",
11079                METHOD_NAME.as_cstr(),
11080                _seqid,
11081                req_ctxt,
11082                &mut ctx_stack,
11083                res
11084            )?;
11085            reply_state.lock().unwrap().send_reply(env);
11086            Ok(())
11087        }
11088
11089        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.deleteVertices"))]
11090        async fn handle_deleteVertices<'a>(
11091            &'a self,
11092            p: &'a mut P::Deserializer,
11093            req_ctxt: &R,
11094            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11095            _seqid: ::std::primitive::u32,
11096        ) -> ::anyhow::Result<()> {
11097            use ::const_cstr::const_cstr;
11098            use ::futures::FutureExt as _;
11099
11100            const_cstr! {
11101                SERVICE_NAME = "GraphStorageService";
11102                METHOD_NAME = "GraphStorageService.deleteVertices";
11103            }
11104            let mut ctx_stack = req_ctxt.get_context_stack(
11105                SERVICE_NAME.as_cstr(),
11106                METHOD_NAME.as_cstr(),
11107            )?;
11108            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11109            let _args: self::Args_GraphStorageService_deleteVertices = ::fbthrift::Deserialize::read(p)?;
11110            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11111                protocol: P::PROTOCOL_ID,
11112                method_name: METHOD_NAME.as_cstr(),
11113                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11114            })?;
11115            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11116
11117            let res = ::std::panic::AssertUnwindSafe(
11118                self.service.deleteVertices(
11119                    _args.req,
11120                )
11121            )
11122            .catch_unwind()
11123            .await;
11124
11125            // nested results - panic catch on the outside, method on the inside
11126            let res = match res {
11127                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11128                    ::tracing::info!("success");
11129                    crate::services::graph_storage_service::DeleteVerticesExn::Success(res)
11130                }
11131                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::DeleteVerticesExn::Success(_))) => {
11132                    panic!(
11133                        "{} attempted to return success via error",
11134                        "deleteVertices",
11135                    )
11136                }
11137                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11138                    ::tracing::error!(exception = ?exn);
11139                    exn
11140                }
11141                ::std::result::Result::Err(exn) => {
11142                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.deleteVertices", exn);
11143                    crate::services::graph_storage_service::DeleteVerticesExn::ApplicationException(aexn)
11144                }
11145            };
11146
11147            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11148                "deleteVertices",
11149                METHOD_NAME.as_cstr(),
11150                _seqid,
11151                req_ctxt,
11152                &mut ctx_stack,
11153                res
11154            )?;
11155            reply_state.lock().unwrap().send_reply(env);
11156            Ok(())
11157        }
11158
11159        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.deleteTags"))]
11160        async fn handle_deleteTags<'a>(
11161            &'a self,
11162            p: &'a mut P::Deserializer,
11163            req_ctxt: &R,
11164            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11165            _seqid: ::std::primitive::u32,
11166        ) -> ::anyhow::Result<()> {
11167            use ::const_cstr::const_cstr;
11168            use ::futures::FutureExt as _;
11169
11170            const_cstr! {
11171                SERVICE_NAME = "GraphStorageService";
11172                METHOD_NAME = "GraphStorageService.deleteTags";
11173            }
11174            let mut ctx_stack = req_ctxt.get_context_stack(
11175                SERVICE_NAME.as_cstr(),
11176                METHOD_NAME.as_cstr(),
11177            )?;
11178            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11179            let _args: self::Args_GraphStorageService_deleteTags = ::fbthrift::Deserialize::read(p)?;
11180            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11181                protocol: P::PROTOCOL_ID,
11182                method_name: METHOD_NAME.as_cstr(),
11183                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11184            })?;
11185            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11186
11187            let res = ::std::panic::AssertUnwindSafe(
11188                self.service.deleteTags(
11189                    _args.req,
11190                )
11191            )
11192            .catch_unwind()
11193            .await;
11194
11195            // nested results - panic catch on the outside, method on the inside
11196            let res = match res {
11197                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11198                    ::tracing::info!("success");
11199                    crate::services::graph_storage_service::DeleteTagsExn::Success(res)
11200                }
11201                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::DeleteTagsExn::Success(_))) => {
11202                    panic!(
11203                        "{} attempted to return success via error",
11204                        "deleteTags",
11205                    )
11206                }
11207                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11208                    ::tracing::error!(exception = ?exn);
11209                    exn
11210                }
11211                ::std::result::Result::Err(exn) => {
11212                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.deleteTags", exn);
11213                    crate::services::graph_storage_service::DeleteTagsExn::ApplicationException(aexn)
11214                }
11215            };
11216
11217            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11218                "deleteTags",
11219                METHOD_NAME.as_cstr(),
11220                _seqid,
11221                req_ctxt,
11222                &mut ctx_stack,
11223                res
11224            )?;
11225            reply_state.lock().unwrap().send_reply(env);
11226            Ok(())
11227        }
11228
11229        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.updateVertex"))]
11230        async fn handle_updateVertex<'a>(
11231            &'a self,
11232            p: &'a mut P::Deserializer,
11233            req_ctxt: &R,
11234            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11235            _seqid: ::std::primitive::u32,
11236        ) -> ::anyhow::Result<()> {
11237            use ::const_cstr::const_cstr;
11238            use ::futures::FutureExt as _;
11239
11240            const_cstr! {
11241                SERVICE_NAME = "GraphStorageService";
11242                METHOD_NAME = "GraphStorageService.updateVertex";
11243            }
11244            let mut ctx_stack = req_ctxt.get_context_stack(
11245                SERVICE_NAME.as_cstr(),
11246                METHOD_NAME.as_cstr(),
11247            )?;
11248            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11249            let _args: self::Args_GraphStorageService_updateVertex = ::fbthrift::Deserialize::read(p)?;
11250            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11251                protocol: P::PROTOCOL_ID,
11252                method_name: METHOD_NAME.as_cstr(),
11253                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11254            })?;
11255            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11256
11257            let res = ::std::panic::AssertUnwindSafe(
11258                self.service.updateVertex(
11259                    _args.req,
11260                )
11261            )
11262            .catch_unwind()
11263            .await;
11264
11265            // nested results - panic catch on the outside, method on the inside
11266            let res = match res {
11267                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11268                    ::tracing::info!("success");
11269                    crate::services::graph_storage_service::UpdateVertexExn::Success(res)
11270                }
11271                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::UpdateVertexExn::Success(_))) => {
11272                    panic!(
11273                        "{} attempted to return success via error",
11274                        "updateVertex",
11275                    )
11276                }
11277                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11278                    ::tracing::error!(exception = ?exn);
11279                    exn
11280                }
11281                ::std::result::Result::Err(exn) => {
11282                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.updateVertex", exn);
11283                    crate::services::graph_storage_service::UpdateVertexExn::ApplicationException(aexn)
11284                }
11285            };
11286
11287            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11288                "updateVertex",
11289                METHOD_NAME.as_cstr(),
11290                _seqid,
11291                req_ctxt,
11292                &mut ctx_stack,
11293                res
11294            )?;
11295            reply_state.lock().unwrap().send_reply(env);
11296            Ok(())
11297        }
11298
11299        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.updateEdge"))]
11300        async fn handle_updateEdge<'a>(
11301            &'a self,
11302            p: &'a mut P::Deserializer,
11303            req_ctxt: &R,
11304            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11305            _seqid: ::std::primitive::u32,
11306        ) -> ::anyhow::Result<()> {
11307            use ::const_cstr::const_cstr;
11308            use ::futures::FutureExt as _;
11309
11310            const_cstr! {
11311                SERVICE_NAME = "GraphStorageService";
11312                METHOD_NAME = "GraphStorageService.updateEdge";
11313            }
11314            let mut ctx_stack = req_ctxt.get_context_stack(
11315                SERVICE_NAME.as_cstr(),
11316                METHOD_NAME.as_cstr(),
11317            )?;
11318            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11319            let _args: self::Args_GraphStorageService_updateEdge = ::fbthrift::Deserialize::read(p)?;
11320            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11321                protocol: P::PROTOCOL_ID,
11322                method_name: METHOD_NAME.as_cstr(),
11323                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11324            })?;
11325            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11326
11327            let res = ::std::panic::AssertUnwindSafe(
11328                self.service.updateEdge(
11329                    _args.req,
11330                )
11331            )
11332            .catch_unwind()
11333            .await;
11334
11335            // nested results - panic catch on the outside, method on the inside
11336            let res = match res {
11337                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11338                    ::tracing::info!("success");
11339                    crate::services::graph_storage_service::UpdateEdgeExn::Success(res)
11340                }
11341                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::UpdateEdgeExn::Success(_))) => {
11342                    panic!(
11343                        "{} attempted to return success via error",
11344                        "updateEdge",
11345                    )
11346                }
11347                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11348                    ::tracing::error!(exception = ?exn);
11349                    exn
11350                }
11351                ::std::result::Result::Err(exn) => {
11352                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.updateEdge", exn);
11353                    crate::services::graph_storage_service::UpdateEdgeExn::ApplicationException(aexn)
11354                }
11355            };
11356
11357            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11358                "updateEdge",
11359                METHOD_NAME.as_cstr(),
11360                _seqid,
11361                req_ctxt,
11362                &mut ctx_stack,
11363                res
11364            )?;
11365            reply_state.lock().unwrap().send_reply(env);
11366            Ok(())
11367        }
11368
11369        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.scanVertex"))]
11370        async fn handle_scanVertex<'a>(
11371            &'a self,
11372            p: &'a mut P::Deserializer,
11373            req_ctxt: &R,
11374            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11375            _seqid: ::std::primitive::u32,
11376        ) -> ::anyhow::Result<()> {
11377            use ::const_cstr::const_cstr;
11378            use ::futures::FutureExt as _;
11379
11380            const_cstr! {
11381                SERVICE_NAME = "GraphStorageService";
11382                METHOD_NAME = "GraphStorageService.scanVertex";
11383            }
11384            let mut ctx_stack = req_ctxt.get_context_stack(
11385                SERVICE_NAME.as_cstr(),
11386                METHOD_NAME.as_cstr(),
11387            )?;
11388            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11389            let _args: self::Args_GraphStorageService_scanVertex = ::fbthrift::Deserialize::read(p)?;
11390            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11391                protocol: P::PROTOCOL_ID,
11392                method_name: METHOD_NAME.as_cstr(),
11393                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11394            })?;
11395            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11396
11397            let res = ::std::panic::AssertUnwindSafe(
11398                self.service.scanVertex(
11399                    _args.req,
11400                )
11401            )
11402            .catch_unwind()
11403            .await;
11404
11405            // nested results - panic catch on the outside, method on the inside
11406            let res = match res {
11407                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11408                    ::tracing::info!("success");
11409                    crate::services::graph_storage_service::ScanVertexExn::Success(res)
11410                }
11411                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::ScanVertexExn::Success(_))) => {
11412                    panic!(
11413                        "{} attempted to return success via error",
11414                        "scanVertex",
11415                    )
11416                }
11417                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11418                    ::tracing::error!(exception = ?exn);
11419                    exn
11420                }
11421                ::std::result::Result::Err(exn) => {
11422                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.scanVertex", exn);
11423                    crate::services::graph_storage_service::ScanVertexExn::ApplicationException(aexn)
11424                }
11425            };
11426
11427            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11428                "scanVertex",
11429                METHOD_NAME.as_cstr(),
11430                _seqid,
11431                req_ctxt,
11432                &mut ctx_stack,
11433                res
11434            )?;
11435            reply_state.lock().unwrap().send_reply(env);
11436            Ok(())
11437        }
11438
11439        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.scanEdge"))]
11440        async fn handle_scanEdge<'a>(
11441            &'a self,
11442            p: &'a mut P::Deserializer,
11443            req_ctxt: &R,
11444            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11445            _seqid: ::std::primitive::u32,
11446        ) -> ::anyhow::Result<()> {
11447            use ::const_cstr::const_cstr;
11448            use ::futures::FutureExt as _;
11449
11450            const_cstr! {
11451                SERVICE_NAME = "GraphStorageService";
11452                METHOD_NAME = "GraphStorageService.scanEdge";
11453            }
11454            let mut ctx_stack = req_ctxt.get_context_stack(
11455                SERVICE_NAME.as_cstr(),
11456                METHOD_NAME.as_cstr(),
11457            )?;
11458            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11459            let _args: self::Args_GraphStorageService_scanEdge = ::fbthrift::Deserialize::read(p)?;
11460            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11461                protocol: P::PROTOCOL_ID,
11462                method_name: METHOD_NAME.as_cstr(),
11463                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11464            })?;
11465            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11466
11467            let res = ::std::panic::AssertUnwindSafe(
11468                self.service.scanEdge(
11469                    _args.req,
11470                )
11471            )
11472            .catch_unwind()
11473            .await;
11474
11475            // nested results - panic catch on the outside, method on the inside
11476            let res = match res {
11477                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11478                    ::tracing::info!("success");
11479                    crate::services::graph_storage_service::ScanEdgeExn::Success(res)
11480                }
11481                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::ScanEdgeExn::Success(_))) => {
11482                    panic!(
11483                        "{} attempted to return success via error",
11484                        "scanEdge",
11485                    )
11486                }
11487                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11488                    ::tracing::error!(exception = ?exn);
11489                    exn
11490                }
11491                ::std::result::Result::Err(exn) => {
11492                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.scanEdge", exn);
11493                    crate::services::graph_storage_service::ScanEdgeExn::ApplicationException(aexn)
11494                }
11495            };
11496
11497            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11498                "scanEdge",
11499                METHOD_NAME.as_cstr(),
11500                _seqid,
11501                req_ctxt,
11502                &mut ctx_stack,
11503                res
11504            )?;
11505            reply_state.lock().unwrap().send_reply(env);
11506            Ok(())
11507        }
11508
11509        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.getUUID"))]
11510        async fn handle_getUUID<'a>(
11511            &'a self,
11512            p: &'a mut P::Deserializer,
11513            req_ctxt: &R,
11514            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11515            _seqid: ::std::primitive::u32,
11516        ) -> ::anyhow::Result<()> {
11517            use ::const_cstr::const_cstr;
11518            use ::futures::FutureExt as _;
11519
11520            const_cstr! {
11521                SERVICE_NAME = "GraphStorageService";
11522                METHOD_NAME = "GraphStorageService.getUUID";
11523            }
11524            let mut ctx_stack = req_ctxt.get_context_stack(
11525                SERVICE_NAME.as_cstr(),
11526                METHOD_NAME.as_cstr(),
11527            )?;
11528            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11529            let _args: self::Args_GraphStorageService_getUUID = ::fbthrift::Deserialize::read(p)?;
11530            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11531                protocol: P::PROTOCOL_ID,
11532                method_name: METHOD_NAME.as_cstr(),
11533                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11534            })?;
11535            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11536
11537            let res = ::std::panic::AssertUnwindSafe(
11538                self.service.getUUID(
11539                    _args.req,
11540                )
11541            )
11542            .catch_unwind()
11543            .await;
11544
11545            // nested results - panic catch on the outside, method on the inside
11546            let res = match res {
11547                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11548                    ::tracing::info!("success");
11549                    crate::services::graph_storage_service::GetUUIDExn::Success(res)
11550                }
11551                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::GetUUIDExn::Success(_))) => {
11552                    panic!(
11553                        "{} attempted to return success via error",
11554                        "getUUID",
11555                    )
11556                }
11557                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11558                    ::tracing::error!(exception = ?exn);
11559                    exn
11560                }
11561                ::std::result::Result::Err(exn) => {
11562                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.getUUID", exn);
11563                    crate::services::graph_storage_service::GetUUIDExn::ApplicationException(aexn)
11564                }
11565            };
11566
11567            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11568                "getUUID",
11569                METHOD_NAME.as_cstr(),
11570                _seqid,
11571                req_ctxt,
11572                &mut ctx_stack,
11573                res
11574            )?;
11575            reply_state.lock().unwrap().send_reply(env);
11576            Ok(())
11577        }
11578
11579        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.lookupIndex"))]
11580        async fn handle_lookupIndex<'a>(
11581            &'a self,
11582            p: &'a mut P::Deserializer,
11583            req_ctxt: &R,
11584            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11585            _seqid: ::std::primitive::u32,
11586        ) -> ::anyhow::Result<()> {
11587            use ::const_cstr::const_cstr;
11588            use ::futures::FutureExt as _;
11589
11590            const_cstr! {
11591                SERVICE_NAME = "GraphStorageService";
11592                METHOD_NAME = "GraphStorageService.lookupIndex";
11593            }
11594            let mut ctx_stack = req_ctxt.get_context_stack(
11595                SERVICE_NAME.as_cstr(),
11596                METHOD_NAME.as_cstr(),
11597            )?;
11598            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11599            let _args: self::Args_GraphStorageService_lookupIndex = ::fbthrift::Deserialize::read(p)?;
11600            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11601                protocol: P::PROTOCOL_ID,
11602                method_name: METHOD_NAME.as_cstr(),
11603                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11604            })?;
11605            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11606
11607            let res = ::std::panic::AssertUnwindSafe(
11608                self.service.lookupIndex(
11609                    _args.req,
11610                )
11611            )
11612            .catch_unwind()
11613            .await;
11614
11615            // nested results - panic catch on the outside, method on the inside
11616            let res = match res {
11617                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11618                    ::tracing::info!("success");
11619                    crate::services::graph_storage_service::LookupIndexExn::Success(res)
11620                }
11621                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::LookupIndexExn::Success(_))) => {
11622                    panic!(
11623                        "{} attempted to return success via error",
11624                        "lookupIndex",
11625                    )
11626                }
11627                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11628                    ::tracing::error!(exception = ?exn);
11629                    exn
11630                }
11631                ::std::result::Result::Err(exn) => {
11632                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.lookupIndex", exn);
11633                    crate::services::graph_storage_service::LookupIndexExn::ApplicationException(aexn)
11634                }
11635            };
11636
11637            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11638                "lookupIndex",
11639                METHOD_NAME.as_cstr(),
11640                _seqid,
11641                req_ctxt,
11642                &mut ctx_stack,
11643                res
11644            )?;
11645            reply_state.lock().unwrap().send_reply(env);
11646            Ok(())
11647        }
11648
11649        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.lookupAndTraverse"))]
11650        async fn handle_lookupAndTraverse<'a>(
11651            &'a self,
11652            p: &'a mut P::Deserializer,
11653            req_ctxt: &R,
11654            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11655            _seqid: ::std::primitive::u32,
11656        ) -> ::anyhow::Result<()> {
11657            use ::const_cstr::const_cstr;
11658            use ::futures::FutureExt as _;
11659
11660            const_cstr! {
11661                SERVICE_NAME = "GraphStorageService";
11662                METHOD_NAME = "GraphStorageService.lookupAndTraverse";
11663            }
11664            let mut ctx_stack = req_ctxt.get_context_stack(
11665                SERVICE_NAME.as_cstr(),
11666                METHOD_NAME.as_cstr(),
11667            )?;
11668            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11669            let _args: self::Args_GraphStorageService_lookupAndTraverse = ::fbthrift::Deserialize::read(p)?;
11670            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11671                protocol: P::PROTOCOL_ID,
11672                method_name: METHOD_NAME.as_cstr(),
11673                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11674            })?;
11675            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11676
11677            let res = ::std::panic::AssertUnwindSafe(
11678                self.service.lookupAndTraverse(
11679                    _args.req,
11680                )
11681            )
11682            .catch_unwind()
11683            .await;
11684
11685            // nested results - panic catch on the outside, method on the inside
11686            let res = match res {
11687                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11688                    ::tracing::info!("success");
11689                    crate::services::graph_storage_service::LookupAndTraverseExn::Success(res)
11690                }
11691                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::LookupAndTraverseExn::Success(_))) => {
11692                    panic!(
11693                        "{} attempted to return success via error",
11694                        "lookupAndTraverse",
11695                    )
11696                }
11697                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11698                    ::tracing::error!(exception = ?exn);
11699                    exn
11700                }
11701                ::std::result::Result::Err(exn) => {
11702                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.lookupAndTraverse", exn);
11703                    crate::services::graph_storage_service::LookupAndTraverseExn::ApplicationException(aexn)
11704                }
11705            };
11706
11707            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11708                "lookupAndTraverse",
11709                METHOD_NAME.as_cstr(),
11710                _seqid,
11711                req_ctxt,
11712                &mut ctx_stack,
11713                res
11714            )?;
11715            reply_state.lock().unwrap().send_reply(env);
11716            Ok(())
11717        }
11718
11719        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.chainUpdateEdge"))]
11720        async fn handle_chainUpdateEdge<'a>(
11721            &'a self,
11722            p: &'a mut P::Deserializer,
11723            req_ctxt: &R,
11724            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11725            _seqid: ::std::primitive::u32,
11726        ) -> ::anyhow::Result<()> {
11727            use ::const_cstr::const_cstr;
11728            use ::futures::FutureExt as _;
11729
11730            const_cstr! {
11731                SERVICE_NAME = "GraphStorageService";
11732                METHOD_NAME = "GraphStorageService.chainUpdateEdge";
11733            }
11734            let mut ctx_stack = req_ctxt.get_context_stack(
11735                SERVICE_NAME.as_cstr(),
11736                METHOD_NAME.as_cstr(),
11737            )?;
11738            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11739            let _args: self::Args_GraphStorageService_chainUpdateEdge = ::fbthrift::Deserialize::read(p)?;
11740            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11741                protocol: P::PROTOCOL_ID,
11742                method_name: METHOD_NAME.as_cstr(),
11743                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11744            })?;
11745            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11746
11747            let res = ::std::panic::AssertUnwindSafe(
11748                self.service.chainUpdateEdge(
11749                    _args.req,
11750                )
11751            )
11752            .catch_unwind()
11753            .await;
11754
11755            // nested results - panic catch on the outside, method on the inside
11756            let res = match res {
11757                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11758                    ::tracing::info!("success");
11759                    crate::services::graph_storage_service::ChainUpdateEdgeExn::Success(res)
11760                }
11761                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::ChainUpdateEdgeExn::Success(_))) => {
11762                    panic!(
11763                        "{} attempted to return success via error",
11764                        "chainUpdateEdge",
11765                    )
11766                }
11767                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11768                    ::tracing::error!(exception = ?exn);
11769                    exn
11770                }
11771                ::std::result::Result::Err(exn) => {
11772                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.chainUpdateEdge", exn);
11773                    crate::services::graph_storage_service::ChainUpdateEdgeExn::ApplicationException(aexn)
11774                }
11775            };
11776
11777            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11778                "chainUpdateEdge",
11779                METHOD_NAME.as_cstr(),
11780                _seqid,
11781                req_ctxt,
11782                &mut ctx_stack,
11783                res
11784            )?;
11785            reply_state.lock().unwrap().send_reply(env);
11786            Ok(())
11787        }
11788
11789        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphStorageService.chainAddEdges"))]
11790        async fn handle_chainAddEdges<'a>(
11791            &'a self,
11792            p: &'a mut P::Deserializer,
11793            req_ctxt: &R,
11794            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11795            _seqid: ::std::primitive::u32,
11796        ) -> ::anyhow::Result<()> {
11797            use ::const_cstr::const_cstr;
11798            use ::futures::FutureExt as _;
11799
11800            const_cstr! {
11801                SERVICE_NAME = "GraphStorageService";
11802                METHOD_NAME = "GraphStorageService.chainAddEdges";
11803            }
11804            let mut ctx_stack = req_ctxt.get_context_stack(
11805                SERVICE_NAME.as_cstr(),
11806                METHOD_NAME.as_cstr(),
11807            )?;
11808            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11809            let _args: self::Args_GraphStorageService_chainAddEdges = ::fbthrift::Deserialize::read(p)?;
11810            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11811                protocol: P::PROTOCOL_ID,
11812                method_name: METHOD_NAME.as_cstr(),
11813                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
11814            })?;
11815            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11816
11817            let res = ::std::panic::AssertUnwindSafe(
11818                self.service.chainAddEdges(
11819                    _args.req,
11820                )
11821            )
11822            .catch_unwind()
11823            .await;
11824
11825            // nested results - panic catch on the outside, method on the inside
11826            let res = match res {
11827                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11828                    ::tracing::info!("success");
11829                    crate::services::graph_storage_service::ChainAddEdgesExn::Success(res)
11830                }
11831                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_storage_service::ChainAddEdgesExn::Success(_))) => {
11832                    panic!(
11833                        "{} attempted to return success via error",
11834                        "chainAddEdges",
11835                    )
11836                }
11837                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11838                    ::tracing::error!(exception = ?exn);
11839                    exn
11840                }
11841                ::std::result::Result::Err(exn) => {
11842                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphStorageService.chainAddEdges", exn);
11843                    crate::services::graph_storage_service::ChainAddEdgesExn::ApplicationException(aexn)
11844                }
11845            };
11846
11847            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11848                "chainAddEdges",
11849                METHOD_NAME.as_cstr(),
11850                _seqid,
11851                req_ctxt,
11852                &mut ctx_stack,
11853                res
11854            )?;
11855            reply_state.lock().unwrap().send_reply(env);
11856            Ok(())
11857        }
11858    }
11859
11860    #[::async_trait::async_trait]
11861    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for GraphStorageServiceProcessor<P, H, R, RS>
11862    where
11863        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
11864        P::Deserializer: ::std::marker::Send,
11865        H: GraphStorageService,
11866        P::Frame: ::std::marker::Send + 'static,
11867        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
11868        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
11869            + ::std::marker::Send + ::std::marker::Sync + 'static,
11870        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
11871    {
11872        type RequestContext = R;
11873        type ReplyState = RS;
11874
11875        #[inline]
11876        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
11877            match name {
11878                b"getNeighbors" => ::std::result::Result::Ok(0usize),
11879                b"getProps" => ::std::result::Result::Ok(1usize),
11880                b"addVertices" => ::std::result::Result::Ok(2usize),
11881                b"addEdges" => ::std::result::Result::Ok(3usize),
11882                b"deleteEdges" => ::std::result::Result::Ok(4usize),
11883                b"deleteVertices" => ::std::result::Result::Ok(5usize),
11884                b"deleteTags" => ::std::result::Result::Ok(6usize),
11885                b"updateVertex" => ::std::result::Result::Ok(7usize),
11886                b"updateEdge" => ::std::result::Result::Ok(8usize),
11887                b"scanVertex" => ::std::result::Result::Ok(9usize),
11888                b"scanEdge" => ::std::result::Result::Ok(10usize),
11889                b"getUUID" => ::std::result::Result::Ok(11usize),
11890                b"lookupIndex" => ::std::result::Result::Ok(12usize),
11891                b"lookupAndTraverse" => ::std::result::Result::Ok(13usize),
11892                b"chainUpdateEdge" => ::std::result::Result::Ok(14usize),
11893                b"chainAddEdges" => ::std::result::Result::Ok(15usize),
11894                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
11895            }
11896        }
11897
11898        #[allow(clippy::match_single_binding)]
11899        async fn handle_method(
11900            &self,
11901            idx: ::std::primitive::usize,
11902            _p: &mut P::Deserializer,
11903            _r: &R,
11904            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11905            _seqid: ::std::primitive::u32,
11906        ) -> ::anyhow::Result<()> {
11907            match idx {
11908                0usize => {
11909                    self.handle_getNeighbors(_p, _r, _reply_state, _seqid).await
11910                }
11911                1usize => {
11912                    self.handle_getProps(_p, _r, _reply_state, _seqid).await
11913                }
11914                2usize => {
11915                    self.handle_addVertices(_p, _r, _reply_state, _seqid).await
11916                }
11917                3usize => {
11918                    self.handle_addEdges(_p, _r, _reply_state, _seqid).await
11919                }
11920                4usize => {
11921                    self.handle_deleteEdges(_p, _r, _reply_state, _seqid).await
11922                }
11923                5usize => {
11924                    self.handle_deleteVertices(_p, _r, _reply_state, _seqid).await
11925                }
11926                6usize => {
11927                    self.handle_deleteTags(_p, _r, _reply_state, _seqid).await
11928                }
11929                7usize => {
11930                    self.handle_updateVertex(_p, _r, _reply_state, _seqid).await
11931                }
11932                8usize => {
11933                    self.handle_updateEdge(_p, _r, _reply_state, _seqid).await
11934                }
11935                9usize => {
11936                    self.handle_scanVertex(_p, _r, _reply_state, _seqid).await
11937                }
11938                10usize => {
11939                    self.handle_scanEdge(_p, _r, _reply_state, _seqid).await
11940                }
11941                11usize => {
11942                    self.handle_getUUID(_p, _r, _reply_state, _seqid).await
11943                }
11944                12usize => {
11945                    self.handle_lookupIndex(_p, _r, _reply_state, _seqid).await
11946                }
11947                13usize => {
11948                    self.handle_lookupAndTraverse(_p, _r, _reply_state, _seqid).await
11949                }
11950                14usize => {
11951                    self.handle_chainUpdateEdge(_p, _r, _reply_state, _seqid).await
11952                }
11953                15usize => {
11954                    self.handle_chainAddEdges(_p, _r, _reply_state, _seqid).await
11955                }
11956                bad => panic!(
11957                    "{}: unexpected method idx {}",
11958                    "GraphStorageServiceProcessor",
11959                    bad
11960                ),
11961            }
11962        }
11963
11964        #[allow(clippy::match_single_binding)]
11965        #[inline]
11966        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
11967            match name {
11968                _ => ::anyhow::bail!("Unknown interaction"),
11969            }
11970        }
11971
11972        #[allow(clippy::match_single_binding)]
11973        fn handle_create_interaction(
11974            &self,
11975            idx: ::std::primitive::usize,
11976        ) -> ::anyhow::Result<
11977            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
11978        > {
11979            match idx {
11980                bad => panic!(
11981                    "{}: unexpected method idx {}",
11982                    "GraphStorageServiceProcessor",
11983                    bad
11984                ),
11985            }
11986        }
11987    }
11988
11989    #[::async_trait::async_trait]
11990    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for GraphStorageServiceProcessor<P, H, R, RS>
11991    where
11992        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
11993        P::Deserializer: ::std::marker::Send,
11994        P::Frame: ::std::marker::Send + 'static,
11995        H: GraphStorageService,
11996        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
11997        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
11998            + ::std::marker::Send + ::std::marker::Sync + 'static,
11999        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
12000    {
12001        type Handler = H;
12002        type RequestContext = R;
12003        type ReplyState = RS;
12004
12005        #[tracing::instrument(level="trace", skip_all, fields(service = "GraphStorageService"))]
12006        async fn call(
12007            &self,
12008            req: ::fbthrift::ProtocolDecoded<P>,
12009            req_ctxt: &R,
12010            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
12011        ) -> ::anyhow::Result<()> {
12012            use ::fbthrift::{BufExt as _, ProtocolReader as _, ServiceProcessor as _};
12013            let mut p = P::deserializer(req);
12014            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
12015            if mty != ::fbthrift::MessageType::Call {
12016                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
12017                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
12018                    format!("message type {:?} not handled", mty)
12019                )));
12020            }
12021            let idx = match idx {
12022                ::std::result::Result::Ok(idx) => idx,
12023                ::std::result::Result::Err(_) => {
12024                    let cur = P::into_buffer(p).reset();
12025                    return self.supa.call(cur, req_ctxt, reply_state).await;
12026                }
12027            };
12028            self.handle_method(idx, &mut p, req_ctxt, reply_state, seqid).await?;
12029            p.read_message_end()?;
12030
12031            Ok(())
12032        }
12033
12034        fn create_interaction(
12035            &self,
12036            name: &str,
12037        ) -> ::anyhow::Result<
12038            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
12039        > {
12040            use ::fbthrift::{ServiceProcessor as _};
12041            let idx = self.create_interaction_idx(name);
12042            let idx = match idx {
12043                ::anyhow::Result::Ok(idx) => idx,
12044                ::anyhow::Result::Err(_) => {
12045                    return self.supa.create_interaction(name);
12046                }
12047            };
12048            self.handle_create_interaction(idx)
12049        }
12050
12051        fn get_method_names(&self) -> &'static [&'static str] {
12052            &[
12053                // from GraphStorageService
12054                "getNeighbors",
12055                "getProps",
12056                "addVertices",
12057                "addEdges",
12058                "deleteEdges",
12059                "deleteVertices",
12060                "deleteTags",
12061                "updateVertex",
12062                "updateEdge",
12063                "scanVertex",
12064                "scanEdge",
12065                "getUUID",
12066                "lookupIndex",
12067                "lookupAndTraverse",
12068                "chainUpdateEdge",
12069                "chainAddEdges",
12070            ]
12071        }
12072    }
12073
12074    /// Construct a new instance of a GraphStorageService service.
12075    ///
12076    /// This is called when a new instance of a Thrift service Processor
12077    /// is needed for a particular Thrift protocol.
12078    #[::tracing::instrument(level="debug", skip_all, fields(proto = ?proto))]
12079    pub fn make_GraphStorageService_server<F, H, R, RS>(
12080        proto: ::fbthrift::ProtocolID,
12081        handler: H,
12082    ) -> ::std::result::Result<::std::boxed::Box<dyn ::fbthrift::ThriftService<F, Handler = H, RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>, ::fbthrift::ApplicationException>
12083    where
12084        F: ::fbthrift::Framing + ::std::marker::Send + ::std::marker::Sync + 'static,
12085        H: GraphStorageService,
12086        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
12087        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = F::DecBuf> + ::std::marker::Send + ::std::marker::Sync + 'static,
12088        RS: ::fbthrift::ReplyState<F, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
12089    {
12090        match proto {
12091            ::fbthrift::ProtocolID::BinaryProtocol => {
12092                ::std::result::Result::Ok(::std::boxed::Box::new(GraphStorageServiceProcessor::<::fbthrift::BinaryProtocol<F>, H, R, RS>::new(handler)))
12093            }
12094            ::fbthrift::ProtocolID::CompactProtocol => {
12095                ::std::result::Result::Ok(::std::boxed::Box::new(GraphStorageServiceProcessor::<::fbthrift::CompactProtocol<F>, H, R, RS>::new(handler)))
12096            }
12097            bad => {
12098                ::tracing::error!(method = "GraphStorageService.", invalid_protocol = ?bad);
12099                ::std::result::Result::Err(::fbthrift::ApplicationException::invalid_protocol(bad))
12100            }
12101        }
12102    }
12103
12104    #[::async_trait::async_trait]
12105    pub trait StorageAdminService: ::std::marker::Send + ::std::marker::Sync + 'static {
12106        async fn transLeader(
12107            &self,
12108            _req: crate::types::TransLeaderReq,
12109        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::TransLeaderExn> {
12110            ::std::result::Result::Err(crate::services::storage_admin_service::TransLeaderExn::ApplicationException(
12111                ::fbthrift::ApplicationException::unimplemented_method(
12112                    "StorageAdminService",
12113                    "transLeader",
12114                ),
12115            ))
12116        }
12117        async fn addPart(
12118            &self,
12119            _req: crate::types::AddPartReq,
12120        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::AddPartExn> {
12121            ::std::result::Result::Err(crate::services::storage_admin_service::AddPartExn::ApplicationException(
12122                ::fbthrift::ApplicationException::unimplemented_method(
12123                    "StorageAdminService",
12124                    "addPart",
12125                ),
12126            ))
12127        }
12128        async fn addLearner(
12129            &self,
12130            _req: crate::types::AddLearnerReq,
12131        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::AddLearnerExn> {
12132            ::std::result::Result::Err(crate::services::storage_admin_service::AddLearnerExn::ApplicationException(
12133                ::fbthrift::ApplicationException::unimplemented_method(
12134                    "StorageAdminService",
12135                    "addLearner",
12136                ),
12137            ))
12138        }
12139        async fn removePart(
12140            &self,
12141            _req: crate::types::RemovePartReq,
12142        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::RemovePartExn> {
12143            ::std::result::Result::Err(crate::services::storage_admin_service::RemovePartExn::ApplicationException(
12144                ::fbthrift::ApplicationException::unimplemented_method(
12145                    "StorageAdminService",
12146                    "removePart",
12147                ),
12148            ))
12149        }
12150        async fn memberChange(
12151            &self,
12152            _req: crate::types::MemberChangeReq,
12153        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::MemberChangeExn> {
12154            ::std::result::Result::Err(crate::services::storage_admin_service::MemberChangeExn::ApplicationException(
12155                ::fbthrift::ApplicationException::unimplemented_method(
12156                    "StorageAdminService",
12157                    "memberChange",
12158                ),
12159            ))
12160        }
12161        async fn waitingForCatchUpData(
12162            &self,
12163            _req: crate::types::CatchUpDataReq,
12164        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::WaitingForCatchUpDataExn> {
12165            ::std::result::Result::Err(crate::services::storage_admin_service::WaitingForCatchUpDataExn::ApplicationException(
12166                ::fbthrift::ApplicationException::unimplemented_method(
12167                    "StorageAdminService",
12168                    "waitingForCatchUpData",
12169                ),
12170            ))
12171        }
12172        async fn createCheckpoint(
12173            &self,
12174            _req: crate::types::CreateCPRequest,
12175        ) -> ::std::result::Result<crate::types::CreateCPResp, crate::services::storage_admin_service::CreateCheckpointExn> {
12176            ::std::result::Result::Err(crate::services::storage_admin_service::CreateCheckpointExn::ApplicationException(
12177                ::fbthrift::ApplicationException::unimplemented_method(
12178                    "StorageAdminService",
12179                    "createCheckpoint",
12180                ),
12181            ))
12182        }
12183        async fn dropCheckpoint(
12184            &self,
12185            _req: crate::types::DropCPRequest,
12186        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::DropCheckpointExn> {
12187            ::std::result::Result::Err(crate::services::storage_admin_service::DropCheckpointExn::ApplicationException(
12188                ::fbthrift::ApplicationException::unimplemented_method(
12189                    "StorageAdminService",
12190                    "dropCheckpoint",
12191                ),
12192            ))
12193        }
12194        async fn blockingWrites(
12195            &self,
12196            _req: crate::types::BlockingSignRequest,
12197        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::BlockingWritesExn> {
12198            ::std::result::Result::Err(crate::services::storage_admin_service::BlockingWritesExn::ApplicationException(
12199                ::fbthrift::ApplicationException::unimplemented_method(
12200                    "StorageAdminService",
12201                    "blockingWrites",
12202                ),
12203            ))
12204        }
12205        async fn rebuildTagIndex(
12206            &self,
12207            _req: crate::types::RebuildIndexRequest,
12208        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::RebuildTagIndexExn> {
12209            ::std::result::Result::Err(crate::services::storage_admin_service::RebuildTagIndexExn::ApplicationException(
12210                ::fbthrift::ApplicationException::unimplemented_method(
12211                    "StorageAdminService",
12212                    "rebuildTagIndex",
12213                ),
12214            ))
12215        }
12216        async fn rebuildEdgeIndex(
12217            &self,
12218            _req: crate::types::RebuildIndexRequest,
12219        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::RebuildEdgeIndexExn> {
12220            ::std::result::Result::Err(crate::services::storage_admin_service::RebuildEdgeIndexExn::ApplicationException(
12221                ::fbthrift::ApplicationException::unimplemented_method(
12222                    "StorageAdminService",
12223                    "rebuildEdgeIndex",
12224                ),
12225            ))
12226        }
12227        async fn getLeaderParts(
12228            &self,
12229            _req: crate::types::GetLeaderReq,
12230        ) -> ::std::result::Result<crate::types::GetLeaderPartsResp, crate::services::storage_admin_service::GetLeaderPartsExn> {
12231            ::std::result::Result::Err(crate::services::storage_admin_service::GetLeaderPartsExn::ApplicationException(
12232                ::fbthrift::ApplicationException::unimplemented_method(
12233                    "StorageAdminService",
12234                    "getLeaderParts",
12235                ),
12236            ))
12237        }
12238        async fn checkPeers(
12239            &self,
12240            _req: crate::types::CheckPeersReq,
12241        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::CheckPeersExn> {
12242            ::std::result::Result::Err(crate::services::storage_admin_service::CheckPeersExn::ApplicationException(
12243                ::fbthrift::ApplicationException::unimplemented_method(
12244                    "StorageAdminService",
12245                    "checkPeers",
12246                ),
12247            ))
12248        }
12249        async fn addAdminTask(
12250            &self,
12251            _req: crate::types::AddAdminTaskRequest,
12252        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::AddAdminTaskExn> {
12253            ::std::result::Result::Err(crate::services::storage_admin_service::AddAdminTaskExn::ApplicationException(
12254                ::fbthrift::ApplicationException::unimplemented_method(
12255                    "StorageAdminService",
12256                    "addAdminTask",
12257                ),
12258            ))
12259        }
12260        async fn stopAdminTask(
12261            &self,
12262            _req: crate::types::StopAdminTaskRequest,
12263        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::StopAdminTaskExn> {
12264            ::std::result::Result::Err(crate::services::storage_admin_service::StopAdminTaskExn::ApplicationException(
12265                ::fbthrift::ApplicationException::unimplemented_method(
12266                    "StorageAdminService",
12267                    "stopAdminTask",
12268                ),
12269            ))
12270        }
12271        async fn listClusterInfo(
12272            &self,
12273            _req: crate::types::ListClusterInfoReq,
12274        ) -> ::std::result::Result<crate::types::ListClusterInfoResp, crate::services::storage_admin_service::ListClusterInfoExn> {
12275            ::std::result::Result::Err(crate::services::storage_admin_service::ListClusterInfoExn::ApplicationException(
12276                ::fbthrift::ApplicationException::unimplemented_method(
12277                    "StorageAdminService",
12278                    "listClusterInfo",
12279                ),
12280            ))
12281        }
12282    }
12283
12284    #[::async_trait::async_trait]
12285    impl<T> StorageAdminService for ::std::boxed::Box<T>
12286    where
12287        T: StorageAdminService + Send + Sync + ?Sized,
12288    {
12289        async fn transLeader(
12290            &self,
12291            req: crate::types::TransLeaderReq,
12292        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::TransLeaderExn> {
12293            (**self).transLeader(
12294                req,
12295            ).await
12296        }
12297        async fn addPart(
12298            &self,
12299            req: crate::types::AddPartReq,
12300        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::AddPartExn> {
12301            (**self).addPart(
12302                req,
12303            ).await
12304        }
12305        async fn addLearner(
12306            &self,
12307            req: crate::types::AddLearnerReq,
12308        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::AddLearnerExn> {
12309            (**self).addLearner(
12310                req,
12311            ).await
12312        }
12313        async fn removePart(
12314            &self,
12315            req: crate::types::RemovePartReq,
12316        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::RemovePartExn> {
12317            (**self).removePart(
12318                req,
12319            ).await
12320        }
12321        async fn memberChange(
12322            &self,
12323            req: crate::types::MemberChangeReq,
12324        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::MemberChangeExn> {
12325            (**self).memberChange(
12326                req,
12327            ).await
12328        }
12329        async fn waitingForCatchUpData(
12330            &self,
12331            req: crate::types::CatchUpDataReq,
12332        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::WaitingForCatchUpDataExn> {
12333            (**self).waitingForCatchUpData(
12334                req,
12335            ).await
12336        }
12337        async fn createCheckpoint(
12338            &self,
12339            req: crate::types::CreateCPRequest,
12340        ) -> ::std::result::Result<crate::types::CreateCPResp, crate::services::storage_admin_service::CreateCheckpointExn> {
12341            (**self).createCheckpoint(
12342                req,
12343            ).await
12344        }
12345        async fn dropCheckpoint(
12346            &self,
12347            req: crate::types::DropCPRequest,
12348        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::DropCheckpointExn> {
12349            (**self).dropCheckpoint(
12350                req,
12351            ).await
12352        }
12353        async fn blockingWrites(
12354            &self,
12355            req: crate::types::BlockingSignRequest,
12356        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::BlockingWritesExn> {
12357            (**self).blockingWrites(
12358                req,
12359            ).await
12360        }
12361        async fn rebuildTagIndex(
12362            &self,
12363            req: crate::types::RebuildIndexRequest,
12364        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::RebuildTagIndexExn> {
12365            (**self).rebuildTagIndex(
12366                req,
12367            ).await
12368        }
12369        async fn rebuildEdgeIndex(
12370            &self,
12371            req: crate::types::RebuildIndexRequest,
12372        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::RebuildEdgeIndexExn> {
12373            (**self).rebuildEdgeIndex(
12374                req,
12375            ).await
12376        }
12377        async fn getLeaderParts(
12378            &self,
12379            req: crate::types::GetLeaderReq,
12380        ) -> ::std::result::Result<crate::types::GetLeaderPartsResp, crate::services::storage_admin_service::GetLeaderPartsExn> {
12381            (**self).getLeaderParts(
12382                req,
12383            ).await
12384        }
12385        async fn checkPeers(
12386            &self,
12387            req: crate::types::CheckPeersReq,
12388        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::CheckPeersExn> {
12389            (**self).checkPeers(
12390                req,
12391            ).await
12392        }
12393        async fn addAdminTask(
12394            &self,
12395            req: crate::types::AddAdminTaskRequest,
12396        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::AddAdminTaskExn> {
12397            (**self).addAdminTask(
12398                req,
12399            ).await
12400        }
12401        async fn stopAdminTask(
12402            &self,
12403            req: crate::types::StopAdminTaskRequest,
12404        ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_admin_service::StopAdminTaskExn> {
12405            (**self).stopAdminTask(
12406                req,
12407            ).await
12408        }
12409        async fn listClusterInfo(
12410            &self,
12411            req: crate::types::ListClusterInfoReq,
12412        ) -> ::std::result::Result<crate::types::ListClusterInfoResp, crate::services::storage_admin_service::ListClusterInfoExn> {
12413            (**self).listClusterInfo(
12414                req,
12415            ).await
12416        }
12417    }
12418
12419    /// Processor for StorageAdminService's methods.
12420    #[derive(Clone, Debug)]
12421    pub struct StorageAdminServiceProcessor<P, H, R, RS> {
12422        service: H,
12423        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
12424        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
12425    }
12426
12427    struct Args_StorageAdminService_transLeader {
12428        req: crate::types::TransLeaderReq,
12429    }
12430    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_transLeader {
12431        #[inline]
12432        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.transLeader"))]
12433        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12434            static ARGS: &[::fbthrift::Field] = &[
12435                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12436            ];
12437            let mut field_req = ::std::option::Option::None;
12438            let _ = p.read_struct_begin(|_| ())?;
12439            loop {
12440                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12441                match (fty, fid as ::std::primitive::i32) {
12442                    (::fbthrift::TType::Stop, _) => break,
12443                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12444                    (fty, _) => p.skip(fty)?,
12445                }
12446                p.read_field_end()?;
12447            }
12448            p.read_struct_end()?;
12449            ::std::result::Result::Ok(Self {
12450                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.transLeader", "req"))?,
12451            })
12452        }
12453    }
12454
12455    struct Args_StorageAdminService_addPart {
12456        req: crate::types::AddPartReq,
12457    }
12458    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_addPart {
12459        #[inline]
12460        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.addPart"))]
12461        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12462            static ARGS: &[::fbthrift::Field] = &[
12463                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12464            ];
12465            let mut field_req = ::std::option::Option::None;
12466            let _ = p.read_struct_begin(|_| ())?;
12467            loop {
12468                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12469                match (fty, fid as ::std::primitive::i32) {
12470                    (::fbthrift::TType::Stop, _) => break,
12471                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12472                    (fty, _) => p.skip(fty)?,
12473                }
12474                p.read_field_end()?;
12475            }
12476            p.read_struct_end()?;
12477            ::std::result::Result::Ok(Self {
12478                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.addPart", "req"))?,
12479            })
12480        }
12481    }
12482
12483    struct Args_StorageAdminService_addLearner {
12484        req: crate::types::AddLearnerReq,
12485    }
12486    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_addLearner {
12487        #[inline]
12488        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.addLearner"))]
12489        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12490            static ARGS: &[::fbthrift::Field] = &[
12491                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12492            ];
12493            let mut field_req = ::std::option::Option::None;
12494            let _ = p.read_struct_begin(|_| ())?;
12495            loop {
12496                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12497                match (fty, fid as ::std::primitive::i32) {
12498                    (::fbthrift::TType::Stop, _) => break,
12499                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12500                    (fty, _) => p.skip(fty)?,
12501                }
12502                p.read_field_end()?;
12503            }
12504            p.read_struct_end()?;
12505            ::std::result::Result::Ok(Self {
12506                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.addLearner", "req"))?,
12507            })
12508        }
12509    }
12510
12511    struct Args_StorageAdminService_removePart {
12512        req: crate::types::RemovePartReq,
12513    }
12514    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_removePart {
12515        #[inline]
12516        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.removePart"))]
12517        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12518            static ARGS: &[::fbthrift::Field] = &[
12519                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12520            ];
12521            let mut field_req = ::std::option::Option::None;
12522            let _ = p.read_struct_begin(|_| ())?;
12523            loop {
12524                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12525                match (fty, fid as ::std::primitive::i32) {
12526                    (::fbthrift::TType::Stop, _) => break,
12527                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12528                    (fty, _) => p.skip(fty)?,
12529                }
12530                p.read_field_end()?;
12531            }
12532            p.read_struct_end()?;
12533            ::std::result::Result::Ok(Self {
12534                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.removePart", "req"))?,
12535            })
12536        }
12537    }
12538
12539    struct Args_StorageAdminService_memberChange {
12540        req: crate::types::MemberChangeReq,
12541    }
12542    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_memberChange {
12543        #[inline]
12544        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.memberChange"))]
12545        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12546            static ARGS: &[::fbthrift::Field] = &[
12547                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12548            ];
12549            let mut field_req = ::std::option::Option::None;
12550            let _ = p.read_struct_begin(|_| ())?;
12551            loop {
12552                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12553                match (fty, fid as ::std::primitive::i32) {
12554                    (::fbthrift::TType::Stop, _) => break,
12555                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12556                    (fty, _) => p.skip(fty)?,
12557                }
12558                p.read_field_end()?;
12559            }
12560            p.read_struct_end()?;
12561            ::std::result::Result::Ok(Self {
12562                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.memberChange", "req"))?,
12563            })
12564        }
12565    }
12566
12567    struct Args_StorageAdminService_waitingForCatchUpData {
12568        req: crate::types::CatchUpDataReq,
12569    }
12570    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_waitingForCatchUpData {
12571        #[inline]
12572        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.waitingForCatchUpData"))]
12573        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12574            static ARGS: &[::fbthrift::Field] = &[
12575                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12576            ];
12577            let mut field_req = ::std::option::Option::None;
12578            let _ = p.read_struct_begin(|_| ())?;
12579            loop {
12580                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12581                match (fty, fid as ::std::primitive::i32) {
12582                    (::fbthrift::TType::Stop, _) => break,
12583                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12584                    (fty, _) => p.skip(fty)?,
12585                }
12586                p.read_field_end()?;
12587            }
12588            p.read_struct_end()?;
12589            ::std::result::Result::Ok(Self {
12590                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.waitingForCatchUpData", "req"))?,
12591            })
12592        }
12593    }
12594
12595    struct Args_StorageAdminService_createCheckpoint {
12596        req: crate::types::CreateCPRequest,
12597    }
12598    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_createCheckpoint {
12599        #[inline]
12600        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.createCheckpoint"))]
12601        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12602            static ARGS: &[::fbthrift::Field] = &[
12603                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12604            ];
12605            let mut field_req = ::std::option::Option::None;
12606            let _ = p.read_struct_begin(|_| ())?;
12607            loop {
12608                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12609                match (fty, fid as ::std::primitive::i32) {
12610                    (::fbthrift::TType::Stop, _) => break,
12611                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12612                    (fty, _) => p.skip(fty)?,
12613                }
12614                p.read_field_end()?;
12615            }
12616            p.read_struct_end()?;
12617            ::std::result::Result::Ok(Self {
12618                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.createCheckpoint", "req"))?,
12619            })
12620        }
12621    }
12622
12623    struct Args_StorageAdminService_dropCheckpoint {
12624        req: crate::types::DropCPRequest,
12625    }
12626    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_dropCheckpoint {
12627        #[inline]
12628        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.dropCheckpoint"))]
12629        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12630            static ARGS: &[::fbthrift::Field] = &[
12631                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12632            ];
12633            let mut field_req = ::std::option::Option::None;
12634            let _ = p.read_struct_begin(|_| ())?;
12635            loop {
12636                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12637                match (fty, fid as ::std::primitive::i32) {
12638                    (::fbthrift::TType::Stop, _) => break,
12639                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12640                    (fty, _) => p.skip(fty)?,
12641                }
12642                p.read_field_end()?;
12643            }
12644            p.read_struct_end()?;
12645            ::std::result::Result::Ok(Self {
12646                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.dropCheckpoint", "req"))?,
12647            })
12648        }
12649    }
12650
12651    struct Args_StorageAdminService_blockingWrites {
12652        req: crate::types::BlockingSignRequest,
12653    }
12654    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_blockingWrites {
12655        #[inline]
12656        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.blockingWrites"))]
12657        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12658            static ARGS: &[::fbthrift::Field] = &[
12659                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12660            ];
12661            let mut field_req = ::std::option::Option::None;
12662            let _ = p.read_struct_begin(|_| ())?;
12663            loop {
12664                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12665                match (fty, fid as ::std::primitive::i32) {
12666                    (::fbthrift::TType::Stop, _) => break,
12667                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12668                    (fty, _) => p.skip(fty)?,
12669                }
12670                p.read_field_end()?;
12671            }
12672            p.read_struct_end()?;
12673            ::std::result::Result::Ok(Self {
12674                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.blockingWrites", "req"))?,
12675            })
12676        }
12677    }
12678
12679    struct Args_StorageAdminService_rebuildTagIndex {
12680        req: crate::types::RebuildIndexRequest,
12681    }
12682    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_rebuildTagIndex {
12683        #[inline]
12684        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.rebuildTagIndex"))]
12685        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12686            static ARGS: &[::fbthrift::Field] = &[
12687                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12688            ];
12689            let mut field_req = ::std::option::Option::None;
12690            let _ = p.read_struct_begin(|_| ())?;
12691            loop {
12692                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12693                match (fty, fid as ::std::primitive::i32) {
12694                    (::fbthrift::TType::Stop, _) => break,
12695                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12696                    (fty, _) => p.skip(fty)?,
12697                }
12698                p.read_field_end()?;
12699            }
12700            p.read_struct_end()?;
12701            ::std::result::Result::Ok(Self {
12702                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.rebuildTagIndex", "req"))?,
12703            })
12704        }
12705    }
12706
12707    struct Args_StorageAdminService_rebuildEdgeIndex {
12708        req: crate::types::RebuildIndexRequest,
12709    }
12710    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_rebuildEdgeIndex {
12711        #[inline]
12712        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.rebuildEdgeIndex"))]
12713        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12714            static ARGS: &[::fbthrift::Field] = &[
12715                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12716            ];
12717            let mut field_req = ::std::option::Option::None;
12718            let _ = p.read_struct_begin(|_| ())?;
12719            loop {
12720                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12721                match (fty, fid as ::std::primitive::i32) {
12722                    (::fbthrift::TType::Stop, _) => break,
12723                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12724                    (fty, _) => p.skip(fty)?,
12725                }
12726                p.read_field_end()?;
12727            }
12728            p.read_struct_end()?;
12729            ::std::result::Result::Ok(Self {
12730                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.rebuildEdgeIndex", "req"))?,
12731            })
12732        }
12733    }
12734
12735    struct Args_StorageAdminService_getLeaderParts {
12736        req: crate::types::GetLeaderReq,
12737    }
12738    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_getLeaderParts {
12739        #[inline]
12740        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.getLeaderParts"))]
12741        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12742            static ARGS: &[::fbthrift::Field] = &[
12743                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12744            ];
12745            let mut field_req = ::std::option::Option::None;
12746            let _ = p.read_struct_begin(|_| ())?;
12747            loop {
12748                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12749                match (fty, fid as ::std::primitive::i32) {
12750                    (::fbthrift::TType::Stop, _) => break,
12751                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12752                    (fty, _) => p.skip(fty)?,
12753                }
12754                p.read_field_end()?;
12755            }
12756            p.read_struct_end()?;
12757            ::std::result::Result::Ok(Self {
12758                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.getLeaderParts", "req"))?,
12759            })
12760        }
12761    }
12762
12763    struct Args_StorageAdminService_checkPeers {
12764        req: crate::types::CheckPeersReq,
12765    }
12766    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_checkPeers {
12767        #[inline]
12768        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.checkPeers"))]
12769        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12770            static ARGS: &[::fbthrift::Field] = &[
12771                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12772            ];
12773            let mut field_req = ::std::option::Option::None;
12774            let _ = p.read_struct_begin(|_| ())?;
12775            loop {
12776                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12777                match (fty, fid as ::std::primitive::i32) {
12778                    (::fbthrift::TType::Stop, _) => break,
12779                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12780                    (fty, _) => p.skip(fty)?,
12781                }
12782                p.read_field_end()?;
12783            }
12784            p.read_struct_end()?;
12785            ::std::result::Result::Ok(Self {
12786                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.checkPeers", "req"))?,
12787            })
12788        }
12789    }
12790
12791    struct Args_StorageAdminService_addAdminTask {
12792        req: crate::types::AddAdminTaskRequest,
12793    }
12794    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_addAdminTask {
12795        #[inline]
12796        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.addAdminTask"))]
12797        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12798            static ARGS: &[::fbthrift::Field] = &[
12799                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12800            ];
12801            let mut field_req = ::std::option::Option::None;
12802            let _ = p.read_struct_begin(|_| ())?;
12803            loop {
12804                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12805                match (fty, fid as ::std::primitive::i32) {
12806                    (::fbthrift::TType::Stop, _) => break,
12807                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12808                    (fty, _) => p.skip(fty)?,
12809                }
12810                p.read_field_end()?;
12811            }
12812            p.read_struct_end()?;
12813            ::std::result::Result::Ok(Self {
12814                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.addAdminTask", "req"))?,
12815            })
12816        }
12817    }
12818
12819    struct Args_StorageAdminService_stopAdminTask {
12820        req: crate::types::StopAdminTaskRequest,
12821    }
12822    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_stopAdminTask {
12823        #[inline]
12824        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.stopAdminTask"))]
12825        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12826            static ARGS: &[::fbthrift::Field] = &[
12827                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12828            ];
12829            let mut field_req = ::std::option::Option::None;
12830            let _ = p.read_struct_begin(|_| ())?;
12831            loop {
12832                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12833                match (fty, fid as ::std::primitive::i32) {
12834                    (::fbthrift::TType::Stop, _) => break,
12835                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12836                    (fty, _) => p.skip(fty)?,
12837                }
12838                p.read_field_end()?;
12839            }
12840            p.read_struct_end()?;
12841            ::std::result::Result::Ok(Self {
12842                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.stopAdminTask", "req"))?,
12843            })
12844        }
12845    }
12846
12847    struct Args_StorageAdminService_listClusterInfo {
12848        req: crate::types::ListClusterInfoReq,
12849    }
12850    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageAdminService_listClusterInfo {
12851        #[inline]
12852        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageAdminService.listClusterInfo"))]
12853        fn read(p: &mut P) -> ::anyhow::Result<Self> {
12854            static ARGS: &[::fbthrift::Field] = &[
12855                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
12856            ];
12857            let mut field_req = ::std::option::Option::None;
12858            let _ = p.read_struct_begin(|_| ())?;
12859            loop {
12860                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
12861                match (fty, fid as ::std::primitive::i32) {
12862                    (::fbthrift::TType::Stop, _) => break,
12863                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
12864                    (fty, _) => p.skip(fty)?,
12865                }
12866                p.read_field_end()?;
12867            }
12868            p.read_struct_end()?;
12869            ::std::result::Result::Ok(Self {
12870                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageAdminService.listClusterInfo", "req"))?,
12871            })
12872        }
12873    }
12874
12875
12876    impl<P, H, R, RS> StorageAdminServiceProcessor<P, H, R, RS>
12877    where
12878        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
12879        P::Frame: ::std::marker::Send + 'static,
12880        P::Deserializer: ::std::marker::Send,
12881        H: StorageAdminService,
12882        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
12883        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
12884        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
12885            + ::std::marker::Send + ::std::marker::Sync,
12886    {
12887        pub fn new(service: H) -> Self {
12888            Self {
12889                service,
12890                supa: ::fbthrift::NullServiceProcessor::new(),
12891                _phantom: ::std::marker::PhantomData,
12892            }
12893        }
12894
12895        pub fn into_inner(self) -> H {
12896            self.service
12897        }
12898
12899        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.transLeader"))]
12900        async fn handle_transLeader<'a>(
12901            &'a self,
12902            p: &'a mut P::Deserializer,
12903            req_ctxt: &R,
12904            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
12905            _seqid: ::std::primitive::u32,
12906        ) -> ::anyhow::Result<()> {
12907            use ::const_cstr::const_cstr;
12908            use ::futures::FutureExt as _;
12909
12910            const_cstr! {
12911                SERVICE_NAME = "StorageAdminService";
12912                METHOD_NAME = "StorageAdminService.transLeader";
12913            }
12914            let mut ctx_stack = req_ctxt.get_context_stack(
12915                SERVICE_NAME.as_cstr(),
12916                METHOD_NAME.as_cstr(),
12917            )?;
12918            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
12919            let _args: self::Args_StorageAdminService_transLeader = ::fbthrift::Deserialize::read(p)?;
12920            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
12921                protocol: P::PROTOCOL_ID,
12922                method_name: METHOD_NAME.as_cstr(),
12923                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
12924            })?;
12925            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
12926
12927            let res = ::std::panic::AssertUnwindSafe(
12928                self.service.transLeader(
12929                    _args.req,
12930                )
12931            )
12932            .catch_unwind()
12933            .await;
12934
12935            // nested results - panic catch on the outside, method on the inside
12936            let res = match res {
12937                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
12938                    ::tracing::info!("success");
12939                    crate::services::storage_admin_service::TransLeaderExn::Success(res)
12940                }
12941                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::TransLeaderExn::Success(_))) => {
12942                    panic!(
12943                        "{} attempted to return success via error",
12944                        "transLeader",
12945                    )
12946                }
12947                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
12948                    ::tracing::error!(exception = ?exn);
12949                    exn
12950                }
12951                ::std::result::Result::Err(exn) => {
12952                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.transLeader", exn);
12953                    crate::services::storage_admin_service::TransLeaderExn::ApplicationException(aexn)
12954                }
12955            };
12956
12957            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
12958                "transLeader",
12959                METHOD_NAME.as_cstr(),
12960                _seqid,
12961                req_ctxt,
12962                &mut ctx_stack,
12963                res
12964            )?;
12965            reply_state.lock().unwrap().send_reply(env);
12966            Ok(())
12967        }
12968
12969        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.addPart"))]
12970        async fn handle_addPart<'a>(
12971            &'a self,
12972            p: &'a mut P::Deserializer,
12973            req_ctxt: &R,
12974            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
12975            _seqid: ::std::primitive::u32,
12976        ) -> ::anyhow::Result<()> {
12977            use ::const_cstr::const_cstr;
12978            use ::futures::FutureExt as _;
12979
12980            const_cstr! {
12981                SERVICE_NAME = "StorageAdminService";
12982                METHOD_NAME = "StorageAdminService.addPart";
12983            }
12984            let mut ctx_stack = req_ctxt.get_context_stack(
12985                SERVICE_NAME.as_cstr(),
12986                METHOD_NAME.as_cstr(),
12987            )?;
12988            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
12989            let _args: self::Args_StorageAdminService_addPart = ::fbthrift::Deserialize::read(p)?;
12990            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
12991                protocol: P::PROTOCOL_ID,
12992                method_name: METHOD_NAME.as_cstr(),
12993                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
12994            })?;
12995            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
12996
12997            let res = ::std::panic::AssertUnwindSafe(
12998                self.service.addPart(
12999                    _args.req,
13000                )
13001            )
13002            .catch_unwind()
13003            .await;
13004
13005            // nested results - panic catch on the outside, method on the inside
13006            let res = match res {
13007                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13008                    ::tracing::info!("success");
13009                    crate::services::storage_admin_service::AddPartExn::Success(res)
13010                }
13011                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::AddPartExn::Success(_))) => {
13012                    panic!(
13013                        "{} attempted to return success via error",
13014                        "addPart",
13015                    )
13016                }
13017                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13018                    ::tracing::error!(exception = ?exn);
13019                    exn
13020                }
13021                ::std::result::Result::Err(exn) => {
13022                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.addPart", exn);
13023                    crate::services::storage_admin_service::AddPartExn::ApplicationException(aexn)
13024                }
13025            };
13026
13027            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13028                "addPart",
13029                METHOD_NAME.as_cstr(),
13030                _seqid,
13031                req_ctxt,
13032                &mut ctx_stack,
13033                res
13034            )?;
13035            reply_state.lock().unwrap().send_reply(env);
13036            Ok(())
13037        }
13038
13039        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.addLearner"))]
13040        async fn handle_addLearner<'a>(
13041            &'a self,
13042            p: &'a mut P::Deserializer,
13043            req_ctxt: &R,
13044            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13045            _seqid: ::std::primitive::u32,
13046        ) -> ::anyhow::Result<()> {
13047            use ::const_cstr::const_cstr;
13048            use ::futures::FutureExt as _;
13049
13050            const_cstr! {
13051                SERVICE_NAME = "StorageAdminService";
13052                METHOD_NAME = "StorageAdminService.addLearner";
13053            }
13054            let mut ctx_stack = req_ctxt.get_context_stack(
13055                SERVICE_NAME.as_cstr(),
13056                METHOD_NAME.as_cstr(),
13057            )?;
13058            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13059            let _args: self::Args_StorageAdminService_addLearner = ::fbthrift::Deserialize::read(p)?;
13060            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13061                protocol: P::PROTOCOL_ID,
13062                method_name: METHOD_NAME.as_cstr(),
13063                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13064            })?;
13065            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13066
13067            let res = ::std::panic::AssertUnwindSafe(
13068                self.service.addLearner(
13069                    _args.req,
13070                )
13071            )
13072            .catch_unwind()
13073            .await;
13074
13075            // nested results - panic catch on the outside, method on the inside
13076            let res = match res {
13077                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13078                    ::tracing::info!("success");
13079                    crate::services::storage_admin_service::AddLearnerExn::Success(res)
13080                }
13081                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::AddLearnerExn::Success(_))) => {
13082                    panic!(
13083                        "{} attempted to return success via error",
13084                        "addLearner",
13085                    )
13086                }
13087                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13088                    ::tracing::error!(exception = ?exn);
13089                    exn
13090                }
13091                ::std::result::Result::Err(exn) => {
13092                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.addLearner", exn);
13093                    crate::services::storage_admin_service::AddLearnerExn::ApplicationException(aexn)
13094                }
13095            };
13096
13097            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13098                "addLearner",
13099                METHOD_NAME.as_cstr(),
13100                _seqid,
13101                req_ctxt,
13102                &mut ctx_stack,
13103                res
13104            )?;
13105            reply_state.lock().unwrap().send_reply(env);
13106            Ok(())
13107        }
13108
13109        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.removePart"))]
13110        async fn handle_removePart<'a>(
13111            &'a self,
13112            p: &'a mut P::Deserializer,
13113            req_ctxt: &R,
13114            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13115            _seqid: ::std::primitive::u32,
13116        ) -> ::anyhow::Result<()> {
13117            use ::const_cstr::const_cstr;
13118            use ::futures::FutureExt as _;
13119
13120            const_cstr! {
13121                SERVICE_NAME = "StorageAdminService";
13122                METHOD_NAME = "StorageAdminService.removePart";
13123            }
13124            let mut ctx_stack = req_ctxt.get_context_stack(
13125                SERVICE_NAME.as_cstr(),
13126                METHOD_NAME.as_cstr(),
13127            )?;
13128            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13129            let _args: self::Args_StorageAdminService_removePart = ::fbthrift::Deserialize::read(p)?;
13130            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13131                protocol: P::PROTOCOL_ID,
13132                method_name: METHOD_NAME.as_cstr(),
13133                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13134            })?;
13135            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13136
13137            let res = ::std::panic::AssertUnwindSafe(
13138                self.service.removePart(
13139                    _args.req,
13140                )
13141            )
13142            .catch_unwind()
13143            .await;
13144
13145            // nested results - panic catch on the outside, method on the inside
13146            let res = match res {
13147                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13148                    ::tracing::info!("success");
13149                    crate::services::storage_admin_service::RemovePartExn::Success(res)
13150                }
13151                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::RemovePartExn::Success(_))) => {
13152                    panic!(
13153                        "{} attempted to return success via error",
13154                        "removePart",
13155                    )
13156                }
13157                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13158                    ::tracing::error!(exception = ?exn);
13159                    exn
13160                }
13161                ::std::result::Result::Err(exn) => {
13162                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.removePart", exn);
13163                    crate::services::storage_admin_service::RemovePartExn::ApplicationException(aexn)
13164                }
13165            };
13166
13167            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13168                "removePart",
13169                METHOD_NAME.as_cstr(),
13170                _seqid,
13171                req_ctxt,
13172                &mut ctx_stack,
13173                res
13174            )?;
13175            reply_state.lock().unwrap().send_reply(env);
13176            Ok(())
13177        }
13178
13179        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.memberChange"))]
13180        async fn handle_memberChange<'a>(
13181            &'a self,
13182            p: &'a mut P::Deserializer,
13183            req_ctxt: &R,
13184            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13185            _seqid: ::std::primitive::u32,
13186        ) -> ::anyhow::Result<()> {
13187            use ::const_cstr::const_cstr;
13188            use ::futures::FutureExt as _;
13189
13190            const_cstr! {
13191                SERVICE_NAME = "StorageAdminService";
13192                METHOD_NAME = "StorageAdminService.memberChange";
13193            }
13194            let mut ctx_stack = req_ctxt.get_context_stack(
13195                SERVICE_NAME.as_cstr(),
13196                METHOD_NAME.as_cstr(),
13197            )?;
13198            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13199            let _args: self::Args_StorageAdminService_memberChange = ::fbthrift::Deserialize::read(p)?;
13200            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13201                protocol: P::PROTOCOL_ID,
13202                method_name: METHOD_NAME.as_cstr(),
13203                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13204            })?;
13205            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13206
13207            let res = ::std::panic::AssertUnwindSafe(
13208                self.service.memberChange(
13209                    _args.req,
13210                )
13211            )
13212            .catch_unwind()
13213            .await;
13214
13215            // nested results - panic catch on the outside, method on the inside
13216            let res = match res {
13217                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13218                    ::tracing::info!("success");
13219                    crate::services::storage_admin_service::MemberChangeExn::Success(res)
13220                }
13221                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::MemberChangeExn::Success(_))) => {
13222                    panic!(
13223                        "{} attempted to return success via error",
13224                        "memberChange",
13225                    )
13226                }
13227                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13228                    ::tracing::error!(exception = ?exn);
13229                    exn
13230                }
13231                ::std::result::Result::Err(exn) => {
13232                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.memberChange", exn);
13233                    crate::services::storage_admin_service::MemberChangeExn::ApplicationException(aexn)
13234                }
13235            };
13236
13237            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13238                "memberChange",
13239                METHOD_NAME.as_cstr(),
13240                _seqid,
13241                req_ctxt,
13242                &mut ctx_stack,
13243                res
13244            )?;
13245            reply_state.lock().unwrap().send_reply(env);
13246            Ok(())
13247        }
13248
13249        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.waitingForCatchUpData"))]
13250        async fn handle_waitingForCatchUpData<'a>(
13251            &'a self,
13252            p: &'a mut P::Deserializer,
13253            req_ctxt: &R,
13254            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13255            _seqid: ::std::primitive::u32,
13256        ) -> ::anyhow::Result<()> {
13257            use ::const_cstr::const_cstr;
13258            use ::futures::FutureExt as _;
13259
13260            const_cstr! {
13261                SERVICE_NAME = "StorageAdminService";
13262                METHOD_NAME = "StorageAdminService.waitingForCatchUpData";
13263            }
13264            let mut ctx_stack = req_ctxt.get_context_stack(
13265                SERVICE_NAME.as_cstr(),
13266                METHOD_NAME.as_cstr(),
13267            )?;
13268            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13269            let _args: self::Args_StorageAdminService_waitingForCatchUpData = ::fbthrift::Deserialize::read(p)?;
13270            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13271                protocol: P::PROTOCOL_ID,
13272                method_name: METHOD_NAME.as_cstr(),
13273                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13274            })?;
13275            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13276
13277            let res = ::std::panic::AssertUnwindSafe(
13278                self.service.waitingForCatchUpData(
13279                    _args.req,
13280                )
13281            )
13282            .catch_unwind()
13283            .await;
13284
13285            // nested results - panic catch on the outside, method on the inside
13286            let res = match res {
13287                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13288                    ::tracing::info!("success");
13289                    crate::services::storage_admin_service::WaitingForCatchUpDataExn::Success(res)
13290                }
13291                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::WaitingForCatchUpDataExn::Success(_))) => {
13292                    panic!(
13293                        "{} attempted to return success via error",
13294                        "waitingForCatchUpData",
13295                    )
13296                }
13297                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13298                    ::tracing::error!(exception = ?exn);
13299                    exn
13300                }
13301                ::std::result::Result::Err(exn) => {
13302                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.waitingForCatchUpData", exn);
13303                    crate::services::storage_admin_service::WaitingForCatchUpDataExn::ApplicationException(aexn)
13304                }
13305            };
13306
13307            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13308                "waitingForCatchUpData",
13309                METHOD_NAME.as_cstr(),
13310                _seqid,
13311                req_ctxt,
13312                &mut ctx_stack,
13313                res
13314            )?;
13315            reply_state.lock().unwrap().send_reply(env);
13316            Ok(())
13317        }
13318
13319        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.createCheckpoint"))]
13320        async fn handle_createCheckpoint<'a>(
13321            &'a self,
13322            p: &'a mut P::Deserializer,
13323            req_ctxt: &R,
13324            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13325            _seqid: ::std::primitive::u32,
13326        ) -> ::anyhow::Result<()> {
13327            use ::const_cstr::const_cstr;
13328            use ::futures::FutureExt as _;
13329
13330            const_cstr! {
13331                SERVICE_NAME = "StorageAdminService";
13332                METHOD_NAME = "StorageAdminService.createCheckpoint";
13333            }
13334            let mut ctx_stack = req_ctxt.get_context_stack(
13335                SERVICE_NAME.as_cstr(),
13336                METHOD_NAME.as_cstr(),
13337            )?;
13338            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13339            let _args: self::Args_StorageAdminService_createCheckpoint = ::fbthrift::Deserialize::read(p)?;
13340            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13341                protocol: P::PROTOCOL_ID,
13342                method_name: METHOD_NAME.as_cstr(),
13343                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13344            })?;
13345            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13346
13347            let res = ::std::panic::AssertUnwindSafe(
13348                self.service.createCheckpoint(
13349                    _args.req,
13350                )
13351            )
13352            .catch_unwind()
13353            .await;
13354
13355            // nested results - panic catch on the outside, method on the inside
13356            let res = match res {
13357                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13358                    ::tracing::info!("success");
13359                    crate::services::storage_admin_service::CreateCheckpointExn::Success(res)
13360                }
13361                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::CreateCheckpointExn::Success(_))) => {
13362                    panic!(
13363                        "{} attempted to return success via error",
13364                        "createCheckpoint",
13365                    )
13366                }
13367                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13368                    ::tracing::error!(exception = ?exn);
13369                    exn
13370                }
13371                ::std::result::Result::Err(exn) => {
13372                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.createCheckpoint", exn);
13373                    crate::services::storage_admin_service::CreateCheckpointExn::ApplicationException(aexn)
13374                }
13375            };
13376
13377            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13378                "createCheckpoint",
13379                METHOD_NAME.as_cstr(),
13380                _seqid,
13381                req_ctxt,
13382                &mut ctx_stack,
13383                res
13384            )?;
13385            reply_state.lock().unwrap().send_reply(env);
13386            Ok(())
13387        }
13388
13389        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.dropCheckpoint"))]
13390        async fn handle_dropCheckpoint<'a>(
13391            &'a self,
13392            p: &'a mut P::Deserializer,
13393            req_ctxt: &R,
13394            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13395            _seqid: ::std::primitive::u32,
13396        ) -> ::anyhow::Result<()> {
13397            use ::const_cstr::const_cstr;
13398            use ::futures::FutureExt as _;
13399
13400            const_cstr! {
13401                SERVICE_NAME = "StorageAdminService";
13402                METHOD_NAME = "StorageAdminService.dropCheckpoint";
13403            }
13404            let mut ctx_stack = req_ctxt.get_context_stack(
13405                SERVICE_NAME.as_cstr(),
13406                METHOD_NAME.as_cstr(),
13407            )?;
13408            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13409            let _args: self::Args_StorageAdminService_dropCheckpoint = ::fbthrift::Deserialize::read(p)?;
13410            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13411                protocol: P::PROTOCOL_ID,
13412                method_name: METHOD_NAME.as_cstr(),
13413                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13414            })?;
13415            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13416
13417            let res = ::std::panic::AssertUnwindSafe(
13418                self.service.dropCheckpoint(
13419                    _args.req,
13420                )
13421            )
13422            .catch_unwind()
13423            .await;
13424
13425            // nested results - panic catch on the outside, method on the inside
13426            let res = match res {
13427                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13428                    ::tracing::info!("success");
13429                    crate::services::storage_admin_service::DropCheckpointExn::Success(res)
13430                }
13431                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::DropCheckpointExn::Success(_))) => {
13432                    panic!(
13433                        "{} attempted to return success via error",
13434                        "dropCheckpoint",
13435                    )
13436                }
13437                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13438                    ::tracing::error!(exception = ?exn);
13439                    exn
13440                }
13441                ::std::result::Result::Err(exn) => {
13442                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.dropCheckpoint", exn);
13443                    crate::services::storage_admin_service::DropCheckpointExn::ApplicationException(aexn)
13444                }
13445            };
13446
13447            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13448                "dropCheckpoint",
13449                METHOD_NAME.as_cstr(),
13450                _seqid,
13451                req_ctxt,
13452                &mut ctx_stack,
13453                res
13454            )?;
13455            reply_state.lock().unwrap().send_reply(env);
13456            Ok(())
13457        }
13458
13459        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.blockingWrites"))]
13460        async fn handle_blockingWrites<'a>(
13461            &'a self,
13462            p: &'a mut P::Deserializer,
13463            req_ctxt: &R,
13464            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13465            _seqid: ::std::primitive::u32,
13466        ) -> ::anyhow::Result<()> {
13467            use ::const_cstr::const_cstr;
13468            use ::futures::FutureExt as _;
13469
13470            const_cstr! {
13471                SERVICE_NAME = "StorageAdminService";
13472                METHOD_NAME = "StorageAdminService.blockingWrites";
13473            }
13474            let mut ctx_stack = req_ctxt.get_context_stack(
13475                SERVICE_NAME.as_cstr(),
13476                METHOD_NAME.as_cstr(),
13477            )?;
13478            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13479            let _args: self::Args_StorageAdminService_blockingWrites = ::fbthrift::Deserialize::read(p)?;
13480            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13481                protocol: P::PROTOCOL_ID,
13482                method_name: METHOD_NAME.as_cstr(),
13483                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13484            })?;
13485            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13486
13487            let res = ::std::panic::AssertUnwindSafe(
13488                self.service.blockingWrites(
13489                    _args.req,
13490                )
13491            )
13492            .catch_unwind()
13493            .await;
13494
13495            // nested results - panic catch on the outside, method on the inside
13496            let res = match res {
13497                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13498                    ::tracing::info!("success");
13499                    crate::services::storage_admin_service::BlockingWritesExn::Success(res)
13500                }
13501                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::BlockingWritesExn::Success(_))) => {
13502                    panic!(
13503                        "{} attempted to return success via error",
13504                        "blockingWrites",
13505                    )
13506                }
13507                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13508                    ::tracing::error!(exception = ?exn);
13509                    exn
13510                }
13511                ::std::result::Result::Err(exn) => {
13512                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.blockingWrites", exn);
13513                    crate::services::storage_admin_service::BlockingWritesExn::ApplicationException(aexn)
13514                }
13515            };
13516
13517            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13518                "blockingWrites",
13519                METHOD_NAME.as_cstr(),
13520                _seqid,
13521                req_ctxt,
13522                &mut ctx_stack,
13523                res
13524            )?;
13525            reply_state.lock().unwrap().send_reply(env);
13526            Ok(())
13527        }
13528
13529        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.rebuildTagIndex"))]
13530        async fn handle_rebuildTagIndex<'a>(
13531            &'a self,
13532            p: &'a mut P::Deserializer,
13533            req_ctxt: &R,
13534            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13535            _seqid: ::std::primitive::u32,
13536        ) -> ::anyhow::Result<()> {
13537            use ::const_cstr::const_cstr;
13538            use ::futures::FutureExt as _;
13539
13540            const_cstr! {
13541                SERVICE_NAME = "StorageAdminService";
13542                METHOD_NAME = "StorageAdminService.rebuildTagIndex";
13543            }
13544            let mut ctx_stack = req_ctxt.get_context_stack(
13545                SERVICE_NAME.as_cstr(),
13546                METHOD_NAME.as_cstr(),
13547            )?;
13548            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13549            let _args: self::Args_StorageAdminService_rebuildTagIndex = ::fbthrift::Deserialize::read(p)?;
13550            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13551                protocol: P::PROTOCOL_ID,
13552                method_name: METHOD_NAME.as_cstr(),
13553                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13554            })?;
13555            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13556
13557            let res = ::std::panic::AssertUnwindSafe(
13558                self.service.rebuildTagIndex(
13559                    _args.req,
13560                )
13561            )
13562            .catch_unwind()
13563            .await;
13564
13565            // nested results - panic catch on the outside, method on the inside
13566            let res = match res {
13567                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13568                    ::tracing::info!("success");
13569                    crate::services::storage_admin_service::RebuildTagIndexExn::Success(res)
13570                }
13571                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::RebuildTagIndexExn::Success(_))) => {
13572                    panic!(
13573                        "{} attempted to return success via error",
13574                        "rebuildTagIndex",
13575                    )
13576                }
13577                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13578                    ::tracing::error!(exception = ?exn);
13579                    exn
13580                }
13581                ::std::result::Result::Err(exn) => {
13582                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.rebuildTagIndex", exn);
13583                    crate::services::storage_admin_service::RebuildTagIndexExn::ApplicationException(aexn)
13584                }
13585            };
13586
13587            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13588                "rebuildTagIndex",
13589                METHOD_NAME.as_cstr(),
13590                _seqid,
13591                req_ctxt,
13592                &mut ctx_stack,
13593                res
13594            )?;
13595            reply_state.lock().unwrap().send_reply(env);
13596            Ok(())
13597        }
13598
13599        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.rebuildEdgeIndex"))]
13600        async fn handle_rebuildEdgeIndex<'a>(
13601            &'a self,
13602            p: &'a mut P::Deserializer,
13603            req_ctxt: &R,
13604            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13605            _seqid: ::std::primitive::u32,
13606        ) -> ::anyhow::Result<()> {
13607            use ::const_cstr::const_cstr;
13608            use ::futures::FutureExt as _;
13609
13610            const_cstr! {
13611                SERVICE_NAME = "StorageAdminService";
13612                METHOD_NAME = "StorageAdminService.rebuildEdgeIndex";
13613            }
13614            let mut ctx_stack = req_ctxt.get_context_stack(
13615                SERVICE_NAME.as_cstr(),
13616                METHOD_NAME.as_cstr(),
13617            )?;
13618            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13619            let _args: self::Args_StorageAdminService_rebuildEdgeIndex = ::fbthrift::Deserialize::read(p)?;
13620            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13621                protocol: P::PROTOCOL_ID,
13622                method_name: METHOD_NAME.as_cstr(),
13623                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13624            })?;
13625            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13626
13627            let res = ::std::panic::AssertUnwindSafe(
13628                self.service.rebuildEdgeIndex(
13629                    _args.req,
13630                )
13631            )
13632            .catch_unwind()
13633            .await;
13634
13635            // nested results - panic catch on the outside, method on the inside
13636            let res = match res {
13637                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13638                    ::tracing::info!("success");
13639                    crate::services::storage_admin_service::RebuildEdgeIndexExn::Success(res)
13640                }
13641                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::RebuildEdgeIndexExn::Success(_))) => {
13642                    panic!(
13643                        "{} attempted to return success via error",
13644                        "rebuildEdgeIndex",
13645                    )
13646                }
13647                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13648                    ::tracing::error!(exception = ?exn);
13649                    exn
13650                }
13651                ::std::result::Result::Err(exn) => {
13652                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.rebuildEdgeIndex", exn);
13653                    crate::services::storage_admin_service::RebuildEdgeIndexExn::ApplicationException(aexn)
13654                }
13655            };
13656
13657            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13658                "rebuildEdgeIndex",
13659                METHOD_NAME.as_cstr(),
13660                _seqid,
13661                req_ctxt,
13662                &mut ctx_stack,
13663                res
13664            )?;
13665            reply_state.lock().unwrap().send_reply(env);
13666            Ok(())
13667        }
13668
13669        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.getLeaderParts"))]
13670        async fn handle_getLeaderParts<'a>(
13671            &'a self,
13672            p: &'a mut P::Deserializer,
13673            req_ctxt: &R,
13674            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13675            _seqid: ::std::primitive::u32,
13676        ) -> ::anyhow::Result<()> {
13677            use ::const_cstr::const_cstr;
13678            use ::futures::FutureExt as _;
13679
13680            const_cstr! {
13681                SERVICE_NAME = "StorageAdminService";
13682                METHOD_NAME = "StorageAdminService.getLeaderParts";
13683            }
13684            let mut ctx_stack = req_ctxt.get_context_stack(
13685                SERVICE_NAME.as_cstr(),
13686                METHOD_NAME.as_cstr(),
13687            )?;
13688            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13689            let _args: self::Args_StorageAdminService_getLeaderParts = ::fbthrift::Deserialize::read(p)?;
13690            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13691                protocol: P::PROTOCOL_ID,
13692                method_name: METHOD_NAME.as_cstr(),
13693                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13694            })?;
13695            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13696
13697            let res = ::std::panic::AssertUnwindSafe(
13698                self.service.getLeaderParts(
13699                    _args.req,
13700                )
13701            )
13702            .catch_unwind()
13703            .await;
13704
13705            // nested results - panic catch on the outside, method on the inside
13706            let res = match res {
13707                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13708                    ::tracing::info!("success");
13709                    crate::services::storage_admin_service::GetLeaderPartsExn::Success(res)
13710                }
13711                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::GetLeaderPartsExn::Success(_))) => {
13712                    panic!(
13713                        "{} attempted to return success via error",
13714                        "getLeaderParts",
13715                    )
13716                }
13717                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13718                    ::tracing::error!(exception = ?exn);
13719                    exn
13720                }
13721                ::std::result::Result::Err(exn) => {
13722                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.getLeaderParts", exn);
13723                    crate::services::storage_admin_service::GetLeaderPartsExn::ApplicationException(aexn)
13724                }
13725            };
13726
13727            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13728                "getLeaderParts",
13729                METHOD_NAME.as_cstr(),
13730                _seqid,
13731                req_ctxt,
13732                &mut ctx_stack,
13733                res
13734            )?;
13735            reply_state.lock().unwrap().send_reply(env);
13736            Ok(())
13737        }
13738
13739        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.checkPeers"))]
13740        async fn handle_checkPeers<'a>(
13741            &'a self,
13742            p: &'a mut P::Deserializer,
13743            req_ctxt: &R,
13744            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13745            _seqid: ::std::primitive::u32,
13746        ) -> ::anyhow::Result<()> {
13747            use ::const_cstr::const_cstr;
13748            use ::futures::FutureExt as _;
13749
13750            const_cstr! {
13751                SERVICE_NAME = "StorageAdminService";
13752                METHOD_NAME = "StorageAdminService.checkPeers";
13753            }
13754            let mut ctx_stack = req_ctxt.get_context_stack(
13755                SERVICE_NAME.as_cstr(),
13756                METHOD_NAME.as_cstr(),
13757            )?;
13758            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13759            let _args: self::Args_StorageAdminService_checkPeers = ::fbthrift::Deserialize::read(p)?;
13760            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13761                protocol: P::PROTOCOL_ID,
13762                method_name: METHOD_NAME.as_cstr(),
13763                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13764            })?;
13765            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13766
13767            let res = ::std::panic::AssertUnwindSafe(
13768                self.service.checkPeers(
13769                    _args.req,
13770                )
13771            )
13772            .catch_unwind()
13773            .await;
13774
13775            // nested results - panic catch on the outside, method on the inside
13776            let res = match res {
13777                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13778                    ::tracing::info!("success");
13779                    crate::services::storage_admin_service::CheckPeersExn::Success(res)
13780                }
13781                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::CheckPeersExn::Success(_))) => {
13782                    panic!(
13783                        "{} attempted to return success via error",
13784                        "checkPeers",
13785                    )
13786                }
13787                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13788                    ::tracing::error!(exception = ?exn);
13789                    exn
13790                }
13791                ::std::result::Result::Err(exn) => {
13792                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.checkPeers", exn);
13793                    crate::services::storage_admin_service::CheckPeersExn::ApplicationException(aexn)
13794                }
13795            };
13796
13797            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13798                "checkPeers",
13799                METHOD_NAME.as_cstr(),
13800                _seqid,
13801                req_ctxt,
13802                &mut ctx_stack,
13803                res
13804            )?;
13805            reply_state.lock().unwrap().send_reply(env);
13806            Ok(())
13807        }
13808
13809        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.addAdminTask"))]
13810        async fn handle_addAdminTask<'a>(
13811            &'a self,
13812            p: &'a mut P::Deserializer,
13813            req_ctxt: &R,
13814            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13815            _seqid: ::std::primitive::u32,
13816        ) -> ::anyhow::Result<()> {
13817            use ::const_cstr::const_cstr;
13818            use ::futures::FutureExt as _;
13819
13820            const_cstr! {
13821                SERVICE_NAME = "StorageAdminService";
13822                METHOD_NAME = "StorageAdminService.addAdminTask";
13823            }
13824            let mut ctx_stack = req_ctxt.get_context_stack(
13825                SERVICE_NAME.as_cstr(),
13826                METHOD_NAME.as_cstr(),
13827            )?;
13828            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13829            let _args: self::Args_StorageAdminService_addAdminTask = ::fbthrift::Deserialize::read(p)?;
13830            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13831                protocol: P::PROTOCOL_ID,
13832                method_name: METHOD_NAME.as_cstr(),
13833                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13834            })?;
13835            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13836
13837            let res = ::std::panic::AssertUnwindSafe(
13838                self.service.addAdminTask(
13839                    _args.req,
13840                )
13841            )
13842            .catch_unwind()
13843            .await;
13844
13845            // nested results - panic catch on the outside, method on the inside
13846            let res = match res {
13847                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13848                    ::tracing::info!("success");
13849                    crate::services::storage_admin_service::AddAdminTaskExn::Success(res)
13850                }
13851                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::AddAdminTaskExn::Success(_))) => {
13852                    panic!(
13853                        "{} attempted to return success via error",
13854                        "addAdminTask",
13855                    )
13856                }
13857                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13858                    ::tracing::error!(exception = ?exn);
13859                    exn
13860                }
13861                ::std::result::Result::Err(exn) => {
13862                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.addAdminTask", exn);
13863                    crate::services::storage_admin_service::AddAdminTaskExn::ApplicationException(aexn)
13864                }
13865            };
13866
13867            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13868                "addAdminTask",
13869                METHOD_NAME.as_cstr(),
13870                _seqid,
13871                req_ctxt,
13872                &mut ctx_stack,
13873                res
13874            )?;
13875            reply_state.lock().unwrap().send_reply(env);
13876            Ok(())
13877        }
13878
13879        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.stopAdminTask"))]
13880        async fn handle_stopAdminTask<'a>(
13881            &'a self,
13882            p: &'a mut P::Deserializer,
13883            req_ctxt: &R,
13884            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13885            _seqid: ::std::primitive::u32,
13886        ) -> ::anyhow::Result<()> {
13887            use ::const_cstr::const_cstr;
13888            use ::futures::FutureExt as _;
13889
13890            const_cstr! {
13891                SERVICE_NAME = "StorageAdminService";
13892                METHOD_NAME = "StorageAdminService.stopAdminTask";
13893            }
13894            let mut ctx_stack = req_ctxt.get_context_stack(
13895                SERVICE_NAME.as_cstr(),
13896                METHOD_NAME.as_cstr(),
13897            )?;
13898            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13899            let _args: self::Args_StorageAdminService_stopAdminTask = ::fbthrift::Deserialize::read(p)?;
13900            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13901                protocol: P::PROTOCOL_ID,
13902                method_name: METHOD_NAME.as_cstr(),
13903                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13904            })?;
13905            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13906
13907            let res = ::std::panic::AssertUnwindSafe(
13908                self.service.stopAdminTask(
13909                    _args.req,
13910                )
13911            )
13912            .catch_unwind()
13913            .await;
13914
13915            // nested results - panic catch on the outside, method on the inside
13916            let res = match res {
13917                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13918                    ::tracing::info!("success");
13919                    crate::services::storage_admin_service::StopAdminTaskExn::Success(res)
13920                }
13921                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::StopAdminTaskExn::Success(_))) => {
13922                    panic!(
13923                        "{} attempted to return success via error",
13924                        "stopAdminTask",
13925                    )
13926                }
13927                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13928                    ::tracing::error!(exception = ?exn);
13929                    exn
13930                }
13931                ::std::result::Result::Err(exn) => {
13932                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.stopAdminTask", exn);
13933                    crate::services::storage_admin_service::StopAdminTaskExn::ApplicationException(aexn)
13934                }
13935            };
13936
13937            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
13938                "stopAdminTask",
13939                METHOD_NAME.as_cstr(),
13940                _seqid,
13941                req_ctxt,
13942                &mut ctx_stack,
13943                res
13944            )?;
13945            reply_state.lock().unwrap().send_reply(env);
13946            Ok(())
13947        }
13948
13949        #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageAdminService.listClusterInfo"))]
13950        async fn handle_listClusterInfo<'a>(
13951            &'a self,
13952            p: &'a mut P::Deserializer,
13953            req_ctxt: &R,
13954            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
13955            _seqid: ::std::primitive::u32,
13956        ) -> ::anyhow::Result<()> {
13957            use ::const_cstr::const_cstr;
13958            use ::futures::FutureExt as _;
13959
13960            const_cstr! {
13961                SERVICE_NAME = "StorageAdminService";
13962                METHOD_NAME = "StorageAdminService.listClusterInfo";
13963            }
13964            let mut ctx_stack = req_ctxt.get_context_stack(
13965                SERVICE_NAME.as_cstr(),
13966                METHOD_NAME.as_cstr(),
13967            )?;
13968            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
13969            let _args: self::Args_StorageAdminService_listClusterInfo = ::fbthrift::Deserialize::read(p)?;
13970            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
13971                protocol: P::PROTOCOL_ID,
13972                method_name: METHOD_NAME.as_cstr(),
13973                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
13974            })?;
13975            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
13976
13977            let res = ::std::panic::AssertUnwindSafe(
13978                self.service.listClusterInfo(
13979                    _args.req,
13980                )
13981            )
13982            .catch_unwind()
13983            .await;
13984
13985            // nested results - panic catch on the outside, method on the inside
13986            let res = match res {
13987                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
13988                    ::tracing::info!("success");
13989                    crate::services::storage_admin_service::ListClusterInfoExn::Success(res)
13990                }
13991                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_admin_service::ListClusterInfoExn::Success(_))) => {
13992                    panic!(
13993                        "{} attempted to return success via error",
13994                        "listClusterInfo",
13995                    )
13996                }
13997                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
13998                    ::tracing::error!(exception = ?exn);
13999                    exn
14000                }
14001                ::std::result::Result::Err(exn) => {
14002                    let aexn = ::fbthrift::ApplicationException::handler_panic("StorageAdminService.listClusterInfo", exn);
14003                    crate::services::storage_admin_service::ListClusterInfoExn::ApplicationException(aexn)
14004                }
14005            };
14006
14007            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
14008                "listClusterInfo",
14009                METHOD_NAME.as_cstr(),
14010                _seqid,
14011                req_ctxt,
14012                &mut ctx_stack,
14013                res
14014            )?;
14015            reply_state.lock().unwrap().send_reply(env);
14016            Ok(())
14017        }
14018    }
14019
14020    #[::async_trait::async_trait]
14021    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for StorageAdminServiceProcessor<P, H, R, RS>
14022    where
14023        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
14024        P::Deserializer: ::std::marker::Send,
14025        H: StorageAdminService,
14026        P::Frame: ::std::marker::Send + 'static,
14027        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
14028        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
14029            + ::std::marker::Send + ::std::marker::Sync + 'static,
14030        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
14031    {
14032        type RequestContext = R;
14033        type ReplyState = RS;
14034
14035        #[inline]
14036        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
14037            match name {
14038                b"transLeader" => ::std::result::Result::Ok(0usize),
14039                b"addPart" => ::std::result::Result::Ok(1usize),
14040                b"addLearner" => ::std::result::Result::Ok(2usize),
14041                b"removePart" => ::std::result::Result::Ok(3usize),
14042                b"memberChange" => ::std::result::Result::Ok(4usize),
14043                b"waitingForCatchUpData" => ::std::result::Result::Ok(5usize),
14044                b"createCheckpoint" => ::std::result::Result::Ok(6usize),
14045                b"dropCheckpoint" => ::std::result::Result::Ok(7usize),
14046                b"blockingWrites" => ::std::result::Result::Ok(8usize),
14047                b"rebuildTagIndex" => ::std::result::Result::Ok(9usize),
14048                b"rebuildEdgeIndex" => ::std::result::Result::Ok(10usize),
14049                b"getLeaderParts" => ::std::result::Result::Ok(11usize),
14050                b"checkPeers" => ::std::result::Result::Ok(12usize),
14051                b"addAdminTask" => ::std::result::Result::Ok(13usize),
14052                b"stopAdminTask" => ::std::result::Result::Ok(14usize),
14053                b"listClusterInfo" => ::std::result::Result::Ok(15usize),
14054                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
14055            }
14056        }
14057
14058        #[allow(clippy::match_single_binding)]
14059        async fn handle_method(
14060            &self,
14061            idx: ::std::primitive::usize,
14062            _p: &mut P::Deserializer,
14063            _r: &R,
14064            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
14065            _seqid: ::std::primitive::u32,
14066        ) -> ::anyhow::Result<()> {
14067            match idx {
14068                0usize => {
14069                    self.handle_transLeader(_p, _r, _reply_state, _seqid).await
14070                }
14071                1usize => {
14072                    self.handle_addPart(_p, _r, _reply_state, _seqid).await
14073                }
14074                2usize => {
14075                    self.handle_addLearner(_p, _r, _reply_state, _seqid).await
14076                }
14077                3usize => {
14078                    self.handle_removePart(_p, _r, _reply_state, _seqid).await
14079                }
14080                4usize => {
14081                    self.handle_memberChange(_p, _r, _reply_state, _seqid).await
14082                }
14083                5usize => {
14084                    self.handle_waitingForCatchUpData(_p, _r, _reply_state, _seqid).await
14085                }
14086                6usize => {
14087                    self.handle_createCheckpoint(_p, _r, _reply_state, _seqid).await
14088                }
14089                7usize => {
14090                    self.handle_dropCheckpoint(_p, _r, _reply_state, _seqid).await
14091                }
14092                8usize => {
14093                    self.handle_blockingWrites(_p, _r, _reply_state, _seqid).await
14094                }
14095                9usize => {
14096                    self.handle_rebuildTagIndex(_p, _r, _reply_state, _seqid).await
14097                }
14098                10usize => {
14099                    self.handle_rebuildEdgeIndex(_p, _r, _reply_state, _seqid).await
14100                }
14101                11usize => {
14102                    self.handle_getLeaderParts(_p, _r, _reply_state, _seqid).await
14103                }
14104                12usize => {
14105                    self.handle_checkPeers(_p, _r, _reply_state, _seqid).await
14106                }
14107                13usize => {
14108                    self.handle_addAdminTask(_p, _r, _reply_state, _seqid).await
14109                }
14110                14usize => {
14111                    self.handle_stopAdminTask(_p, _r, _reply_state, _seqid).await
14112                }
14113                15usize => {
14114                    self.handle_listClusterInfo(_p, _r, _reply_state, _seqid).await
14115                }
14116                bad => panic!(
14117                    "{}: unexpected method idx {}",
14118                    "StorageAdminServiceProcessor",
14119                    bad
14120                ),
14121            }
14122        }
14123
14124        #[allow(clippy::match_single_binding)]
14125        #[inline]
14126        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
14127            match name {
14128                _ => ::anyhow::bail!("Unknown interaction"),
14129            }
14130        }
14131
14132        #[allow(clippy::match_single_binding)]
14133        fn handle_create_interaction(
14134            &self,
14135            idx: ::std::primitive::usize,
14136        ) -> ::anyhow::Result<
14137            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
14138        > {
14139            match idx {
14140                bad => panic!(
14141                    "{}: unexpected method idx {}",
14142                    "StorageAdminServiceProcessor",
14143                    bad
14144                ),
14145            }
14146        }
14147    }
14148
14149    #[::async_trait::async_trait]
14150    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for StorageAdminServiceProcessor<P, H, R, RS>
14151    where
14152        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
14153        P::Deserializer: ::std::marker::Send,
14154        P::Frame: ::std::marker::Send + 'static,
14155        H: StorageAdminService,
14156        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
14157        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
14158            + ::std::marker::Send + ::std::marker::Sync + 'static,
14159        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
14160    {
14161        type Handler = H;
14162        type RequestContext = R;
14163        type ReplyState = RS;
14164
14165        #[tracing::instrument(level="trace", skip_all, fields(service = "StorageAdminService"))]
14166        async fn call(
14167            &self,
14168            req: ::fbthrift::ProtocolDecoded<P>,
14169            req_ctxt: &R,
14170            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
14171        ) -> ::anyhow::Result<()> {
14172            use ::fbthrift::{BufExt as _, ProtocolReader as _, ServiceProcessor as _};
14173            let mut p = P::deserializer(req);
14174            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
14175            if mty != ::fbthrift::MessageType::Call {
14176                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
14177                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
14178                    format!("message type {:?} not handled", mty)
14179                )));
14180            }
14181            let idx = match idx {
14182                ::std::result::Result::Ok(idx) => idx,
14183                ::std::result::Result::Err(_) => {
14184                    let cur = P::into_buffer(p).reset();
14185                    return self.supa.call(cur, req_ctxt, reply_state).await;
14186                }
14187            };
14188            self.handle_method(idx, &mut p, req_ctxt, reply_state, seqid).await?;
14189            p.read_message_end()?;
14190
14191            Ok(())
14192        }
14193
14194        fn create_interaction(
14195            &self,
14196            name: &str,
14197        ) -> ::anyhow::Result<
14198            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
14199        > {
14200            use ::fbthrift::{ServiceProcessor as _};
14201            let idx = self.create_interaction_idx(name);
14202            let idx = match idx {
14203                ::anyhow::Result::Ok(idx) => idx,
14204                ::anyhow::Result::Err(_) => {
14205                    return self.supa.create_interaction(name);
14206                }
14207            };
14208            self.handle_create_interaction(idx)
14209        }
14210
14211        fn get_method_names(&self) -> &'static [&'static str] {
14212            &[
14213                // from StorageAdminService
14214                "transLeader",
14215                "addPart",
14216                "addLearner",
14217                "removePart",
14218                "memberChange",
14219                "waitingForCatchUpData",
14220                "createCheckpoint",
14221                "dropCheckpoint",
14222                "blockingWrites",
14223                "rebuildTagIndex",
14224                "rebuildEdgeIndex",
14225                "getLeaderParts",
14226                "checkPeers",
14227                "addAdminTask",
14228                "stopAdminTask",
14229                "listClusterInfo",
14230            ]
14231        }
14232    }
14233
14234    /// Construct a new instance of a StorageAdminService service.
14235    ///
14236    /// This is called when a new instance of a Thrift service Processor
14237    /// is needed for a particular Thrift protocol.
14238    #[::tracing::instrument(level="debug", skip_all, fields(proto = ?proto))]
14239    pub fn make_StorageAdminService_server<F, H, R, RS>(
14240        proto: ::fbthrift::ProtocolID,
14241        handler: H,
14242    ) -> ::std::result::Result<::std::boxed::Box<dyn ::fbthrift::ThriftService<F, Handler = H, RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>, ::fbthrift::ApplicationException>
14243    where
14244        F: ::fbthrift::Framing + ::std::marker::Send + ::std::marker::Sync + 'static,
14245        H: StorageAdminService,
14246        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
14247        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = F::DecBuf> + ::std::marker::Send + ::std::marker::Sync + 'static,
14248        RS: ::fbthrift::ReplyState<F, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
14249    {
14250        match proto {
14251            ::fbthrift::ProtocolID::BinaryProtocol => {
14252                ::std::result::Result::Ok(::std::boxed::Box::new(StorageAdminServiceProcessor::<::fbthrift::BinaryProtocol<F>, H, R, RS>::new(handler)))
14253            }
14254            ::fbthrift::ProtocolID::CompactProtocol => {
14255                ::std::result::Result::Ok(::std::boxed::Box::new(StorageAdminServiceProcessor::<::fbthrift::CompactProtocol<F>, H, R, RS>::new(handler)))
14256            }
14257            bad => {
14258                ::tracing::error!(method = "StorageAdminService.", invalid_protocol = ?bad);
14259                ::std::result::Result::Err(::fbthrift::ApplicationException::invalid_protocol(bad))
14260            }
14261        }
14262    }
14263
14264    #[::async_trait::async_trait]
14265    pub trait GeneralStorageService: ::std::marker::Send + ::std::marker::Sync + 'static {
14266        async fn get(
14267            &self,
14268            _req: crate::types::KVGetRequest,
14269        ) -> ::std::result::Result<crate::types::KVGetResponse, crate::services::general_storage_service::GetExn> {
14270            ::std::result::Result::Err(crate::services::general_storage_service::GetExn::ApplicationException(
14271                ::fbthrift::ApplicationException::unimplemented_method(
14272                    "GeneralStorageService",
14273                    "get",
14274                ),
14275            ))
14276        }
14277        async fn put(
14278            &self,
14279            _req: crate::types::KVPutRequest,
14280        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::general_storage_service::PutExn> {
14281            ::std::result::Result::Err(crate::services::general_storage_service::PutExn::ApplicationException(
14282                ::fbthrift::ApplicationException::unimplemented_method(
14283                    "GeneralStorageService",
14284                    "put",
14285                ),
14286            ))
14287        }
14288        async fn remove(
14289            &self,
14290            _req: crate::types::KVRemoveRequest,
14291        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::general_storage_service::RemoveExn> {
14292            ::std::result::Result::Err(crate::services::general_storage_service::RemoveExn::ApplicationException(
14293                ::fbthrift::ApplicationException::unimplemented_method(
14294                    "GeneralStorageService",
14295                    "remove",
14296                ),
14297            ))
14298        }
14299    }
14300
14301    #[::async_trait::async_trait]
14302    impl<T> GeneralStorageService for ::std::boxed::Box<T>
14303    where
14304        T: GeneralStorageService + Send + Sync + ?Sized,
14305    {
14306        async fn get(
14307            &self,
14308            req: crate::types::KVGetRequest,
14309        ) -> ::std::result::Result<crate::types::KVGetResponse, crate::services::general_storage_service::GetExn> {
14310            (**self).get(
14311                req,
14312            ).await
14313        }
14314        async fn put(
14315            &self,
14316            req: crate::types::KVPutRequest,
14317        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::general_storage_service::PutExn> {
14318            (**self).put(
14319                req,
14320            ).await
14321        }
14322        async fn remove(
14323            &self,
14324            req: crate::types::KVRemoveRequest,
14325        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::general_storage_service::RemoveExn> {
14326            (**self).remove(
14327                req,
14328            ).await
14329        }
14330    }
14331
14332    /// Processor for GeneralStorageService's methods.
14333    #[derive(Clone, Debug)]
14334    pub struct GeneralStorageServiceProcessor<P, H, R, RS> {
14335        service: H,
14336        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
14337        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
14338    }
14339
14340    struct Args_GeneralStorageService_get {
14341        req: crate::types::KVGetRequest,
14342    }
14343    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GeneralStorageService_get {
14344        #[inline]
14345        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GeneralStorageService.get"))]
14346        fn read(p: &mut P) -> ::anyhow::Result<Self> {
14347            static ARGS: &[::fbthrift::Field] = &[
14348                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
14349            ];
14350            let mut field_req = ::std::option::Option::None;
14351            let _ = p.read_struct_begin(|_| ())?;
14352            loop {
14353                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
14354                match (fty, fid as ::std::primitive::i32) {
14355                    (::fbthrift::TType::Stop, _) => break,
14356                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
14357                    (fty, _) => p.skip(fty)?,
14358                }
14359                p.read_field_end()?;
14360            }
14361            p.read_struct_end()?;
14362            ::std::result::Result::Ok(Self {
14363                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GeneralStorageService.get", "req"))?,
14364            })
14365        }
14366    }
14367
14368    struct Args_GeneralStorageService_put {
14369        req: crate::types::KVPutRequest,
14370    }
14371    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GeneralStorageService_put {
14372        #[inline]
14373        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GeneralStorageService.put"))]
14374        fn read(p: &mut P) -> ::anyhow::Result<Self> {
14375            static ARGS: &[::fbthrift::Field] = &[
14376                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
14377            ];
14378            let mut field_req = ::std::option::Option::None;
14379            let _ = p.read_struct_begin(|_| ())?;
14380            loop {
14381                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
14382                match (fty, fid as ::std::primitive::i32) {
14383                    (::fbthrift::TType::Stop, _) => break,
14384                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
14385                    (fty, _) => p.skip(fty)?,
14386                }
14387                p.read_field_end()?;
14388            }
14389            p.read_struct_end()?;
14390            ::std::result::Result::Ok(Self {
14391                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GeneralStorageService.put", "req"))?,
14392            })
14393        }
14394    }
14395
14396    struct Args_GeneralStorageService_remove {
14397        req: crate::types::KVRemoveRequest,
14398    }
14399    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GeneralStorageService_remove {
14400        #[inline]
14401        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GeneralStorageService.remove"))]
14402        fn read(p: &mut P) -> ::anyhow::Result<Self> {
14403            static ARGS: &[::fbthrift::Field] = &[
14404                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
14405            ];
14406            let mut field_req = ::std::option::Option::None;
14407            let _ = p.read_struct_begin(|_| ())?;
14408            loop {
14409                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
14410                match (fty, fid as ::std::primitive::i32) {
14411                    (::fbthrift::TType::Stop, _) => break,
14412                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
14413                    (fty, _) => p.skip(fty)?,
14414                }
14415                p.read_field_end()?;
14416            }
14417            p.read_struct_end()?;
14418            ::std::result::Result::Ok(Self {
14419                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GeneralStorageService.remove", "req"))?,
14420            })
14421        }
14422    }
14423
14424
14425    impl<P, H, R, RS> GeneralStorageServiceProcessor<P, H, R, RS>
14426    where
14427        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
14428        P::Frame: ::std::marker::Send + 'static,
14429        P::Deserializer: ::std::marker::Send,
14430        H: GeneralStorageService,
14431        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
14432        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
14433        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
14434            + ::std::marker::Send + ::std::marker::Sync,
14435    {
14436        pub fn new(service: H) -> Self {
14437            Self {
14438                service,
14439                supa: ::fbthrift::NullServiceProcessor::new(),
14440                _phantom: ::std::marker::PhantomData,
14441            }
14442        }
14443
14444        pub fn into_inner(self) -> H {
14445            self.service
14446        }
14447
14448        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GeneralStorageService.get"))]
14449        async fn handle_get<'a>(
14450            &'a self,
14451            p: &'a mut P::Deserializer,
14452            req_ctxt: &R,
14453            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
14454            _seqid: ::std::primitive::u32,
14455        ) -> ::anyhow::Result<()> {
14456            use ::const_cstr::const_cstr;
14457            use ::futures::FutureExt as _;
14458
14459            const_cstr! {
14460                SERVICE_NAME = "GeneralStorageService";
14461                METHOD_NAME = "GeneralStorageService.get";
14462            }
14463            let mut ctx_stack = req_ctxt.get_context_stack(
14464                SERVICE_NAME.as_cstr(),
14465                METHOD_NAME.as_cstr(),
14466            )?;
14467            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
14468            let _args: self::Args_GeneralStorageService_get = ::fbthrift::Deserialize::read(p)?;
14469            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
14470                protocol: P::PROTOCOL_ID,
14471                method_name: METHOD_NAME.as_cstr(),
14472                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
14473            })?;
14474            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
14475
14476            let res = ::std::panic::AssertUnwindSafe(
14477                self.service.get(
14478                    _args.req,
14479                )
14480            )
14481            .catch_unwind()
14482            .await;
14483
14484            // nested results - panic catch on the outside, method on the inside
14485            let res = match res {
14486                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
14487                    ::tracing::info!("success");
14488                    crate::services::general_storage_service::GetExn::Success(res)
14489                }
14490                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::general_storage_service::GetExn::Success(_))) => {
14491                    panic!(
14492                        "{} attempted to return success via error",
14493                        "get",
14494                    )
14495                }
14496                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
14497                    ::tracing::error!(exception = ?exn);
14498                    exn
14499                }
14500                ::std::result::Result::Err(exn) => {
14501                    let aexn = ::fbthrift::ApplicationException::handler_panic("GeneralStorageService.get", exn);
14502                    crate::services::general_storage_service::GetExn::ApplicationException(aexn)
14503                }
14504            };
14505
14506            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
14507                "get",
14508                METHOD_NAME.as_cstr(),
14509                _seqid,
14510                req_ctxt,
14511                &mut ctx_stack,
14512                res
14513            )?;
14514            reply_state.lock().unwrap().send_reply(env);
14515            Ok(())
14516        }
14517
14518        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GeneralStorageService.put"))]
14519        async fn handle_put<'a>(
14520            &'a self,
14521            p: &'a mut P::Deserializer,
14522            req_ctxt: &R,
14523            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
14524            _seqid: ::std::primitive::u32,
14525        ) -> ::anyhow::Result<()> {
14526            use ::const_cstr::const_cstr;
14527            use ::futures::FutureExt as _;
14528
14529            const_cstr! {
14530                SERVICE_NAME = "GeneralStorageService";
14531                METHOD_NAME = "GeneralStorageService.put";
14532            }
14533            let mut ctx_stack = req_ctxt.get_context_stack(
14534                SERVICE_NAME.as_cstr(),
14535                METHOD_NAME.as_cstr(),
14536            )?;
14537            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
14538            let _args: self::Args_GeneralStorageService_put = ::fbthrift::Deserialize::read(p)?;
14539            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
14540                protocol: P::PROTOCOL_ID,
14541                method_name: METHOD_NAME.as_cstr(),
14542                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
14543            })?;
14544            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
14545
14546            let res = ::std::panic::AssertUnwindSafe(
14547                self.service.put(
14548                    _args.req,
14549                )
14550            )
14551            .catch_unwind()
14552            .await;
14553
14554            // nested results - panic catch on the outside, method on the inside
14555            let res = match res {
14556                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
14557                    ::tracing::info!("success");
14558                    crate::services::general_storage_service::PutExn::Success(res)
14559                }
14560                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::general_storage_service::PutExn::Success(_))) => {
14561                    panic!(
14562                        "{} attempted to return success via error",
14563                        "put",
14564                    )
14565                }
14566                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
14567                    ::tracing::error!(exception = ?exn);
14568                    exn
14569                }
14570                ::std::result::Result::Err(exn) => {
14571                    let aexn = ::fbthrift::ApplicationException::handler_panic("GeneralStorageService.put", exn);
14572                    crate::services::general_storage_service::PutExn::ApplicationException(aexn)
14573                }
14574            };
14575
14576            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
14577                "put",
14578                METHOD_NAME.as_cstr(),
14579                _seqid,
14580                req_ctxt,
14581                &mut ctx_stack,
14582                res
14583            )?;
14584            reply_state.lock().unwrap().send_reply(env);
14585            Ok(())
14586        }
14587
14588        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GeneralStorageService.remove"))]
14589        async fn handle_remove<'a>(
14590            &'a self,
14591            p: &'a mut P::Deserializer,
14592            req_ctxt: &R,
14593            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
14594            _seqid: ::std::primitive::u32,
14595        ) -> ::anyhow::Result<()> {
14596            use ::const_cstr::const_cstr;
14597            use ::futures::FutureExt as _;
14598
14599            const_cstr! {
14600                SERVICE_NAME = "GeneralStorageService";
14601                METHOD_NAME = "GeneralStorageService.remove";
14602            }
14603            let mut ctx_stack = req_ctxt.get_context_stack(
14604                SERVICE_NAME.as_cstr(),
14605                METHOD_NAME.as_cstr(),
14606            )?;
14607            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
14608            let _args: self::Args_GeneralStorageService_remove = ::fbthrift::Deserialize::read(p)?;
14609            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
14610                protocol: P::PROTOCOL_ID,
14611                method_name: METHOD_NAME.as_cstr(),
14612                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
14613            })?;
14614            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
14615
14616            let res = ::std::panic::AssertUnwindSafe(
14617                self.service.remove(
14618                    _args.req,
14619                )
14620            )
14621            .catch_unwind()
14622            .await;
14623
14624            // nested results - panic catch on the outside, method on the inside
14625            let res = match res {
14626                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
14627                    ::tracing::info!("success");
14628                    crate::services::general_storage_service::RemoveExn::Success(res)
14629                }
14630                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::general_storage_service::RemoveExn::Success(_))) => {
14631                    panic!(
14632                        "{} attempted to return success via error",
14633                        "remove",
14634                    )
14635                }
14636                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
14637                    ::tracing::error!(exception = ?exn);
14638                    exn
14639                }
14640                ::std::result::Result::Err(exn) => {
14641                    let aexn = ::fbthrift::ApplicationException::handler_panic("GeneralStorageService.remove", exn);
14642                    crate::services::general_storage_service::RemoveExn::ApplicationException(aexn)
14643                }
14644            };
14645
14646            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
14647                "remove",
14648                METHOD_NAME.as_cstr(),
14649                _seqid,
14650                req_ctxt,
14651                &mut ctx_stack,
14652                res
14653            )?;
14654            reply_state.lock().unwrap().send_reply(env);
14655            Ok(())
14656        }
14657    }
14658
14659    #[::async_trait::async_trait]
14660    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for GeneralStorageServiceProcessor<P, H, R, RS>
14661    where
14662        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
14663        P::Deserializer: ::std::marker::Send,
14664        H: GeneralStorageService,
14665        P::Frame: ::std::marker::Send + 'static,
14666        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
14667        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
14668            + ::std::marker::Send + ::std::marker::Sync + 'static,
14669        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
14670    {
14671        type RequestContext = R;
14672        type ReplyState = RS;
14673
14674        #[inline]
14675        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
14676            match name {
14677                b"get" => ::std::result::Result::Ok(0usize),
14678                b"put" => ::std::result::Result::Ok(1usize),
14679                b"remove" => ::std::result::Result::Ok(2usize),
14680                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
14681            }
14682        }
14683
14684        #[allow(clippy::match_single_binding)]
14685        async fn handle_method(
14686            &self,
14687            idx: ::std::primitive::usize,
14688            _p: &mut P::Deserializer,
14689            _r: &R,
14690            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
14691            _seqid: ::std::primitive::u32,
14692        ) -> ::anyhow::Result<()> {
14693            match idx {
14694                0usize => {
14695                    self.handle_get(_p, _r, _reply_state, _seqid).await
14696                }
14697                1usize => {
14698                    self.handle_put(_p, _r, _reply_state, _seqid).await
14699                }
14700                2usize => {
14701                    self.handle_remove(_p, _r, _reply_state, _seqid).await
14702                }
14703                bad => panic!(
14704                    "{}: unexpected method idx {}",
14705                    "GeneralStorageServiceProcessor",
14706                    bad
14707                ),
14708            }
14709        }
14710
14711        #[allow(clippy::match_single_binding)]
14712        #[inline]
14713        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
14714            match name {
14715                _ => ::anyhow::bail!("Unknown interaction"),
14716            }
14717        }
14718
14719        #[allow(clippy::match_single_binding)]
14720        fn handle_create_interaction(
14721            &self,
14722            idx: ::std::primitive::usize,
14723        ) -> ::anyhow::Result<
14724            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
14725        > {
14726            match idx {
14727                bad => panic!(
14728                    "{}: unexpected method idx {}",
14729                    "GeneralStorageServiceProcessor",
14730                    bad
14731                ),
14732            }
14733        }
14734    }
14735
14736    #[::async_trait::async_trait]
14737    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for GeneralStorageServiceProcessor<P, H, R, RS>
14738    where
14739        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
14740        P::Deserializer: ::std::marker::Send,
14741        P::Frame: ::std::marker::Send + 'static,
14742        H: GeneralStorageService,
14743        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
14744        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
14745            + ::std::marker::Send + ::std::marker::Sync + 'static,
14746        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
14747    {
14748        type Handler = H;
14749        type RequestContext = R;
14750        type ReplyState = RS;
14751
14752        #[tracing::instrument(level="trace", skip_all, fields(service = "GeneralStorageService"))]
14753        async fn call(
14754            &self,
14755            req: ::fbthrift::ProtocolDecoded<P>,
14756            req_ctxt: &R,
14757            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
14758        ) -> ::anyhow::Result<()> {
14759            use ::fbthrift::{BufExt as _, ProtocolReader as _, ServiceProcessor as _};
14760            let mut p = P::deserializer(req);
14761            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
14762            if mty != ::fbthrift::MessageType::Call {
14763                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
14764                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
14765                    format!("message type {:?} not handled", mty)
14766                )));
14767            }
14768            let idx = match idx {
14769                ::std::result::Result::Ok(idx) => idx,
14770                ::std::result::Result::Err(_) => {
14771                    let cur = P::into_buffer(p).reset();
14772                    return self.supa.call(cur, req_ctxt, reply_state).await;
14773                }
14774            };
14775            self.handle_method(idx, &mut p, req_ctxt, reply_state, seqid).await?;
14776            p.read_message_end()?;
14777
14778            Ok(())
14779        }
14780
14781        fn create_interaction(
14782            &self,
14783            name: &str,
14784        ) -> ::anyhow::Result<
14785            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
14786        > {
14787            use ::fbthrift::{ServiceProcessor as _};
14788            let idx = self.create_interaction_idx(name);
14789            let idx = match idx {
14790                ::anyhow::Result::Ok(idx) => idx,
14791                ::anyhow::Result::Err(_) => {
14792                    return self.supa.create_interaction(name);
14793                }
14794            };
14795            self.handle_create_interaction(idx)
14796        }
14797
14798        fn get_method_names(&self) -> &'static [&'static str] {
14799            &[
14800                // from GeneralStorageService
14801                "get",
14802                "put",
14803                "remove",
14804            ]
14805        }
14806    }
14807
14808    /// Construct a new instance of a GeneralStorageService service.
14809    ///
14810    /// This is called when a new instance of a Thrift service Processor
14811    /// is needed for a particular Thrift protocol.
14812    #[::tracing::instrument(level="debug", skip_all, fields(proto = ?proto))]
14813    pub fn make_GeneralStorageService_server<F, H, R, RS>(
14814        proto: ::fbthrift::ProtocolID,
14815        handler: H,
14816    ) -> ::std::result::Result<::std::boxed::Box<dyn ::fbthrift::ThriftService<F, Handler = H, RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>, ::fbthrift::ApplicationException>
14817    where
14818        F: ::fbthrift::Framing + ::std::marker::Send + ::std::marker::Sync + 'static,
14819        H: GeneralStorageService,
14820        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
14821        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = F::DecBuf> + ::std::marker::Send + ::std::marker::Sync + 'static,
14822        RS: ::fbthrift::ReplyState<F, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
14823    {
14824        match proto {
14825            ::fbthrift::ProtocolID::BinaryProtocol => {
14826                ::std::result::Result::Ok(::std::boxed::Box::new(GeneralStorageServiceProcessor::<::fbthrift::BinaryProtocol<F>, H, R, RS>::new(handler)))
14827            }
14828            ::fbthrift::ProtocolID::CompactProtocol => {
14829                ::std::result::Result::Ok(::std::boxed::Box::new(GeneralStorageServiceProcessor::<::fbthrift::CompactProtocol<F>, H, R, RS>::new(handler)))
14830            }
14831            bad => {
14832                ::tracing::error!(method = "GeneralStorageService.", invalid_protocol = ?bad);
14833                ::std::result::Result::Err(::fbthrift::ApplicationException::invalid_protocol(bad))
14834            }
14835        }
14836    }
14837
14838    #[::async_trait::async_trait]
14839    pub trait InternalStorageService: ::std::marker::Send + ::std::marker::Sync + 'static {
14840        async fn chainAddEdges(
14841            &self,
14842            _req: crate::types::ChainAddEdgesRequest,
14843        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::internal_storage_service::ChainAddEdgesExn> {
14844            ::std::result::Result::Err(crate::services::internal_storage_service::ChainAddEdgesExn::ApplicationException(
14845                ::fbthrift::ApplicationException::unimplemented_method(
14846                    "InternalStorageService",
14847                    "chainAddEdges",
14848                ),
14849            ))
14850        }
14851        async fn chainUpdateEdge(
14852            &self,
14853            _req: crate::types::ChainUpdateEdgeRequest,
14854        ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::internal_storage_service::ChainUpdateEdgeExn> {
14855            ::std::result::Result::Err(crate::services::internal_storage_service::ChainUpdateEdgeExn::ApplicationException(
14856                ::fbthrift::ApplicationException::unimplemented_method(
14857                    "InternalStorageService",
14858                    "chainUpdateEdge",
14859                ),
14860            ))
14861        }
14862    }
14863
14864    #[::async_trait::async_trait]
14865    impl<T> InternalStorageService for ::std::boxed::Box<T>
14866    where
14867        T: InternalStorageService + Send + Sync + ?Sized,
14868    {
14869        async fn chainAddEdges(
14870            &self,
14871            req: crate::types::ChainAddEdgesRequest,
14872        ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::internal_storage_service::ChainAddEdgesExn> {
14873            (**self).chainAddEdges(
14874                req,
14875            ).await
14876        }
14877        async fn chainUpdateEdge(
14878            &self,
14879            req: crate::types::ChainUpdateEdgeRequest,
14880        ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::internal_storage_service::ChainUpdateEdgeExn> {
14881            (**self).chainUpdateEdge(
14882                req,
14883            ).await
14884        }
14885    }
14886
14887    /// Processor for InternalStorageService's methods.
14888    #[derive(Clone, Debug)]
14889    pub struct InternalStorageServiceProcessor<P, H, R, RS> {
14890        service: H,
14891        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
14892        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
14893    }
14894
14895    struct Args_InternalStorageService_chainAddEdges {
14896        req: crate::types::ChainAddEdgesRequest,
14897    }
14898    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_InternalStorageService_chainAddEdges {
14899        #[inline]
14900        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "InternalStorageService.chainAddEdges"))]
14901        fn read(p: &mut P) -> ::anyhow::Result<Self> {
14902            static ARGS: &[::fbthrift::Field] = &[
14903                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
14904            ];
14905            let mut field_req = ::std::option::Option::None;
14906            let _ = p.read_struct_begin(|_| ())?;
14907            loop {
14908                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
14909                match (fty, fid as ::std::primitive::i32) {
14910                    (::fbthrift::TType::Stop, _) => break,
14911                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
14912                    (fty, _) => p.skip(fty)?,
14913                }
14914                p.read_field_end()?;
14915            }
14916            p.read_struct_end()?;
14917            ::std::result::Result::Ok(Self {
14918                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "InternalStorageService.chainAddEdges", "req"))?,
14919            })
14920        }
14921    }
14922
14923    struct Args_InternalStorageService_chainUpdateEdge {
14924        req: crate::types::ChainUpdateEdgeRequest,
14925    }
14926    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_InternalStorageService_chainUpdateEdge {
14927        #[inline]
14928        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "InternalStorageService.chainUpdateEdge"))]
14929        fn read(p: &mut P) -> ::anyhow::Result<Self> {
14930            static ARGS: &[::fbthrift::Field] = &[
14931                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
14932            ];
14933            let mut field_req = ::std::option::Option::None;
14934            let _ = p.read_struct_begin(|_| ())?;
14935            loop {
14936                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
14937                match (fty, fid as ::std::primitive::i32) {
14938                    (::fbthrift::TType::Stop, _) => break,
14939                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
14940                    (fty, _) => p.skip(fty)?,
14941                }
14942                p.read_field_end()?;
14943            }
14944            p.read_struct_end()?;
14945            ::std::result::Result::Ok(Self {
14946                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "InternalStorageService.chainUpdateEdge", "req"))?,
14947            })
14948        }
14949    }
14950
14951
14952    impl<P, H, R, RS> InternalStorageServiceProcessor<P, H, R, RS>
14953    where
14954        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
14955        P::Frame: ::std::marker::Send + 'static,
14956        P::Deserializer: ::std::marker::Send,
14957        H: InternalStorageService,
14958        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
14959        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
14960        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
14961            + ::std::marker::Send + ::std::marker::Sync,
14962    {
14963        pub fn new(service: H) -> Self {
14964            Self {
14965                service,
14966                supa: ::fbthrift::NullServiceProcessor::new(),
14967                _phantom: ::std::marker::PhantomData,
14968            }
14969        }
14970
14971        pub fn into_inner(self) -> H {
14972            self.service
14973        }
14974
14975        #[::tracing::instrument(skip_all, name = "handler", fields(method = "InternalStorageService.chainAddEdges"))]
14976        async fn handle_chainAddEdges<'a>(
14977            &'a self,
14978            p: &'a mut P::Deserializer,
14979            req_ctxt: &R,
14980            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
14981            _seqid: ::std::primitive::u32,
14982        ) -> ::anyhow::Result<()> {
14983            use ::const_cstr::const_cstr;
14984            use ::futures::FutureExt as _;
14985
14986            const_cstr! {
14987                SERVICE_NAME = "InternalStorageService";
14988                METHOD_NAME = "InternalStorageService.chainAddEdges";
14989            }
14990            let mut ctx_stack = req_ctxt.get_context_stack(
14991                SERVICE_NAME.as_cstr(),
14992                METHOD_NAME.as_cstr(),
14993            )?;
14994            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
14995            let _args: self::Args_InternalStorageService_chainAddEdges = ::fbthrift::Deserialize::read(p)?;
14996            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
14997                protocol: P::PROTOCOL_ID,
14998                method_name: METHOD_NAME.as_cstr(),
14999                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
15000            })?;
15001            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
15002
15003            let res = ::std::panic::AssertUnwindSafe(
15004                self.service.chainAddEdges(
15005                    _args.req,
15006                )
15007            )
15008            .catch_unwind()
15009            .await;
15010
15011            // nested results - panic catch on the outside, method on the inside
15012            let res = match res {
15013                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
15014                    ::tracing::info!("success");
15015                    crate::services::internal_storage_service::ChainAddEdgesExn::Success(res)
15016                }
15017                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::internal_storage_service::ChainAddEdgesExn::Success(_))) => {
15018                    panic!(
15019                        "{} attempted to return success via error",
15020                        "chainAddEdges",
15021                    )
15022                }
15023                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
15024                    ::tracing::error!(exception = ?exn);
15025                    exn
15026                }
15027                ::std::result::Result::Err(exn) => {
15028                    let aexn = ::fbthrift::ApplicationException::handler_panic("InternalStorageService.chainAddEdges", exn);
15029                    crate::services::internal_storage_service::ChainAddEdgesExn::ApplicationException(aexn)
15030                }
15031            };
15032
15033            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
15034                "chainAddEdges",
15035                METHOD_NAME.as_cstr(),
15036                _seqid,
15037                req_ctxt,
15038                &mut ctx_stack,
15039                res
15040            )?;
15041            reply_state.lock().unwrap().send_reply(env);
15042            Ok(())
15043        }
15044
15045        #[::tracing::instrument(skip_all, name = "handler", fields(method = "InternalStorageService.chainUpdateEdge"))]
15046        async fn handle_chainUpdateEdge<'a>(
15047            &'a self,
15048            p: &'a mut P::Deserializer,
15049            req_ctxt: &R,
15050            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
15051            _seqid: ::std::primitive::u32,
15052        ) -> ::anyhow::Result<()> {
15053            use ::const_cstr::const_cstr;
15054            use ::futures::FutureExt as _;
15055
15056            const_cstr! {
15057                SERVICE_NAME = "InternalStorageService";
15058                METHOD_NAME = "InternalStorageService.chainUpdateEdge";
15059            }
15060            let mut ctx_stack = req_ctxt.get_context_stack(
15061                SERVICE_NAME.as_cstr(),
15062                METHOD_NAME.as_cstr(),
15063            )?;
15064            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
15065            let _args: self::Args_InternalStorageService_chainUpdateEdge = ::fbthrift::Deserialize::read(p)?;
15066            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
15067                protocol: P::PROTOCOL_ID,
15068                method_name: METHOD_NAME.as_cstr(),
15069                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
15070            })?;
15071            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
15072
15073            let res = ::std::panic::AssertUnwindSafe(
15074                self.service.chainUpdateEdge(
15075                    _args.req,
15076                )
15077            )
15078            .catch_unwind()
15079            .await;
15080
15081            // nested results - panic catch on the outside, method on the inside
15082            let res = match res {
15083                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
15084                    ::tracing::info!("success");
15085                    crate::services::internal_storage_service::ChainUpdateEdgeExn::Success(res)
15086                }
15087                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::internal_storage_service::ChainUpdateEdgeExn::Success(_))) => {
15088                    panic!(
15089                        "{} attempted to return success via error",
15090                        "chainUpdateEdge",
15091                    )
15092                }
15093                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
15094                    ::tracing::error!(exception = ?exn);
15095                    exn
15096                }
15097                ::std::result::Result::Err(exn) => {
15098                    let aexn = ::fbthrift::ApplicationException::handler_panic("InternalStorageService.chainUpdateEdge", exn);
15099                    crate::services::internal_storage_service::ChainUpdateEdgeExn::ApplicationException(aexn)
15100                }
15101            };
15102
15103            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
15104                "chainUpdateEdge",
15105                METHOD_NAME.as_cstr(),
15106                _seqid,
15107                req_ctxt,
15108                &mut ctx_stack,
15109                res
15110            )?;
15111            reply_state.lock().unwrap().send_reply(env);
15112            Ok(())
15113        }
15114    }
15115
15116    #[::async_trait::async_trait]
15117    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for InternalStorageServiceProcessor<P, H, R, RS>
15118    where
15119        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
15120        P::Deserializer: ::std::marker::Send,
15121        H: InternalStorageService,
15122        P::Frame: ::std::marker::Send + 'static,
15123        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
15124        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
15125            + ::std::marker::Send + ::std::marker::Sync + 'static,
15126        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
15127    {
15128        type RequestContext = R;
15129        type ReplyState = RS;
15130
15131        #[inline]
15132        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
15133            match name {
15134                b"chainAddEdges" => ::std::result::Result::Ok(0usize),
15135                b"chainUpdateEdge" => ::std::result::Result::Ok(1usize),
15136                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
15137            }
15138        }
15139
15140        #[allow(clippy::match_single_binding)]
15141        async fn handle_method(
15142            &self,
15143            idx: ::std::primitive::usize,
15144            _p: &mut P::Deserializer,
15145            _r: &R,
15146            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
15147            _seqid: ::std::primitive::u32,
15148        ) -> ::anyhow::Result<()> {
15149            match idx {
15150                0usize => {
15151                    self.handle_chainAddEdges(_p, _r, _reply_state, _seqid).await
15152                }
15153                1usize => {
15154                    self.handle_chainUpdateEdge(_p, _r, _reply_state, _seqid).await
15155                }
15156                bad => panic!(
15157                    "{}: unexpected method idx {}",
15158                    "InternalStorageServiceProcessor",
15159                    bad
15160                ),
15161            }
15162        }
15163
15164        #[allow(clippy::match_single_binding)]
15165        #[inline]
15166        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
15167            match name {
15168                _ => ::anyhow::bail!("Unknown interaction"),
15169            }
15170        }
15171
15172        #[allow(clippy::match_single_binding)]
15173        fn handle_create_interaction(
15174            &self,
15175            idx: ::std::primitive::usize,
15176        ) -> ::anyhow::Result<
15177            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
15178        > {
15179            match idx {
15180                bad => panic!(
15181                    "{}: unexpected method idx {}",
15182                    "InternalStorageServiceProcessor",
15183                    bad
15184                ),
15185            }
15186        }
15187    }
15188
15189    #[::async_trait::async_trait]
15190    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for InternalStorageServiceProcessor<P, H, R, RS>
15191    where
15192        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
15193        P::Deserializer: ::std::marker::Send,
15194        P::Frame: ::std::marker::Send + 'static,
15195        H: InternalStorageService,
15196        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
15197        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
15198            + ::std::marker::Send + ::std::marker::Sync + 'static,
15199        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
15200    {
15201        type Handler = H;
15202        type RequestContext = R;
15203        type ReplyState = RS;
15204
15205        #[tracing::instrument(level="trace", skip_all, fields(service = "InternalStorageService"))]
15206        async fn call(
15207            &self,
15208            req: ::fbthrift::ProtocolDecoded<P>,
15209            req_ctxt: &R,
15210            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
15211        ) -> ::anyhow::Result<()> {
15212            use ::fbthrift::{BufExt as _, ProtocolReader as _, ServiceProcessor as _};
15213            let mut p = P::deserializer(req);
15214            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
15215            if mty != ::fbthrift::MessageType::Call {
15216                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
15217                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
15218                    format!("message type {:?} not handled", mty)
15219                )));
15220            }
15221            let idx = match idx {
15222                ::std::result::Result::Ok(idx) => idx,
15223                ::std::result::Result::Err(_) => {
15224                    let cur = P::into_buffer(p).reset();
15225                    return self.supa.call(cur, req_ctxt, reply_state).await;
15226                }
15227            };
15228            self.handle_method(idx, &mut p, req_ctxt, reply_state, seqid).await?;
15229            p.read_message_end()?;
15230
15231            Ok(())
15232        }
15233
15234        fn create_interaction(
15235            &self,
15236            name: &str,
15237        ) -> ::anyhow::Result<
15238            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
15239        > {
15240            use ::fbthrift::{ServiceProcessor as _};
15241            let idx = self.create_interaction_idx(name);
15242            let idx = match idx {
15243                ::anyhow::Result::Ok(idx) => idx,
15244                ::anyhow::Result::Err(_) => {
15245                    return self.supa.create_interaction(name);
15246                }
15247            };
15248            self.handle_create_interaction(idx)
15249        }
15250
15251        fn get_method_names(&self) -> &'static [&'static str] {
15252            &[
15253                // from InternalStorageService
15254                "chainAddEdges",
15255                "chainUpdateEdge",
15256            ]
15257        }
15258    }
15259
15260    /// Construct a new instance of a InternalStorageService service.
15261    ///
15262    /// This is called when a new instance of a Thrift service Processor
15263    /// is needed for a particular Thrift protocol.
15264    #[::tracing::instrument(level="debug", skip_all, fields(proto = ?proto))]
15265    pub fn make_InternalStorageService_server<F, H, R, RS>(
15266        proto: ::fbthrift::ProtocolID,
15267        handler: H,
15268    ) -> ::std::result::Result<::std::boxed::Box<dyn ::fbthrift::ThriftService<F, Handler = H, RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>, ::fbthrift::ApplicationException>
15269    where
15270        F: ::fbthrift::Framing + ::std::marker::Send + ::std::marker::Sync + 'static,
15271        H: InternalStorageService,
15272        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
15273        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = F::DecBuf> + ::std::marker::Send + ::std::marker::Sync + 'static,
15274        RS: ::fbthrift::ReplyState<F, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
15275    {
15276        match proto {
15277            ::fbthrift::ProtocolID::BinaryProtocol => {
15278                ::std::result::Result::Ok(::std::boxed::Box::new(InternalStorageServiceProcessor::<::fbthrift::BinaryProtocol<F>, H, R, RS>::new(handler)))
15279            }
15280            ::fbthrift::ProtocolID::CompactProtocol => {
15281                ::std::result::Result::Ok(::std::boxed::Box::new(InternalStorageServiceProcessor::<::fbthrift::CompactProtocol<F>, H, R, RS>::new(handler)))
15282            }
15283            bad => {
15284                ::tracing::error!(method = "InternalStorageService.", invalid_protocol = ?bad);
15285                ::std::result::Result::Err(::fbthrift::ApplicationException::invalid_protocol(bad))
15286            }
15287        }
15288    }
15289}
15290
15291/// Client mocks. For every service, a struct mock::TheService that implements
15292/// client::TheService.
15293///
15294/// As an example of the generated API, for the following thrift service:
15295///
15296/// ```thrift
15297/// service MyService {
15298///     FunctionResponse myFunction(
15299///         1: FunctionRequest request,
15300///     ) throws {
15301///         1: StorageException s,
15302///         2: NotFoundException n,
15303///     ),
15304///
15305///     // other functions
15306/// }
15307/// ```
15308///
15309/// we would end up with this mock object under crate::mock::MyService:
15310///
15311/// ```
15312/// # const _: &str = stringify! {
15313/// impl crate::client::MyService for MyService<'mock> {...}
15314///
15315/// pub struct MyService<'mock> {
15316///     pub myFunction: myFunction<'mock>,
15317///     // ...
15318/// }
15319///
15320/// impl dyn crate::client::MyService {
15321///     pub fn mock<'mock>() -> MyService<'mock>;
15322/// }
15323///
15324/// impl myFunction<'mock> {
15325///     // directly return the given success response
15326///     pub fn ret(&self, value: FunctionResponse);
15327///
15328///     // invoke closure to compute success response
15329///     pub fn mock(
15330///         &self,
15331///         mock: impl FnMut(FunctionRequest) -> FunctionResponse + Send + Sync + 'mock,
15332///     );
15333///
15334///     // invoke closure to compute response
15335///     pub fn mock_result(
15336///         &self,
15337///         mock: impl FnMut(FunctionRequest) -> Result<FunctionResponse, crate::services::MyService::MyFunctionExn> + Send + Sync + 'mock,
15338///     );
15339///
15340///     // return one of the function's declared exceptions
15341///     pub fn throw<E>(&self, exception: E)
15342///     where
15343///         E: Clone + Into<crate::services::MyService::MyFunctionExn> + Send + Sync + 'mock;
15344/// }
15345///
15346/// impl From<StorageException> for MyFunctionExn {...}
15347/// impl From<NotFoundException> for MyFunctionExn {...}
15348/// # };
15349/// ```
15350///
15351/// The intended usage from a test would be:
15352///
15353/// ```
15354/// # const _: &str = stringify! {
15355/// use std::sync::Arc;
15356/// use thrift_if::client::MyService;
15357///
15358/// #[test]
15359/// fn test_my_client() {
15360///     let mock = Arc::new(<dyn MyService>::mock());
15361///
15362///     // directly return a success response
15363///     let resp = FunctionResponse {...};
15364///     mock.myFunction.ret(resp);
15365///
15366///     // or give a closure to compute the success response
15367///     mock.myFunction.mock(|request| FunctionResponse {...});
15368///
15369///     // or throw one of the function's exceptions
15370///     mock.myFunction.throw(StorageException::ItFailed);
15371///
15372///     // or compute a Result (useful if your exceptions aren't Clone)
15373///     mock.myFunction.mock_result(|request| Err(...));
15374///
15375///     let out = do_the_thing(mock).wait().unwrap();
15376///     assert!(out.what_i_expected());
15377/// }
15378///
15379/// fn do_the_thing(
15380///     client: Arc<dyn MyService + Send + Sync + 'static>,
15381/// ) -> impl Future<Item = Out> {...}
15382/// # };
15383/// ```
15384pub mod mock {
15385    pub struct GraphStorageService<'mock> {
15386        pub getNeighbors: r#impl::graph_storage_service::getNeighbors<'mock>,
15387        pub getProps: r#impl::graph_storage_service::getProps<'mock>,
15388        pub addVertices: r#impl::graph_storage_service::addVertices<'mock>,
15389        pub addEdges: r#impl::graph_storage_service::addEdges<'mock>,
15390        pub deleteEdges: r#impl::graph_storage_service::deleteEdges<'mock>,
15391        pub deleteVertices: r#impl::graph_storage_service::deleteVertices<'mock>,
15392        pub deleteTags: r#impl::graph_storage_service::deleteTags<'mock>,
15393        pub updateVertex: r#impl::graph_storage_service::updateVertex<'mock>,
15394        pub updateEdge: r#impl::graph_storage_service::updateEdge<'mock>,
15395        pub scanVertex: r#impl::graph_storage_service::scanVertex<'mock>,
15396        pub scanEdge: r#impl::graph_storage_service::scanEdge<'mock>,
15397        pub getUUID: r#impl::graph_storage_service::getUUID<'mock>,
15398        pub lookupIndex: r#impl::graph_storage_service::lookupIndex<'mock>,
15399        pub lookupAndTraverse: r#impl::graph_storage_service::lookupAndTraverse<'mock>,
15400        pub chainUpdateEdge: r#impl::graph_storage_service::chainUpdateEdge<'mock>,
15401        pub chainAddEdges: r#impl::graph_storage_service::chainAddEdges<'mock>,
15402        _marker: ::std::marker::PhantomData<&'mock ()>,
15403    }
15404
15405    impl dyn super::client::GraphStorageService {
15406        pub fn mock<'mock>() -> GraphStorageService<'mock> {
15407            GraphStorageService {
15408                getNeighbors: r#impl::graph_storage_service::getNeighbors::unimplemented(),
15409                getProps: r#impl::graph_storage_service::getProps::unimplemented(),
15410                addVertices: r#impl::graph_storage_service::addVertices::unimplemented(),
15411                addEdges: r#impl::graph_storage_service::addEdges::unimplemented(),
15412                deleteEdges: r#impl::graph_storage_service::deleteEdges::unimplemented(),
15413                deleteVertices: r#impl::graph_storage_service::deleteVertices::unimplemented(),
15414                deleteTags: r#impl::graph_storage_service::deleteTags::unimplemented(),
15415                updateVertex: r#impl::graph_storage_service::updateVertex::unimplemented(),
15416                updateEdge: r#impl::graph_storage_service::updateEdge::unimplemented(),
15417                scanVertex: r#impl::graph_storage_service::scanVertex::unimplemented(),
15418                scanEdge: r#impl::graph_storage_service::scanEdge::unimplemented(),
15419                getUUID: r#impl::graph_storage_service::getUUID::unimplemented(),
15420                lookupIndex: r#impl::graph_storage_service::lookupIndex::unimplemented(),
15421                lookupAndTraverse: r#impl::graph_storage_service::lookupAndTraverse::unimplemented(),
15422                chainUpdateEdge: r#impl::graph_storage_service::chainUpdateEdge::unimplemented(),
15423                chainAddEdges: r#impl::graph_storage_service::chainAddEdges::unimplemented(),
15424                _marker: ::std::marker::PhantomData,
15425            }
15426        }
15427    }
15428
15429    impl<'mock> super::client::GraphStorageService for GraphStorageService<'mock> {
15430        fn getNeighbors(
15431            &self,
15432            arg_req: &crate::types::GetNeighborsRequest,
15433        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError>> {
15434            let mut closure = self.getNeighbors.closure.lock().unwrap();
15435            let closure: &mut dyn ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> _ = &mut **closure;
15436            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15437        }
15438        fn getProps(
15439            &self,
15440            arg_req: &crate::types::GetPropRequest,
15441        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError>> {
15442            let mut closure = self.getProps.closure.lock().unwrap();
15443            let closure: &mut dyn ::std::ops::FnMut(crate::types::GetPropRequest) -> _ = &mut **closure;
15444            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15445        }
15446        fn addVertices(
15447            &self,
15448            arg_req: &crate::types::AddVerticesRequest,
15449        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError>> {
15450            let mut closure = self.addVertices.closure.lock().unwrap();
15451            let closure: &mut dyn ::std::ops::FnMut(crate::types::AddVerticesRequest) -> _ = &mut **closure;
15452            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15453        }
15454        fn addEdges(
15455            &self,
15456            arg_req: &crate::types::AddEdgesRequest,
15457        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError>> {
15458            let mut closure = self.addEdges.closure.lock().unwrap();
15459            let closure: &mut dyn ::std::ops::FnMut(crate::types::AddEdgesRequest) -> _ = &mut **closure;
15460            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15461        }
15462        fn deleteEdges(
15463            &self,
15464            arg_req: &crate::types::DeleteEdgesRequest,
15465        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError>> {
15466            let mut closure = self.deleteEdges.closure.lock().unwrap();
15467            let closure: &mut dyn ::std::ops::FnMut(crate::types::DeleteEdgesRequest) -> _ = &mut **closure;
15468            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15469        }
15470        fn deleteVertices(
15471            &self,
15472            arg_req: &crate::types::DeleteVerticesRequest,
15473        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError>> {
15474            let mut closure = self.deleteVertices.closure.lock().unwrap();
15475            let closure: &mut dyn ::std::ops::FnMut(crate::types::DeleteVerticesRequest) -> _ = &mut **closure;
15476            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15477        }
15478        fn deleteTags(
15479            &self,
15480            arg_req: &crate::types::DeleteTagsRequest,
15481        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError>> {
15482            let mut closure = self.deleteTags.closure.lock().unwrap();
15483            let closure: &mut dyn ::std::ops::FnMut(crate::types::DeleteTagsRequest) -> _ = &mut **closure;
15484            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15485        }
15486        fn updateVertex(
15487            &self,
15488            arg_req: &crate::types::UpdateVertexRequest,
15489        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError>> {
15490            let mut closure = self.updateVertex.closure.lock().unwrap();
15491            let closure: &mut dyn ::std::ops::FnMut(crate::types::UpdateVertexRequest) -> _ = &mut **closure;
15492            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15493        }
15494        fn updateEdge(
15495            &self,
15496            arg_req: &crate::types::UpdateEdgeRequest,
15497        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError>> {
15498            let mut closure = self.updateEdge.closure.lock().unwrap();
15499            let closure: &mut dyn ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> _ = &mut **closure;
15500            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15501        }
15502        fn scanVertex(
15503            &self,
15504            arg_req: &crate::types::ScanVertexRequest,
15505        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError>> {
15506            let mut closure = self.scanVertex.closure.lock().unwrap();
15507            let closure: &mut dyn ::std::ops::FnMut(crate::types::ScanVertexRequest) -> _ = &mut **closure;
15508            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15509        }
15510        fn scanEdge(
15511            &self,
15512            arg_req: &crate::types::ScanEdgeRequest,
15513        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError>> {
15514            let mut closure = self.scanEdge.closure.lock().unwrap();
15515            let closure: &mut dyn ::std::ops::FnMut(crate::types::ScanEdgeRequest) -> _ = &mut **closure;
15516            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15517        }
15518        fn getUUID(
15519            &self,
15520            arg_req: &crate::types::GetUUIDReq,
15521        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError>> {
15522            let mut closure = self.getUUID.closure.lock().unwrap();
15523            let closure: &mut dyn ::std::ops::FnMut(crate::types::GetUUIDReq) -> _ = &mut **closure;
15524            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15525        }
15526        fn lookupIndex(
15527            &self,
15528            arg_req: &crate::types::LookupIndexRequest,
15529        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError>> {
15530            let mut closure = self.lookupIndex.closure.lock().unwrap();
15531            let closure: &mut dyn ::std::ops::FnMut(crate::types::LookupIndexRequest) -> _ = &mut **closure;
15532            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15533        }
15534        fn lookupAndTraverse(
15535            &self,
15536            arg_req: &crate::types::LookupAndTraverseRequest,
15537        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError>> {
15538            let mut closure = self.lookupAndTraverse.closure.lock().unwrap();
15539            let closure: &mut dyn ::std::ops::FnMut(crate::types::LookupAndTraverseRequest) -> _ = &mut **closure;
15540            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15541        }
15542        fn chainUpdateEdge(
15543            &self,
15544            arg_req: &crate::types::UpdateEdgeRequest,
15545        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError>> {
15546            let mut closure = self.chainUpdateEdge.closure.lock().unwrap();
15547            let closure: &mut dyn ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> _ = &mut **closure;
15548            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15549        }
15550        fn chainAddEdges(
15551            &self,
15552            arg_req: &crate::types::AddEdgesRequest,
15553        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError>> {
15554            let mut closure = self.chainAddEdges.closure.lock().unwrap();
15555            let closure: &mut dyn ::std::ops::FnMut(crate::types::AddEdgesRequest) -> _ = &mut **closure;
15556            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15557        }
15558    }
15559
15560
15561    pub struct StorageAdminService<'mock> {
15562        pub transLeader: r#impl::storage_admin_service::transLeader<'mock>,
15563        pub addPart: r#impl::storage_admin_service::addPart<'mock>,
15564        pub addLearner: r#impl::storage_admin_service::addLearner<'mock>,
15565        pub removePart: r#impl::storage_admin_service::removePart<'mock>,
15566        pub memberChange: r#impl::storage_admin_service::memberChange<'mock>,
15567        pub waitingForCatchUpData: r#impl::storage_admin_service::waitingForCatchUpData<'mock>,
15568        pub createCheckpoint: r#impl::storage_admin_service::createCheckpoint<'mock>,
15569        pub dropCheckpoint: r#impl::storage_admin_service::dropCheckpoint<'mock>,
15570        pub blockingWrites: r#impl::storage_admin_service::blockingWrites<'mock>,
15571        pub rebuildTagIndex: r#impl::storage_admin_service::rebuildTagIndex<'mock>,
15572        pub rebuildEdgeIndex: r#impl::storage_admin_service::rebuildEdgeIndex<'mock>,
15573        pub getLeaderParts: r#impl::storage_admin_service::getLeaderParts<'mock>,
15574        pub checkPeers: r#impl::storage_admin_service::checkPeers<'mock>,
15575        pub addAdminTask: r#impl::storage_admin_service::addAdminTask<'mock>,
15576        pub stopAdminTask: r#impl::storage_admin_service::stopAdminTask<'mock>,
15577        pub listClusterInfo: r#impl::storage_admin_service::listClusterInfo<'mock>,
15578        _marker: ::std::marker::PhantomData<&'mock ()>,
15579    }
15580
15581    impl dyn super::client::StorageAdminService {
15582        pub fn mock<'mock>() -> StorageAdminService<'mock> {
15583            StorageAdminService {
15584                transLeader: r#impl::storage_admin_service::transLeader::unimplemented(),
15585                addPart: r#impl::storage_admin_service::addPart::unimplemented(),
15586                addLearner: r#impl::storage_admin_service::addLearner::unimplemented(),
15587                removePart: r#impl::storage_admin_service::removePart::unimplemented(),
15588                memberChange: r#impl::storage_admin_service::memberChange::unimplemented(),
15589                waitingForCatchUpData: r#impl::storage_admin_service::waitingForCatchUpData::unimplemented(),
15590                createCheckpoint: r#impl::storage_admin_service::createCheckpoint::unimplemented(),
15591                dropCheckpoint: r#impl::storage_admin_service::dropCheckpoint::unimplemented(),
15592                blockingWrites: r#impl::storage_admin_service::blockingWrites::unimplemented(),
15593                rebuildTagIndex: r#impl::storage_admin_service::rebuildTagIndex::unimplemented(),
15594                rebuildEdgeIndex: r#impl::storage_admin_service::rebuildEdgeIndex::unimplemented(),
15595                getLeaderParts: r#impl::storage_admin_service::getLeaderParts::unimplemented(),
15596                checkPeers: r#impl::storage_admin_service::checkPeers::unimplemented(),
15597                addAdminTask: r#impl::storage_admin_service::addAdminTask::unimplemented(),
15598                stopAdminTask: r#impl::storage_admin_service::stopAdminTask::unimplemented(),
15599                listClusterInfo: r#impl::storage_admin_service::listClusterInfo::unimplemented(),
15600                _marker: ::std::marker::PhantomData,
15601            }
15602        }
15603    }
15604
15605    impl<'mock> super::client::StorageAdminService for StorageAdminService<'mock> {
15606        fn transLeader(
15607            &self,
15608            arg_req: &crate::types::TransLeaderReq,
15609        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError>> {
15610            let mut closure = self.transLeader.closure.lock().unwrap();
15611            let closure: &mut dyn ::std::ops::FnMut(crate::types::TransLeaderReq) -> _ = &mut **closure;
15612            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15613        }
15614        fn addPart(
15615            &self,
15616            arg_req: &crate::types::AddPartReq,
15617        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError>> {
15618            let mut closure = self.addPart.closure.lock().unwrap();
15619            let closure: &mut dyn ::std::ops::FnMut(crate::types::AddPartReq) -> _ = &mut **closure;
15620            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15621        }
15622        fn addLearner(
15623            &self,
15624            arg_req: &crate::types::AddLearnerReq,
15625        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError>> {
15626            let mut closure = self.addLearner.closure.lock().unwrap();
15627            let closure: &mut dyn ::std::ops::FnMut(crate::types::AddLearnerReq) -> _ = &mut **closure;
15628            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15629        }
15630        fn removePart(
15631            &self,
15632            arg_req: &crate::types::RemovePartReq,
15633        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError>> {
15634            let mut closure = self.removePart.closure.lock().unwrap();
15635            let closure: &mut dyn ::std::ops::FnMut(crate::types::RemovePartReq) -> _ = &mut **closure;
15636            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15637        }
15638        fn memberChange(
15639            &self,
15640            arg_req: &crate::types::MemberChangeReq,
15641        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError>> {
15642            let mut closure = self.memberChange.closure.lock().unwrap();
15643            let closure: &mut dyn ::std::ops::FnMut(crate::types::MemberChangeReq) -> _ = &mut **closure;
15644            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15645        }
15646        fn waitingForCatchUpData(
15647            &self,
15648            arg_req: &crate::types::CatchUpDataReq,
15649        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError>> {
15650            let mut closure = self.waitingForCatchUpData.closure.lock().unwrap();
15651            let closure: &mut dyn ::std::ops::FnMut(crate::types::CatchUpDataReq) -> _ = &mut **closure;
15652            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15653        }
15654        fn createCheckpoint(
15655            &self,
15656            arg_req: &crate::types::CreateCPRequest,
15657        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError>> {
15658            let mut closure = self.createCheckpoint.closure.lock().unwrap();
15659            let closure: &mut dyn ::std::ops::FnMut(crate::types::CreateCPRequest) -> _ = &mut **closure;
15660            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15661        }
15662        fn dropCheckpoint(
15663            &self,
15664            arg_req: &crate::types::DropCPRequest,
15665        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError>> {
15666            let mut closure = self.dropCheckpoint.closure.lock().unwrap();
15667            let closure: &mut dyn ::std::ops::FnMut(crate::types::DropCPRequest) -> _ = &mut **closure;
15668            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15669        }
15670        fn blockingWrites(
15671            &self,
15672            arg_req: &crate::types::BlockingSignRequest,
15673        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError>> {
15674            let mut closure = self.blockingWrites.closure.lock().unwrap();
15675            let closure: &mut dyn ::std::ops::FnMut(crate::types::BlockingSignRequest) -> _ = &mut **closure;
15676            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15677        }
15678        fn rebuildTagIndex(
15679            &self,
15680            arg_req: &crate::types::RebuildIndexRequest,
15681        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError>> {
15682            let mut closure = self.rebuildTagIndex.closure.lock().unwrap();
15683            let closure: &mut dyn ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> _ = &mut **closure;
15684            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15685        }
15686        fn rebuildEdgeIndex(
15687            &self,
15688            arg_req: &crate::types::RebuildIndexRequest,
15689        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError>> {
15690            let mut closure = self.rebuildEdgeIndex.closure.lock().unwrap();
15691            let closure: &mut dyn ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> _ = &mut **closure;
15692            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15693        }
15694        fn getLeaderParts(
15695            &self,
15696            arg_req: &crate::types::GetLeaderReq,
15697        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError>> {
15698            let mut closure = self.getLeaderParts.closure.lock().unwrap();
15699            let closure: &mut dyn ::std::ops::FnMut(crate::types::GetLeaderReq) -> _ = &mut **closure;
15700            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15701        }
15702        fn checkPeers(
15703            &self,
15704            arg_req: &crate::types::CheckPeersReq,
15705        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError>> {
15706            let mut closure = self.checkPeers.closure.lock().unwrap();
15707            let closure: &mut dyn ::std::ops::FnMut(crate::types::CheckPeersReq) -> _ = &mut **closure;
15708            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15709        }
15710        fn addAdminTask(
15711            &self,
15712            arg_req: &crate::types::AddAdminTaskRequest,
15713        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError>> {
15714            let mut closure = self.addAdminTask.closure.lock().unwrap();
15715            let closure: &mut dyn ::std::ops::FnMut(crate::types::AddAdminTaskRequest) -> _ = &mut **closure;
15716            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15717        }
15718        fn stopAdminTask(
15719            &self,
15720            arg_req: &crate::types::StopAdminTaskRequest,
15721        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError>> {
15722            let mut closure = self.stopAdminTask.closure.lock().unwrap();
15723            let closure: &mut dyn ::std::ops::FnMut(crate::types::StopAdminTaskRequest) -> _ = &mut **closure;
15724            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15725        }
15726        fn listClusterInfo(
15727            &self,
15728            arg_req: &crate::types::ListClusterInfoReq,
15729        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError>> {
15730            let mut closure = self.listClusterInfo.closure.lock().unwrap();
15731            let closure: &mut dyn ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> _ = &mut **closure;
15732            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15733        }
15734    }
15735
15736
15737    pub struct GeneralStorageService<'mock> {
15738        pub get: r#impl::general_storage_service::get<'mock>,
15739        pub put: r#impl::general_storage_service::put<'mock>,
15740        pub remove: r#impl::general_storage_service::remove<'mock>,
15741        _marker: ::std::marker::PhantomData<&'mock ()>,
15742    }
15743
15744    impl dyn super::client::GeneralStorageService {
15745        pub fn mock<'mock>() -> GeneralStorageService<'mock> {
15746            GeneralStorageService {
15747                get: r#impl::general_storage_service::get::unimplemented(),
15748                put: r#impl::general_storage_service::put::unimplemented(),
15749                remove: r#impl::general_storage_service::remove::unimplemented(),
15750                _marker: ::std::marker::PhantomData,
15751            }
15752        }
15753    }
15754
15755    impl<'mock> super::client::GeneralStorageService for GeneralStorageService<'mock> {
15756        fn get(
15757            &self,
15758            arg_req: &crate::types::KVGetRequest,
15759        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError>> {
15760            let mut closure = self.get.closure.lock().unwrap();
15761            let closure: &mut dyn ::std::ops::FnMut(crate::types::KVGetRequest) -> _ = &mut **closure;
15762            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15763        }
15764        fn put(
15765            &self,
15766            arg_req: &crate::types::KVPutRequest,
15767        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError>> {
15768            let mut closure = self.put.closure.lock().unwrap();
15769            let closure: &mut dyn ::std::ops::FnMut(crate::types::KVPutRequest) -> _ = &mut **closure;
15770            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15771        }
15772        fn remove(
15773            &self,
15774            arg_req: &crate::types::KVRemoveRequest,
15775        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError>> {
15776            let mut closure = self.remove.closure.lock().unwrap();
15777            let closure: &mut dyn ::std::ops::FnMut(crate::types::KVRemoveRequest) -> _ = &mut **closure;
15778            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15779        }
15780    }
15781
15782
15783    pub struct InternalStorageService<'mock> {
15784        pub chainAddEdges: r#impl::internal_storage_service::chainAddEdges<'mock>,
15785        pub chainUpdateEdge: r#impl::internal_storage_service::chainUpdateEdge<'mock>,
15786        _marker: ::std::marker::PhantomData<&'mock ()>,
15787    }
15788
15789    impl dyn super::client::InternalStorageService {
15790        pub fn mock<'mock>() -> InternalStorageService<'mock> {
15791            InternalStorageService {
15792                chainAddEdges: r#impl::internal_storage_service::chainAddEdges::unimplemented(),
15793                chainUpdateEdge: r#impl::internal_storage_service::chainUpdateEdge::unimplemented(),
15794                _marker: ::std::marker::PhantomData,
15795            }
15796        }
15797    }
15798
15799    impl<'mock> super::client::InternalStorageService for InternalStorageService<'mock> {
15800        fn chainAddEdges(
15801            &self,
15802            arg_req: &crate::types::ChainAddEdgesRequest,
15803        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError>> {
15804            let mut closure = self.chainAddEdges.closure.lock().unwrap();
15805            let closure: &mut dyn ::std::ops::FnMut(crate::types::ChainAddEdgesRequest) -> _ = &mut **closure;
15806            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15807        }
15808        fn chainUpdateEdge(
15809            &self,
15810            arg_req: &crate::types::ChainUpdateEdgeRequest,
15811        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError>> {
15812            let mut closure = self.chainUpdateEdge.closure.lock().unwrap();
15813            let closure: &mut dyn ::std::ops::FnMut(crate::types::ChainUpdateEdgeRequest) -> _ = &mut **closure;
15814            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
15815        }
15816    }
15817
15818    mod r#impl {
15819        pub mod graph_storage_service {
15820
15821            pub struct getNeighbors<'mock> {
15822                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
15823                    dyn ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> ::std::result::Result<
15824                        crate::types::GetNeighborsResponse,
15825                        crate::errors::graph_storage_service::GetNeighborsError,
15826                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
15827                >>,
15828            }
15829
15830            #[allow(clippy::redundant_closure)]
15831            impl<'mock> getNeighbors<'mock> {
15832                pub fn unimplemented() -> Self {
15833                    Self {
15834                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetNeighborsRequest| panic!(
15835                            "{}::{} is not mocked",
15836                            "GraphStorageService",
15837                            "getNeighbors",
15838                        ))),
15839                    }
15840                }
15841
15842                pub fn ret(&self, value: crate::types::GetNeighborsResponse) {
15843                    self.mock(move |_: crate::types::GetNeighborsRequest| value.clone());
15844                }
15845
15846                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> crate::types::GetNeighborsResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
15847                    let mut closure = self.closure.lock().unwrap();
15848                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
15849                }
15850
15851                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::GetNeighborsError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
15852                    let mut closure = self.closure.lock().unwrap();
15853                    *closure = ::std::boxed::Box::new(move |req| mock(req));
15854                }
15855
15856                pub fn throw<E>(&self, exception: E)
15857                where
15858                    E: ::std::convert::Into<crate::errors::graph_storage_service::GetNeighborsError>,
15859                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
15860                {
15861                    let mut closure = self.closure.lock().unwrap();
15862                    *closure = ::std::boxed::Box::new(move |_: crate::types::GetNeighborsRequest| ::std::result::Result::Err(exception.clone().into()));
15863                }
15864            }
15865
15866            pub struct getProps<'mock> {
15867                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
15868                    dyn ::std::ops::FnMut(crate::types::GetPropRequest) -> ::std::result::Result<
15869                        crate::types::GetPropResponse,
15870                        crate::errors::graph_storage_service::GetPropsError,
15871                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
15872                >>,
15873            }
15874
15875            #[allow(clippy::redundant_closure)]
15876            impl<'mock> getProps<'mock> {
15877                pub fn unimplemented() -> Self {
15878                    Self {
15879                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetPropRequest| panic!(
15880                            "{}::{} is not mocked",
15881                            "GraphStorageService",
15882                            "getProps",
15883                        ))),
15884                    }
15885                }
15886
15887                pub fn ret(&self, value: crate::types::GetPropResponse) {
15888                    self.mock(move |_: crate::types::GetPropRequest| value.clone());
15889                }
15890
15891                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetPropRequest) -> crate::types::GetPropResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
15892                    let mut closure = self.closure.lock().unwrap();
15893                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
15894                }
15895
15896                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetPropRequest) -> ::std::result::Result<crate::types::GetPropResponse, crate::errors::graph_storage_service::GetPropsError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
15897                    let mut closure = self.closure.lock().unwrap();
15898                    *closure = ::std::boxed::Box::new(move |req| mock(req));
15899                }
15900
15901                pub fn throw<E>(&self, exception: E)
15902                where
15903                    E: ::std::convert::Into<crate::errors::graph_storage_service::GetPropsError>,
15904                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
15905                {
15906                    let mut closure = self.closure.lock().unwrap();
15907                    *closure = ::std::boxed::Box::new(move |_: crate::types::GetPropRequest| ::std::result::Result::Err(exception.clone().into()));
15908                }
15909            }
15910
15911            pub struct addVertices<'mock> {
15912                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
15913                    dyn ::std::ops::FnMut(crate::types::AddVerticesRequest) -> ::std::result::Result<
15914                        crate::types::ExecResponse,
15915                        crate::errors::graph_storage_service::AddVerticesError,
15916                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
15917                >>,
15918            }
15919
15920            #[allow(clippy::redundant_closure)]
15921            impl<'mock> addVertices<'mock> {
15922                pub fn unimplemented() -> Self {
15923                    Self {
15924                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddVerticesRequest| panic!(
15925                            "{}::{} is not mocked",
15926                            "GraphStorageService",
15927                            "addVertices",
15928                        ))),
15929                    }
15930                }
15931
15932                pub fn ret(&self, value: crate::types::ExecResponse) {
15933                    self.mock(move |_: crate::types::AddVerticesRequest| value.clone());
15934                }
15935
15936                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddVerticesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
15937                    let mut closure = self.closure.lock().unwrap();
15938                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
15939                }
15940
15941                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddVerticesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddVerticesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
15942                    let mut closure = self.closure.lock().unwrap();
15943                    *closure = ::std::boxed::Box::new(move |req| mock(req));
15944                }
15945
15946                pub fn throw<E>(&self, exception: E)
15947                where
15948                    E: ::std::convert::Into<crate::errors::graph_storage_service::AddVerticesError>,
15949                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
15950                {
15951                    let mut closure = self.closure.lock().unwrap();
15952                    *closure = ::std::boxed::Box::new(move |_: crate::types::AddVerticesRequest| ::std::result::Result::Err(exception.clone().into()));
15953                }
15954            }
15955
15956            pub struct addEdges<'mock> {
15957                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
15958                    dyn ::std::ops::FnMut(crate::types::AddEdgesRequest) -> ::std::result::Result<
15959                        crate::types::ExecResponse,
15960                        crate::errors::graph_storage_service::AddEdgesError,
15961                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
15962                >>,
15963            }
15964
15965            #[allow(clippy::redundant_closure)]
15966            impl<'mock> addEdges<'mock> {
15967                pub fn unimplemented() -> Self {
15968                    Self {
15969                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddEdgesRequest| panic!(
15970                            "{}::{} is not mocked",
15971                            "GraphStorageService",
15972                            "addEdges",
15973                        ))),
15974                    }
15975                }
15976
15977                pub fn ret(&self, value: crate::types::ExecResponse) {
15978                    self.mock(move |_: crate::types::AddEdgesRequest| value.clone());
15979                }
15980
15981                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddEdgesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
15982                    let mut closure = self.closure.lock().unwrap();
15983                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
15984                }
15985
15986                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddEdgesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::AddEdgesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
15987                    let mut closure = self.closure.lock().unwrap();
15988                    *closure = ::std::boxed::Box::new(move |req| mock(req));
15989                }
15990
15991                pub fn throw<E>(&self, exception: E)
15992                where
15993                    E: ::std::convert::Into<crate::errors::graph_storage_service::AddEdgesError>,
15994                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
15995                {
15996                    let mut closure = self.closure.lock().unwrap();
15997                    *closure = ::std::boxed::Box::new(move |_: crate::types::AddEdgesRequest| ::std::result::Result::Err(exception.clone().into()));
15998                }
15999            }
16000
16001            pub struct deleteEdges<'mock> {
16002                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16003                    dyn ::std::ops::FnMut(crate::types::DeleteEdgesRequest) -> ::std::result::Result<
16004                        crate::types::ExecResponse,
16005                        crate::errors::graph_storage_service::DeleteEdgesError,
16006                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16007                >>,
16008            }
16009
16010            #[allow(clippy::redundant_closure)]
16011            impl<'mock> deleteEdges<'mock> {
16012                pub fn unimplemented() -> Self {
16013                    Self {
16014                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::DeleteEdgesRequest| panic!(
16015                            "{}::{} is not mocked",
16016                            "GraphStorageService",
16017                            "deleteEdges",
16018                        ))),
16019                    }
16020                }
16021
16022                pub fn ret(&self, value: crate::types::ExecResponse) {
16023                    self.mock(move |_: crate::types::DeleteEdgesRequest| value.clone());
16024                }
16025
16026                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteEdgesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16027                    let mut closure = self.closure.lock().unwrap();
16028                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16029                }
16030
16031                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteEdgesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteEdgesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16032                    let mut closure = self.closure.lock().unwrap();
16033                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16034                }
16035
16036                pub fn throw<E>(&self, exception: E)
16037                where
16038                    E: ::std::convert::Into<crate::errors::graph_storage_service::DeleteEdgesError>,
16039                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16040                {
16041                    let mut closure = self.closure.lock().unwrap();
16042                    *closure = ::std::boxed::Box::new(move |_: crate::types::DeleteEdgesRequest| ::std::result::Result::Err(exception.clone().into()));
16043                }
16044            }
16045
16046            pub struct deleteVertices<'mock> {
16047                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16048                    dyn ::std::ops::FnMut(crate::types::DeleteVerticesRequest) -> ::std::result::Result<
16049                        crate::types::ExecResponse,
16050                        crate::errors::graph_storage_service::DeleteVerticesError,
16051                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16052                >>,
16053            }
16054
16055            #[allow(clippy::redundant_closure)]
16056            impl<'mock> deleteVertices<'mock> {
16057                pub fn unimplemented() -> Self {
16058                    Self {
16059                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::DeleteVerticesRequest| panic!(
16060                            "{}::{} is not mocked",
16061                            "GraphStorageService",
16062                            "deleteVertices",
16063                        ))),
16064                    }
16065                }
16066
16067                pub fn ret(&self, value: crate::types::ExecResponse) {
16068                    self.mock(move |_: crate::types::DeleteVerticesRequest| value.clone());
16069                }
16070
16071                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteVerticesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16072                    let mut closure = self.closure.lock().unwrap();
16073                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16074                }
16075
16076                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteVerticesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteVerticesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16077                    let mut closure = self.closure.lock().unwrap();
16078                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16079                }
16080
16081                pub fn throw<E>(&self, exception: E)
16082                where
16083                    E: ::std::convert::Into<crate::errors::graph_storage_service::DeleteVerticesError>,
16084                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16085                {
16086                    let mut closure = self.closure.lock().unwrap();
16087                    *closure = ::std::boxed::Box::new(move |_: crate::types::DeleteVerticesRequest| ::std::result::Result::Err(exception.clone().into()));
16088                }
16089            }
16090
16091            pub struct deleteTags<'mock> {
16092                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16093                    dyn ::std::ops::FnMut(crate::types::DeleteTagsRequest) -> ::std::result::Result<
16094                        crate::types::ExecResponse,
16095                        crate::errors::graph_storage_service::DeleteTagsError,
16096                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16097                >>,
16098            }
16099
16100            #[allow(clippy::redundant_closure)]
16101            impl<'mock> deleteTags<'mock> {
16102                pub fn unimplemented() -> Self {
16103                    Self {
16104                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::DeleteTagsRequest| panic!(
16105                            "{}::{} is not mocked",
16106                            "GraphStorageService",
16107                            "deleteTags",
16108                        ))),
16109                    }
16110                }
16111
16112                pub fn ret(&self, value: crate::types::ExecResponse) {
16113                    self.mock(move |_: crate::types::DeleteTagsRequest| value.clone());
16114                }
16115
16116                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteTagsRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16117                    let mut closure = self.closure.lock().unwrap();
16118                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16119                }
16120
16121                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteTagsRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::DeleteTagsError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16122                    let mut closure = self.closure.lock().unwrap();
16123                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16124                }
16125
16126                pub fn throw<E>(&self, exception: E)
16127                where
16128                    E: ::std::convert::Into<crate::errors::graph_storage_service::DeleteTagsError>,
16129                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16130                {
16131                    let mut closure = self.closure.lock().unwrap();
16132                    *closure = ::std::boxed::Box::new(move |_: crate::types::DeleteTagsRequest| ::std::result::Result::Err(exception.clone().into()));
16133                }
16134            }
16135
16136            pub struct updateVertex<'mock> {
16137                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16138                    dyn ::std::ops::FnMut(crate::types::UpdateVertexRequest) -> ::std::result::Result<
16139                        crate::types::UpdateResponse,
16140                        crate::errors::graph_storage_service::UpdateVertexError,
16141                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16142                >>,
16143            }
16144
16145            #[allow(clippy::redundant_closure)]
16146            impl<'mock> updateVertex<'mock> {
16147                pub fn unimplemented() -> Self {
16148                    Self {
16149                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::UpdateVertexRequest| panic!(
16150                            "{}::{} is not mocked",
16151                            "GraphStorageService",
16152                            "updateVertex",
16153                        ))),
16154                    }
16155                }
16156
16157                pub fn ret(&self, value: crate::types::UpdateResponse) {
16158                    self.mock(move |_: crate::types::UpdateVertexRequest| value.clone());
16159                }
16160
16161                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateVertexRequest) -> crate::types::UpdateResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16162                    let mut closure = self.closure.lock().unwrap();
16163                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16164                }
16165
16166                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateVertexRequest) -> ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateVertexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16167                    let mut closure = self.closure.lock().unwrap();
16168                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16169                }
16170
16171                pub fn throw<E>(&self, exception: E)
16172                where
16173                    E: ::std::convert::Into<crate::errors::graph_storage_service::UpdateVertexError>,
16174                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16175                {
16176                    let mut closure = self.closure.lock().unwrap();
16177                    *closure = ::std::boxed::Box::new(move |_: crate::types::UpdateVertexRequest| ::std::result::Result::Err(exception.clone().into()));
16178                }
16179            }
16180
16181            pub struct updateEdge<'mock> {
16182                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16183                    dyn ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> ::std::result::Result<
16184                        crate::types::UpdateResponse,
16185                        crate::errors::graph_storage_service::UpdateEdgeError,
16186                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16187                >>,
16188            }
16189
16190            #[allow(clippy::redundant_closure)]
16191            impl<'mock> updateEdge<'mock> {
16192                pub fn unimplemented() -> Self {
16193                    Self {
16194                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::UpdateEdgeRequest| panic!(
16195                            "{}::{} is not mocked",
16196                            "GraphStorageService",
16197                            "updateEdge",
16198                        ))),
16199                    }
16200                }
16201
16202                pub fn ret(&self, value: crate::types::UpdateResponse) {
16203                    self.mock(move |_: crate::types::UpdateEdgeRequest| value.clone());
16204                }
16205
16206                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> crate::types::UpdateResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16207                    let mut closure = self.closure.lock().unwrap();
16208                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16209                }
16210
16211                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::UpdateEdgeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16212                    let mut closure = self.closure.lock().unwrap();
16213                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16214                }
16215
16216                pub fn throw<E>(&self, exception: E)
16217                where
16218                    E: ::std::convert::Into<crate::errors::graph_storage_service::UpdateEdgeError>,
16219                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16220                {
16221                    let mut closure = self.closure.lock().unwrap();
16222                    *closure = ::std::boxed::Box::new(move |_: crate::types::UpdateEdgeRequest| ::std::result::Result::Err(exception.clone().into()));
16223                }
16224            }
16225
16226            pub struct scanVertex<'mock> {
16227                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16228                    dyn ::std::ops::FnMut(crate::types::ScanVertexRequest) -> ::std::result::Result<
16229                        crate::types::ScanVertexResponse,
16230                        crate::errors::graph_storage_service::ScanVertexError,
16231                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16232                >>,
16233            }
16234
16235            #[allow(clippy::redundant_closure)]
16236            impl<'mock> scanVertex<'mock> {
16237                pub fn unimplemented() -> Self {
16238                    Self {
16239                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ScanVertexRequest| panic!(
16240                            "{}::{} is not mocked",
16241                            "GraphStorageService",
16242                            "scanVertex",
16243                        ))),
16244                    }
16245                }
16246
16247                pub fn ret(&self, value: crate::types::ScanVertexResponse) {
16248                    self.mock(move |_: crate::types::ScanVertexRequest| value.clone());
16249                }
16250
16251                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ScanVertexRequest) -> crate::types::ScanVertexResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16252                    let mut closure = self.closure.lock().unwrap();
16253                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16254                }
16255
16256                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ScanVertexRequest) -> ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::graph_storage_service::ScanVertexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16257                    let mut closure = self.closure.lock().unwrap();
16258                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16259                }
16260
16261                pub fn throw<E>(&self, exception: E)
16262                where
16263                    E: ::std::convert::Into<crate::errors::graph_storage_service::ScanVertexError>,
16264                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16265                {
16266                    let mut closure = self.closure.lock().unwrap();
16267                    *closure = ::std::boxed::Box::new(move |_: crate::types::ScanVertexRequest| ::std::result::Result::Err(exception.clone().into()));
16268                }
16269            }
16270
16271            pub struct scanEdge<'mock> {
16272                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16273                    dyn ::std::ops::FnMut(crate::types::ScanEdgeRequest) -> ::std::result::Result<
16274                        crate::types::ScanEdgeResponse,
16275                        crate::errors::graph_storage_service::ScanEdgeError,
16276                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16277                >>,
16278            }
16279
16280            #[allow(clippy::redundant_closure)]
16281            impl<'mock> scanEdge<'mock> {
16282                pub fn unimplemented() -> Self {
16283                    Self {
16284                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ScanEdgeRequest| panic!(
16285                            "{}::{} is not mocked",
16286                            "GraphStorageService",
16287                            "scanEdge",
16288                        ))),
16289                    }
16290                }
16291
16292                pub fn ret(&self, value: crate::types::ScanEdgeResponse) {
16293                    self.mock(move |_: crate::types::ScanEdgeRequest| value.clone());
16294                }
16295
16296                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ScanEdgeRequest) -> crate::types::ScanEdgeResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16297                    let mut closure = self.closure.lock().unwrap();
16298                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16299                }
16300
16301                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ScanEdgeRequest) -> ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::graph_storage_service::ScanEdgeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16302                    let mut closure = self.closure.lock().unwrap();
16303                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16304                }
16305
16306                pub fn throw<E>(&self, exception: E)
16307                where
16308                    E: ::std::convert::Into<crate::errors::graph_storage_service::ScanEdgeError>,
16309                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16310                {
16311                    let mut closure = self.closure.lock().unwrap();
16312                    *closure = ::std::boxed::Box::new(move |_: crate::types::ScanEdgeRequest| ::std::result::Result::Err(exception.clone().into()));
16313                }
16314            }
16315
16316            pub struct getUUID<'mock> {
16317                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16318                    dyn ::std::ops::FnMut(crate::types::GetUUIDReq) -> ::std::result::Result<
16319                        crate::types::GetUUIDResp,
16320                        crate::errors::graph_storage_service::GetUUIDError,
16321                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16322                >>,
16323            }
16324
16325            #[allow(clippy::redundant_closure)]
16326            impl<'mock> getUUID<'mock> {
16327                pub fn unimplemented() -> Self {
16328                    Self {
16329                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetUUIDReq| panic!(
16330                            "{}::{} is not mocked",
16331                            "GraphStorageService",
16332                            "getUUID",
16333                        ))),
16334                    }
16335                }
16336
16337                pub fn ret(&self, value: crate::types::GetUUIDResp) {
16338                    self.mock(move |_: crate::types::GetUUIDReq| value.clone());
16339                }
16340
16341                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetUUIDReq) -> crate::types::GetUUIDResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16342                    let mut closure = self.closure.lock().unwrap();
16343                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16344                }
16345
16346                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetUUIDReq) -> ::std::result::Result<crate::types::GetUUIDResp, crate::errors::graph_storage_service::GetUUIDError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16347                    let mut closure = self.closure.lock().unwrap();
16348                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16349                }
16350
16351                pub fn throw<E>(&self, exception: E)
16352                where
16353                    E: ::std::convert::Into<crate::errors::graph_storage_service::GetUUIDError>,
16354                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16355                {
16356                    let mut closure = self.closure.lock().unwrap();
16357                    *closure = ::std::boxed::Box::new(move |_: crate::types::GetUUIDReq| ::std::result::Result::Err(exception.clone().into()));
16358                }
16359            }
16360
16361            pub struct lookupIndex<'mock> {
16362                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16363                    dyn ::std::ops::FnMut(crate::types::LookupIndexRequest) -> ::std::result::Result<
16364                        crate::types::LookupIndexResp,
16365                        crate::errors::graph_storage_service::LookupIndexError,
16366                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16367                >>,
16368            }
16369
16370            #[allow(clippy::redundant_closure)]
16371            impl<'mock> lookupIndex<'mock> {
16372                pub fn unimplemented() -> Self {
16373                    Self {
16374                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::LookupIndexRequest| panic!(
16375                            "{}::{} is not mocked",
16376                            "GraphStorageService",
16377                            "lookupIndex",
16378                        ))),
16379                    }
16380                }
16381
16382                pub fn ret(&self, value: crate::types::LookupIndexResp) {
16383                    self.mock(move |_: crate::types::LookupIndexRequest| value.clone());
16384                }
16385
16386                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::LookupIndexRequest) -> crate::types::LookupIndexResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16387                    let mut closure = self.closure.lock().unwrap();
16388                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16389                }
16390
16391                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::LookupIndexRequest) -> ::std::result::Result<crate::types::LookupIndexResp, crate::errors::graph_storage_service::LookupIndexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16392                    let mut closure = self.closure.lock().unwrap();
16393                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16394                }
16395
16396                pub fn throw<E>(&self, exception: E)
16397                where
16398                    E: ::std::convert::Into<crate::errors::graph_storage_service::LookupIndexError>,
16399                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16400                {
16401                    let mut closure = self.closure.lock().unwrap();
16402                    *closure = ::std::boxed::Box::new(move |_: crate::types::LookupIndexRequest| ::std::result::Result::Err(exception.clone().into()));
16403                }
16404            }
16405
16406            pub struct lookupAndTraverse<'mock> {
16407                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16408                    dyn ::std::ops::FnMut(crate::types::LookupAndTraverseRequest) -> ::std::result::Result<
16409                        crate::types::GetNeighborsResponse,
16410                        crate::errors::graph_storage_service::LookupAndTraverseError,
16411                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16412                >>,
16413            }
16414
16415            #[allow(clippy::redundant_closure)]
16416            impl<'mock> lookupAndTraverse<'mock> {
16417                pub fn unimplemented() -> Self {
16418                    Self {
16419                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::LookupAndTraverseRequest| panic!(
16420                            "{}::{} is not mocked",
16421                            "GraphStorageService",
16422                            "lookupAndTraverse",
16423                        ))),
16424                    }
16425                }
16426
16427                pub fn ret(&self, value: crate::types::GetNeighborsResponse) {
16428                    self.mock(move |_: crate::types::LookupAndTraverseRequest| value.clone());
16429                }
16430
16431                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::LookupAndTraverseRequest) -> crate::types::GetNeighborsResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16432                    let mut closure = self.closure.lock().unwrap();
16433                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16434                }
16435
16436                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::LookupAndTraverseRequest) -> ::std::result::Result<crate::types::GetNeighborsResponse, crate::errors::graph_storage_service::LookupAndTraverseError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16437                    let mut closure = self.closure.lock().unwrap();
16438                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16439                }
16440
16441                pub fn throw<E>(&self, exception: E)
16442                where
16443                    E: ::std::convert::Into<crate::errors::graph_storage_service::LookupAndTraverseError>,
16444                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16445                {
16446                    let mut closure = self.closure.lock().unwrap();
16447                    *closure = ::std::boxed::Box::new(move |_: crate::types::LookupAndTraverseRequest| ::std::result::Result::Err(exception.clone().into()));
16448                }
16449            }
16450
16451            pub struct chainUpdateEdge<'mock> {
16452                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16453                    dyn ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> ::std::result::Result<
16454                        crate::types::UpdateResponse,
16455                        crate::errors::graph_storage_service::ChainUpdateEdgeError,
16456                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16457                >>,
16458            }
16459
16460            #[allow(clippy::redundant_closure)]
16461            impl<'mock> chainUpdateEdge<'mock> {
16462                pub fn unimplemented() -> Self {
16463                    Self {
16464                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::UpdateEdgeRequest| panic!(
16465                            "{}::{} is not mocked",
16466                            "GraphStorageService",
16467                            "chainUpdateEdge",
16468                        ))),
16469                    }
16470                }
16471
16472                pub fn ret(&self, value: crate::types::UpdateResponse) {
16473                    self.mock(move |_: crate::types::UpdateEdgeRequest| value.clone());
16474                }
16475
16476                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> crate::types::UpdateResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16477                    let mut closure = self.closure.lock().unwrap();
16478                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16479                }
16480
16481                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> ::std::result::Result<crate::types::UpdateResponse, crate::errors::graph_storage_service::ChainUpdateEdgeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16482                    let mut closure = self.closure.lock().unwrap();
16483                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16484                }
16485
16486                pub fn throw<E>(&self, exception: E)
16487                where
16488                    E: ::std::convert::Into<crate::errors::graph_storage_service::ChainUpdateEdgeError>,
16489                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16490                {
16491                    let mut closure = self.closure.lock().unwrap();
16492                    *closure = ::std::boxed::Box::new(move |_: crate::types::UpdateEdgeRequest| ::std::result::Result::Err(exception.clone().into()));
16493                }
16494            }
16495
16496            pub struct chainAddEdges<'mock> {
16497                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16498                    dyn ::std::ops::FnMut(crate::types::AddEdgesRequest) -> ::std::result::Result<
16499                        crate::types::ExecResponse,
16500                        crate::errors::graph_storage_service::ChainAddEdgesError,
16501                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16502                >>,
16503            }
16504
16505            #[allow(clippy::redundant_closure)]
16506            impl<'mock> chainAddEdges<'mock> {
16507                pub fn unimplemented() -> Self {
16508                    Self {
16509                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddEdgesRequest| panic!(
16510                            "{}::{} is not mocked",
16511                            "GraphStorageService",
16512                            "chainAddEdges",
16513                        ))),
16514                    }
16515                }
16516
16517                pub fn ret(&self, value: crate::types::ExecResponse) {
16518                    self.mock(move |_: crate::types::AddEdgesRequest| value.clone());
16519                }
16520
16521                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddEdgesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16522                    let mut closure = self.closure.lock().unwrap();
16523                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16524                }
16525
16526                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddEdgesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::graph_storage_service::ChainAddEdgesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16527                    let mut closure = self.closure.lock().unwrap();
16528                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16529                }
16530
16531                pub fn throw<E>(&self, exception: E)
16532                where
16533                    E: ::std::convert::Into<crate::errors::graph_storage_service::ChainAddEdgesError>,
16534                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16535                {
16536                    let mut closure = self.closure.lock().unwrap();
16537                    *closure = ::std::boxed::Box::new(move |_: crate::types::AddEdgesRequest| ::std::result::Result::Err(exception.clone().into()));
16538                }
16539            }
16540        }
16541        pub mod storage_admin_service {
16542
16543            pub struct transLeader<'mock> {
16544                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16545                    dyn ::std::ops::FnMut(crate::types::TransLeaderReq) -> ::std::result::Result<
16546                        crate::types::AdminExecResp,
16547                        crate::errors::storage_admin_service::TransLeaderError,
16548                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16549                >>,
16550            }
16551
16552            #[allow(clippy::redundant_closure)]
16553            impl<'mock> transLeader<'mock> {
16554                pub fn unimplemented() -> Self {
16555                    Self {
16556                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::TransLeaderReq| panic!(
16557                            "{}::{} is not mocked",
16558                            "StorageAdminService",
16559                            "transLeader",
16560                        ))),
16561                    }
16562                }
16563
16564                pub fn ret(&self, value: crate::types::AdminExecResp) {
16565                    self.mock(move |_: crate::types::TransLeaderReq| value.clone());
16566                }
16567
16568                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::TransLeaderReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16569                    let mut closure = self.closure.lock().unwrap();
16570                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16571                }
16572
16573                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::TransLeaderReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::TransLeaderError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16574                    let mut closure = self.closure.lock().unwrap();
16575                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16576                }
16577
16578                pub fn throw<E>(&self, exception: E)
16579                where
16580                    E: ::std::convert::Into<crate::errors::storage_admin_service::TransLeaderError>,
16581                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16582                {
16583                    let mut closure = self.closure.lock().unwrap();
16584                    *closure = ::std::boxed::Box::new(move |_: crate::types::TransLeaderReq| ::std::result::Result::Err(exception.clone().into()));
16585                }
16586            }
16587
16588            pub struct addPart<'mock> {
16589                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16590                    dyn ::std::ops::FnMut(crate::types::AddPartReq) -> ::std::result::Result<
16591                        crate::types::AdminExecResp,
16592                        crate::errors::storage_admin_service::AddPartError,
16593                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16594                >>,
16595            }
16596
16597            #[allow(clippy::redundant_closure)]
16598            impl<'mock> addPart<'mock> {
16599                pub fn unimplemented() -> Self {
16600                    Self {
16601                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddPartReq| panic!(
16602                            "{}::{} is not mocked",
16603                            "StorageAdminService",
16604                            "addPart",
16605                        ))),
16606                    }
16607                }
16608
16609                pub fn ret(&self, value: crate::types::AdminExecResp) {
16610                    self.mock(move |_: crate::types::AddPartReq| value.clone());
16611                }
16612
16613                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddPartReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16614                    let mut closure = self.closure.lock().unwrap();
16615                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16616                }
16617
16618                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddPartReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddPartError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16619                    let mut closure = self.closure.lock().unwrap();
16620                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16621                }
16622
16623                pub fn throw<E>(&self, exception: E)
16624                where
16625                    E: ::std::convert::Into<crate::errors::storage_admin_service::AddPartError>,
16626                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16627                {
16628                    let mut closure = self.closure.lock().unwrap();
16629                    *closure = ::std::boxed::Box::new(move |_: crate::types::AddPartReq| ::std::result::Result::Err(exception.clone().into()));
16630                }
16631            }
16632
16633            pub struct addLearner<'mock> {
16634                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16635                    dyn ::std::ops::FnMut(crate::types::AddLearnerReq) -> ::std::result::Result<
16636                        crate::types::AdminExecResp,
16637                        crate::errors::storage_admin_service::AddLearnerError,
16638                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16639                >>,
16640            }
16641
16642            #[allow(clippy::redundant_closure)]
16643            impl<'mock> addLearner<'mock> {
16644                pub fn unimplemented() -> Self {
16645                    Self {
16646                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddLearnerReq| panic!(
16647                            "{}::{} is not mocked",
16648                            "StorageAdminService",
16649                            "addLearner",
16650                        ))),
16651                    }
16652                }
16653
16654                pub fn ret(&self, value: crate::types::AdminExecResp) {
16655                    self.mock(move |_: crate::types::AddLearnerReq| value.clone());
16656                }
16657
16658                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddLearnerReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16659                    let mut closure = self.closure.lock().unwrap();
16660                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16661                }
16662
16663                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddLearnerReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddLearnerError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16664                    let mut closure = self.closure.lock().unwrap();
16665                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16666                }
16667
16668                pub fn throw<E>(&self, exception: E)
16669                where
16670                    E: ::std::convert::Into<crate::errors::storage_admin_service::AddLearnerError>,
16671                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16672                {
16673                    let mut closure = self.closure.lock().unwrap();
16674                    *closure = ::std::boxed::Box::new(move |_: crate::types::AddLearnerReq| ::std::result::Result::Err(exception.clone().into()));
16675                }
16676            }
16677
16678            pub struct removePart<'mock> {
16679                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16680                    dyn ::std::ops::FnMut(crate::types::RemovePartReq) -> ::std::result::Result<
16681                        crate::types::AdminExecResp,
16682                        crate::errors::storage_admin_service::RemovePartError,
16683                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16684                >>,
16685            }
16686
16687            #[allow(clippy::redundant_closure)]
16688            impl<'mock> removePart<'mock> {
16689                pub fn unimplemented() -> Self {
16690                    Self {
16691                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::RemovePartReq| panic!(
16692                            "{}::{} is not mocked",
16693                            "StorageAdminService",
16694                            "removePart",
16695                        ))),
16696                    }
16697                }
16698
16699                pub fn ret(&self, value: crate::types::AdminExecResp) {
16700                    self.mock(move |_: crate::types::RemovePartReq| value.clone());
16701                }
16702
16703                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::RemovePartReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16704                    let mut closure = self.closure.lock().unwrap();
16705                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16706                }
16707
16708                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::RemovePartReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RemovePartError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16709                    let mut closure = self.closure.lock().unwrap();
16710                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16711                }
16712
16713                pub fn throw<E>(&self, exception: E)
16714                where
16715                    E: ::std::convert::Into<crate::errors::storage_admin_service::RemovePartError>,
16716                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16717                {
16718                    let mut closure = self.closure.lock().unwrap();
16719                    *closure = ::std::boxed::Box::new(move |_: crate::types::RemovePartReq| ::std::result::Result::Err(exception.clone().into()));
16720                }
16721            }
16722
16723            pub struct memberChange<'mock> {
16724                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16725                    dyn ::std::ops::FnMut(crate::types::MemberChangeReq) -> ::std::result::Result<
16726                        crate::types::AdminExecResp,
16727                        crate::errors::storage_admin_service::MemberChangeError,
16728                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16729                >>,
16730            }
16731
16732            #[allow(clippy::redundant_closure)]
16733            impl<'mock> memberChange<'mock> {
16734                pub fn unimplemented() -> Self {
16735                    Self {
16736                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::MemberChangeReq| panic!(
16737                            "{}::{} is not mocked",
16738                            "StorageAdminService",
16739                            "memberChange",
16740                        ))),
16741                    }
16742                }
16743
16744                pub fn ret(&self, value: crate::types::AdminExecResp) {
16745                    self.mock(move |_: crate::types::MemberChangeReq| value.clone());
16746                }
16747
16748                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::MemberChangeReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16749                    let mut closure = self.closure.lock().unwrap();
16750                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16751                }
16752
16753                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::MemberChangeReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::MemberChangeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16754                    let mut closure = self.closure.lock().unwrap();
16755                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16756                }
16757
16758                pub fn throw<E>(&self, exception: E)
16759                where
16760                    E: ::std::convert::Into<crate::errors::storage_admin_service::MemberChangeError>,
16761                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16762                {
16763                    let mut closure = self.closure.lock().unwrap();
16764                    *closure = ::std::boxed::Box::new(move |_: crate::types::MemberChangeReq| ::std::result::Result::Err(exception.clone().into()));
16765                }
16766            }
16767
16768            pub struct waitingForCatchUpData<'mock> {
16769                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16770                    dyn ::std::ops::FnMut(crate::types::CatchUpDataReq) -> ::std::result::Result<
16771                        crate::types::AdminExecResp,
16772                        crate::errors::storage_admin_service::WaitingForCatchUpDataError,
16773                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16774                >>,
16775            }
16776
16777            #[allow(clippy::redundant_closure)]
16778            impl<'mock> waitingForCatchUpData<'mock> {
16779                pub fn unimplemented() -> Self {
16780                    Self {
16781                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::CatchUpDataReq| panic!(
16782                            "{}::{} is not mocked",
16783                            "StorageAdminService",
16784                            "waitingForCatchUpData",
16785                        ))),
16786                    }
16787                }
16788
16789                pub fn ret(&self, value: crate::types::AdminExecResp) {
16790                    self.mock(move |_: crate::types::CatchUpDataReq| value.clone());
16791                }
16792
16793                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::CatchUpDataReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16794                    let mut closure = self.closure.lock().unwrap();
16795                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16796                }
16797
16798                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::CatchUpDataReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::WaitingForCatchUpDataError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16799                    let mut closure = self.closure.lock().unwrap();
16800                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16801                }
16802
16803                pub fn throw<E>(&self, exception: E)
16804                where
16805                    E: ::std::convert::Into<crate::errors::storage_admin_service::WaitingForCatchUpDataError>,
16806                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16807                {
16808                    let mut closure = self.closure.lock().unwrap();
16809                    *closure = ::std::boxed::Box::new(move |_: crate::types::CatchUpDataReq| ::std::result::Result::Err(exception.clone().into()));
16810                }
16811            }
16812
16813            pub struct createCheckpoint<'mock> {
16814                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16815                    dyn ::std::ops::FnMut(crate::types::CreateCPRequest) -> ::std::result::Result<
16816                        crate::types::CreateCPResp,
16817                        crate::errors::storage_admin_service::CreateCheckpointError,
16818                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16819                >>,
16820            }
16821
16822            #[allow(clippy::redundant_closure)]
16823            impl<'mock> createCheckpoint<'mock> {
16824                pub fn unimplemented() -> Self {
16825                    Self {
16826                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::CreateCPRequest| panic!(
16827                            "{}::{} is not mocked",
16828                            "StorageAdminService",
16829                            "createCheckpoint",
16830                        ))),
16831                    }
16832                }
16833
16834                pub fn ret(&self, value: crate::types::CreateCPResp) {
16835                    self.mock(move |_: crate::types::CreateCPRequest| value.clone());
16836                }
16837
16838                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::CreateCPRequest) -> crate::types::CreateCPResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16839                    let mut closure = self.closure.lock().unwrap();
16840                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16841                }
16842
16843                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::CreateCPRequest) -> ::std::result::Result<crate::types::CreateCPResp, crate::errors::storage_admin_service::CreateCheckpointError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16844                    let mut closure = self.closure.lock().unwrap();
16845                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16846                }
16847
16848                pub fn throw<E>(&self, exception: E)
16849                where
16850                    E: ::std::convert::Into<crate::errors::storage_admin_service::CreateCheckpointError>,
16851                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16852                {
16853                    let mut closure = self.closure.lock().unwrap();
16854                    *closure = ::std::boxed::Box::new(move |_: crate::types::CreateCPRequest| ::std::result::Result::Err(exception.clone().into()));
16855                }
16856            }
16857
16858            pub struct dropCheckpoint<'mock> {
16859                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16860                    dyn ::std::ops::FnMut(crate::types::DropCPRequest) -> ::std::result::Result<
16861                        crate::types::AdminExecResp,
16862                        crate::errors::storage_admin_service::DropCheckpointError,
16863                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16864                >>,
16865            }
16866
16867            #[allow(clippy::redundant_closure)]
16868            impl<'mock> dropCheckpoint<'mock> {
16869                pub fn unimplemented() -> Self {
16870                    Self {
16871                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::DropCPRequest| panic!(
16872                            "{}::{} is not mocked",
16873                            "StorageAdminService",
16874                            "dropCheckpoint",
16875                        ))),
16876                    }
16877                }
16878
16879                pub fn ret(&self, value: crate::types::AdminExecResp) {
16880                    self.mock(move |_: crate::types::DropCPRequest| value.clone());
16881                }
16882
16883                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::DropCPRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16884                    let mut closure = self.closure.lock().unwrap();
16885                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16886                }
16887
16888                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::DropCPRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::DropCheckpointError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16889                    let mut closure = self.closure.lock().unwrap();
16890                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16891                }
16892
16893                pub fn throw<E>(&self, exception: E)
16894                where
16895                    E: ::std::convert::Into<crate::errors::storage_admin_service::DropCheckpointError>,
16896                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16897                {
16898                    let mut closure = self.closure.lock().unwrap();
16899                    *closure = ::std::boxed::Box::new(move |_: crate::types::DropCPRequest| ::std::result::Result::Err(exception.clone().into()));
16900                }
16901            }
16902
16903            pub struct blockingWrites<'mock> {
16904                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16905                    dyn ::std::ops::FnMut(crate::types::BlockingSignRequest) -> ::std::result::Result<
16906                        crate::types::AdminExecResp,
16907                        crate::errors::storage_admin_service::BlockingWritesError,
16908                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16909                >>,
16910            }
16911
16912            #[allow(clippy::redundant_closure)]
16913            impl<'mock> blockingWrites<'mock> {
16914                pub fn unimplemented() -> Self {
16915                    Self {
16916                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::BlockingSignRequest| panic!(
16917                            "{}::{} is not mocked",
16918                            "StorageAdminService",
16919                            "blockingWrites",
16920                        ))),
16921                    }
16922                }
16923
16924                pub fn ret(&self, value: crate::types::AdminExecResp) {
16925                    self.mock(move |_: crate::types::BlockingSignRequest| value.clone());
16926                }
16927
16928                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::BlockingSignRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16929                    let mut closure = self.closure.lock().unwrap();
16930                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16931                }
16932
16933                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::BlockingSignRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::BlockingWritesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16934                    let mut closure = self.closure.lock().unwrap();
16935                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16936                }
16937
16938                pub fn throw<E>(&self, exception: E)
16939                where
16940                    E: ::std::convert::Into<crate::errors::storage_admin_service::BlockingWritesError>,
16941                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16942                {
16943                    let mut closure = self.closure.lock().unwrap();
16944                    *closure = ::std::boxed::Box::new(move |_: crate::types::BlockingSignRequest| ::std::result::Result::Err(exception.clone().into()));
16945                }
16946            }
16947
16948            pub struct rebuildTagIndex<'mock> {
16949                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16950                    dyn ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> ::std::result::Result<
16951                        crate::types::AdminExecResp,
16952                        crate::errors::storage_admin_service::RebuildTagIndexError,
16953                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16954                >>,
16955            }
16956
16957            #[allow(clippy::redundant_closure)]
16958            impl<'mock> rebuildTagIndex<'mock> {
16959                pub fn unimplemented() -> Self {
16960                    Self {
16961                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::RebuildIndexRequest| panic!(
16962                            "{}::{} is not mocked",
16963                            "StorageAdminService",
16964                            "rebuildTagIndex",
16965                        ))),
16966                    }
16967                }
16968
16969                pub fn ret(&self, value: crate::types::AdminExecResp) {
16970                    self.mock(move |_: crate::types::RebuildIndexRequest| value.clone());
16971                }
16972
16973                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16974                    let mut closure = self.closure.lock().unwrap();
16975                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
16976                }
16977
16978                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildTagIndexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
16979                    let mut closure = self.closure.lock().unwrap();
16980                    *closure = ::std::boxed::Box::new(move |req| mock(req));
16981                }
16982
16983                pub fn throw<E>(&self, exception: E)
16984                where
16985                    E: ::std::convert::Into<crate::errors::storage_admin_service::RebuildTagIndexError>,
16986                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
16987                {
16988                    let mut closure = self.closure.lock().unwrap();
16989                    *closure = ::std::boxed::Box::new(move |_: crate::types::RebuildIndexRequest| ::std::result::Result::Err(exception.clone().into()));
16990                }
16991            }
16992
16993            pub struct rebuildEdgeIndex<'mock> {
16994                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
16995                    dyn ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> ::std::result::Result<
16996                        crate::types::AdminExecResp,
16997                        crate::errors::storage_admin_service::RebuildEdgeIndexError,
16998                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
16999                >>,
17000            }
17001
17002            #[allow(clippy::redundant_closure)]
17003            impl<'mock> rebuildEdgeIndex<'mock> {
17004                pub fn unimplemented() -> Self {
17005                    Self {
17006                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::RebuildIndexRequest| panic!(
17007                            "{}::{} is not mocked",
17008                            "StorageAdminService",
17009                            "rebuildEdgeIndex",
17010                        ))),
17011                    }
17012                }
17013
17014                pub fn ret(&self, value: crate::types::AdminExecResp) {
17015                    self.mock(move |_: crate::types::RebuildIndexRequest| value.clone());
17016                }
17017
17018                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17019                    let mut closure = self.closure.lock().unwrap();
17020                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17021                }
17022
17023                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::RebuildEdgeIndexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17024                    let mut closure = self.closure.lock().unwrap();
17025                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17026                }
17027
17028                pub fn throw<E>(&self, exception: E)
17029                where
17030                    E: ::std::convert::Into<crate::errors::storage_admin_service::RebuildEdgeIndexError>,
17031                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17032                {
17033                    let mut closure = self.closure.lock().unwrap();
17034                    *closure = ::std::boxed::Box::new(move |_: crate::types::RebuildIndexRequest| ::std::result::Result::Err(exception.clone().into()));
17035                }
17036            }
17037
17038            pub struct getLeaderParts<'mock> {
17039                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17040                    dyn ::std::ops::FnMut(crate::types::GetLeaderReq) -> ::std::result::Result<
17041                        crate::types::GetLeaderPartsResp,
17042                        crate::errors::storage_admin_service::GetLeaderPartsError,
17043                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17044                >>,
17045            }
17046
17047            #[allow(clippy::redundant_closure)]
17048            impl<'mock> getLeaderParts<'mock> {
17049                pub fn unimplemented() -> Self {
17050                    Self {
17051                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetLeaderReq| panic!(
17052                            "{}::{} is not mocked",
17053                            "StorageAdminService",
17054                            "getLeaderParts",
17055                        ))),
17056                    }
17057                }
17058
17059                pub fn ret(&self, value: crate::types::GetLeaderPartsResp) {
17060                    self.mock(move |_: crate::types::GetLeaderReq| value.clone());
17061                }
17062
17063                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetLeaderReq) -> crate::types::GetLeaderPartsResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17064                    let mut closure = self.closure.lock().unwrap();
17065                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17066                }
17067
17068                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetLeaderReq) -> ::std::result::Result<crate::types::GetLeaderPartsResp, crate::errors::storage_admin_service::GetLeaderPartsError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17069                    let mut closure = self.closure.lock().unwrap();
17070                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17071                }
17072
17073                pub fn throw<E>(&self, exception: E)
17074                where
17075                    E: ::std::convert::Into<crate::errors::storage_admin_service::GetLeaderPartsError>,
17076                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17077                {
17078                    let mut closure = self.closure.lock().unwrap();
17079                    *closure = ::std::boxed::Box::new(move |_: crate::types::GetLeaderReq| ::std::result::Result::Err(exception.clone().into()));
17080                }
17081            }
17082
17083            pub struct checkPeers<'mock> {
17084                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17085                    dyn ::std::ops::FnMut(crate::types::CheckPeersReq) -> ::std::result::Result<
17086                        crate::types::AdminExecResp,
17087                        crate::errors::storage_admin_service::CheckPeersError,
17088                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17089                >>,
17090            }
17091
17092            #[allow(clippy::redundant_closure)]
17093            impl<'mock> checkPeers<'mock> {
17094                pub fn unimplemented() -> Self {
17095                    Self {
17096                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::CheckPeersReq| panic!(
17097                            "{}::{} is not mocked",
17098                            "StorageAdminService",
17099                            "checkPeers",
17100                        ))),
17101                    }
17102                }
17103
17104                pub fn ret(&self, value: crate::types::AdminExecResp) {
17105                    self.mock(move |_: crate::types::CheckPeersReq| value.clone());
17106                }
17107
17108                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::CheckPeersReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17109                    let mut closure = self.closure.lock().unwrap();
17110                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17111                }
17112
17113                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::CheckPeersReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::CheckPeersError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17114                    let mut closure = self.closure.lock().unwrap();
17115                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17116                }
17117
17118                pub fn throw<E>(&self, exception: E)
17119                where
17120                    E: ::std::convert::Into<crate::errors::storage_admin_service::CheckPeersError>,
17121                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17122                {
17123                    let mut closure = self.closure.lock().unwrap();
17124                    *closure = ::std::boxed::Box::new(move |_: crate::types::CheckPeersReq| ::std::result::Result::Err(exception.clone().into()));
17125                }
17126            }
17127
17128            pub struct addAdminTask<'mock> {
17129                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17130                    dyn ::std::ops::FnMut(crate::types::AddAdminTaskRequest) -> ::std::result::Result<
17131                        crate::types::AdminExecResp,
17132                        crate::errors::storage_admin_service::AddAdminTaskError,
17133                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17134                >>,
17135            }
17136
17137            #[allow(clippy::redundant_closure)]
17138            impl<'mock> addAdminTask<'mock> {
17139                pub fn unimplemented() -> Self {
17140                    Self {
17141                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddAdminTaskRequest| panic!(
17142                            "{}::{} is not mocked",
17143                            "StorageAdminService",
17144                            "addAdminTask",
17145                        ))),
17146                    }
17147                }
17148
17149                pub fn ret(&self, value: crate::types::AdminExecResp) {
17150                    self.mock(move |_: crate::types::AddAdminTaskRequest| value.clone());
17151                }
17152
17153                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddAdminTaskRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17154                    let mut closure = self.closure.lock().unwrap();
17155                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17156                }
17157
17158                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddAdminTaskRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::AddAdminTaskError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17159                    let mut closure = self.closure.lock().unwrap();
17160                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17161                }
17162
17163                pub fn throw<E>(&self, exception: E)
17164                where
17165                    E: ::std::convert::Into<crate::errors::storage_admin_service::AddAdminTaskError>,
17166                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17167                {
17168                    let mut closure = self.closure.lock().unwrap();
17169                    *closure = ::std::boxed::Box::new(move |_: crate::types::AddAdminTaskRequest| ::std::result::Result::Err(exception.clone().into()));
17170                }
17171            }
17172
17173            pub struct stopAdminTask<'mock> {
17174                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17175                    dyn ::std::ops::FnMut(crate::types::StopAdminTaskRequest) -> ::std::result::Result<
17176                        crate::types::AdminExecResp,
17177                        crate::errors::storage_admin_service::StopAdminTaskError,
17178                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17179                >>,
17180            }
17181
17182            #[allow(clippy::redundant_closure)]
17183            impl<'mock> stopAdminTask<'mock> {
17184                pub fn unimplemented() -> Self {
17185                    Self {
17186                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::StopAdminTaskRequest| panic!(
17187                            "{}::{} is not mocked",
17188                            "StorageAdminService",
17189                            "stopAdminTask",
17190                        ))),
17191                    }
17192                }
17193
17194                pub fn ret(&self, value: crate::types::AdminExecResp) {
17195                    self.mock(move |_: crate::types::StopAdminTaskRequest| value.clone());
17196                }
17197
17198                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::StopAdminTaskRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17199                    let mut closure = self.closure.lock().unwrap();
17200                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17201                }
17202
17203                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::StopAdminTaskRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_admin_service::StopAdminTaskError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17204                    let mut closure = self.closure.lock().unwrap();
17205                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17206                }
17207
17208                pub fn throw<E>(&self, exception: E)
17209                where
17210                    E: ::std::convert::Into<crate::errors::storage_admin_service::StopAdminTaskError>,
17211                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17212                {
17213                    let mut closure = self.closure.lock().unwrap();
17214                    *closure = ::std::boxed::Box::new(move |_: crate::types::StopAdminTaskRequest| ::std::result::Result::Err(exception.clone().into()));
17215                }
17216            }
17217
17218            pub struct listClusterInfo<'mock> {
17219                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17220                    dyn ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> ::std::result::Result<
17221                        crate::types::ListClusterInfoResp,
17222                        crate::errors::storage_admin_service::ListClusterInfoError,
17223                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17224                >>,
17225            }
17226
17227            #[allow(clippy::redundant_closure)]
17228            impl<'mock> listClusterInfo<'mock> {
17229                pub fn unimplemented() -> Self {
17230                    Self {
17231                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ListClusterInfoReq| panic!(
17232                            "{}::{} is not mocked",
17233                            "StorageAdminService",
17234                            "listClusterInfo",
17235                        ))),
17236                    }
17237                }
17238
17239                pub fn ret(&self, value: crate::types::ListClusterInfoResp) {
17240                    self.mock(move |_: crate::types::ListClusterInfoReq| value.clone());
17241                }
17242
17243                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> crate::types::ListClusterInfoResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17244                    let mut closure = self.closure.lock().unwrap();
17245                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17246                }
17247
17248                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> ::std::result::Result<crate::types::ListClusterInfoResp, crate::errors::storage_admin_service::ListClusterInfoError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17249                    let mut closure = self.closure.lock().unwrap();
17250                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17251                }
17252
17253                pub fn throw<E>(&self, exception: E)
17254                where
17255                    E: ::std::convert::Into<crate::errors::storage_admin_service::ListClusterInfoError>,
17256                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17257                {
17258                    let mut closure = self.closure.lock().unwrap();
17259                    *closure = ::std::boxed::Box::new(move |_: crate::types::ListClusterInfoReq| ::std::result::Result::Err(exception.clone().into()));
17260                }
17261            }
17262        }
17263        pub mod general_storage_service {
17264
17265            pub struct get<'mock> {
17266                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17267                    dyn ::std::ops::FnMut(crate::types::KVGetRequest) -> ::std::result::Result<
17268                        crate::types::KVGetResponse,
17269                        crate::errors::general_storage_service::GetError,
17270                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17271                >>,
17272            }
17273
17274            #[allow(clippy::redundant_closure)]
17275            impl<'mock> get<'mock> {
17276                pub fn unimplemented() -> Self {
17277                    Self {
17278                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::KVGetRequest| panic!(
17279                            "{}::{} is not mocked",
17280                            "GeneralStorageService",
17281                            "get",
17282                        ))),
17283                    }
17284                }
17285
17286                pub fn ret(&self, value: crate::types::KVGetResponse) {
17287                    self.mock(move |_: crate::types::KVGetRequest| value.clone());
17288                }
17289
17290                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::KVGetRequest) -> crate::types::KVGetResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17291                    let mut closure = self.closure.lock().unwrap();
17292                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17293                }
17294
17295                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::KVGetRequest) -> ::std::result::Result<crate::types::KVGetResponse, crate::errors::general_storage_service::GetError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17296                    let mut closure = self.closure.lock().unwrap();
17297                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17298                }
17299
17300                pub fn throw<E>(&self, exception: E)
17301                where
17302                    E: ::std::convert::Into<crate::errors::general_storage_service::GetError>,
17303                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17304                {
17305                    let mut closure = self.closure.lock().unwrap();
17306                    *closure = ::std::boxed::Box::new(move |_: crate::types::KVGetRequest| ::std::result::Result::Err(exception.clone().into()));
17307                }
17308            }
17309
17310            pub struct put<'mock> {
17311                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17312                    dyn ::std::ops::FnMut(crate::types::KVPutRequest) -> ::std::result::Result<
17313                        crate::types::ExecResponse,
17314                        crate::errors::general_storage_service::PutError,
17315                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17316                >>,
17317            }
17318
17319            #[allow(clippy::redundant_closure)]
17320            impl<'mock> put<'mock> {
17321                pub fn unimplemented() -> Self {
17322                    Self {
17323                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::KVPutRequest| panic!(
17324                            "{}::{} is not mocked",
17325                            "GeneralStorageService",
17326                            "put",
17327                        ))),
17328                    }
17329                }
17330
17331                pub fn ret(&self, value: crate::types::ExecResponse) {
17332                    self.mock(move |_: crate::types::KVPutRequest| value.clone());
17333                }
17334
17335                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::KVPutRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17336                    let mut closure = self.closure.lock().unwrap();
17337                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17338                }
17339
17340                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::KVPutRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::PutError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17341                    let mut closure = self.closure.lock().unwrap();
17342                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17343                }
17344
17345                pub fn throw<E>(&self, exception: E)
17346                where
17347                    E: ::std::convert::Into<crate::errors::general_storage_service::PutError>,
17348                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17349                {
17350                    let mut closure = self.closure.lock().unwrap();
17351                    *closure = ::std::boxed::Box::new(move |_: crate::types::KVPutRequest| ::std::result::Result::Err(exception.clone().into()));
17352                }
17353            }
17354
17355            pub struct remove<'mock> {
17356                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17357                    dyn ::std::ops::FnMut(crate::types::KVRemoveRequest) -> ::std::result::Result<
17358                        crate::types::ExecResponse,
17359                        crate::errors::general_storage_service::RemoveError,
17360                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17361                >>,
17362            }
17363
17364            #[allow(clippy::redundant_closure)]
17365            impl<'mock> remove<'mock> {
17366                pub fn unimplemented() -> Self {
17367                    Self {
17368                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::KVRemoveRequest| panic!(
17369                            "{}::{} is not mocked",
17370                            "GeneralStorageService",
17371                            "remove",
17372                        ))),
17373                    }
17374                }
17375
17376                pub fn ret(&self, value: crate::types::ExecResponse) {
17377                    self.mock(move |_: crate::types::KVRemoveRequest| value.clone());
17378                }
17379
17380                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::KVRemoveRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17381                    let mut closure = self.closure.lock().unwrap();
17382                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17383                }
17384
17385                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::KVRemoveRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::general_storage_service::RemoveError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17386                    let mut closure = self.closure.lock().unwrap();
17387                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17388                }
17389
17390                pub fn throw<E>(&self, exception: E)
17391                where
17392                    E: ::std::convert::Into<crate::errors::general_storage_service::RemoveError>,
17393                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17394                {
17395                    let mut closure = self.closure.lock().unwrap();
17396                    *closure = ::std::boxed::Box::new(move |_: crate::types::KVRemoveRequest| ::std::result::Result::Err(exception.clone().into()));
17397                }
17398            }
17399        }
17400        pub mod internal_storage_service {
17401
17402            pub struct chainAddEdges<'mock> {
17403                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17404                    dyn ::std::ops::FnMut(crate::types::ChainAddEdgesRequest) -> ::std::result::Result<
17405                        crate::types::ExecResponse,
17406                        crate::errors::internal_storage_service::ChainAddEdgesError,
17407                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17408                >>,
17409            }
17410
17411            #[allow(clippy::redundant_closure)]
17412            impl<'mock> chainAddEdges<'mock> {
17413                pub fn unimplemented() -> Self {
17414                    Self {
17415                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ChainAddEdgesRequest| panic!(
17416                            "{}::{} is not mocked",
17417                            "InternalStorageService",
17418                            "chainAddEdges",
17419                        ))),
17420                    }
17421                }
17422
17423                pub fn ret(&self, value: crate::types::ExecResponse) {
17424                    self.mock(move |_: crate::types::ChainAddEdgesRequest| value.clone());
17425                }
17426
17427                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ChainAddEdgesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17428                    let mut closure = self.closure.lock().unwrap();
17429                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17430                }
17431
17432                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ChainAddEdgesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::internal_storage_service::ChainAddEdgesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17433                    let mut closure = self.closure.lock().unwrap();
17434                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17435                }
17436
17437                pub fn throw<E>(&self, exception: E)
17438                where
17439                    E: ::std::convert::Into<crate::errors::internal_storage_service::ChainAddEdgesError>,
17440                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17441                {
17442                    let mut closure = self.closure.lock().unwrap();
17443                    *closure = ::std::boxed::Box::new(move |_: crate::types::ChainAddEdgesRequest| ::std::result::Result::Err(exception.clone().into()));
17444                }
17445            }
17446
17447            pub struct chainUpdateEdge<'mock> {
17448                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
17449                    dyn ::std::ops::FnMut(crate::types::ChainUpdateEdgeRequest) -> ::std::result::Result<
17450                        crate::types::UpdateResponse,
17451                        crate::errors::internal_storage_service::ChainUpdateEdgeError,
17452                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
17453                >>,
17454            }
17455
17456            #[allow(clippy::redundant_closure)]
17457            impl<'mock> chainUpdateEdge<'mock> {
17458                pub fn unimplemented() -> Self {
17459                    Self {
17460                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ChainUpdateEdgeRequest| panic!(
17461                            "{}::{} is not mocked",
17462                            "InternalStorageService",
17463                            "chainUpdateEdge",
17464                        ))),
17465                    }
17466                }
17467
17468                pub fn ret(&self, value: crate::types::UpdateResponse) {
17469                    self.mock(move |_: crate::types::ChainUpdateEdgeRequest| value.clone());
17470                }
17471
17472                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ChainUpdateEdgeRequest) -> crate::types::UpdateResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17473                    let mut closure = self.closure.lock().unwrap();
17474                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
17475                }
17476
17477                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ChainUpdateEdgeRequest) -> ::std::result::Result<crate::types::UpdateResponse, crate::errors::internal_storage_service::ChainUpdateEdgeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
17478                    let mut closure = self.closure.lock().unwrap();
17479                    *closure = ::std::boxed::Box::new(move |req| mock(req));
17480                }
17481
17482                pub fn throw<E>(&self, exception: E)
17483                where
17484                    E: ::std::convert::Into<crate::errors::internal_storage_service::ChainUpdateEdgeError>,
17485                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
17486                {
17487                    let mut closure = self.closure.lock().unwrap();
17488                    *closure = ::std::boxed::Box::new(move |_: crate::types::ChainUpdateEdgeRequest| ::std::result::Result::Err(exception.clone().into()));
17489                }
17490            }
17491        }
17492    }
17493}
17494
17495/// Error return types.
17496pub mod errors {
17497    /// Errors for GraphStorageService functions.
17498    pub mod graph_storage_service {
17499
17500        pub type GetNeighborsError = ::fbthrift::NonthrowingFunctionError;
17501
17502        impl ::std::convert::From<crate::services::graph_storage_service::GetNeighborsExn> for
17503            ::std::result::Result<crate::types::GetNeighborsResponse, GetNeighborsError>
17504        {
17505            fn from(e: crate::services::graph_storage_service::GetNeighborsExn) -> Self {
17506                match e {
17507                    crate::services::graph_storage_service::GetNeighborsExn::Success(res) => {
17508                        ::std::result::Result::Ok(res)
17509                    }
17510                    crate::services::graph_storage_service::GetNeighborsExn::ApplicationException(aexn) =>
17511                        ::std::result::Result::Err(GetNeighborsError::ApplicationException(aexn)),
17512                }
17513            }
17514        }
17515
17516        pub type GetPropsError = ::fbthrift::NonthrowingFunctionError;
17517
17518        impl ::std::convert::From<crate::services::graph_storage_service::GetPropsExn> for
17519            ::std::result::Result<crate::types::GetPropResponse, GetPropsError>
17520        {
17521            fn from(e: crate::services::graph_storage_service::GetPropsExn) -> Self {
17522                match e {
17523                    crate::services::graph_storage_service::GetPropsExn::Success(res) => {
17524                        ::std::result::Result::Ok(res)
17525                    }
17526                    crate::services::graph_storage_service::GetPropsExn::ApplicationException(aexn) =>
17527                        ::std::result::Result::Err(GetPropsError::ApplicationException(aexn)),
17528                }
17529            }
17530        }
17531
17532        pub type AddVerticesError = ::fbthrift::NonthrowingFunctionError;
17533
17534        impl ::std::convert::From<crate::services::graph_storage_service::AddVerticesExn> for
17535            ::std::result::Result<crate::types::ExecResponse, AddVerticesError>
17536        {
17537            fn from(e: crate::services::graph_storage_service::AddVerticesExn) -> Self {
17538                match e {
17539                    crate::services::graph_storage_service::AddVerticesExn::Success(res) => {
17540                        ::std::result::Result::Ok(res)
17541                    }
17542                    crate::services::graph_storage_service::AddVerticesExn::ApplicationException(aexn) =>
17543                        ::std::result::Result::Err(AddVerticesError::ApplicationException(aexn)),
17544                }
17545            }
17546        }
17547
17548        pub type AddEdgesError = ::fbthrift::NonthrowingFunctionError;
17549
17550        impl ::std::convert::From<crate::services::graph_storage_service::AddEdgesExn> for
17551            ::std::result::Result<crate::types::ExecResponse, AddEdgesError>
17552        {
17553            fn from(e: crate::services::graph_storage_service::AddEdgesExn) -> Self {
17554                match e {
17555                    crate::services::graph_storage_service::AddEdgesExn::Success(res) => {
17556                        ::std::result::Result::Ok(res)
17557                    }
17558                    crate::services::graph_storage_service::AddEdgesExn::ApplicationException(aexn) =>
17559                        ::std::result::Result::Err(AddEdgesError::ApplicationException(aexn)),
17560                }
17561            }
17562        }
17563
17564        pub type DeleteEdgesError = ::fbthrift::NonthrowingFunctionError;
17565
17566        impl ::std::convert::From<crate::services::graph_storage_service::DeleteEdgesExn> for
17567            ::std::result::Result<crate::types::ExecResponse, DeleteEdgesError>
17568        {
17569            fn from(e: crate::services::graph_storage_service::DeleteEdgesExn) -> Self {
17570                match e {
17571                    crate::services::graph_storage_service::DeleteEdgesExn::Success(res) => {
17572                        ::std::result::Result::Ok(res)
17573                    }
17574                    crate::services::graph_storage_service::DeleteEdgesExn::ApplicationException(aexn) =>
17575                        ::std::result::Result::Err(DeleteEdgesError::ApplicationException(aexn)),
17576                }
17577            }
17578        }
17579
17580        pub type DeleteVerticesError = ::fbthrift::NonthrowingFunctionError;
17581
17582        impl ::std::convert::From<crate::services::graph_storage_service::DeleteVerticesExn> for
17583            ::std::result::Result<crate::types::ExecResponse, DeleteVerticesError>
17584        {
17585            fn from(e: crate::services::graph_storage_service::DeleteVerticesExn) -> Self {
17586                match e {
17587                    crate::services::graph_storage_service::DeleteVerticesExn::Success(res) => {
17588                        ::std::result::Result::Ok(res)
17589                    }
17590                    crate::services::graph_storage_service::DeleteVerticesExn::ApplicationException(aexn) =>
17591                        ::std::result::Result::Err(DeleteVerticesError::ApplicationException(aexn)),
17592                }
17593            }
17594        }
17595
17596        pub type DeleteTagsError = ::fbthrift::NonthrowingFunctionError;
17597
17598        impl ::std::convert::From<crate::services::graph_storage_service::DeleteTagsExn> for
17599            ::std::result::Result<crate::types::ExecResponse, DeleteTagsError>
17600        {
17601            fn from(e: crate::services::graph_storage_service::DeleteTagsExn) -> Self {
17602                match e {
17603                    crate::services::graph_storage_service::DeleteTagsExn::Success(res) => {
17604                        ::std::result::Result::Ok(res)
17605                    }
17606                    crate::services::graph_storage_service::DeleteTagsExn::ApplicationException(aexn) =>
17607                        ::std::result::Result::Err(DeleteTagsError::ApplicationException(aexn)),
17608                }
17609            }
17610        }
17611
17612        pub type UpdateVertexError = ::fbthrift::NonthrowingFunctionError;
17613
17614        impl ::std::convert::From<crate::services::graph_storage_service::UpdateVertexExn> for
17615            ::std::result::Result<crate::types::UpdateResponse, UpdateVertexError>
17616        {
17617            fn from(e: crate::services::graph_storage_service::UpdateVertexExn) -> Self {
17618                match e {
17619                    crate::services::graph_storage_service::UpdateVertexExn::Success(res) => {
17620                        ::std::result::Result::Ok(res)
17621                    }
17622                    crate::services::graph_storage_service::UpdateVertexExn::ApplicationException(aexn) =>
17623                        ::std::result::Result::Err(UpdateVertexError::ApplicationException(aexn)),
17624                }
17625            }
17626        }
17627
17628        pub type UpdateEdgeError = ::fbthrift::NonthrowingFunctionError;
17629
17630        impl ::std::convert::From<crate::services::graph_storage_service::UpdateEdgeExn> for
17631            ::std::result::Result<crate::types::UpdateResponse, UpdateEdgeError>
17632        {
17633            fn from(e: crate::services::graph_storage_service::UpdateEdgeExn) -> Self {
17634                match e {
17635                    crate::services::graph_storage_service::UpdateEdgeExn::Success(res) => {
17636                        ::std::result::Result::Ok(res)
17637                    }
17638                    crate::services::graph_storage_service::UpdateEdgeExn::ApplicationException(aexn) =>
17639                        ::std::result::Result::Err(UpdateEdgeError::ApplicationException(aexn)),
17640                }
17641            }
17642        }
17643
17644        pub type ScanVertexError = ::fbthrift::NonthrowingFunctionError;
17645
17646        impl ::std::convert::From<crate::services::graph_storage_service::ScanVertexExn> for
17647            ::std::result::Result<crate::types::ScanVertexResponse, ScanVertexError>
17648        {
17649            fn from(e: crate::services::graph_storage_service::ScanVertexExn) -> Self {
17650                match e {
17651                    crate::services::graph_storage_service::ScanVertexExn::Success(res) => {
17652                        ::std::result::Result::Ok(res)
17653                    }
17654                    crate::services::graph_storage_service::ScanVertexExn::ApplicationException(aexn) =>
17655                        ::std::result::Result::Err(ScanVertexError::ApplicationException(aexn)),
17656                }
17657            }
17658        }
17659
17660        pub type ScanEdgeError = ::fbthrift::NonthrowingFunctionError;
17661
17662        impl ::std::convert::From<crate::services::graph_storage_service::ScanEdgeExn> for
17663            ::std::result::Result<crate::types::ScanEdgeResponse, ScanEdgeError>
17664        {
17665            fn from(e: crate::services::graph_storage_service::ScanEdgeExn) -> Self {
17666                match e {
17667                    crate::services::graph_storage_service::ScanEdgeExn::Success(res) => {
17668                        ::std::result::Result::Ok(res)
17669                    }
17670                    crate::services::graph_storage_service::ScanEdgeExn::ApplicationException(aexn) =>
17671                        ::std::result::Result::Err(ScanEdgeError::ApplicationException(aexn)),
17672                }
17673            }
17674        }
17675
17676        pub type GetUUIDError = ::fbthrift::NonthrowingFunctionError;
17677
17678        impl ::std::convert::From<crate::services::graph_storage_service::GetUUIDExn> for
17679            ::std::result::Result<crate::types::GetUUIDResp, GetUUIDError>
17680        {
17681            fn from(e: crate::services::graph_storage_service::GetUUIDExn) -> Self {
17682                match e {
17683                    crate::services::graph_storage_service::GetUUIDExn::Success(res) => {
17684                        ::std::result::Result::Ok(res)
17685                    }
17686                    crate::services::graph_storage_service::GetUUIDExn::ApplicationException(aexn) =>
17687                        ::std::result::Result::Err(GetUUIDError::ApplicationException(aexn)),
17688                }
17689            }
17690        }
17691
17692        pub type LookupIndexError = ::fbthrift::NonthrowingFunctionError;
17693
17694        impl ::std::convert::From<crate::services::graph_storage_service::LookupIndexExn> for
17695            ::std::result::Result<crate::types::LookupIndexResp, LookupIndexError>
17696        {
17697            fn from(e: crate::services::graph_storage_service::LookupIndexExn) -> Self {
17698                match e {
17699                    crate::services::graph_storage_service::LookupIndexExn::Success(res) => {
17700                        ::std::result::Result::Ok(res)
17701                    }
17702                    crate::services::graph_storage_service::LookupIndexExn::ApplicationException(aexn) =>
17703                        ::std::result::Result::Err(LookupIndexError::ApplicationException(aexn)),
17704                }
17705            }
17706        }
17707
17708        pub type LookupAndTraverseError = ::fbthrift::NonthrowingFunctionError;
17709
17710        impl ::std::convert::From<crate::services::graph_storage_service::LookupAndTraverseExn> for
17711            ::std::result::Result<crate::types::GetNeighborsResponse, LookupAndTraverseError>
17712        {
17713            fn from(e: crate::services::graph_storage_service::LookupAndTraverseExn) -> Self {
17714                match e {
17715                    crate::services::graph_storage_service::LookupAndTraverseExn::Success(res) => {
17716                        ::std::result::Result::Ok(res)
17717                    }
17718                    crate::services::graph_storage_service::LookupAndTraverseExn::ApplicationException(aexn) =>
17719                        ::std::result::Result::Err(LookupAndTraverseError::ApplicationException(aexn)),
17720                }
17721            }
17722        }
17723
17724        pub type ChainUpdateEdgeError = ::fbthrift::NonthrowingFunctionError;
17725
17726        impl ::std::convert::From<crate::services::graph_storage_service::ChainUpdateEdgeExn> for
17727            ::std::result::Result<crate::types::UpdateResponse, ChainUpdateEdgeError>
17728        {
17729            fn from(e: crate::services::graph_storage_service::ChainUpdateEdgeExn) -> Self {
17730                match e {
17731                    crate::services::graph_storage_service::ChainUpdateEdgeExn::Success(res) => {
17732                        ::std::result::Result::Ok(res)
17733                    }
17734                    crate::services::graph_storage_service::ChainUpdateEdgeExn::ApplicationException(aexn) =>
17735                        ::std::result::Result::Err(ChainUpdateEdgeError::ApplicationException(aexn)),
17736                }
17737            }
17738        }
17739
17740        pub type ChainAddEdgesError = ::fbthrift::NonthrowingFunctionError;
17741
17742        impl ::std::convert::From<crate::services::graph_storage_service::ChainAddEdgesExn> for
17743            ::std::result::Result<crate::types::ExecResponse, ChainAddEdgesError>
17744        {
17745            fn from(e: crate::services::graph_storage_service::ChainAddEdgesExn) -> Self {
17746                match e {
17747                    crate::services::graph_storage_service::ChainAddEdgesExn::Success(res) => {
17748                        ::std::result::Result::Ok(res)
17749                    }
17750                    crate::services::graph_storage_service::ChainAddEdgesExn::ApplicationException(aexn) =>
17751                        ::std::result::Result::Err(ChainAddEdgesError::ApplicationException(aexn)),
17752                }
17753            }
17754        }
17755
17756    }
17757
17758    /// Errors for StorageAdminService functions.
17759    pub mod storage_admin_service {
17760
17761        pub type TransLeaderError = ::fbthrift::NonthrowingFunctionError;
17762
17763        impl ::std::convert::From<crate::services::storage_admin_service::TransLeaderExn> for
17764            ::std::result::Result<crate::types::AdminExecResp, TransLeaderError>
17765        {
17766            fn from(e: crate::services::storage_admin_service::TransLeaderExn) -> Self {
17767                match e {
17768                    crate::services::storage_admin_service::TransLeaderExn::Success(res) => {
17769                        ::std::result::Result::Ok(res)
17770                    }
17771                    crate::services::storage_admin_service::TransLeaderExn::ApplicationException(aexn) =>
17772                        ::std::result::Result::Err(TransLeaderError::ApplicationException(aexn)),
17773                }
17774            }
17775        }
17776
17777        pub type AddPartError = ::fbthrift::NonthrowingFunctionError;
17778
17779        impl ::std::convert::From<crate::services::storage_admin_service::AddPartExn> for
17780            ::std::result::Result<crate::types::AdminExecResp, AddPartError>
17781        {
17782            fn from(e: crate::services::storage_admin_service::AddPartExn) -> Self {
17783                match e {
17784                    crate::services::storage_admin_service::AddPartExn::Success(res) => {
17785                        ::std::result::Result::Ok(res)
17786                    }
17787                    crate::services::storage_admin_service::AddPartExn::ApplicationException(aexn) =>
17788                        ::std::result::Result::Err(AddPartError::ApplicationException(aexn)),
17789                }
17790            }
17791        }
17792
17793        pub type AddLearnerError = ::fbthrift::NonthrowingFunctionError;
17794
17795        impl ::std::convert::From<crate::services::storage_admin_service::AddLearnerExn> for
17796            ::std::result::Result<crate::types::AdminExecResp, AddLearnerError>
17797        {
17798            fn from(e: crate::services::storage_admin_service::AddLearnerExn) -> Self {
17799                match e {
17800                    crate::services::storage_admin_service::AddLearnerExn::Success(res) => {
17801                        ::std::result::Result::Ok(res)
17802                    }
17803                    crate::services::storage_admin_service::AddLearnerExn::ApplicationException(aexn) =>
17804                        ::std::result::Result::Err(AddLearnerError::ApplicationException(aexn)),
17805                }
17806            }
17807        }
17808
17809        pub type RemovePartError = ::fbthrift::NonthrowingFunctionError;
17810
17811        impl ::std::convert::From<crate::services::storage_admin_service::RemovePartExn> for
17812            ::std::result::Result<crate::types::AdminExecResp, RemovePartError>
17813        {
17814            fn from(e: crate::services::storage_admin_service::RemovePartExn) -> Self {
17815                match e {
17816                    crate::services::storage_admin_service::RemovePartExn::Success(res) => {
17817                        ::std::result::Result::Ok(res)
17818                    }
17819                    crate::services::storage_admin_service::RemovePartExn::ApplicationException(aexn) =>
17820                        ::std::result::Result::Err(RemovePartError::ApplicationException(aexn)),
17821                }
17822            }
17823        }
17824
17825        pub type MemberChangeError = ::fbthrift::NonthrowingFunctionError;
17826
17827        impl ::std::convert::From<crate::services::storage_admin_service::MemberChangeExn> for
17828            ::std::result::Result<crate::types::AdminExecResp, MemberChangeError>
17829        {
17830            fn from(e: crate::services::storage_admin_service::MemberChangeExn) -> Self {
17831                match e {
17832                    crate::services::storage_admin_service::MemberChangeExn::Success(res) => {
17833                        ::std::result::Result::Ok(res)
17834                    }
17835                    crate::services::storage_admin_service::MemberChangeExn::ApplicationException(aexn) =>
17836                        ::std::result::Result::Err(MemberChangeError::ApplicationException(aexn)),
17837                }
17838            }
17839        }
17840
17841        pub type WaitingForCatchUpDataError = ::fbthrift::NonthrowingFunctionError;
17842
17843        impl ::std::convert::From<crate::services::storage_admin_service::WaitingForCatchUpDataExn> for
17844            ::std::result::Result<crate::types::AdminExecResp, WaitingForCatchUpDataError>
17845        {
17846            fn from(e: crate::services::storage_admin_service::WaitingForCatchUpDataExn) -> Self {
17847                match e {
17848                    crate::services::storage_admin_service::WaitingForCatchUpDataExn::Success(res) => {
17849                        ::std::result::Result::Ok(res)
17850                    }
17851                    crate::services::storage_admin_service::WaitingForCatchUpDataExn::ApplicationException(aexn) =>
17852                        ::std::result::Result::Err(WaitingForCatchUpDataError::ApplicationException(aexn)),
17853                }
17854            }
17855        }
17856
17857        pub type CreateCheckpointError = ::fbthrift::NonthrowingFunctionError;
17858
17859        impl ::std::convert::From<crate::services::storage_admin_service::CreateCheckpointExn> for
17860            ::std::result::Result<crate::types::CreateCPResp, CreateCheckpointError>
17861        {
17862            fn from(e: crate::services::storage_admin_service::CreateCheckpointExn) -> Self {
17863                match e {
17864                    crate::services::storage_admin_service::CreateCheckpointExn::Success(res) => {
17865                        ::std::result::Result::Ok(res)
17866                    }
17867                    crate::services::storage_admin_service::CreateCheckpointExn::ApplicationException(aexn) =>
17868                        ::std::result::Result::Err(CreateCheckpointError::ApplicationException(aexn)),
17869                }
17870            }
17871        }
17872
17873        pub type DropCheckpointError = ::fbthrift::NonthrowingFunctionError;
17874
17875        impl ::std::convert::From<crate::services::storage_admin_service::DropCheckpointExn> for
17876            ::std::result::Result<crate::types::AdminExecResp, DropCheckpointError>
17877        {
17878            fn from(e: crate::services::storage_admin_service::DropCheckpointExn) -> Self {
17879                match e {
17880                    crate::services::storage_admin_service::DropCheckpointExn::Success(res) => {
17881                        ::std::result::Result::Ok(res)
17882                    }
17883                    crate::services::storage_admin_service::DropCheckpointExn::ApplicationException(aexn) =>
17884                        ::std::result::Result::Err(DropCheckpointError::ApplicationException(aexn)),
17885                }
17886            }
17887        }
17888
17889        pub type BlockingWritesError = ::fbthrift::NonthrowingFunctionError;
17890
17891        impl ::std::convert::From<crate::services::storage_admin_service::BlockingWritesExn> for
17892            ::std::result::Result<crate::types::AdminExecResp, BlockingWritesError>
17893        {
17894            fn from(e: crate::services::storage_admin_service::BlockingWritesExn) -> Self {
17895                match e {
17896                    crate::services::storage_admin_service::BlockingWritesExn::Success(res) => {
17897                        ::std::result::Result::Ok(res)
17898                    }
17899                    crate::services::storage_admin_service::BlockingWritesExn::ApplicationException(aexn) =>
17900                        ::std::result::Result::Err(BlockingWritesError::ApplicationException(aexn)),
17901                }
17902            }
17903        }
17904
17905        pub type RebuildTagIndexError = ::fbthrift::NonthrowingFunctionError;
17906
17907        impl ::std::convert::From<crate::services::storage_admin_service::RebuildTagIndexExn> for
17908            ::std::result::Result<crate::types::AdminExecResp, RebuildTagIndexError>
17909        {
17910            fn from(e: crate::services::storage_admin_service::RebuildTagIndexExn) -> Self {
17911                match e {
17912                    crate::services::storage_admin_service::RebuildTagIndexExn::Success(res) => {
17913                        ::std::result::Result::Ok(res)
17914                    }
17915                    crate::services::storage_admin_service::RebuildTagIndexExn::ApplicationException(aexn) =>
17916                        ::std::result::Result::Err(RebuildTagIndexError::ApplicationException(aexn)),
17917                }
17918            }
17919        }
17920
17921        pub type RebuildEdgeIndexError = ::fbthrift::NonthrowingFunctionError;
17922
17923        impl ::std::convert::From<crate::services::storage_admin_service::RebuildEdgeIndexExn> for
17924            ::std::result::Result<crate::types::AdminExecResp, RebuildEdgeIndexError>
17925        {
17926            fn from(e: crate::services::storage_admin_service::RebuildEdgeIndexExn) -> Self {
17927                match e {
17928                    crate::services::storage_admin_service::RebuildEdgeIndexExn::Success(res) => {
17929                        ::std::result::Result::Ok(res)
17930                    }
17931                    crate::services::storage_admin_service::RebuildEdgeIndexExn::ApplicationException(aexn) =>
17932                        ::std::result::Result::Err(RebuildEdgeIndexError::ApplicationException(aexn)),
17933                }
17934            }
17935        }
17936
17937        pub type GetLeaderPartsError = ::fbthrift::NonthrowingFunctionError;
17938
17939        impl ::std::convert::From<crate::services::storage_admin_service::GetLeaderPartsExn> for
17940            ::std::result::Result<crate::types::GetLeaderPartsResp, GetLeaderPartsError>
17941        {
17942            fn from(e: crate::services::storage_admin_service::GetLeaderPartsExn) -> Self {
17943                match e {
17944                    crate::services::storage_admin_service::GetLeaderPartsExn::Success(res) => {
17945                        ::std::result::Result::Ok(res)
17946                    }
17947                    crate::services::storage_admin_service::GetLeaderPartsExn::ApplicationException(aexn) =>
17948                        ::std::result::Result::Err(GetLeaderPartsError::ApplicationException(aexn)),
17949                }
17950            }
17951        }
17952
17953        pub type CheckPeersError = ::fbthrift::NonthrowingFunctionError;
17954
17955        impl ::std::convert::From<crate::services::storage_admin_service::CheckPeersExn> for
17956            ::std::result::Result<crate::types::AdminExecResp, CheckPeersError>
17957        {
17958            fn from(e: crate::services::storage_admin_service::CheckPeersExn) -> Self {
17959                match e {
17960                    crate::services::storage_admin_service::CheckPeersExn::Success(res) => {
17961                        ::std::result::Result::Ok(res)
17962                    }
17963                    crate::services::storage_admin_service::CheckPeersExn::ApplicationException(aexn) =>
17964                        ::std::result::Result::Err(CheckPeersError::ApplicationException(aexn)),
17965                }
17966            }
17967        }
17968
17969        pub type AddAdminTaskError = ::fbthrift::NonthrowingFunctionError;
17970
17971        impl ::std::convert::From<crate::services::storage_admin_service::AddAdminTaskExn> for
17972            ::std::result::Result<crate::types::AdminExecResp, AddAdminTaskError>
17973        {
17974            fn from(e: crate::services::storage_admin_service::AddAdminTaskExn) -> Self {
17975                match e {
17976                    crate::services::storage_admin_service::AddAdminTaskExn::Success(res) => {
17977                        ::std::result::Result::Ok(res)
17978                    }
17979                    crate::services::storage_admin_service::AddAdminTaskExn::ApplicationException(aexn) =>
17980                        ::std::result::Result::Err(AddAdminTaskError::ApplicationException(aexn)),
17981                }
17982            }
17983        }
17984
17985        pub type StopAdminTaskError = ::fbthrift::NonthrowingFunctionError;
17986
17987        impl ::std::convert::From<crate::services::storage_admin_service::StopAdminTaskExn> for
17988            ::std::result::Result<crate::types::AdminExecResp, StopAdminTaskError>
17989        {
17990            fn from(e: crate::services::storage_admin_service::StopAdminTaskExn) -> Self {
17991                match e {
17992                    crate::services::storage_admin_service::StopAdminTaskExn::Success(res) => {
17993                        ::std::result::Result::Ok(res)
17994                    }
17995                    crate::services::storage_admin_service::StopAdminTaskExn::ApplicationException(aexn) =>
17996                        ::std::result::Result::Err(StopAdminTaskError::ApplicationException(aexn)),
17997                }
17998            }
17999        }
18000
18001        pub type ListClusterInfoError = ::fbthrift::NonthrowingFunctionError;
18002
18003        impl ::std::convert::From<crate::services::storage_admin_service::ListClusterInfoExn> for
18004            ::std::result::Result<crate::types::ListClusterInfoResp, ListClusterInfoError>
18005        {
18006            fn from(e: crate::services::storage_admin_service::ListClusterInfoExn) -> Self {
18007                match e {
18008                    crate::services::storage_admin_service::ListClusterInfoExn::Success(res) => {
18009                        ::std::result::Result::Ok(res)
18010                    }
18011                    crate::services::storage_admin_service::ListClusterInfoExn::ApplicationException(aexn) =>
18012                        ::std::result::Result::Err(ListClusterInfoError::ApplicationException(aexn)),
18013                }
18014            }
18015        }
18016
18017    }
18018
18019    /// Errors for GeneralStorageService functions.
18020    pub mod general_storage_service {
18021
18022        pub type GetError = ::fbthrift::NonthrowingFunctionError;
18023
18024        impl ::std::convert::From<crate::services::general_storage_service::GetExn> for
18025            ::std::result::Result<crate::types::KVGetResponse, GetError>
18026        {
18027            fn from(e: crate::services::general_storage_service::GetExn) -> Self {
18028                match e {
18029                    crate::services::general_storage_service::GetExn::Success(res) => {
18030                        ::std::result::Result::Ok(res)
18031                    }
18032                    crate::services::general_storage_service::GetExn::ApplicationException(aexn) =>
18033                        ::std::result::Result::Err(GetError::ApplicationException(aexn)),
18034                }
18035            }
18036        }
18037
18038        pub type PutError = ::fbthrift::NonthrowingFunctionError;
18039
18040        impl ::std::convert::From<crate::services::general_storage_service::PutExn> for
18041            ::std::result::Result<crate::types::ExecResponse, PutError>
18042        {
18043            fn from(e: crate::services::general_storage_service::PutExn) -> Self {
18044                match e {
18045                    crate::services::general_storage_service::PutExn::Success(res) => {
18046                        ::std::result::Result::Ok(res)
18047                    }
18048                    crate::services::general_storage_service::PutExn::ApplicationException(aexn) =>
18049                        ::std::result::Result::Err(PutError::ApplicationException(aexn)),
18050                }
18051            }
18052        }
18053
18054        pub type RemoveError = ::fbthrift::NonthrowingFunctionError;
18055
18056        impl ::std::convert::From<crate::services::general_storage_service::RemoveExn> for
18057            ::std::result::Result<crate::types::ExecResponse, RemoveError>
18058        {
18059            fn from(e: crate::services::general_storage_service::RemoveExn) -> Self {
18060                match e {
18061                    crate::services::general_storage_service::RemoveExn::Success(res) => {
18062                        ::std::result::Result::Ok(res)
18063                    }
18064                    crate::services::general_storage_service::RemoveExn::ApplicationException(aexn) =>
18065                        ::std::result::Result::Err(RemoveError::ApplicationException(aexn)),
18066                }
18067            }
18068        }
18069
18070    }
18071
18072    /// Errors for InternalStorageService functions.
18073    pub mod internal_storage_service {
18074
18075        pub type ChainAddEdgesError = ::fbthrift::NonthrowingFunctionError;
18076
18077        impl ::std::convert::From<crate::services::internal_storage_service::ChainAddEdgesExn> for
18078            ::std::result::Result<crate::types::ExecResponse, ChainAddEdgesError>
18079        {
18080            fn from(e: crate::services::internal_storage_service::ChainAddEdgesExn) -> Self {
18081                match e {
18082                    crate::services::internal_storage_service::ChainAddEdgesExn::Success(res) => {
18083                        ::std::result::Result::Ok(res)
18084                    }
18085                    crate::services::internal_storage_service::ChainAddEdgesExn::ApplicationException(aexn) =>
18086                        ::std::result::Result::Err(ChainAddEdgesError::ApplicationException(aexn)),
18087                }
18088            }
18089        }
18090
18091        pub type ChainUpdateEdgeError = ::fbthrift::NonthrowingFunctionError;
18092
18093        impl ::std::convert::From<crate::services::internal_storage_service::ChainUpdateEdgeExn> for
18094            ::std::result::Result<crate::types::UpdateResponse, ChainUpdateEdgeError>
18095        {
18096            fn from(e: crate::services::internal_storage_service::ChainUpdateEdgeExn) -> Self {
18097                match e {
18098                    crate::services::internal_storage_service::ChainUpdateEdgeExn::Success(res) => {
18099                        ::std::result::Result::Ok(res)
18100                    }
18101                    crate::services::internal_storage_service::ChainUpdateEdgeExn::ApplicationException(aexn) =>
18102                        ::std::result::Result::Err(ChainUpdateEdgeError::ApplicationException(aexn)),
18103                }
18104            }
18105        }
18106
18107    }
18108
18109}