1#![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}
17
18pub mod services {
19 pub mod storage_service {
20 #[derive(Clone, Debug)]
21 pub enum GetBoundExn {
22 #[doc(hidden)]
23 Success(crate::types::QueryResponse),
24 ApplicationException(::fbthrift::ApplicationException),
25 }
26
27 impl ::std::convert::From<crate::errors::storage_service::GetBoundError> for GetBoundExn {
28 fn from(err: crate::errors::storage_service::GetBoundError) -> Self {
29 match err {
30 crate::errors::storage_service::GetBoundError::ApplicationException(aexn) => GetBoundExn::ApplicationException(aexn),
31 crate::errors::storage_service::GetBoundError::ThriftError(err) => GetBoundExn::ApplicationException(::fbthrift::ApplicationException {
32 message: err.to_string(),
33 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
34 }),
35 }
36 }
37 }
38
39 impl ::std::convert::From<::fbthrift::ApplicationException> for GetBoundExn {
40 fn from(exn: ::fbthrift::ApplicationException) -> Self {
41 Self::ApplicationException(exn)
42 }
43 }
44
45 impl ::fbthrift::ExceptionInfo for GetBoundExn {
46 fn exn_name(&self) -> &'static str {
47 match self {
48 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
49 Self::ApplicationException(aexn) => aexn.exn_name(),
50 }
51 }
52
53 fn exn_value(&self) -> String {
54 match self {
55 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
56 Self::ApplicationException(aexn) => aexn.exn_value(),
57 }
58 }
59
60 fn exn_is_declared(&self) -> bool {
61 match self {
62 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
63 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
64 }
65 }
66 }
67
68 impl ::fbthrift::ResultInfo for GetBoundExn {
69 fn result_type(&self) -> ::fbthrift::ResultType {
70 match self {
71 Self::Success(_) => ::fbthrift::ResultType::Return,
72 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
73 }
74 }
75 }
76
77 impl ::fbthrift::GetTType for GetBoundExn {
78 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
79 }
80
81 impl<P> ::fbthrift::Serialize<P> for GetBoundExn
82 where
83 P: ::fbthrift::ProtocolWriter,
84 {
85 fn write(&self, p: &mut P) {
86 if let Self::ApplicationException(aexn) = self {
87 return aexn.write(p);
88 }
89 p.write_struct_begin("GetBound");
90 match self {
91 Self::Success(inner) => {
92 p.write_field_begin(
93 "Success",
94 ::fbthrift::TType::Struct,
95 0i16,
96 );
97 inner.write(p);
98 p.write_field_end();
99 }
100 Self::ApplicationException(_aexn) => unreachable!(),
101 }
102 p.write_field_stop();
103 p.write_struct_end();
104 }
105 }
106
107 impl<P> ::fbthrift::Deserialize<P> for GetBoundExn
108 where
109 P: ::fbthrift::ProtocolReader,
110 {
111 fn read(p: &mut P) -> ::anyhow::Result<Self> {
112 static RETURNS: &[::fbthrift::Field] = &[
113 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
114 ];
115 let _ = p.read_struct_begin(|_| ())?;
116 let mut once = false;
117 let mut alt = ::std::option::Option::None;
118 loop {
119 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
120 match ((fty, fid as ::std::primitive::i32), once) {
121 ((::fbthrift::TType::Stop, _), _) => {
122 p.read_field_end()?;
123 break;
124 }
125 ((::fbthrift::TType::Struct, 0i32), false) => {
126 once = true;
127 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
128 }
129 ((ty, _id), false) => p.skip(ty)?,
130 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
131 ::fbthrift::ApplicationException::new(
132 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
133 format!(
134 "unwanted extra union {} field ty {:?} id {}",
135 "GetBoundExn",
136 badty,
137 badid,
138 ),
139 )
140 )),
141 }
142 p.read_field_end()?;
143 }
144 p.read_struct_end()?;
145 alt.ok_or_else(||
146 ::fbthrift::ApplicationException::new(
147 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
148 format!("Empty union {}", "GetBoundExn"),
149 )
150 .into(),
151 )
152 }
153 }
154
155 #[derive(Clone, Debug)]
156 pub enum BoundStatsExn {
157 #[doc(hidden)]
158 Success(crate::types::QueryStatsResponse),
159 ApplicationException(::fbthrift::ApplicationException),
160 }
161
162 impl ::std::convert::From<crate::errors::storage_service::BoundStatsError> for BoundStatsExn {
163 fn from(err: crate::errors::storage_service::BoundStatsError) -> Self {
164 match err {
165 crate::errors::storage_service::BoundStatsError::ApplicationException(aexn) => BoundStatsExn::ApplicationException(aexn),
166 crate::errors::storage_service::BoundStatsError::ThriftError(err) => BoundStatsExn::ApplicationException(::fbthrift::ApplicationException {
167 message: err.to_string(),
168 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
169 }),
170 }
171 }
172 }
173
174 impl ::std::convert::From<::fbthrift::ApplicationException> for BoundStatsExn {
175 fn from(exn: ::fbthrift::ApplicationException) -> Self {
176 Self::ApplicationException(exn)
177 }
178 }
179
180 impl ::fbthrift::ExceptionInfo for BoundStatsExn {
181 fn exn_name(&self) -> &'static str {
182 match self {
183 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
184 Self::ApplicationException(aexn) => aexn.exn_name(),
185 }
186 }
187
188 fn exn_value(&self) -> String {
189 match self {
190 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
191 Self::ApplicationException(aexn) => aexn.exn_value(),
192 }
193 }
194
195 fn exn_is_declared(&self) -> bool {
196 match self {
197 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
198 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
199 }
200 }
201 }
202
203 impl ::fbthrift::ResultInfo for BoundStatsExn {
204 fn result_type(&self) -> ::fbthrift::ResultType {
205 match self {
206 Self::Success(_) => ::fbthrift::ResultType::Return,
207 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
208 }
209 }
210 }
211
212 impl ::fbthrift::GetTType for BoundStatsExn {
213 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
214 }
215
216 impl<P> ::fbthrift::Serialize<P> for BoundStatsExn
217 where
218 P: ::fbthrift::ProtocolWriter,
219 {
220 fn write(&self, p: &mut P) {
221 if let Self::ApplicationException(aexn) = self {
222 return aexn.write(p);
223 }
224 p.write_struct_begin("BoundStats");
225 match self {
226 Self::Success(inner) => {
227 p.write_field_begin(
228 "Success",
229 ::fbthrift::TType::Struct,
230 0i16,
231 );
232 inner.write(p);
233 p.write_field_end();
234 }
235 Self::ApplicationException(_aexn) => unreachable!(),
236 }
237 p.write_field_stop();
238 p.write_struct_end();
239 }
240 }
241
242 impl<P> ::fbthrift::Deserialize<P> for BoundStatsExn
243 where
244 P: ::fbthrift::ProtocolReader,
245 {
246 fn read(p: &mut P) -> ::anyhow::Result<Self> {
247 static RETURNS: &[::fbthrift::Field] = &[
248 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
249 ];
250 let _ = p.read_struct_begin(|_| ())?;
251 let mut once = false;
252 let mut alt = ::std::option::Option::None;
253 loop {
254 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
255 match ((fty, fid as ::std::primitive::i32), once) {
256 ((::fbthrift::TType::Stop, _), _) => {
257 p.read_field_end()?;
258 break;
259 }
260 ((::fbthrift::TType::Struct, 0i32), false) => {
261 once = true;
262 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
263 }
264 ((ty, _id), false) => p.skip(ty)?,
265 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
266 ::fbthrift::ApplicationException::new(
267 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
268 format!(
269 "unwanted extra union {} field ty {:?} id {}",
270 "BoundStatsExn",
271 badty,
272 badid,
273 ),
274 )
275 )),
276 }
277 p.read_field_end()?;
278 }
279 p.read_struct_end()?;
280 alt.ok_or_else(||
281 ::fbthrift::ApplicationException::new(
282 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
283 format!("Empty union {}", "BoundStatsExn"),
284 )
285 .into(),
286 )
287 }
288 }
289
290 #[derive(Clone, Debug)]
291 pub enum GetPropsExn {
292 #[doc(hidden)]
293 Success(crate::types::QueryResponse),
294 ApplicationException(::fbthrift::ApplicationException),
295 }
296
297 impl ::std::convert::From<crate::errors::storage_service::GetPropsError> for GetPropsExn {
298 fn from(err: crate::errors::storage_service::GetPropsError) -> Self {
299 match err {
300 crate::errors::storage_service::GetPropsError::ApplicationException(aexn) => GetPropsExn::ApplicationException(aexn),
301 crate::errors::storage_service::GetPropsError::ThriftError(err) => GetPropsExn::ApplicationException(::fbthrift::ApplicationException {
302 message: err.to_string(),
303 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
304 }),
305 }
306 }
307 }
308
309 impl ::std::convert::From<::fbthrift::ApplicationException> for GetPropsExn {
310 fn from(exn: ::fbthrift::ApplicationException) -> Self {
311 Self::ApplicationException(exn)
312 }
313 }
314
315 impl ::fbthrift::ExceptionInfo for GetPropsExn {
316 fn exn_name(&self) -> &'static str {
317 match self {
318 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
319 Self::ApplicationException(aexn) => aexn.exn_name(),
320 }
321 }
322
323 fn exn_value(&self) -> String {
324 match self {
325 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
326 Self::ApplicationException(aexn) => aexn.exn_value(),
327 }
328 }
329
330 fn exn_is_declared(&self) -> bool {
331 match self {
332 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
333 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
334 }
335 }
336 }
337
338 impl ::fbthrift::ResultInfo for GetPropsExn {
339 fn result_type(&self) -> ::fbthrift::ResultType {
340 match self {
341 Self::Success(_) => ::fbthrift::ResultType::Return,
342 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
343 }
344 }
345 }
346
347 impl ::fbthrift::GetTType for GetPropsExn {
348 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
349 }
350
351 impl<P> ::fbthrift::Serialize<P> for GetPropsExn
352 where
353 P: ::fbthrift::ProtocolWriter,
354 {
355 fn write(&self, p: &mut P) {
356 if let Self::ApplicationException(aexn) = self {
357 return aexn.write(p);
358 }
359 p.write_struct_begin("GetProps");
360 match self {
361 Self::Success(inner) => {
362 p.write_field_begin(
363 "Success",
364 ::fbthrift::TType::Struct,
365 0i16,
366 );
367 inner.write(p);
368 p.write_field_end();
369 }
370 Self::ApplicationException(_aexn) => unreachable!(),
371 }
372 p.write_field_stop();
373 p.write_struct_end();
374 }
375 }
376
377 impl<P> ::fbthrift::Deserialize<P> for GetPropsExn
378 where
379 P: ::fbthrift::ProtocolReader,
380 {
381 fn read(p: &mut P) -> ::anyhow::Result<Self> {
382 static RETURNS: &[::fbthrift::Field] = &[
383 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
384 ];
385 let _ = p.read_struct_begin(|_| ())?;
386 let mut once = false;
387 let mut alt = ::std::option::Option::None;
388 loop {
389 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
390 match ((fty, fid as ::std::primitive::i32), once) {
391 ((::fbthrift::TType::Stop, _), _) => {
392 p.read_field_end()?;
393 break;
394 }
395 ((::fbthrift::TType::Struct, 0i32), false) => {
396 once = true;
397 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
398 }
399 ((ty, _id), false) => p.skip(ty)?,
400 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
401 ::fbthrift::ApplicationException::new(
402 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
403 format!(
404 "unwanted extra union {} field ty {:?} id {}",
405 "GetPropsExn",
406 badty,
407 badid,
408 ),
409 )
410 )),
411 }
412 p.read_field_end()?;
413 }
414 p.read_struct_end()?;
415 alt.ok_or_else(||
416 ::fbthrift::ApplicationException::new(
417 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
418 format!("Empty union {}", "GetPropsExn"),
419 )
420 .into(),
421 )
422 }
423 }
424
425 #[derive(Clone, Debug)]
426 pub enum GetEdgePropsExn {
427 #[doc(hidden)]
428 Success(crate::types::EdgePropResponse),
429 ApplicationException(::fbthrift::ApplicationException),
430 }
431
432 impl ::std::convert::From<crate::errors::storage_service::GetEdgePropsError> for GetEdgePropsExn {
433 fn from(err: crate::errors::storage_service::GetEdgePropsError) -> Self {
434 match err {
435 crate::errors::storage_service::GetEdgePropsError::ApplicationException(aexn) => GetEdgePropsExn::ApplicationException(aexn),
436 crate::errors::storage_service::GetEdgePropsError::ThriftError(err) => GetEdgePropsExn::ApplicationException(::fbthrift::ApplicationException {
437 message: err.to_string(),
438 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
439 }),
440 }
441 }
442 }
443
444 impl ::std::convert::From<::fbthrift::ApplicationException> for GetEdgePropsExn {
445 fn from(exn: ::fbthrift::ApplicationException) -> Self {
446 Self::ApplicationException(exn)
447 }
448 }
449
450 impl ::fbthrift::ExceptionInfo for GetEdgePropsExn {
451 fn exn_name(&self) -> &'static str {
452 match self {
453 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
454 Self::ApplicationException(aexn) => aexn.exn_name(),
455 }
456 }
457
458 fn exn_value(&self) -> String {
459 match self {
460 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
461 Self::ApplicationException(aexn) => aexn.exn_value(),
462 }
463 }
464
465 fn exn_is_declared(&self) -> bool {
466 match self {
467 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
468 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
469 }
470 }
471 }
472
473 impl ::fbthrift::ResultInfo for GetEdgePropsExn {
474 fn result_type(&self) -> ::fbthrift::ResultType {
475 match self {
476 Self::Success(_) => ::fbthrift::ResultType::Return,
477 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
478 }
479 }
480 }
481
482 impl ::fbthrift::GetTType for GetEdgePropsExn {
483 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
484 }
485
486 impl<P> ::fbthrift::Serialize<P> for GetEdgePropsExn
487 where
488 P: ::fbthrift::ProtocolWriter,
489 {
490 fn write(&self, p: &mut P) {
491 if let Self::ApplicationException(aexn) = self {
492 return aexn.write(p);
493 }
494 p.write_struct_begin("GetEdgeProps");
495 match self {
496 Self::Success(inner) => {
497 p.write_field_begin(
498 "Success",
499 ::fbthrift::TType::Struct,
500 0i16,
501 );
502 inner.write(p);
503 p.write_field_end();
504 }
505 Self::ApplicationException(_aexn) => unreachable!(),
506 }
507 p.write_field_stop();
508 p.write_struct_end();
509 }
510 }
511
512 impl<P> ::fbthrift::Deserialize<P> for GetEdgePropsExn
513 where
514 P: ::fbthrift::ProtocolReader,
515 {
516 fn read(p: &mut P) -> ::anyhow::Result<Self> {
517 static RETURNS: &[::fbthrift::Field] = &[
518 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
519 ];
520 let _ = p.read_struct_begin(|_| ())?;
521 let mut once = false;
522 let mut alt = ::std::option::Option::None;
523 loop {
524 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
525 match ((fty, fid as ::std::primitive::i32), once) {
526 ((::fbthrift::TType::Stop, _), _) => {
527 p.read_field_end()?;
528 break;
529 }
530 ((::fbthrift::TType::Struct, 0i32), false) => {
531 once = true;
532 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
533 }
534 ((ty, _id), false) => p.skip(ty)?,
535 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
536 ::fbthrift::ApplicationException::new(
537 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
538 format!(
539 "unwanted extra union {} field ty {:?} id {}",
540 "GetEdgePropsExn",
541 badty,
542 badid,
543 ),
544 )
545 )),
546 }
547 p.read_field_end()?;
548 }
549 p.read_struct_end()?;
550 alt.ok_or_else(||
551 ::fbthrift::ApplicationException::new(
552 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
553 format!("Empty union {}", "GetEdgePropsExn"),
554 )
555 .into(),
556 )
557 }
558 }
559
560 #[derive(Clone, Debug)]
561 pub enum AddVerticesExn {
562 #[doc(hidden)]
563 Success(crate::types::ExecResponse),
564 ApplicationException(::fbthrift::ApplicationException),
565 }
566
567 impl ::std::convert::From<crate::errors::storage_service::AddVerticesError> for AddVerticesExn {
568 fn from(err: crate::errors::storage_service::AddVerticesError) -> Self {
569 match err {
570 crate::errors::storage_service::AddVerticesError::ApplicationException(aexn) => AddVerticesExn::ApplicationException(aexn),
571 crate::errors::storage_service::AddVerticesError::ThriftError(err) => AddVerticesExn::ApplicationException(::fbthrift::ApplicationException {
572 message: err.to_string(),
573 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
574 }),
575 }
576 }
577 }
578
579 impl ::std::convert::From<::fbthrift::ApplicationException> for AddVerticesExn {
580 fn from(exn: ::fbthrift::ApplicationException) -> Self {
581 Self::ApplicationException(exn)
582 }
583 }
584
585 impl ::fbthrift::ExceptionInfo for AddVerticesExn {
586 fn exn_name(&self) -> &'static str {
587 match self {
588 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
589 Self::ApplicationException(aexn) => aexn.exn_name(),
590 }
591 }
592
593 fn exn_value(&self) -> String {
594 match self {
595 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
596 Self::ApplicationException(aexn) => aexn.exn_value(),
597 }
598 }
599
600 fn exn_is_declared(&self) -> bool {
601 match self {
602 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
603 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
604 }
605 }
606 }
607
608 impl ::fbthrift::ResultInfo for AddVerticesExn {
609 fn result_type(&self) -> ::fbthrift::ResultType {
610 match self {
611 Self::Success(_) => ::fbthrift::ResultType::Return,
612 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
613 }
614 }
615 }
616
617 impl ::fbthrift::GetTType for AddVerticesExn {
618 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
619 }
620
621 impl<P> ::fbthrift::Serialize<P> for AddVerticesExn
622 where
623 P: ::fbthrift::ProtocolWriter,
624 {
625 fn write(&self, p: &mut P) {
626 if let Self::ApplicationException(aexn) = self {
627 return aexn.write(p);
628 }
629 p.write_struct_begin("AddVertices");
630 match self {
631 Self::Success(inner) => {
632 p.write_field_begin(
633 "Success",
634 ::fbthrift::TType::Struct,
635 0i16,
636 );
637 inner.write(p);
638 p.write_field_end();
639 }
640 Self::ApplicationException(_aexn) => unreachable!(),
641 }
642 p.write_field_stop();
643 p.write_struct_end();
644 }
645 }
646
647 impl<P> ::fbthrift::Deserialize<P> for AddVerticesExn
648 where
649 P: ::fbthrift::ProtocolReader,
650 {
651 fn read(p: &mut P) -> ::anyhow::Result<Self> {
652 static RETURNS: &[::fbthrift::Field] = &[
653 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
654 ];
655 let _ = p.read_struct_begin(|_| ())?;
656 let mut once = false;
657 let mut alt = ::std::option::Option::None;
658 loop {
659 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
660 match ((fty, fid as ::std::primitive::i32), once) {
661 ((::fbthrift::TType::Stop, _), _) => {
662 p.read_field_end()?;
663 break;
664 }
665 ((::fbthrift::TType::Struct, 0i32), false) => {
666 once = true;
667 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
668 }
669 ((ty, _id), false) => p.skip(ty)?,
670 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
671 ::fbthrift::ApplicationException::new(
672 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
673 format!(
674 "unwanted extra union {} field ty {:?} id {}",
675 "AddVerticesExn",
676 badty,
677 badid,
678 ),
679 )
680 )),
681 }
682 p.read_field_end()?;
683 }
684 p.read_struct_end()?;
685 alt.ok_or_else(||
686 ::fbthrift::ApplicationException::new(
687 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
688 format!("Empty union {}", "AddVerticesExn"),
689 )
690 .into(),
691 )
692 }
693 }
694
695 #[derive(Clone, Debug)]
696 pub enum AddEdgesExn {
697 #[doc(hidden)]
698 Success(crate::types::ExecResponse),
699 ApplicationException(::fbthrift::ApplicationException),
700 }
701
702 impl ::std::convert::From<crate::errors::storage_service::AddEdgesError> for AddEdgesExn {
703 fn from(err: crate::errors::storage_service::AddEdgesError) -> Self {
704 match err {
705 crate::errors::storage_service::AddEdgesError::ApplicationException(aexn) => AddEdgesExn::ApplicationException(aexn),
706 crate::errors::storage_service::AddEdgesError::ThriftError(err) => AddEdgesExn::ApplicationException(::fbthrift::ApplicationException {
707 message: err.to_string(),
708 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
709 }),
710 }
711 }
712 }
713
714 impl ::std::convert::From<::fbthrift::ApplicationException> for AddEdgesExn {
715 fn from(exn: ::fbthrift::ApplicationException) -> Self {
716 Self::ApplicationException(exn)
717 }
718 }
719
720 impl ::fbthrift::ExceptionInfo for AddEdgesExn {
721 fn exn_name(&self) -> &'static str {
722 match self {
723 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
724 Self::ApplicationException(aexn) => aexn.exn_name(),
725 }
726 }
727
728 fn exn_value(&self) -> String {
729 match self {
730 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
731 Self::ApplicationException(aexn) => aexn.exn_value(),
732 }
733 }
734
735 fn exn_is_declared(&self) -> bool {
736 match self {
737 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
738 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
739 }
740 }
741 }
742
743 impl ::fbthrift::ResultInfo for AddEdgesExn {
744 fn result_type(&self) -> ::fbthrift::ResultType {
745 match self {
746 Self::Success(_) => ::fbthrift::ResultType::Return,
747 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
748 }
749 }
750 }
751
752 impl ::fbthrift::GetTType for AddEdgesExn {
753 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
754 }
755
756 impl<P> ::fbthrift::Serialize<P> for AddEdgesExn
757 where
758 P: ::fbthrift::ProtocolWriter,
759 {
760 fn write(&self, p: &mut P) {
761 if let Self::ApplicationException(aexn) = self {
762 return aexn.write(p);
763 }
764 p.write_struct_begin("AddEdges");
765 match self {
766 Self::Success(inner) => {
767 p.write_field_begin(
768 "Success",
769 ::fbthrift::TType::Struct,
770 0i16,
771 );
772 inner.write(p);
773 p.write_field_end();
774 }
775 Self::ApplicationException(_aexn) => unreachable!(),
776 }
777 p.write_field_stop();
778 p.write_struct_end();
779 }
780 }
781
782 impl<P> ::fbthrift::Deserialize<P> for AddEdgesExn
783 where
784 P: ::fbthrift::ProtocolReader,
785 {
786 fn read(p: &mut P) -> ::anyhow::Result<Self> {
787 static RETURNS: &[::fbthrift::Field] = &[
788 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
789 ];
790 let _ = p.read_struct_begin(|_| ())?;
791 let mut once = false;
792 let mut alt = ::std::option::Option::None;
793 loop {
794 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
795 match ((fty, fid as ::std::primitive::i32), once) {
796 ((::fbthrift::TType::Stop, _), _) => {
797 p.read_field_end()?;
798 break;
799 }
800 ((::fbthrift::TType::Struct, 0i32), false) => {
801 once = true;
802 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
803 }
804 ((ty, _id), false) => p.skip(ty)?,
805 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
806 ::fbthrift::ApplicationException::new(
807 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
808 format!(
809 "unwanted extra union {} field ty {:?} id {}",
810 "AddEdgesExn",
811 badty,
812 badid,
813 ),
814 )
815 )),
816 }
817 p.read_field_end()?;
818 }
819 p.read_struct_end()?;
820 alt.ok_or_else(||
821 ::fbthrift::ApplicationException::new(
822 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
823 format!("Empty union {}", "AddEdgesExn"),
824 )
825 .into(),
826 )
827 }
828 }
829
830 #[derive(Clone, Debug)]
831 pub enum DeleteEdgesExn {
832 #[doc(hidden)]
833 Success(crate::types::ExecResponse),
834 ApplicationException(::fbthrift::ApplicationException),
835 }
836
837 impl ::std::convert::From<crate::errors::storage_service::DeleteEdgesError> for DeleteEdgesExn {
838 fn from(err: crate::errors::storage_service::DeleteEdgesError) -> Self {
839 match err {
840 crate::errors::storage_service::DeleteEdgesError::ApplicationException(aexn) => DeleteEdgesExn::ApplicationException(aexn),
841 crate::errors::storage_service::DeleteEdgesError::ThriftError(err) => DeleteEdgesExn::ApplicationException(::fbthrift::ApplicationException {
842 message: err.to_string(),
843 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
844 }),
845 }
846 }
847 }
848
849 impl ::std::convert::From<::fbthrift::ApplicationException> for DeleteEdgesExn {
850 fn from(exn: ::fbthrift::ApplicationException) -> Self {
851 Self::ApplicationException(exn)
852 }
853 }
854
855 impl ::fbthrift::ExceptionInfo for DeleteEdgesExn {
856 fn exn_name(&self) -> &'static str {
857 match self {
858 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
859 Self::ApplicationException(aexn) => aexn.exn_name(),
860 }
861 }
862
863 fn exn_value(&self) -> String {
864 match self {
865 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
866 Self::ApplicationException(aexn) => aexn.exn_value(),
867 }
868 }
869
870 fn exn_is_declared(&self) -> bool {
871 match self {
872 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
873 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
874 }
875 }
876 }
877
878 impl ::fbthrift::ResultInfo for DeleteEdgesExn {
879 fn result_type(&self) -> ::fbthrift::ResultType {
880 match self {
881 Self::Success(_) => ::fbthrift::ResultType::Return,
882 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
883 }
884 }
885 }
886
887 impl ::fbthrift::GetTType for DeleteEdgesExn {
888 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
889 }
890
891 impl<P> ::fbthrift::Serialize<P> for DeleteEdgesExn
892 where
893 P: ::fbthrift::ProtocolWriter,
894 {
895 fn write(&self, p: &mut P) {
896 if let Self::ApplicationException(aexn) = self {
897 return aexn.write(p);
898 }
899 p.write_struct_begin("DeleteEdges");
900 match self {
901 Self::Success(inner) => {
902 p.write_field_begin(
903 "Success",
904 ::fbthrift::TType::Struct,
905 0i16,
906 );
907 inner.write(p);
908 p.write_field_end();
909 }
910 Self::ApplicationException(_aexn) => unreachable!(),
911 }
912 p.write_field_stop();
913 p.write_struct_end();
914 }
915 }
916
917 impl<P> ::fbthrift::Deserialize<P> for DeleteEdgesExn
918 where
919 P: ::fbthrift::ProtocolReader,
920 {
921 fn read(p: &mut P) -> ::anyhow::Result<Self> {
922 static RETURNS: &[::fbthrift::Field] = &[
923 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
924 ];
925 let _ = p.read_struct_begin(|_| ())?;
926 let mut once = false;
927 let mut alt = ::std::option::Option::None;
928 loop {
929 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
930 match ((fty, fid as ::std::primitive::i32), once) {
931 ((::fbthrift::TType::Stop, _), _) => {
932 p.read_field_end()?;
933 break;
934 }
935 ((::fbthrift::TType::Struct, 0i32), false) => {
936 once = true;
937 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
938 }
939 ((ty, _id), false) => p.skip(ty)?,
940 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
941 ::fbthrift::ApplicationException::new(
942 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
943 format!(
944 "unwanted extra union {} field ty {:?} id {}",
945 "DeleteEdgesExn",
946 badty,
947 badid,
948 ),
949 )
950 )),
951 }
952 p.read_field_end()?;
953 }
954 p.read_struct_end()?;
955 alt.ok_or_else(||
956 ::fbthrift::ApplicationException::new(
957 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
958 format!("Empty union {}", "DeleteEdgesExn"),
959 )
960 .into(),
961 )
962 }
963 }
964
965 #[derive(Clone, Debug)]
966 pub enum DeleteVerticesExn {
967 #[doc(hidden)]
968 Success(crate::types::ExecResponse),
969 ApplicationException(::fbthrift::ApplicationException),
970 }
971
972 impl ::std::convert::From<crate::errors::storage_service::DeleteVerticesError> for DeleteVerticesExn {
973 fn from(err: crate::errors::storage_service::DeleteVerticesError) -> Self {
974 match err {
975 crate::errors::storage_service::DeleteVerticesError::ApplicationException(aexn) => DeleteVerticesExn::ApplicationException(aexn),
976 crate::errors::storage_service::DeleteVerticesError::ThriftError(err) => DeleteVerticesExn::ApplicationException(::fbthrift::ApplicationException {
977 message: err.to_string(),
978 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
979 }),
980 }
981 }
982 }
983
984 impl ::std::convert::From<::fbthrift::ApplicationException> for DeleteVerticesExn {
985 fn from(exn: ::fbthrift::ApplicationException) -> Self {
986 Self::ApplicationException(exn)
987 }
988 }
989
990 impl ::fbthrift::ExceptionInfo for DeleteVerticesExn {
991 fn exn_name(&self) -> &'static str {
992 match self {
993 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
994 Self::ApplicationException(aexn) => aexn.exn_name(),
995 }
996 }
997
998 fn exn_value(&self) -> String {
999 match self {
1000 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1001 Self::ApplicationException(aexn) => aexn.exn_value(),
1002 }
1003 }
1004
1005 fn exn_is_declared(&self) -> bool {
1006 match self {
1007 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1008 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1009 }
1010 }
1011 }
1012
1013 impl ::fbthrift::ResultInfo for DeleteVerticesExn {
1014 fn result_type(&self) -> ::fbthrift::ResultType {
1015 match self {
1016 Self::Success(_) => ::fbthrift::ResultType::Return,
1017 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1018 }
1019 }
1020 }
1021
1022 impl ::fbthrift::GetTType for DeleteVerticesExn {
1023 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1024 }
1025
1026 impl<P> ::fbthrift::Serialize<P> for DeleteVerticesExn
1027 where
1028 P: ::fbthrift::ProtocolWriter,
1029 {
1030 fn write(&self, p: &mut P) {
1031 if let Self::ApplicationException(aexn) = self {
1032 return aexn.write(p);
1033 }
1034 p.write_struct_begin("DeleteVertices");
1035 match self {
1036 Self::Success(inner) => {
1037 p.write_field_begin(
1038 "Success",
1039 ::fbthrift::TType::Struct,
1040 0i16,
1041 );
1042 inner.write(p);
1043 p.write_field_end();
1044 }
1045 Self::ApplicationException(_aexn) => unreachable!(),
1046 }
1047 p.write_field_stop();
1048 p.write_struct_end();
1049 }
1050 }
1051
1052 impl<P> ::fbthrift::Deserialize<P> for DeleteVerticesExn
1053 where
1054 P: ::fbthrift::ProtocolReader,
1055 {
1056 fn read(p: &mut P) -> ::anyhow::Result<Self> {
1057 static RETURNS: &[::fbthrift::Field] = &[
1058 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1059 ];
1060 let _ = p.read_struct_begin(|_| ())?;
1061 let mut once = false;
1062 let mut alt = ::std::option::Option::None;
1063 loop {
1064 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1065 match ((fty, fid as ::std::primitive::i32), once) {
1066 ((::fbthrift::TType::Stop, _), _) => {
1067 p.read_field_end()?;
1068 break;
1069 }
1070 ((::fbthrift::TType::Struct, 0i32), false) => {
1071 once = true;
1072 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1073 }
1074 ((ty, _id), false) => p.skip(ty)?,
1075 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1076 ::fbthrift::ApplicationException::new(
1077 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1078 format!(
1079 "unwanted extra union {} field ty {:?} id {}",
1080 "DeleteVerticesExn",
1081 badty,
1082 badid,
1083 ),
1084 )
1085 )),
1086 }
1087 p.read_field_end()?;
1088 }
1089 p.read_struct_end()?;
1090 alt.ok_or_else(||
1091 ::fbthrift::ApplicationException::new(
1092 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1093 format!("Empty union {}", "DeleteVerticesExn"),
1094 )
1095 .into(),
1096 )
1097 }
1098 }
1099
1100 #[derive(Clone, Debug)]
1101 pub enum UpdateVertexExn {
1102 #[doc(hidden)]
1103 Success(crate::types::UpdateResponse),
1104 ApplicationException(::fbthrift::ApplicationException),
1105 }
1106
1107 impl ::std::convert::From<crate::errors::storage_service::UpdateVertexError> for UpdateVertexExn {
1108 fn from(err: crate::errors::storage_service::UpdateVertexError) -> Self {
1109 match err {
1110 crate::errors::storage_service::UpdateVertexError::ApplicationException(aexn) => UpdateVertexExn::ApplicationException(aexn),
1111 crate::errors::storage_service::UpdateVertexError::ThriftError(err) => UpdateVertexExn::ApplicationException(::fbthrift::ApplicationException {
1112 message: err.to_string(),
1113 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1114 }),
1115 }
1116 }
1117 }
1118
1119 impl ::std::convert::From<::fbthrift::ApplicationException> for UpdateVertexExn {
1120 fn from(exn: ::fbthrift::ApplicationException) -> Self {
1121 Self::ApplicationException(exn)
1122 }
1123 }
1124
1125 impl ::fbthrift::ExceptionInfo for UpdateVertexExn {
1126 fn exn_name(&self) -> &'static str {
1127 match self {
1128 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1129 Self::ApplicationException(aexn) => aexn.exn_name(),
1130 }
1131 }
1132
1133 fn exn_value(&self) -> String {
1134 match self {
1135 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1136 Self::ApplicationException(aexn) => aexn.exn_value(),
1137 }
1138 }
1139
1140 fn exn_is_declared(&self) -> bool {
1141 match self {
1142 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1143 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1144 }
1145 }
1146 }
1147
1148 impl ::fbthrift::ResultInfo for UpdateVertexExn {
1149 fn result_type(&self) -> ::fbthrift::ResultType {
1150 match self {
1151 Self::Success(_) => ::fbthrift::ResultType::Return,
1152 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1153 }
1154 }
1155 }
1156
1157 impl ::fbthrift::GetTType for UpdateVertexExn {
1158 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1159 }
1160
1161 impl<P> ::fbthrift::Serialize<P> for UpdateVertexExn
1162 where
1163 P: ::fbthrift::ProtocolWriter,
1164 {
1165 fn write(&self, p: &mut P) {
1166 if let Self::ApplicationException(aexn) = self {
1167 return aexn.write(p);
1168 }
1169 p.write_struct_begin("UpdateVertex");
1170 match self {
1171 Self::Success(inner) => {
1172 p.write_field_begin(
1173 "Success",
1174 ::fbthrift::TType::Struct,
1175 0i16,
1176 );
1177 inner.write(p);
1178 p.write_field_end();
1179 }
1180 Self::ApplicationException(_aexn) => unreachable!(),
1181 }
1182 p.write_field_stop();
1183 p.write_struct_end();
1184 }
1185 }
1186
1187 impl<P> ::fbthrift::Deserialize<P> for UpdateVertexExn
1188 where
1189 P: ::fbthrift::ProtocolReader,
1190 {
1191 fn read(p: &mut P) -> ::anyhow::Result<Self> {
1192 static RETURNS: &[::fbthrift::Field] = &[
1193 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1194 ];
1195 let _ = p.read_struct_begin(|_| ())?;
1196 let mut once = false;
1197 let mut alt = ::std::option::Option::None;
1198 loop {
1199 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1200 match ((fty, fid as ::std::primitive::i32), once) {
1201 ((::fbthrift::TType::Stop, _), _) => {
1202 p.read_field_end()?;
1203 break;
1204 }
1205 ((::fbthrift::TType::Struct, 0i32), false) => {
1206 once = true;
1207 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1208 }
1209 ((ty, _id), false) => p.skip(ty)?,
1210 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1211 ::fbthrift::ApplicationException::new(
1212 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1213 format!(
1214 "unwanted extra union {} field ty {:?} id {}",
1215 "UpdateVertexExn",
1216 badty,
1217 badid,
1218 ),
1219 )
1220 )),
1221 }
1222 p.read_field_end()?;
1223 }
1224 p.read_struct_end()?;
1225 alt.ok_or_else(||
1226 ::fbthrift::ApplicationException::new(
1227 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1228 format!("Empty union {}", "UpdateVertexExn"),
1229 )
1230 .into(),
1231 )
1232 }
1233 }
1234
1235 #[derive(Clone, Debug)]
1236 pub enum UpdateEdgeExn {
1237 #[doc(hidden)]
1238 Success(crate::types::UpdateResponse),
1239 ApplicationException(::fbthrift::ApplicationException),
1240 }
1241
1242 impl ::std::convert::From<crate::errors::storage_service::UpdateEdgeError> for UpdateEdgeExn {
1243 fn from(err: crate::errors::storage_service::UpdateEdgeError) -> Self {
1244 match err {
1245 crate::errors::storage_service::UpdateEdgeError::ApplicationException(aexn) => UpdateEdgeExn::ApplicationException(aexn),
1246 crate::errors::storage_service::UpdateEdgeError::ThriftError(err) => UpdateEdgeExn::ApplicationException(::fbthrift::ApplicationException {
1247 message: err.to_string(),
1248 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1249 }),
1250 }
1251 }
1252 }
1253
1254 impl ::std::convert::From<::fbthrift::ApplicationException> for UpdateEdgeExn {
1255 fn from(exn: ::fbthrift::ApplicationException) -> Self {
1256 Self::ApplicationException(exn)
1257 }
1258 }
1259
1260 impl ::fbthrift::ExceptionInfo for UpdateEdgeExn {
1261 fn exn_name(&self) -> &'static str {
1262 match self {
1263 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1264 Self::ApplicationException(aexn) => aexn.exn_name(),
1265 }
1266 }
1267
1268 fn exn_value(&self) -> String {
1269 match self {
1270 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1271 Self::ApplicationException(aexn) => aexn.exn_value(),
1272 }
1273 }
1274
1275 fn exn_is_declared(&self) -> bool {
1276 match self {
1277 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1278 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1279 }
1280 }
1281 }
1282
1283 impl ::fbthrift::ResultInfo for UpdateEdgeExn {
1284 fn result_type(&self) -> ::fbthrift::ResultType {
1285 match self {
1286 Self::Success(_) => ::fbthrift::ResultType::Return,
1287 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1288 }
1289 }
1290 }
1291
1292 impl ::fbthrift::GetTType for UpdateEdgeExn {
1293 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1294 }
1295
1296 impl<P> ::fbthrift::Serialize<P> for UpdateEdgeExn
1297 where
1298 P: ::fbthrift::ProtocolWriter,
1299 {
1300 fn write(&self, p: &mut P) {
1301 if let Self::ApplicationException(aexn) = self {
1302 return aexn.write(p);
1303 }
1304 p.write_struct_begin("UpdateEdge");
1305 match self {
1306 Self::Success(inner) => {
1307 p.write_field_begin(
1308 "Success",
1309 ::fbthrift::TType::Struct,
1310 0i16,
1311 );
1312 inner.write(p);
1313 p.write_field_end();
1314 }
1315 Self::ApplicationException(_aexn) => unreachable!(),
1316 }
1317 p.write_field_stop();
1318 p.write_struct_end();
1319 }
1320 }
1321
1322 impl<P> ::fbthrift::Deserialize<P> for UpdateEdgeExn
1323 where
1324 P: ::fbthrift::ProtocolReader,
1325 {
1326 fn read(p: &mut P) -> ::anyhow::Result<Self> {
1327 static RETURNS: &[::fbthrift::Field] = &[
1328 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1329 ];
1330 let _ = p.read_struct_begin(|_| ())?;
1331 let mut once = false;
1332 let mut alt = ::std::option::Option::None;
1333 loop {
1334 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1335 match ((fty, fid as ::std::primitive::i32), once) {
1336 ((::fbthrift::TType::Stop, _), _) => {
1337 p.read_field_end()?;
1338 break;
1339 }
1340 ((::fbthrift::TType::Struct, 0i32), false) => {
1341 once = true;
1342 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1343 }
1344 ((ty, _id), false) => p.skip(ty)?,
1345 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1346 ::fbthrift::ApplicationException::new(
1347 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1348 format!(
1349 "unwanted extra union {} field ty {:?} id {}",
1350 "UpdateEdgeExn",
1351 badty,
1352 badid,
1353 ),
1354 )
1355 )),
1356 }
1357 p.read_field_end()?;
1358 }
1359 p.read_struct_end()?;
1360 alt.ok_or_else(||
1361 ::fbthrift::ApplicationException::new(
1362 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1363 format!("Empty union {}", "UpdateEdgeExn"),
1364 )
1365 .into(),
1366 )
1367 }
1368 }
1369
1370 #[derive(Clone, Debug)]
1371 pub enum ScanEdgeExn {
1372 #[doc(hidden)]
1373 Success(crate::types::ScanEdgeResponse),
1374 ApplicationException(::fbthrift::ApplicationException),
1375 }
1376
1377 impl ::std::convert::From<crate::errors::storage_service::ScanEdgeError> for ScanEdgeExn {
1378 fn from(err: crate::errors::storage_service::ScanEdgeError) -> Self {
1379 match err {
1380 crate::errors::storage_service::ScanEdgeError::ApplicationException(aexn) => ScanEdgeExn::ApplicationException(aexn),
1381 crate::errors::storage_service::ScanEdgeError::ThriftError(err) => ScanEdgeExn::ApplicationException(::fbthrift::ApplicationException {
1382 message: err.to_string(),
1383 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1384 }),
1385 }
1386 }
1387 }
1388
1389 impl ::std::convert::From<::fbthrift::ApplicationException> for ScanEdgeExn {
1390 fn from(exn: ::fbthrift::ApplicationException) -> Self {
1391 Self::ApplicationException(exn)
1392 }
1393 }
1394
1395 impl ::fbthrift::ExceptionInfo for ScanEdgeExn {
1396 fn exn_name(&self) -> &'static str {
1397 match self {
1398 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1399 Self::ApplicationException(aexn) => aexn.exn_name(),
1400 }
1401 }
1402
1403 fn exn_value(&self) -> String {
1404 match self {
1405 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1406 Self::ApplicationException(aexn) => aexn.exn_value(),
1407 }
1408 }
1409
1410 fn exn_is_declared(&self) -> bool {
1411 match self {
1412 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1413 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1414 }
1415 }
1416 }
1417
1418 impl ::fbthrift::ResultInfo for ScanEdgeExn {
1419 fn result_type(&self) -> ::fbthrift::ResultType {
1420 match self {
1421 Self::Success(_) => ::fbthrift::ResultType::Return,
1422 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1423 }
1424 }
1425 }
1426
1427 impl ::fbthrift::GetTType for ScanEdgeExn {
1428 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1429 }
1430
1431 impl<P> ::fbthrift::Serialize<P> for ScanEdgeExn
1432 where
1433 P: ::fbthrift::ProtocolWriter,
1434 {
1435 fn write(&self, p: &mut P) {
1436 if let Self::ApplicationException(aexn) = self {
1437 return aexn.write(p);
1438 }
1439 p.write_struct_begin("ScanEdge");
1440 match self {
1441 Self::Success(inner) => {
1442 p.write_field_begin(
1443 "Success",
1444 ::fbthrift::TType::Struct,
1445 0i16,
1446 );
1447 inner.write(p);
1448 p.write_field_end();
1449 }
1450 Self::ApplicationException(_aexn) => unreachable!(),
1451 }
1452 p.write_field_stop();
1453 p.write_struct_end();
1454 }
1455 }
1456
1457 impl<P> ::fbthrift::Deserialize<P> for ScanEdgeExn
1458 where
1459 P: ::fbthrift::ProtocolReader,
1460 {
1461 fn read(p: &mut P) -> ::anyhow::Result<Self> {
1462 static RETURNS: &[::fbthrift::Field] = &[
1463 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1464 ];
1465 let _ = p.read_struct_begin(|_| ())?;
1466 let mut once = false;
1467 let mut alt = ::std::option::Option::None;
1468 loop {
1469 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1470 match ((fty, fid as ::std::primitive::i32), once) {
1471 ((::fbthrift::TType::Stop, _), _) => {
1472 p.read_field_end()?;
1473 break;
1474 }
1475 ((::fbthrift::TType::Struct, 0i32), false) => {
1476 once = true;
1477 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1478 }
1479 ((ty, _id), false) => p.skip(ty)?,
1480 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1481 ::fbthrift::ApplicationException::new(
1482 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1483 format!(
1484 "unwanted extra union {} field ty {:?} id {}",
1485 "ScanEdgeExn",
1486 badty,
1487 badid,
1488 ),
1489 )
1490 )),
1491 }
1492 p.read_field_end()?;
1493 }
1494 p.read_struct_end()?;
1495 alt.ok_or_else(||
1496 ::fbthrift::ApplicationException::new(
1497 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1498 format!("Empty union {}", "ScanEdgeExn"),
1499 )
1500 .into(),
1501 )
1502 }
1503 }
1504
1505 #[derive(Clone, Debug)]
1506 pub enum ScanVertexExn {
1507 #[doc(hidden)]
1508 Success(crate::types::ScanVertexResponse),
1509 ApplicationException(::fbthrift::ApplicationException),
1510 }
1511
1512 impl ::std::convert::From<crate::errors::storage_service::ScanVertexError> for ScanVertexExn {
1513 fn from(err: crate::errors::storage_service::ScanVertexError) -> Self {
1514 match err {
1515 crate::errors::storage_service::ScanVertexError::ApplicationException(aexn) => ScanVertexExn::ApplicationException(aexn),
1516 crate::errors::storage_service::ScanVertexError::ThriftError(err) => ScanVertexExn::ApplicationException(::fbthrift::ApplicationException {
1517 message: err.to_string(),
1518 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1519 }),
1520 }
1521 }
1522 }
1523
1524 impl ::std::convert::From<::fbthrift::ApplicationException> for ScanVertexExn {
1525 fn from(exn: ::fbthrift::ApplicationException) -> Self {
1526 Self::ApplicationException(exn)
1527 }
1528 }
1529
1530 impl ::fbthrift::ExceptionInfo for ScanVertexExn {
1531 fn exn_name(&self) -> &'static str {
1532 match self {
1533 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1534 Self::ApplicationException(aexn) => aexn.exn_name(),
1535 }
1536 }
1537
1538 fn exn_value(&self) -> String {
1539 match self {
1540 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1541 Self::ApplicationException(aexn) => aexn.exn_value(),
1542 }
1543 }
1544
1545 fn exn_is_declared(&self) -> bool {
1546 match self {
1547 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1548 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1549 }
1550 }
1551 }
1552
1553 impl ::fbthrift::ResultInfo for ScanVertexExn {
1554 fn result_type(&self) -> ::fbthrift::ResultType {
1555 match self {
1556 Self::Success(_) => ::fbthrift::ResultType::Return,
1557 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1558 }
1559 }
1560 }
1561
1562 impl ::fbthrift::GetTType for ScanVertexExn {
1563 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1564 }
1565
1566 impl<P> ::fbthrift::Serialize<P> for ScanVertexExn
1567 where
1568 P: ::fbthrift::ProtocolWriter,
1569 {
1570 fn write(&self, p: &mut P) {
1571 if let Self::ApplicationException(aexn) = self {
1572 return aexn.write(p);
1573 }
1574 p.write_struct_begin("ScanVertex");
1575 match self {
1576 Self::Success(inner) => {
1577 p.write_field_begin(
1578 "Success",
1579 ::fbthrift::TType::Struct,
1580 0i16,
1581 );
1582 inner.write(p);
1583 p.write_field_end();
1584 }
1585 Self::ApplicationException(_aexn) => unreachable!(),
1586 }
1587 p.write_field_stop();
1588 p.write_struct_end();
1589 }
1590 }
1591
1592 impl<P> ::fbthrift::Deserialize<P> for ScanVertexExn
1593 where
1594 P: ::fbthrift::ProtocolReader,
1595 {
1596 fn read(p: &mut P) -> ::anyhow::Result<Self> {
1597 static RETURNS: &[::fbthrift::Field] = &[
1598 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1599 ];
1600 let _ = p.read_struct_begin(|_| ())?;
1601 let mut once = false;
1602 let mut alt = ::std::option::Option::None;
1603 loop {
1604 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1605 match ((fty, fid as ::std::primitive::i32), once) {
1606 ((::fbthrift::TType::Stop, _), _) => {
1607 p.read_field_end()?;
1608 break;
1609 }
1610 ((::fbthrift::TType::Struct, 0i32), false) => {
1611 once = true;
1612 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1613 }
1614 ((ty, _id), false) => p.skip(ty)?,
1615 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1616 ::fbthrift::ApplicationException::new(
1617 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1618 format!(
1619 "unwanted extra union {} field ty {:?} id {}",
1620 "ScanVertexExn",
1621 badty,
1622 badid,
1623 ),
1624 )
1625 )),
1626 }
1627 p.read_field_end()?;
1628 }
1629 p.read_struct_end()?;
1630 alt.ok_or_else(||
1631 ::fbthrift::ApplicationException::new(
1632 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1633 format!("Empty union {}", "ScanVertexExn"),
1634 )
1635 .into(),
1636 )
1637 }
1638 }
1639
1640 #[derive(Clone, Debug)]
1641 pub enum TransLeaderExn {
1642 #[doc(hidden)]
1643 Success(crate::types::AdminExecResp),
1644 ApplicationException(::fbthrift::ApplicationException),
1645 }
1646
1647 impl ::std::convert::From<crate::errors::storage_service::TransLeaderError> for TransLeaderExn {
1648 fn from(err: crate::errors::storage_service::TransLeaderError) -> Self {
1649 match err {
1650 crate::errors::storage_service::TransLeaderError::ApplicationException(aexn) => TransLeaderExn::ApplicationException(aexn),
1651 crate::errors::storage_service::TransLeaderError::ThriftError(err) => TransLeaderExn::ApplicationException(::fbthrift::ApplicationException {
1652 message: err.to_string(),
1653 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1654 }),
1655 }
1656 }
1657 }
1658
1659 impl ::std::convert::From<::fbthrift::ApplicationException> for TransLeaderExn {
1660 fn from(exn: ::fbthrift::ApplicationException) -> Self {
1661 Self::ApplicationException(exn)
1662 }
1663 }
1664
1665 impl ::fbthrift::ExceptionInfo for TransLeaderExn {
1666 fn exn_name(&self) -> &'static str {
1667 match self {
1668 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1669 Self::ApplicationException(aexn) => aexn.exn_name(),
1670 }
1671 }
1672
1673 fn exn_value(&self) -> String {
1674 match self {
1675 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1676 Self::ApplicationException(aexn) => aexn.exn_value(),
1677 }
1678 }
1679
1680 fn exn_is_declared(&self) -> bool {
1681 match self {
1682 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1683 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1684 }
1685 }
1686 }
1687
1688 impl ::fbthrift::ResultInfo for TransLeaderExn {
1689 fn result_type(&self) -> ::fbthrift::ResultType {
1690 match self {
1691 Self::Success(_) => ::fbthrift::ResultType::Return,
1692 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1693 }
1694 }
1695 }
1696
1697 impl ::fbthrift::GetTType for TransLeaderExn {
1698 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1699 }
1700
1701 impl<P> ::fbthrift::Serialize<P> for TransLeaderExn
1702 where
1703 P: ::fbthrift::ProtocolWriter,
1704 {
1705 fn write(&self, p: &mut P) {
1706 if let Self::ApplicationException(aexn) = self {
1707 return aexn.write(p);
1708 }
1709 p.write_struct_begin("TransLeader");
1710 match self {
1711 Self::Success(inner) => {
1712 p.write_field_begin(
1713 "Success",
1714 ::fbthrift::TType::Struct,
1715 0i16,
1716 );
1717 inner.write(p);
1718 p.write_field_end();
1719 }
1720 Self::ApplicationException(_aexn) => unreachable!(),
1721 }
1722 p.write_field_stop();
1723 p.write_struct_end();
1724 }
1725 }
1726
1727 impl<P> ::fbthrift::Deserialize<P> for TransLeaderExn
1728 where
1729 P: ::fbthrift::ProtocolReader,
1730 {
1731 fn read(p: &mut P) -> ::anyhow::Result<Self> {
1732 static RETURNS: &[::fbthrift::Field] = &[
1733 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1734 ];
1735 let _ = p.read_struct_begin(|_| ())?;
1736 let mut once = false;
1737 let mut alt = ::std::option::Option::None;
1738 loop {
1739 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1740 match ((fty, fid as ::std::primitive::i32), once) {
1741 ((::fbthrift::TType::Stop, _), _) => {
1742 p.read_field_end()?;
1743 break;
1744 }
1745 ((::fbthrift::TType::Struct, 0i32), false) => {
1746 once = true;
1747 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1748 }
1749 ((ty, _id), false) => p.skip(ty)?,
1750 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1751 ::fbthrift::ApplicationException::new(
1752 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1753 format!(
1754 "unwanted extra union {} field ty {:?} id {}",
1755 "TransLeaderExn",
1756 badty,
1757 badid,
1758 ),
1759 )
1760 )),
1761 }
1762 p.read_field_end()?;
1763 }
1764 p.read_struct_end()?;
1765 alt.ok_or_else(||
1766 ::fbthrift::ApplicationException::new(
1767 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1768 format!("Empty union {}", "TransLeaderExn"),
1769 )
1770 .into(),
1771 )
1772 }
1773 }
1774
1775 #[derive(Clone, Debug)]
1776 pub enum AddPartExn {
1777 #[doc(hidden)]
1778 Success(crate::types::AdminExecResp),
1779 ApplicationException(::fbthrift::ApplicationException),
1780 }
1781
1782 impl ::std::convert::From<crate::errors::storage_service::AddPartError> for AddPartExn {
1783 fn from(err: crate::errors::storage_service::AddPartError) -> Self {
1784 match err {
1785 crate::errors::storage_service::AddPartError::ApplicationException(aexn) => AddPartExn::ApplicationException(aexn),
1786 crate::errors::storage_service::AddPartError::ThriftError(err) => AddPartExn::ApplicationException(::fbthrift::ApplicationException {
1787 message: err.to_string(),
1788 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1789 }),
1790 }
1791 }
1792 }
1793
1794 impl ::std::convert::From<::fbthrift::ApplicationException> for AddPartExn {
1795 fn from(exn: ::fbthrift::ApplicationException) -> Self {
1796 Self::ApplicationException(exn)
1797 }
1798 }
1799
1800 impl ::fbthrift::ExceptionInfo for AddPartExn {
1801 fn exn_name(&self) -> &'static str {
1802 match self {
1803 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1804 Self::ApplicationException(aexn) => aexn.exn_name(),
1805 }
1806 }
1807
1808 fn exn_value(&self) -> String {
1809 match self {
1810 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1811 Self::ApplicationException(aexn) => aexn.exn_value(),
1812 }
1813 }
1814
1815 fn exn_is_declared(&self) -> bool {
1816 match self {
1817 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1818 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1819 }
1820 }
1821 }
1822
1823 impl ::fbthrift::ResultInfo for AddPartExn {
1824 fn result_type(&self) -> ::fbthrift::ResultType {
1825 match self {
1826 Self::Success(_) => ::fbthrift::ResultType::Return,
1827 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1828 }
1829 }
1830 }
1831
1832 impl ::fbthrift::GetTType for AddPartExn {
1833 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1834 }
1835
1836 impl<P> ::fbthrift::Serialize<P> for AddPartExn
1837 where
1838 P: ::fbthrift::ProtocolWriter,
1839 {
1840 fn write(&self, p: &mut P) {
1841 if let Self::ApplicationException(aexn) = self {
1842 return aexn.write(p);
1843 }
1844 p.write_struct_begin("AddPart");
1845 match self {
1846 Self::Success(inner) => {
1847 p.write_field_begin(
1848 "Success",
1849 ::fbthrift::TType::Struct,
1850 0i16,
1851 );
1852 inner.write(p);
1853 p.write_field_end();
1854 }
1855 Self::ApplicationException(_aexn) => unreachable!(),
1856 }
1857 p.write_field_stop();
1858 p.write_struct_end();
1859 }
1860 }
1861
1862 impl<P> ::fbthrift::Deserialize<P> for AddPartExn
1863 where
1864 P: ::fbthrift::ProtocolReader,
1865 {
1866 fn read(p: &mut P) -> ::anyhow::Result<Self> {
1867 static RETURNS: &[::fbthrift::Field] = &[
1868 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
1869 ];
1870 let _ = p.read_struct_begin(|_| ())?;
1871 let mut once = false;
1872 let mut alt = ::std::option::Option::None;
1873 loop {
1874 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
1875 match ((fty, fid as ::std::primitive::i32), once) {
1876 ((::fbthrift::TType::Stop, _), _) => {
1877 p.read_field_end()?;
1878 break;
1879 }
1880 ((::fbthrift::TType::Struct, 0i32), false) => {
1881 once = true;
1882 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
1883 }
1884 ((ty, _id), false) => p.skip(ty)?,
1885 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
1886 ::fbthrift::ApplicationException::new(
1887 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
1888 format!(
1889 "unwanted extra union {} field ty {:?} id {}",
1890 "AddPartExn",
1891 badty,
1892 badid,
1893 ),
1894 )
1895 )),
1896 }
1897 p.read_field_end()?;
1898 }
1899 p.read_struct_end()?;
1900 alt.ok_or_else(||
1901 ::fbthrift::ApplicationException::new(
1902 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
1903 format!("Empty union {}", "AddPartExn"),
1904 )
1905 .into(),
1906 )
1907 }
1908 }
1909
1910 #[derive(Clone, Debug)]
1911 pub enum AddLearnerExn {
1912 #[doc(hidden)]
1913 Success(crate::types::AdminExecResp),
1914 ApplicationException(::fbthrift::ApplicationException),
1915 }
1916
1917 impl ::std::convert::From<crate::errors::storage_service::AddLearnerError> for AddLearnerExn {
1918 fn from(err: crate::errors::storage_service::AddLearnerError) -> Self {
1919 match err {
1920 crate::errors::storage_service::AddLearnerError::ApplicationException(aexn) => AddLearnerExn::ApplicationException(aexn),
1921 crate::errors::storage_service::AddLearnerError::ThriftError(err) => AddLearnerExn::ApplicationException(::fbthrift::ApplicationException {
1922 message: err.to_string(),
1923 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
1924 }),
1925 }
1926 }
1927 }
1928
1929 impl ::std::convert::From<::fbthrift::ApplicationException> for AddLearnerExn {
1930 fn from(exn: ::fbthrift::ApplicationException) -> Self {
1931 Self::ApplicationException(exn)
1932 }
1933 }
1934
1935 impl ::fbthrift::ExceptionInfo for AddLearnerExn {
1936 fn exn_name(&self) -> &'static str {
1937 match self {
1938 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
1939 Self::ApplicationException(aexn) => aexn.exn_name(),
1940 }
1941 }
1942
1943 fn exn_value(&self) -> String {
1944 match self {
1945 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
1946 Self::ApplicationException(aexn) => aexn.exn_value(),
1947 }
1948 }
1949
1950 fn exn_is_declared(&self) -> bool {
1951 match self {
1952 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
1953 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
1954 }
1955 }
1956 }
1957
1958 impl ::fbthrift::ResultInfo for AddLearnerExn {
1959 fn result_type(&self) -> ::fbthrift::ResultType {
1960 match self {
1961 Self::Success(_) => ::fbthrift::ResultType::Return,
1962 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
1963 }
1964 }
1965 }
1966
1967 impl ::fbthrift::GetTType for AddLearnerExn {
1968 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
1969 }
1970
1971 impl<P> ::fbthrift::Serialize<P> for AddLearnerExn
1972 where
1973 P: ::fbthrift::ProtocolWriter,
1974 {
1975 fn write(&self, p: &mut P) {
1976 if let Self::ApplicationException(aexn) = self {
1977 return aexn.write(p);
1978 }
1979 p.write_struct_begin("AddLearner");
1980 match self {
1981 Self::Success(inner) => {
1982 p.write_field_begin(
1983 "Success",
1984 ::fbthrift::TType::Struct,
1985 0i16,
1986 );
1987 inner.write(p);
1988 p.write_field_end();
1989 }
1990 Self::ApplicationException(_aexn) => unreachable!(),
1991 }
1992 p.write_field_stop();
1993 p.write_struct_end();
1994 }
1995 }
1996
1997 impl<P> ::fbthrift::Deserialize<P> for AddLearnerExn
1998 where
1999 P: ::fbthrift::ProtocolReader,
2000 {
2001 fn read(p: &mut P) -> ::anyhow::Result<Self> {
2002 static RETURNS: &[::fbthrift::Field] = &[
2003 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2004 ];
2005 let _ = p.read_struct_begin(|_| ())?;
2006 let mut once = false;
2007 let mut alt = ::std::option::Option::None;
2008 loop {
2009 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2010 match ((fty, fid as ::std::primitive::i32), once) {
2011 ((::fbthrift::TType::Stop, _), _) => {
2012 p.read_field_end()?;
2013 break;
2014 }
2015 ((::fbthrift::TType::Struct, 0i32), false) => {
2016 once = true;
2017 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2018 }
2019 ((ty, _id), false) => p.skip(ty)?,
2020 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2021 ::fbthrift::ApplicationException::new(
2022 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2023 format!(
2024 "unwanted extra union {} field ty {:?} id {}",
2025 "AddLearnerExn",
2026 badty,
2027 badid,
2028 ),
2029 )
2030 )),
2031 }
2032 p.read_field_end()?;
2033 }
2034 p.read_struct_end()?;
2035 alt.ok_or_else(||
2036 ::fbthrift::ApplicationException::new(
2037 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2038 format!("Empty union {}", "AddLearnerExn"),
2039 )
2040 .into(),
2041 )
2042 }
2043 }
2044
2045 #[derive(Clone, Debug)]
2046 pub enum WaitingForCatchUpDataExn {
2047 #[doc(hidden)]
2048 Success(crate::types::AdminExecResp),
2049 ApplicationException(::fbthrift::ApplicationException),
2050 }
2051
2052 impl ::std::convert::From<crate::errors::storage_service::WaitingForCatchUpDataError> for WaitingForCatchUpDataExn {
2053 fn from(err: crate::errors::storage_service::WaitingForCatchUpDataError) -> Self {
2054 match err {
2055 crate::errors::storage_service::WaitingForCatchUpDataError::ApplicationException(aexn) => WaitingForCatchUpDataExn::ApplicationException(aexn),
2056 crate::errors::storage_service::WaitingForCatchUpDataError::ThriftError(err) => WaitingForCatchUpDataExn::ApplicationException(::fbthrift::ApplicationException {
2057 message: err.to_string(),
2058 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2059 }),
2060 }
2061 }
2062 }
2063
2064 impl ::std::convert::From<::fbthrift::ApplicationException> for WaitingForCatchUpDataExn {
2065 fn from(exn: ::fbthrift::ApplicationException) -> Self {
2066 Self::ApplicationException(exn)
2067 }
2068 }
2069
2070 impl ::fbthrift::ExceptionInfo for WaitingForCatchUpDataExn {
2071 fn exn_name(&self) -> &'static str {
2072 match self {
2073 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2074 Self::ApplicationException(aexn) => aexn.exn_name(),
2075 }
2076 }
2077
2078 fn exn_value(&self) -> String {
2079 match self {
2080 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2081 Self::ApplicationException(aexn) => aexn.exn_value(),
2082 }
2083 }
2084
2085 fn exn_is_declared(&self) -> bool {
2086 match self {
2087 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2088 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2089 }
2090 }
2091 }
2092
2093 impl ::fbthrift::ResultInfo for WaitingForCatchUpDataExn {
2094 fn result_type(&self) -> ::fbthrift::ResultType {
2095 match self {
2096 Self::Success(_) => ::fbthrift::ResultType::Return,
2097 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2098 }
2099 }
2100 }
2101
2102 impl ::fbthrift::GetTType for WaitingForCatchUpDataExn {
2103 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2104 }
2105
2106 impl<P> ::fbthrift::Serialize<P> for WaitingForCatchUpDataExn
2107 where
2108 P: ::fbthrift::ProtocolWriter,
2109 {
2110 fn write(&self, p: &mut P) {
2111 if let Self::ApplicationException(aexn) = self {
2112 return aexn.write(p);
2113 }
2114 p.write_struct_begin("WaitingForCatchUpData");
2115 match self {
2116 Self::Success(inner) => {
2117 p.write_field_begin(
2118 "Success",
2119 ::fbthrift::TType::Struct,
2120 0i16,
2121 );
2122 inner.write(p);
2123 p.write_field_end();
2124 }
2125 Self::ApplicationException(_aexn) => unreachable!(),
2126 }
2127 p.write_field_stop();
2128 p.write_struct_end();
2129 }
2130 }
2131
2132 impl<P> ::fbthrift::Deserialize<P> for WaitingForCatchUpDataExn
2133 where
2134 P: ::fbthrift::ProtocolReader,
2135 {
2136 fn read(p: &mut P) -> ::anyhow::Result<Self> {
2137 static RETURNS: &[::fbthrift::Field] = &[
2138 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2139 ];
2140 let _ = p.read_struct_begin(|_| ())?;
2141 let mut once = false;
2142 let mut alt = ::std::option::Option::None;
2143 loop {
2144 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2145 match ((fty, fid as ::std::primitive::i32), once) {
2146 ((::fbthrift::TType::Stop, _), _) => {
2147 p.read_field_end()?;
2148 break;
2149 }
2150 ((::fbthrift::TType::Struct, 0i32), false) => {
2151 once = true;
2152 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2153 }
2154 ((ty, _id), false) => p.skip(ty)?,
2155 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2156 ::fbthrift::ApplicationException::new(
2157 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2158 format!(
2159 "unwanted extra union {} field ty {:?} id {}",
2160 "WaitingForCatchUpDataExn",
2161 badty,
2162 badid,
2163 ),
2164 )
2165 )),
2166 }
2167 p.read_field_end()?;
2168 }
2169 p.read_struct_end()?;
2170 alt.ok_or_else(||
2171 ::fbthrift::ApplicationException::new(
2172 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2173 format!("Empty union {}", "WaitingForCatchUpDataExn"),
2174 )
2175 .into(),
2176 )
2177 }
2178 }
2179
2180 #[derive(Clone, Debug)]
2181 pub enum RemovePartExn {
2182 #[doc(hidden)]
2183 Success(crate::types::AdminExecResp),
2184 ApplicationException(::fbthrift::ApplicationException),
2185 }
2186
2187 impl ::std::convert::From<crate::errors::storage_service::RemovePartError> for RemovePartExn {
2188 fn from(err: crate::errors::storage_service::RemovePartError) -> Self {
2189 match err {
2190 crate::errors::storage_service::RemovePartError::ApplicationException(aexn) => RemovePartExn::ApplicationException(aexn),
2191 crate::errors::storage_service::RemovePartError::ThriftError(err) => RemovePartExn::ApplicationException(::fbthrift::ApplicationException {
2192 message: err.to_string(),
2193 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2194 }),
2195 }
2196 }
2197 }
2198
2199 impl ::std::convert::From<::fbthrift::ApplicationException> for RemovePartExn {
2200 fn from(exn: ::fbthrift::ApplicationException) -> Self {
2201 Self::ApplicationException(exn)
2202 }
2203 }
2204
2205 impl ::fbthrift::ExceptionInfo for RemovePartExn {
2206 fn exn_name(&self) -> &'static str {
2207 match self {
2208 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2209 Self::ApplicationException(aexn) => aexn.exn_name(),
2210 }
2211 }
2212
2213 fn exn_value(&self) -> String {
2214 match self {
2215 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2216 Self::ApplicationException(aexn) => aexn.exn_value(),
2217 }
2218 }
2219
2220 fn exn_is_declared(&self) -> bool {
2221 match self {
2222 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2223 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2224 }
2225 }
2226 }
2227
2228 impl ::fbthrift::ResultInfo for RemovePartExn {
2229 fn result_type(&self) -> ::fbthrift::ResultType {
2230 match self {
2231 Self::Success(_) => ::fbthrift::ResultType::Return,
2232 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2233 }
2234 }
2235 }
2236
2237 impl ::fbthrift::GetTType for RemovePartExn {
2238 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2239 }
2240
2241 impl<P> ::fbthrift::Serialize<P> for RemovePartExn
2242 where
2243 P: ::fbthrift::ProtocolWriter,
2244 {
2245 fn write(&self, p: &mut P) {
2246 if let Self::ApplicationException(aexn) = self {
2247 return aexn.write(p);
2248 }
2249 p.write_struct_begin("RemovePart");
2250 match self {
2251 Self::Success(inner) => {
2252 p.write_field_begin(
2253 "Success",
2254 ::fbthrift::TType::Struct,
2255 0i16,
2256 );
2257 inner.write(p);
2258 p.write_field_end();
2259 }
2260 Self::ApplicationException(_aexn) => unreachable!(),
2261 }
2262 p.write_field_stop();
2263 p.write_struct_end();
2264 }
2265 }
2266
2267 impl<P> ::fbthrift::Deserialize<P> for RemovePartExn
2268 where
2269 P: ::fbthrift::ProtocolReader,
2270 {
2271 fn read(p: &mut P) -> ::anyhow::Result<Self> {
2272 static RETURNS: &[::fbthrift::Field] = &[
2273 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2274 ];
2275 let _ = p.read_struct_begin(|_| ())?;
2276 let mut once = false;
2277 let mut alt = ::std::option::Option::None;
2278 loop {
2279 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2280 match ((fty, fid as ::std::primitive::i32), once) {
2281 ((::fbthrift::TType::Stop, _), _) => {
2282 p.read_field_end()?;
2283 break;
2284 }
2285 ((::fbthrift::TType::Struct, 0i32), false) => {
2286 once = true;
2287 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2288 }
2289 ((ty, _id), false) => p.skip(ty)?,
2290 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2291 ::fbthrift::ApplicationException::new(
2292 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2293 format!(
2294 "unwanted extra union {} field ty {:?} id {}",
2295 "RemovePartExn",
2296 badty,
2297 badid,
2298 ),
2299 )
2300 )),
2301 }
2302 p.read_field_end()?;
2303 }
2304 p.read_struct_end()?;
2305 alt.ok_or_else(||
2306 ::fbthrift::ApplicationException::new(
2307 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2308 format!("Empty union {}", "RemovePartExn"),
2309 )
2310 .into(),
2311 )
2312 }
2313 }
2314
2315 #[derive(Clone, Debug)]
2316 pub enum MemberChangeExn {
2317 #[doc(hidden)]
2318 Success(crate::types::AdminExecResp),
2319 ApplicationException(::fbthrift::ApplicationException),
2320 }
2321
2322 impl ::std::convert::From<crate::errors::storage_service::MemberChangeError> for MemberChangeExn {
2323 fn from(err: crate::errors::storage_service::MemberChangeError) -> Self {
2324 match err {
2325 crate::errors::storage_service::MemberChangeError::ApplicationException(aexn) => MemberChangeExn::ApplicationException(aexn),
2326 crate::errors::storage_service::MemberChangeError::ThriftError(err) => MemberChangeExn::ApplicationException(::fbthrift::ApplicationException {
2327 message: err.to_string(),
2328 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2329 }),
2330 }
2331 }
2332 }
2333
2334 impl ::std::convert::From<::fbthrift::ApplicationException> for MemberChangeExn {
2335 fn from(exn: ::fbthrift::ApplicationException) -> Self {
2336 Self::ApplicationException(exn)
2337 }
2338 }
2339
2340 impl ::fbthrift::ExceptionInfo for MemberChangeExn {
2341 fn exn_name(&self) -> &'static str {
2342 match self {
2343 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2344 Self::ApplicationException(aexn) => aexn.exn_name(),
2345 }
2346 }
2347
2348 fn exn_value(&self) -> String {
2349 match self {
2350 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2351 Self::ApplicationException(aexn) => aexn.exn_value(),
2352 }
2353 }
2354
2355 fn exn_is_declared(&self) -> bool {
2356 match self {
2357 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2358 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2359 }
2360 }
2361 }
2362
2363 impl ::fbthrift::ResultInfo for MemberChangeExn {
2364 fn result_type(&self) -> ::fbthrift::ResultType {
2365 match self {
2366 Self::Success(_) => ::fbthrift::ResultType::Return,
2367 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2368 }
2369 }
2370 }
2371
2372 impl ::fbthrift::GetTType for MemberChangeExn {
2373 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2374 }
2375
2376 impl<P> ::fbthrift::Serialize<P> for MemberChangeExn
2377 where
2378 P: ::fbthrift::ProtocolWriter,
2379 {
2380 fn write(&self, p: &mut P) {
2381 if let Self::ApplicationException(aexn) = self {
2382 return aexn.write(p);
2383 }
2384 p.write_struct_begin("MemberChange");
2385 match self {
2386 Self::Success(inner) => {
2387 p.write_field_begin(
2388 "Success",
2389 ::fbthrift::TType::Struct,
2390 0i16,
2391 );
2392 inner.write(p);
2393 p.write_field_end();
2394 }
2395 Self::ApplicationException(_aexn) => unreachable!(),
2396 }
2397 p.write_field_stop();
2398 p.write_struct_end();
2399 }
2400 }
2401
2402 impl<P> ::fbthrift::Deserialize<P> for MemberChangeExn
2403 where
2404 P: ::fbthrift::ProtocolReader,
2405 {
2406 fn read(p: &mut P) -> ::anyhow::Result<Self> {
2407 static RETURNS: &[::fbthrift::Field] = &[
2408 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2409 ];
2410 let _ = p.read_struct_begin(|_| ())?;
2411 let mut once = false;
2412 let mut alt = ::std::option::Option::None;
2413 loop {
2414 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2415 match ((fty, fid as ::std::primitive::i32), once) {
2416 ((::fbthrift::TType::Stop, _), _) => {
2417 p.read_field_end()?;
2418 break;
2419 }
2420 ((::fbthrift::TType::Struct, 0i32), false) => {
2421 once = true;
2422 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2423 }
2424 ((ty, _id), false) => p.skip(ty)?,
2425 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2426 ::fbthrift::ApplicationException::new(
2427 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2428 format!(
2429 "unwanted extra union {} field ty {:?} id {}",
2430 "MemberChangeExn",
2431 badty,
2432 badid,
2433 ),
2434 )
2435 )),
2436 }
2437 p.read_field_end()?;
2438 }
2439 p.read_struct_end()?;
2440 alt.ok_or_else(||
2441 ::fbthrift::ApplicationException::new(
2442 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2443 format!("Empty union {}", "MemberChangeExn"),
2444 )
2445 .into(),
2446 )
2447 }
2448 }
2449
2450 #[derive(Clone, Debug)]
2451 pub enum CheckPeersExn {
2452 #[doc(hidden)]
2453 Success(crate::types::AdminExecResp),
2454 ApplicationException(::fbthrift::ApplicationException),
2455 }
2456
2457 impl ::std::convert::From<crate::errors::storage_service::CheckPeersError> for CheckPeersExn {
2458 fn from(err: crate::errors::storage_service::CheckPeersError) -> Self {
2459 match err {
2460 crate::errors::storage_service::CheckPeersError::ApplicationException(aexn) => CheckPeersExn::ApplicationException(aexn),
2461 crate::errors::storage_service::CheckPeersError::ThriftError(err) => CheckPeersExn::ApplicationException(::fbthrift::ApplicationException {
2462 message: err.to_string(),
2463 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2464 }),
2465 }
2466 }
2467 }
2468
2469 impl ::std::convert::From<::fbthrift::ApplicationException> for CheckPeersExn {
2470 fn from(exn: ::fbthrift::ApplicationException) -> Self {
2471 Self::ApplicationException(exn)
2472 }
2473 }
2474
2475 impl ::fbthrift::ExceptionInfo for CheckPeersExn {
2476 fn exn_name(&self) -> &'static str {
2477 match self {
2478 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2479 Self::ApplicationException(aexn) => aexn.exn_name(),
2480 }
2481 }
2482
2483 fn exn_value(&self) -> String {
2484 match self {
2485 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2486 Self::ApplicationException(aexn) => aexn.exn_value(),
2487 }
2488 }
2489
2490 fn exn_is_declared(&self) -> bool {
2491 match self {
2492 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2493 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2494 }
2495 }
2496 }
2497
2498 impl ::fbthrift::ResultInfo for CheckPeersExn {
2499 fn result_type(&self) -> ::fbthrift::ResultType {
2500 match self {
2501 Self::Success(_) => ::fbthrift::ResultType::Return,
2502 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2503 }
2504 }
2505 }
2506
2507 impl ::fbthrift::GetTType for CheckPeersExn {
2508 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2509 }
2510
2511 impl<P> ::fbthrift::Serialize<P> for CheckPeersExn
2512 where
2513 P: ::fbthrift::ProtocolWriter,
2514 {
2515 fn write(&self, p: &mut P) {
2516 if let Self::ApplicationException(aexn) = self {
2517 return aexn.write(p);
2518 }
2519 p.write_struct_begin("CheckPeers");
2520 match self {
2521 Self::Success(inner) => {
2522 p.write_field_begin(
2523 "Success",
2524 ::fbthrift::TType::Struct,
2525 0i16,
2526 );
2527 inner.write(p);
2528 p.write_field_end();
2529 }
2530 Self::ApplicationException(_aexn) => unreachable!(),
2531 }
2532 p.write_field_stop();
2533 p.write_struct_end();
2534 }
2535 }
2536
2537 impl<P> ::fbthrift::Deserialize<P> for CheckPeersExn
2538 where
2539 P: ::fbthrift::ProtocolReader,
2540 {
2541 fn read(p: &mut P) -> ::anyhow::Result<Self> {
2542 static RETURNS: &[::fbthrift::Field] = &[
2543 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2544 ];
2545 let _ = p.read_struct_begin(|_| ())?;
2546 let mut once = false;
2547 let mut alt = ::std::option::Option::None;
2548 loop {
2549 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2550 match ((fty, fid as ::std::primitive::i32), once) {
2551 ((::fbthrift::TType::Stop, _), _) => {
2552 p.read_field_end()?;
2553 break;
2554 }
2555 ((::fbthrift::TType::Struct, 0i32), false) => {
2556 once = true;
2557 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2558 }
2559 ((ty, _id), false) => p.skip(ty)?,
2560 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2561 ::fbthrift::ApplicationException::new(
2562 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2563 format!(
2564 "unwanted extra union {} field ty {:?} id {}",
2565 "CheckPeersExn",
2566 badty,
2567 badid,
2568 ),
2569 )
2570 )),
2571 }
2572 p.read_field_end()?;
2573 }
2574 p.read_struct_end()?;
2575 alt.ok_or_else(||
2576 ::fbthrift::ApplicationException::new(
2577 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2578 format!("Empty union {}", "CheckPeersExn"),
2579 )
2580 .into(),
2581 )
2582 }
2583 }
2584
2585 #[derive(Clone, Debug)]
2586 pub enum GetLeaderPartExn {
2587 #[doc(hidden)]
2588 Success(crate::types::GetLeaderResp),
2589 ApplicationException(::fbthrift::ApplicationException),
2590 }
2591
2592 impl ::std::convert::From<crate::errors::storage_service::GetLeaderPartError> for GetLeaderPartExn {
2593 fn from(err: crate::errors::storage_service::GetLeaderPartError) -> Self {
2594 match err {
2595 crate::errors::storage_service::GetLeaderPartError::ApplicationException(aexn) => GetLeaderPartExn::ApplicationException(aexn),
2596 crate::errors::storage_service::GetLeaderPartError::ThriftError(err) => GetLeaderPartExn::ApplicationException(::fbthrift::ApplicationException {
2597 message: err.to_string(),
2598 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2599 }),
2600 }
2601 }
2602 }
2603
2604 impl ::std::convert::From<::fbthrift::ApplicationException> for GetLeaderPartExn {
2605 fn from(exn: ::fbthrift::ApplicationException) -> Self {
2606 Self::ApplicationException(exn)
2607 }
2608 }
2609
2610 impl ::fbthrift::ExceptionInfo for GetLeaderPartExn {
2611 fn exn_name(&self) -> &'static str {
2612 match self {
2613 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2614 Self::ApplicationException(aexn) => aexn.exn_name(),
2615 }
2616 }
2617
2618 fn exn_value(&self) -> String {
2619 match self {
2620 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2621 Self::ApplicationException(aexn) => aexn.exn_value(),
2622 }
2623 }
2624
2625 fn exn_is_declared(&self) -> bool {
2626 match self {
2627 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2628 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2629 }
2630 }
2631 }
2632
2633 impl ::fbthrift::ResultInfo for GetLeaderPartExn {
2634 fn result_type(&self) -> ::fbthrift::ResultType {
2635 match self {
2636 Self::Success(_) => ::fbthrift::ResultType::Return,
2637 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2638 }
2639 }
2640 }
2641
2642 impl ::fbthrift::GetTType for GetLeaderPartExn {
2643 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2644 }
2645
2646 impl<P> ::fbthrift::Serialize<P> for GetLeaderPartExn
2647 where
2648 P: ::fbthrift::ProtocolWriter,
2649 {
2650 fn write(&self, p: &mut P) {
2651 if let Self::ApplicationException(aexn) = self {
2652 return aexn.write(p);
2653 }
2654 p.write_struct_begin("GetLeaderPart");
2655 match self {
2656 Self::Success(inner) => {
2657 p.write_field_begin(
2658 "Success",
2659 ::fbthrift::TType::Struct,
2660 0i16,
2661 );
2662 inner.write(p);
2663 p.write_field_end();
2664 }
2665 Self::ApplicationException(_aexn) => unreachable!(),
2666 }
2667 p.write_field_stop();
2668 p.write_struct_end();
2669 }
2670 }
2671
2672 impl<P> ::fbthrift::Deserialize<P> for GetLeaderPartExn
2673 where
2674 P: ::fbthrift::ProtocolReader,
2675 {
2676 fn read(p: &mut P) -> ::anyhow::Result<Self> {
2677 static RETURNS: &[::fbthrift::Field] = &[
2678 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2679 ];
2680 let _ = p.read_struct_begin(|_| ())?;
2681 let mut once = false;
2682 let mut alt = ::std::option::Option::None;
2683 loop {
2684 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2685 match ((fty, fid as ::std::primitive::i32), once) {
2686 ((::fbthrift::TType::Stop, _), _) => {
2687 p.read_field_end()?;
2688 break;
2689 }
2690 ((::fbthrift::TType::Struct, 0i32), false) => {
2691 once = true;
2692 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2693 }
2694 ((ty, _id), false) => p.skip(ty)?,
2695 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2696 ::fbthrift::ApplicationException::new(
2697 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2698 format!(
2699 "unwanted extra union {} field ty {:?} id {}",
2700 "GetLeaderPartExn",
2701 badty,
2702 badid,
2703 ),
2704 )
2705 )),
2706 }
2707 p.read_field_end()?;
2708 }
2709 p.read_struct_end()?;
2710 alt.ok_or_else(||
2711 ::fbthrift::ApplicationException::new(
2712 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2713 format!("Empty union {}", "GetLeaderPartExn"),
2714 )
2715 .into(),
2716 )
2717 }
2718 }
2719
2720 #[derive(Clone, Debug)]
2721 pub enum CreateCheckpointExn {
2722 #[doc(hidden)]
2723 Success(crate::types::AdminExecResp),
2724 ApplicationException(::fbthrift::ApplicationException),
2725 }
2726
2727 impl ::std::convert::From<crate::errors::storage_service::CreateCheckpointError> for CreateCheckpointExn {
2728 fn from(err: crate::errors::storage_service::CreateCheckpointError) -> Self {
2729 match err {
2730 crate::errors::storage_service::CreateCheckpointError::ApplicationException(aexn) => CreateCheckpointExn::ApplicationException(aexn),
2731 crate::errors::storage_service::CreateCheckpointError::ThriftError(err) => CreateCheckpointExn::ApplicationException(::fbthrift::ApplicationException {
2732 message: err.to_string(),
2733 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2734 }),
2735 }
2736 }
2737 }
2738
2739 impl ::std::convert::From<::fbthrift::ApplicationException> for CreateCheckpointExn {
2740 fn from(exn: ::fbthrift::ApplicationException) -> Self {
2741 Self::ApplicationException(exn)
2742 }
2743 }
2744
2745 impl ::fbthrift::ExceptionInfo for CreateCheckpointExn {
2746 fn exn_name(&self) -> &'static str {
2747 match self {
2748 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2749 Self::ApplicationException(aexn) => aexn.exn_name(),
2750 }
2751 }
2752
2753 fn exn_value(&self) -> String {
2754 match self {
2755 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2756 Self::ApplicationException(aexn) => aexn.exn_value(),
2757 }
2758 }
2759
2760 fn exn_is_declared(&self) -> bool {
2761 match self {
2762 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2763 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2764 }
2765 }
2766 }
2767
2768 impl ::fbthrift::ResultInfo for CreateCheckpointExn {
2769 fn result_type(&self) -> ::fbthrift::ResultType {
2770 match self {
2771 Self::Success(_) => ::fbthrift::ResultType::Return,
2772 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2773 }
2774 }
2775 }
2776
2777 impl ::fbthrift::GetTType for CreateCheckpointExn {
2778 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2779 }
2780
2781 impl<P> ::fbthrift::Serialize<P> for CreateCheckpointExn
2782 where
2783 P: ::fbthrift::ProtocolWriter,
2784 {
2785 fn write(&self, p: &mut P) {
2786 if let Self::ApplicationException(aexn) = self {
2787 return aexn.write(p);
2788 }
2789 p.write_struct_begin("CreateCheckpoint");
2790 match self {
2791 Self::Success(inner) => {
2792 p.write_field_begin(
2793 "Success",
2794 ::fbthrift::TType::Struct,
2795 0i16,
2796 );
2797 inner.write(p);
2798 p.write_field_end();
2799 }
2800 Self::ApplicationException(_aexn) => unreachable!(),
2801 }
2802 p.write_field_stop();
2803 p.write_struct_end();
2804 }
2805 }
2806
2807 impl<P> ::fbthrift::Deserialize<P> for CreateCheckpointExn
2808 where
2809 P: ::fbthrift::ProtocolReader,
2810 {
2811 fn read(p: &mut P) -> ::anyhow::Result<Self> {
2812 static RETURNS: &[::fbthrift::Field] = &[
2813 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2814 ];
2815 let _ = p.read_struct_begin(|_| ())?;
2816 let mut once = false;
2817 let mut alt = ::std::option::Option::None;
2818 loop {
2819 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2820 match ((fty, fid as ::std::primitive::i32), once) {
2821 ((::fbthrift::TType::Stop, _), _) => {
2822 p.read_field_end()?;
2823 break;
2824 }
2825 ((::fbthrift::TType::Struct, 0i32), false) => {
2826 once = true;
2827 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2828 }
2829 ((ty, _id), false) => p.skip(ty)?,
2830 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2831 ::fbthrift::ApplicationException::new(
2832 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2833 format!(
2834 "unwanted extra union {} field ty {:?} id {}",
2835 "CreateCheckpointExn",
2836 badty,
2837 badid,
2838 ),
2839 )
2840 )),
2841 }
2842 p.read_field_end()?;
2843 }
2844 p.read_struct_end()?;
2845 alt.ok_or_else(||
2846 ::fbthrift::ApplicationException::new(
2847 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2848 format!("Empty union {}", "CreateCheckpointExn"),
2849 )
2850 .into(),
2851 )
2852 }
2853 }
2854
2855 #[derive(Clone, Debug)]
2856 pub enum DropCheckpointExn {
2857 #[doc(hidden)]
2858 Success(crate::types::AdminExecResp),
2859 ApplicationException(::fbthrift::ApplicationException),
2860 }
2861
2862 impl ::std::convert::From<crate::errors::storage_service::DropCheckpointError> for DropCheckpointExn {
2863 fn from(err: crate::errors::storage_service::DropCheckpointError) -> Self {
2864 match err {
2865 crate::errors::storage_service::DropCheckpointError::ApplicationException(aexn) => DropCheckpointExn::ApplicationException(aexn),
2866 crate::errors::storage_service::DropCheckpointError::ThriftError(err) => DropCheckpointExn::ApplicationException(::fbthrift::ApplicationException {
2867 message: err.to_string(),
2868 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
2869 }),
2870 }
2871 }
2872 }
2873
2874 impl ::std::convert::From<::fbthrift::ApplicationException> for DropCheckpointExn {
2875 fn from(exn: ::fbthrift::ApplicationException) -> Self {
2876 Self::ApplicationException(exn)
2877 }
2878 }
2879
2880 impl ::fbthrift::ExceptionInfo for DropCheckpointExn {
2881 fn exn_name(&self) -> &'static str {
2882 match self {
2883 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
2884 Self::ApplicationException(aexn) => aexn.exn_name(),
2885 }
2886 }
2887
2888 fn exn_value(&self) -> String {
2889 match self {
2890 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
2891 Self::ApplicationException(aexn) => aexn.exn_value(),
2892 }
2893 }
2894
2895 fn exn_is_declared(&self) -> bool {
2896 match self {
2897 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
2898 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
2899 }
2900 }
2901 }
2902
2903 impl ::fbthrift::ResultInfo for DropCheckpointExn {
2904 fn result_type(&self) -> ::fbthrift::ResultType {
2905 match self {
2906 Self::Success(_) => ::fbthrift::ResultType::Return,
2907 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
2908 }
2909 }
2910 }
2911
2912 impl ::fbthrift::GetTType for DropCheckpointExn {
2913 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
2914 }
2915
2916 impl<P> ::fbthrift::Serialize<P> for DropCheckpointExn
2917 where
2918 P: ::fbthrift::ProtocolWriter,
2919 {
2920 fn write(&self, p: &mut P) {
2921 if let Self::ApplicationException(aexn) = self {
2922 return aexn.write(p);
2923 }
2924 p.write_struct_begin("DropCheckpoint");
2925 match self {
2926 Self::Success(inner) => {
2927 p.write_field_begin(
2928 "Success",
2929 ::fbthrift::TType::Struct,
2930 0i16,
2931 );
2932 inner.write(p);
2933 p.write_field_end();
2934 }
2935 Self::ApplicationException(_aexn) => unreachable!(),
2936 }
2937 p.write_field_stop();
2938 p.write_struct_end();
2939 }
2940 }
2941
2942 impl<P> ::fbthrift::Deserialize<P> for DropCheckpointExn
2943 where
2944 P: ::fbthrift::ProtocolReader,
2945 {
2946 fn read(p: &mut P) -> ::anyhow::Result<Self> {
2947 static RETURNS: &[::fbthrift::Field] = &[
2948 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
2949 ];
2950 let _ = p.read_struct_begin(|_| ())?;
2951 let mut once = false;
2952 let mut alt = ::std::option::Option::None;
2953 loop {
2954 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
2955 match ((fty, fid as ::std::primitive::i32), once) {
2956 ((::fbthrift::TType::Stop, _), _) => {
2957 p.read_field_end()?;
2958 break;
2959 }
2960 ((::fbthrift::TType::Struct, 0i32), false) => {
2961 once = true;
2962 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
2963 }
2964 ((ty, _id), false) => p.skip(ty)?,
2965 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
2966 ::fbthrift::ApplicationException::new(
2967 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
2968 format!(
2969 "unwanted extra union {} field ty {:?} id {}",
2970 "DropCheckpointExn",
2971 badty,
2972 badid,
2973 ),
2974 )
2975 )),
2976 }
2977 p.read_field_end()?;
2978 }
2979 p.read_struct_end()?;
2980 alt.ok_or_else(||
2981 ::fbthrift::ApplicationException::new(
2982 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
2983 format!("Empty union {}", "DropCheckpointExn"),
2984 )
2985 .into(),
2986 )
2987 }
2988 }
2989
2990 #[derive(Clone, Debug)]
2991 pub enum BlockingWritesExn {
2992 #[doc(hidden)]
2993 Success(crate::types::AdminExecResp),
2994 ApplicationException(::fbthrift::ApplicationException),
2995 }
2996
2997 impl ::std::convert::From<crate::errors::storage_service::BlockingWritesError> for BlockingWritesExn {
2998 fn from(err: crate::errors::storage_service::BlockingWritesError) -> Self {
2999 match err {
3000 crate::errors::storage_service::BlockingWritesError::ApplicationException(aexn) => BlockingWritesExn::ApplicationException(aexn),
3001 crate::errors::storage_service::BlockingWritesError::ThriftError(err) => BlockingWritesExn::ApplicationException(::fbthrift::ApplicationException {
3002 message: err.to_string(),
3003 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3004 }),
3005 }
3006 }
3007 }
3008
3009 impl ::std::convert::From<::fbthrift::ApplicationException> for BlockingWritesExn {
3010 fn from(exn: ::fbthrift::ApplicationException) -> Self {
3011 Self::ApplicationException(exn)
3012 }
3013 }
3014
3015 impl ::fbthrift::ExceptionInfo for BlockingWritesExn {
3016 fn exn_name(&self) -> &'static str {
3017 match self {
3018 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3019 Self::ApplicationException(aexn) => aexn.exn_name(),
3020 }
3021 }
3022
3023 fn exn_value(&self) -> String {
3024 match self {
3025 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3026 Self::ApplicationException(aexn) => aexn.exn_value(),
3027 }
3028 }
3029
3030 fn exn_is_declared(&self) -> bool {
3031 match self {
3032 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3033 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3034 }
3035 }
3036 }
3037
3038 impl ::fbthrift::ResultInfo for BlockingWritesExn {
3039 fn result_type(&self) -> ::fbthrift::ResultType {
3040 match self {
3041 Self::Success(_) => ::fbthrift::ResultType::Return,
3042 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3043 }
3044 }
3045 }
3046
3047 impl ::fbthrift::GetTType for BlockingWritesExn {
3048 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3049 }
3050
3051 impl<P> ::fbthrift::Serialize<P> for BlockingWritesExn
3052 where
3053 P: ::fbthrift::ProtocolWriter,
3054 {
3055 fn write(&self, p: &mut P) {
3056 if let Self::ApplicationException(aexn) = self {
3057 return aexn.write(p);
3058 }
3059 p.write_struct_begin("BlockingWrites");
3060 match self {
3061 Self::Success(inner) => {
3062 p.write_field_begin(
3063 "Success",
3064 ::fbthrift::TType::Struct,
3065 0i16,
3066 );
3067 inner.write(p);
3068 p.write_field_end();
3069 }
3070 Self::ApplicationException(_aexn) => unreachable!(),
3071 }
3072 p.write_field_stop();
3073 p.write_struct_end();
3074 }
3075 }
3076
3077 impl<P> ::fbthrift::Deserialize<P> for BlockingWritesExn
3078 where
3079 P: ::fbthrift::ProtocolReader,
3080 {
3081 fn read(p: &mut P) -> ::anyhow::Result<Self> {
3082 static RETURNS: &[::fbthrift::Field] = &[
3083 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3084 ];
3085 let _ = p.read_struct_begin(|_| ())?;
3086 let mut once = false;
3087 let mut alt = ::std::option::Option::None;
3088 loop {
3089 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3090 match ((fty, fid as ::std::primitive::i32), once) {
3091 ((::fbthrift::TType::Stop, _), _) => {
3092 p.read_field_end()?;
3093 break;
3094 }
3095 ((::fbthrift::TType::Struct, 0i32), false) => {
3096 once = true;
3097 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3098 }
3099 ((ty, _id), false) => p.skip(ty)?,
3100 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3101 ::fbthrift::ApplicationException::new(
3102 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3103 format!(
3104 "unwanted extra union {} field ty {:?} id {}",
3105 "BlockingWritesExn",
3106 badty,
3107 badid,
3108 ),
3109 )
3110 )),
3111 }
3112 p.read_field_end()?;
3113 }
3114 p.read_struct_end()?;
3115 alt.ok_or_else(||
3116 ::fbthrift::ApplicationException::new(
3117 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3118 format!("Empty union {}", "BlockingWritesExn"),
3119 )
3120 .into(),
3121 )
3122 }
3123 }
3124
3125 #[derive(Clone, Debug)]
3126 pub enum RebuildTagIndexExn {
3127 #[doc(hidden)]
3128 Success(crate::types::AdminExecResp),
3129 ApplicationException(::fbthrift::ApplicationException),
3130 }
3131
3132 impl ::std::convert::From<crate::errors::storage_service::RebuildTagIndexError> for RebuildTagIndexExn {
3133 fn from(err: crate::errors::storage_service::RebuildTagIndexError) -> Self {
3134 match err {
3135 crate::errors::storage_service::RebuildTagIndexError::ApplicationException(aexn) => RebuildTagIndexExn::ApplicationException(aexn),
3136 crate::errors::storage_service::RebuildTagIndexError::ThriftError(err) => RebuildTagIndexExn::ApplicationException(::fbthrift::ApplicationException {
3137 message: err.to_string(),
3138 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3139 }),
3140 }
3141 }
3142 }
3143
3144 impl ::std::convert::From<::fbthrift::ApplicationException> for RebuildTagIndexExn {
3145 fn from(exn: ::fbthrift::ApplicationException) -> Self {
3146 Self::ApplicationException(exn)
3147 }
3148 }
3149
3150 impl ::fbthrift::ExceptionInfo for RebuildTagIndexExn {
3151 fn exn_name(&self) -> &'static str {
3152 match self {
3153 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3154 Self::ApplicationException(aexn) => aexn.exn_name(),
3155 }
3156 }
3157
3158 fn exn_value(&self) -> String {
3159 match self {
3160 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3161 Self::ApplicationException(aexn) => aexn.exn_value(),
3162 }
3163 }
3164
3165 fn exn_is_declared(&self) -> bool {
3166 match self {
3167 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3168 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3169 }
3170 }
3171 }
3172
3173 impl ::fbthrift::ResultInfo for RebuildTagIndexExn {
3174 fn result_type(&self) -> ::fbthrift::ResultType {
3175 match self {
3176 Self::Success(_) => ::fbthrift::ResultType::Return,
3177 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3178 }
3179 }
3180 }
3181
3182 impl ::fbthrift::GetTType for RebuildTagIndexExn {
3183 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3184 }
3185
3186 impl<P> ::fbthrift::Serialize<P> for RebuildTagIndexExn
3187 where
3188 P: ::fbthrift::ProtocolWriter,
3189 {
3190 fn write(&self, p: &mut P) {
3191 if let Self::ApplicationException(aexn) = self {
3192 return aexn.write(p);
3193 }
3194 p.write_struct_begin("RebuildTagIndex");
3195 match self {
3196 Self::Success(inner) => {
3197 p.write_field_begin(
3198 "Success",
3199 ::fbthrift::TType::Struct,
3200 0i16,
3201 );
3202 inner.write(p);
3203 p.write_field_end();
3204 }
3205 Self::ApplicationException(_aexn) => unreachable!(),
3206 }
3207 p.write_field_stop();
3208 p.write_struct_end();
3209 }
3210 }
3211
3212 impl<P> ::fbthrift::Deserialize<P> for RebuildTagIndexExn
3213 where
3214 P: ::fbthrift::ProtocolReader,
3215 {
3216 fn read(p: &mut P) -> ::anyhow::Result<Self> {
3217 static RETURNS: &[::fbthrift::Field] = &[
3218 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3219 ];
3220 let _ = p.read_struct_begin(|_| ())?;
3221 let mut once = false;
3222 let mut alt = ::std::option::Option::None;
3223 loop {
3224 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3225 match ((fty, fid as ::std::primitive::i32), once) {
3226 ((::fbthrift::TType::Stop, _), _) => {
3227 p.read_field_end()?;
3228 break;
3229 }
3230 ((::fbthrift::TType::Struct, 0i32), false) => {
3231 once = true;
3232 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3233 }
3234 ((ty, _id), false) => p.skip(ty)?,
3235 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3236 ::fbthrift::ApplicationException::new(
3237 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3238 format!(
3239 "unwanted extra union {} field ty {:?} id {}",
3240 "RebuildTagIndexExn",
3241 badty,
3242 badid,
3243 ),
3244 )
3245 )),
3246 }
3247 p.read_field_end()?;
3248 }
3249 p.read_struct_end()?;
3250 alt.ok_or_else(||
3251 ::fbthrift::ApplicationException::new(
3252 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3253 format!("Empty union {}", "RebuildTagIndexExn"),
3254 )
3255 .into(),
3256 )
3257 }
3258 }
3259
3260 #[derive(Clone, Debug)]
3261 pub enum RebuildEdgeIndexExn {
3262 #[doc(hidden)]
3263 Success(crate::types::AdminExecResp),
3264 ApplicationException(::fbthrift::ApplicationException),
3265 }
3266
3267 impl ::std::convert::From<crate::errors::storage_service::RebuildEdgeIndexError> for RebuildEdgeIndexExn {
3268 fn from(err: crate::errors::storage_service::RebuildEdgeIndexError) -> Self {
3269 match err {
3270 crate::errors::storage_service::RebuildEdgeIndexError::ApplicationException(aexn) => RebuildEdgeIndexExn::ApplicationException(aexn),
3271 crate::errors::storage_service::RebuildEdgeIndexError::ThriftError(err) => RebuildEdgeIndexExn::ApplicationException(::fbthrift::ApplicationException {
3272 message: err.to_string(),
3273 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3274 }),
3275 }
3276 }
3277 }
3278
3279 impl ::std::convert::From<::fbthrift::ApplicationException> for RebuildEdgeIndexExn {
3280 fn from(exn: ::fbthrift::ApplicationException) -> Self {
3281 Self::ApplicationException(exn)
3282 }
3283 }
3284
3285 impl ::fbthrift::ExceptionInfo for RebuildEdgeIndexExn {
3286 fn exn_name(&self) -> &'static str {
3287 match self {
3288 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3289 Self::ApplicationException(aexn) => aexn.exn_name(),
3290 }
3291 }
3292
3293 fn exn_value(&self) -> String {
3294 match self {
3295 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3296 Self::ApplicationException(aexn) => aexn.exn_value(),
3297 }
3298 }
3299
3300 fn exn_is_declared(&self) -> bool {
3301 match self {
3302 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3303 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3304 }
3305 }
3306 }
3307
3308 impl ::fbthrift::ResultInfo for RebuildEdgeIndexExn {
3309 fn result_type(&self) -> ::fbthrift::ResultType {
3310 match self {
3311 Self::Success(_) => ::fbthrift::ResultType::Return,
3312 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3313 }
3314 }
3315 }
3316
3317 impl ::fbthrift::GetTType for RebuildEdgeIndexExn {
3318 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3319 }
3320
3321 impl<P> ::fbthrift::Serialize<P> for RebuildEdgeIndexExn
3322 where
3323 P: ::fbthrift::ProtocolWriter,
3324 {
3325 fn write(&self, p: &mut P) {
3326 if let Self::ApplicationException(aexn) = self {
3327 return aexn.write(p);
3328 }
3329 p.write_struct_begin("RebuildEdgeIndex");
3330 match self {
3331 Self::Success(inner) => {
3332 p.write_field_begin(
3333 "Success",
3334 ::fbthrift::TType::Struct,
3335 0i16,
3336 );
3337 inner.write(p);
3338 p.write_field_end();
3339 }
3340 Self::ApplicationException(_aexn) => unreachable!(),
3341 }
3342 p.write_field_stop();
3343 p.write_struct_end();
3344 }
3345 }
3346
3347 impl<P> ::fbthrift::Deserialize<P> for RebuildEdgeIndexExn
3348 where
3349 P: ::fbthrift::ProtocolReader,
3350 {
3351 fn read(p: &mut P) -> ::anyhow::Result<Self> {
3352 static RETURNS: &[::fbthrift::Field] = &[
3353 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3354 ];
3355 let _ = p.read_struct_begin(|_| ())?;
3356 let mut once = false;
3357 let mut alt = ::std::option::Option::None;
3358 loop {
3359 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3360 match ((fty, fid as ::std::primitive::i32), once) {
3361 ((::fbthrift::TType::Stop, _), _) => {
3362 p.read_field_end()?;
3363 break;
3364 }
3365 ((::fbthrift::TType::Struct, 0i32), false) => {
3366 once = true;
3367 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3368 }
3369 ((ty, _id), false) => p.skip(ty)?,
3370 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3371 ::fbthrift::ApplicationException::new(
3372 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3373 format!(
3374 "unwanted extra union {} field ty {:?} id {}",
3375 "RebuildEdgeIndexExn",
3376 badty,
3377 badid,
3378 ),
3379 )
3380 )),
3381 }
3382 p.read_field_end()?;
3383 }
3384 p.read_struct_end()?;
3385 alt.ok_or_else(||
3386 ::fbthrift::ApplicationException::new(
3387 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3388 format!("Empty union {}", "RebuildEdgeIndexExn"),
3389 )
3390 .into(),
3391 )
3392 }
3393 }
3394
3395 #[derive(Clone, Debug)]
3396 pub enum PutExn {
3397 #[doc(hidden)]
3398 Success(crate::types::ExecResponse),
3399 ApplicationException(::fbthrift::ApplicationException),
3400 }
3401
3402 impl ::std::convert::From<crate::errors::storage_service::PutError> for PutExn {
3403 fn from(err: crate::errors::storage_service::PutError) -> Self {
3404 match err {
3405 crate::errors::storage_service::PutError::ApplicationException(aexn) => PutExn::ApplicationException(aexn),
3406 crate::errors::storage_service::PutError::ThriftError(err) => PutExn::ApplicationException(::fbthrift::ApplicationException {
3407 message: err.to_string(),
3408 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3409 }),
3410 }
3411 }
3412 }
3413
3414 impl ::std::convert::From<::fbthrift::ApplicationException> for PutExn {
3415 fn from(exn: ::fbthrift::ApplicationException) -> Self {
3416 Self::ApplicationException(exn)
3417 }
3418 }
3419
3420 impl ::fbthrift::ExceptionInfo for PutExn {
3421 fn exn_name(&self) -> &'static str {
3422 match self {
3423 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3424 Self::ApplicationException(aexn) => aexn.exn_name(),
3425 }
3426 }
3427
3428 fn exn_value(&self) -> String {
3429 match self {
3430 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3431 Self::ApplicationException(aexn) => aexn.exn_value(),
3432 }
3433 }
3434
3435 fn exn_is_declared(&self) -> bool {
3436 match self {
3437 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3438 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3439 }
3440 }
3441 }
3442
3443 impl ::fbthrift::ResultInfo for PutExn {
3444 fn result_type(&self) -> ::fbthrift::ResultType {
3445 match self {
3446 Self::Success(_) => ::fbthrift::ResultType::Return,
3447 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3448 }
3449 }
3450 }
3451
3452 impl ::fbthrift::GetTType for PutExn {
3453 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3454 }
3455
3456 impl<P> ::fbthrift::Serialize<P> for PutExn
3457 where
3458 P: ::fbthrift::ProtocolWriter,
3459 {
3460 fn write(&self, p: &mut P) {
3461 if let Self::ApplicationException(aexn) = self {
3462 return aexn.write(p);
3463 }
3464 p.write_struct_begin("Put");
3465 match self {
3466 Self::Success(inner) => {
3467 p.write_field_begin(
3468 "Success",
3469 ::fbthrift::TType::Struct,
3470 0i16,
3471 );
3472 inner.write(p);
3473 p.write_field_end();
3474 }
3475 Self::ApplicationException(_aexn) => unreachable!(),
3476 }
3477 p.write_field_stop();
3478 p.write_struct_end();
3479 }
3480 }
3481
3482 impl<P> ::fbthrift::Deserialize<P> for PutExn
3483 where
3484 P: ::fbthrift::ProtocolReader,
3485 {
3486 fn read(p: &mut P) -> ::anyhow::Result<Self> {
3487 static RETURNS: &[::fbthrift::Field] = &[
3488 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3489 ];
3490 let _ = p.read_struct_begin(|_| ())?;
3491 let mut once = false;
3492 let mut alt = ::std::option::Option::None;
3493 loop {
3494 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3495 match ((fty, fid as ::std::primitive::i32), once) {
3496 ((::fbthrift::TType::Stop, _), _) => {
3497 p.read_field_end()?;
3498 break;
3499 }
3500 ((::fbthrift::TType::Struct, 0i32), false) => {
3501 once = true;
3502 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3503 }
3504 ((ty, _id), false) => p.skip(ty)?,
3505 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3506 ::fbthrift::ApplicationException::new(
3507 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3508 format!(
3509 "unwanted extra union {} field ty {:?} id {}",
3510 "PutExn",
3511 badty,
3512 badid,
3513 ),
3514 )
3515 )),
3516 }
3517 p.read_field_end()?;
3518 }
3519 p.read_struct_end()?;
3520 alt.ok_or_else(||
3521 ::fbthrift::ApplicationException::new(
3522 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3523 format!("Empty union {}", "PutExn"),
3524 )
3525 .into(),
3526 )
3527 }
3528 }
3529
3530 #[derive(Clone, Debug)]
3531 pub enum GetExn {
3532 #[doc(hidden)]
3533 Success(crate::types::GeneralResponse),
3534 ApplicationException(::fbthrift::ApplicationException),
3535 }
3536
3537 impl ::std::convert::From<crate::errors::storage_service::GetError> for GetExn {
3538 fn from(err: crate::errors::storage_service::GetError) -> Self {
3539 match err {
3540 crate::errors::storage_service::GetError::ApplicationException(aexn) => GetExn::ApplicationException(aexn),
3541 crate::errors::storage_service::GetError::ThriftError(err) => GetExn::ApplicationException(::fbthrift::ApplicationException {
3542 message: err.to_string(),
3543 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3544 }),
3545 }
3546 }
3547 }
3548
3549 impl ::std::convert::From<::fbthrift::ApplicationException> for GetExn {
3550 fn from(exn: ::fbthrift::ApplicationException) -> Self {
3551 Self::ApplicationException(exn)
3552 }
3553 }
3554
3555 impl ::fbthrift::ExceptionInfo for GetExn {
3556 fn exn_name(&self) -> &'static str {
3557 match self {
3558 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3559 Self::ApplicationException(aexn) => aexn.exn_name(),
3560 }
3561 }
3562
3563 fn exn_value(&self) -> String {
3564 match self {
3565 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3566 Self::ApplicationException(aexn) => aexn.exn_value(),
3567 }
3568 }
3569
3570 fn exn_is_declared(&self) -> bool {
3571 match self {
3572 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3573 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3574 }
3575 }
3576 }
3577
3578 impl ::fbthrift::ResultInfo for GetExn {
3579 fn result_type(&self) -> ::fbthrift::ResultType {
3580 match self {
3581 Self::Success(_) => ::fbthrift::ResultType::Return,
3582 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3583 }
3584 }
3585 }
3586
3587 impl ::fbthrift::GetTType for GetExn {
3588 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3589 }
3590
3591 impl<P> ::fbthrift::Serialize<P> for GetExn
3592 where
3593 P: ::fbthrift::ProtocolWriter,
3594 {
3595 fn write(&self, p: &mut P) {
3596 if let Self::ApplicationException(aexn) = self {
3597 return aexn.write(p);
3598 }
3599 p.write_struct_begin("Get");
3600 match self {
3601 Self::Success(inner) => {
3602 p.write_field_begin(
3603 "Success",
3604 ::fbthrift::TType::Struct,
3605 0i16,
3606 );
3607 inner.write(p);
3608 p.write_field_end();
3609 }
3610 Self::ApplicationException(_aexn) => unreachable!(),
3611 }
3612 p.write_field_stop();
3613 p.write_struct_end();
3614 }
3615 }
3616
3617 impl<P> ::fbthrift::Deserialize<P> for GetExn
3618 where
3619 P: ::fbthrift::ProtocolReader,
3620 {
3621 fn read(p: &mut P) -> ::anyhow::Result<Self> {
3622 static RETURNS: &[::fbthrift::Field] = &[
3623 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3624 ];
3625 let _ = p.read_struct_begin(|_| ())?;
3626 let mut once = false;
3627 let mut alt = ::std::option::Option::None;
3628 loop {
3629 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3630 match ((fty, fid as ::std::primitive::i32), once) {
3631 ((::fbthrift::TType::Stop, _), _) => {
3632 p.read_field_end()?;
3633 break;
3634 }
3635 ((::fbthrift::TType::Struct, 0i32), false) => {
3636 once = true;
3637 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3638 }
3639 ((ty, _id), false) => p.skip(ty)?,
3640 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3641 ::fbthrift::ApplicationException::new(
3642 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3643 format!(
3644 "unwanted extra union {} field ty {:?} id {}",
3645 "GetExn",
3646 badty,
3647 badid,
3648 ),
3649 )
3650 )),
3651 }
3652 p.read_field_end()?;
3653 }
3654 p.read_struct_end()?;
3655 alt.ok_or_else(||
3656 ::fbthrift::ApplicationException::new(
3657 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3658 format!("Empty union {}", "GetExn"),
3659 )
3660 .into(),
3661 )
3662 }
3663 }
3664
3665 #[derive(Clone, Debug)]
3666 pub enum RemoveExn {
3667 #[doc(hidden)]
3668 Success(crate::types::ExecResponse),
3669 ApplicationException(::fbthrift::ApplicationException),
3670 }
3671
3672 impl ::std::convert::From<crate::errors::storage_service::RemoveError> for RemoveExn {
3673 fn from(err: crate::errors::storage_service::RemoveError) -> Self {
3674 match err {
3675 crate::errors::storage_service::RemoveError::ApplicationException(aexn) => RemoveExn::ApplicationException(aexn),
3676 crate::errors::storage_service::RemoveError::ThriftError(err) => RemoveExn::ApplicationException(::fbthrift::ApplicationException {
3677 message: err.to_string(),
3678 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3679 }),
3680 }
3681 }
3682 }
3683
3684 impl ::std::convert::From<::fbthrift::ApplicationException> for RemoveExn {
3685 fn from(exn: ::fbthrift::ApplicationException) -> Self {
3686 Self::ApplicationException(exn)
3687 }
3688 }
3689
3690 impl ::fbthrift::ExceptionInfo for RemoveExn {
3691 fn exn_name(&self) -> &'static str {
3692 match self {
3693 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3694 Self::ApplicationException(aexn) => aexn.exn_name(),
3695 }
3696 }
3697
3698 fn exn_value(&self) -> String {
3699 match self {
3700 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3701 Self::ApplicationException(aexn) => aexn.exn_value(),
3702 }
3703 }
3704
3705 fn exn_is_declared(&self) -> bool {
3706 match self {
3707 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3708 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3709 }
3710 }
3711 }
3712
3713 impl ::fbthrift::ResultInfo for RemoveExn {
3714 fn result_type(&self) -> ::fbthrift::ResultType {
3715 match self {
3716 Self::Success(_) => ::fbthrift::ResultType::Return,
3717 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3718 }
3719 }
3720 }
3721
3722 impl ::fbthrift::GetTType for RemoveExn {
3723 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3724 }
3725
3726 impl<P> ::fbthrift::Serialize<P> for RemoveExn
3727 where
3728 P: ::fbthrift::ProtocolWriter,
3729 {
3730 fn write(&self, p: &mut P) {
3731 if let Self::ApplicationException(aexn) = self {
3732 return aexn.write(p);
3733 }
3734 p.write_struct_begin("Remove");
3735 match self {
3736 Self::Success(inner) => {
3737 p.write_field_begin(
3738 "Success",
3739 ::fbthrift::TType::Struct,
3740 0i16,
3741 );
3742 inner.write(p);
3743 p.write_field_end();
3744 }
3745 Self::ApplicationException(_aexn) => unreachable!(),
3746 }
3747 p.write_field_stop();
3748 p.write_struct_end();
3749 }
3750 }
3751
3752 impl<P> ::fbthrift::Deserialize<P> for RemoveExn
3753 where
3754 P: ::fbthrift::ProtocolReader,
3755 {
3756 fn read(p: &mut P) -> ::anyhow::Result<Self> {
3757 static RETURNS: &[::fbthrift::Field] = &[
3758 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3759 ];
3760 let _ = p.read_struct_begin(|_| ())?;
3761 let mut once = false;
3762 let mut alt = ::std::option::Option::None;
3763 loop {
3764 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3765 match ((fty, fid as ::std::primitive::i32), once) {
3766 ((::fbthrift::TType::Stop, _), _) => {
3767 p.read_field_end()?;
3768 break;
3769 }
3770 ((::fbthrift::TType::Struct, 0i32), false) => {
3771 once = true;
3772 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3773 }
3774 ((ty, _id), false) => p.skip(ty)?,
3775 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3776 ::fbthrift::ApplicationException::new(
3777 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3778 format!(
3779 "unwanted extra union {} field ty {:?} id {}",
3780 "RemoveExn",
3781 badty,
3782 badid,
3783 ),
3784 )
3785 )),
3786 }
3787 p.read_field_end()?;
3788 }
3789 p.read_struct_end()?;
3790 alt.ok_or_else(||
3791 ::fbthrift::ApplicationException::new(
3792 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3793 format!("Empty union {}", "RemoveExn"),
3794 )
3795 .into(),
3796 )
3797 }
3798 }
3799
3800 #[derive(Clone, Debug)]
3801 pub enum RemoveRangeExn {
3802 #[doc(hidden)]
3803 Success(crate::types::ExecResponse),
3804 ApplicationException(::fbthrift::ApplicationException),
3805 }
3806
3807 impl ::std::convert::From<crate::errors::storage_service::RemoveRangeError> for RemoveRangeExn {
3808 fn from(err: crate::errors::storage_service::RemoveRangeError) -> Self {
3809 match err {
3810 crate::errors::storage_service::RemoveRangeError::ApplicationException(aexn) => RemoveRangeExn::ApplicationException(aexn),
3811 crate::errors::storage_service::RemoveRangeError::ThriftError(err) => RemoveRangeExn::ApplicationException(::fbthrift::ApplicationException {
3812 message: err.to_string(),
3813 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3814 }),
3815 }
3816 }
3817 }
3818
3819 impl ::std::convert::From<::fbthrift::ApplicationException> for RemoveRangeExn {
3820 fn from(exn: ::fbthrift::ApplicationException) -> Self {
3821 Self::ApplicationException(exn)
3822 }
3823 }
3824
3825 impl ::fbthrift::ExceptionInfo for RemoveRangeExn {
3826 fn exn_name(&self) -> &'static str {
3827 match self {
3828 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3829 Self::ApplicationException(aexn) => aexn.exn_name(),
3830 }
3831 }
3832
3833 fn exn_value(&self) -> String {
3834 match self {
3835 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3836 Self::ApplicationException(aexn) => aexn.exn_value(),
3837 }
3838 }
3839
3840 fn exn_is_declared(&self) -> bool {
3841 match self {
3842 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3843 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3844 }
3845 }
3846 }
3847
3848 impl ::fbthrift::ResultInfo for RemoveRangeExn {
3849 fn result_type(&self) -> ::fbthrift::ResultType {
3850 match self {
3851 Self::Success(_) => ::fbthrift::ResultType::Return,
3852 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3853 }
3854 }
3855 }
3856
3857 impl ::fbthrift::GetTType for RemoveRangeExn {
3858 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3859 }
3860
3861 impl<P> ::fbthrift::Serialize<P> for RemoveRangeExn
3862 where
3863 P: ::fbthrift::ProtocolWriter,
3864 {
3865 fn write(&self, p: &mut P) {
3866 if let Self::ApplicationException(aexn) = self {
3867 return aexn.write(p);
3868 }
3869 p.write_struct_begin("RemoveRange");
3870 match self {
3871 Self::Success(inner) => {
3872 p.write_field_begin(
3873 "Success",
3874 ::fbthrift::TType::Struct,
3875 0i16,
3876 );
3877 inner.write(p);
3878 p.write_field_end();
3879 }
3880 Self::ApplicationException(_aexn) => unreachable!(),
3881 }
3882 p.write_field_stop();
3883 p.write_struct_end();
3884 }
3885 }
3886
3887 impl<P> ::fbthrift::Deserialize<P> for RemoveRangeExn
3888 where
3889 P: ::fbthrift::ProtocolReader,
3890 {
3891 fn read(p: &mut P) -> ::anyhow::Result<Self> {
3892 static RETURNS: &[::fbthrift::Field] = &[
3893 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
3894 ];
3895 let _ = p.read_struct_begin(|_| ())?;
3896 let mut once = false;
3897 let mut alt = ::std::option::Option::None;
3898 loop {
3899 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
3900 match ((fty, fid as ::std::primitive::i32), once) {
3901 ((::fbthrift::TType::Stop, _), _) => {
3902 p.read_field_end()?;
3903 break;
3904 }
3905 ((::fbthrift::TType::Struct, 0i32), false) => {
3906 once = true;
3907 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
3908 }
3909 ((ty, _id), false) => p.skip(ty)?,
3910 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
3911 ::fbthrift::ApplicationException::new(
3912 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
3913 format!(
3914 "unwanted extra union {} field ty {:?} id {}",
3915 "RemoveRangeExn",
3916 badty,
3917 badid,
3918 ),
3919 )
3920 )),
3921 }
3922 p.read_field_end()?;
3923 }
3924 p.read_struct_end()?;
3925 alt.ok_or_else(||
3926 ::fbthrift::ApplicationException::new(
3927 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
3928 format!("Empty union {}", "RemoveRangeExn"),
3929 )
3930 .into(),
3931 )
3932 }
3933 }
3934
3935 #[derive(Clone, Debug)]
3936 pub enum GetUUIDExn {
3937 #[doc(hidden)]
3938 Success(crate::types::GetUUIDResp),
3939 ApplicationException(::fbthrift::ApplicationException),
3940 }
3941
3942 impl ::std::convert::From<crate::errors::storage_service::GetUUIDError> for GetUUIDExn {
3943 fn from(err: crate::errors::storage_service::GetUUIDError) -> Self {
3944 match err {
3945 crate::errors::storage_service::GetUUIDError::ApplicationException(aexn) => GetUUIDExn::ApplicationException(aexn),
3946 crate::errors::storage_service::GetUUIDError::ThriftError(err) => GetUUIDExn::ApplicationException(::fbthrift::ApplicationException {
3947 message: err.to_string(),
3948 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
3949 }),
3950 }
3951 }
3952 }
3953
3954 impl ::std::convert::From<::fbthrift::ApplicationException> for GetUUIDExn {
3955 fn from(exn: ::fbthrift::ApplicationException) -> Self {
3956 Self::ApplicationException(exn)
3957 }
3958 }
3959
3960 impl ::fbthrift::ExceptionInfo for GetUUIDExn {
3961 fn exn_name(&self) -> &'static str {
3962 match self {
3963 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
3964 Self::ApplicationException(aexn) => aexn.exn_name(),
3965 }
3966 }
3967
3968 fn exn_value(&self) -> String {
3969 match self {
3970 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
3971 Self::ApplicationException(aexn) => aexn.exn_value(),
3972 }
3973 }
3974
3975 fn exn_is_declared(&self) -> bool {
3976 match self {
3977 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
3978 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
3979 }
3980 }
3981 }
3982
3983 impl ::fbthrift::ResultInfo for GetUUIDExn {
3984 fn result_type(&self) -> ::fbthrift::ResultType {
3985 match self {
3986 Self::Success(_) => ::fbthrift::ResultType::Return,
3987 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
3988 }
3989 }
3990 }
3991
3992 impl ::fbthrift::GetTType for GetUUIDExn {
3993 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
3994 }
3995
3996 impl<P> ::fbthrift::Serialize<P> for GetUUIDExn
3997 where
3998 P: ::fbthrift::ProtocolWriter,
3999 {
4000 fn write(&self, p: &mut P) {
4001 if let Self::ApplicationException(aexn) = self {
4002 return aexn.write(p);
4003 }
4004 p.write_struct_begin("GetUUID");
4005 match self {
4006 Self::Success(inner) => {
4007 p.write_field_begin(
4008 "Success",
4009 ::fbthrift::TType::Struct,
4010 0i16,
4011 );
4012 inner.write(p);
4013 p.write_field_end();
4014 }
4015 Self::ApplicationException(_aexn) => unreachable!(),
4016 }
4017 p.write_field_stop();
4018 p.write_struct_end();
4019 }
4020 }
4021
4022 impl<P> ::fbthrift::Deserialize<P> for GetUUIDExn
4023 where
4024 P: ::fbthrift::ProtocolReader,
4025 {
4026 fn read(p: &mut P) -> ::anyhow::Result<Self> {
4027 static RETURNS: &[::fbthrift::Field] = &[
4028 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4029 ];
4030 let _ = p.read_struct_begin(|_| ())?;
4031 let mut once = false;
4032 let mut alt = ::std::option::Option::None;
4033 loop {
4034 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4035 match ((fty, fid as ::std::primitive::i32), once) {
4036 ((::fbthrift::TType::Stop, _), _) => {
4037 p.read_field_end()?;
4038 break;
4039 }
4040 ((::fbthrift::TType::Struct, 0i32), false) => {
4041 once = true;
4042 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4043 }
4044 ((ty, _id), false) => p.skip(ty)?,
4045 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4046 ::fbthrift::ApplicationException::new(
4047 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4048 format!(
4049 "unwanted extra union {} field ty {:?} id {}",
4050 "GetUUIDExn",
4051 badty,
4052 badid,
4053 ),
4054 )
4055 )),
4056 }
4057 p.read_field_end()?;
4058 }
4059 p.read_struct_end()?;
4060 alt.ok_or_else(||
4061 ::fbthrift::ApplicationException::new(
4062 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4063 format!("Empty union {}", "GetUUIDExn"),
4064 )
4065 .into(),
4066 )
4067 }
4068 }
4069
4070 #[derive(Clone, Debug)]
4071 pub enum LookUpIndexExn {
4072 #[doc(hidden)]
4073 Success(crate::types::LookUpIndexResp),
4074 ApplicationException(::fbthrift::ApplicationException),
4075 }
4076
4077 impl ::std::convert::From<crate::errors::storage_service::LookUpIndexError> for LookUpIndexExn {
4078 fn from(err: crate::errors::storage_service::LookUpIndexError) -> Self {
4079 match err {
4080 crate::errors::storage_service::LookUpIndexError::ApplicationException(aexn) => LookUpIndexExn::ApplicationException(aexn),
4081 crate::errors::storage_service::LookUpIndexError::ThriftError(err) => LookUpIndexExn::ApplicationException(::fbthrift::ApplicationException {
4082 message: err.to_string(),
4083 type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
4084 }),
4085 }
4086 }
4087 }
4088
4089 impl ::std::convert::From<::fbthrift::ApplicationException> for LookUpIndexExn {
4090 fn from(exn: ::fbthrift::ApplicationException) -> Self {
4091 Self::ApplicationException(exn)
4092 }
4093 }
4094
4095 impl ::fbthrift::ExceptionInfo for LookUpIndexExn {
4096 fn exn_name(&self) -> &'static str {
4097 match self {
4098 Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
4099 Self::ApplicationException(aexn) => aexn.exn_name(),
4100 }
4101 }
4102
4103 fn exn_value(&self) -> String {
4104 match self {
4105 Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
4106 Self::ApplicationException(aexn) => aexn.exn_value(),
4107 }
4108 }
4109
4110 fn exn_is_declared(&self) -> bool {
4111 match self {
4112 Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
4113 Self::ApplicationException(aexn) => aexn.exn_is_declared(),
4114 }
4115 }
4116 }
4117
4118 impl ::fbthrift::ResultInfo for LookUpIndexExn {
4119 fn result_type(&self) -> ::fbthrift::ResultType {
4120 match self {
4121 Self::Success(_) => ::fbthrift::ResultType::Return,
4122 Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
4123 }
4124 }
4125 }
4126
4127 impl ::fbthrift::GetTType for LookUpIndexExn {
4128 const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
4129 }
4130
4131 impl<P> ::fbthrift::Serialize<P> for LookUpIndexExn
4132 where
4133 P: ::fbthrift::ProtocolWriter,
4134 {
4135 fn write(&self, p: &mut P) {
4136 if let Self::ApplicationException(aexn) = self {
4137 return aexn.write(p);
4138 }
4139 p.write_struct_begin("LookUpIndex");
4140 match self {
4141 Self::Success(inner) => {
4142 p.write_field_begin(
4143 "Success",
4144 ::fbthrift::TType::Struct,
4145 0i16,
4146 );
4147 inner.write(p);
4148 p.write_field_end();
4149 }
4150 Self::ApplicationException(_aexn) => unreachable!(),
4151 }
4152 p.write_field_stop();
4153 p.write_struct_end();
4154 }
4155 }
4156
4157 impl<P> ::fbthrift::Deserialize<P> for LookUpIndexExn
4158 where
4159 P: ::fbthrift::ProtocolReader,
4160 {
4161 fn read(p: &mut P) -> ::anyhow::Result<Self> {
4162 static RETURNS: &[::fbthrift::Field] = &[
4163 ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
4164 ];
4165 let _ = p.read_struct_begin(|_| ())?;
4166 let mut once = false;
4167 let mut alt = ::std::option::Option::None;
4168 loop {
4169 let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
4170 match ((fty, fid as ::std::primitive::i32), once) {
4171 ((::fbthrift::TType::Stop, _), _) => {
4172 p.read_field_end()?;
4173 break;
4174 }
4175 ((::fbthrift::TType::Struct, 0i32), false) => {
4176 once = true;
4177 alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
4178 }
4179 ((ty, _id), false) => p.skip(ty)?,
4180 ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
4181 ::fbthrift::ApplicationException::new(
4182 ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
4183 format!(
4184 "unwanted extra union {} field ty {:?} id {}",
4185 "LookUpIndexExn",
4186 badty,
4187 badid,
4188 ),
4189 )
4190 )),
4191 }
4192 p.read_field_end()?;
4193 }
4194 p.read_struct_end()?;
4195 alt.ok_or_else(||
4196 ::fbthrift::ApplicationException::new(
4197 ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
4198 format!("Empty union {}", "LookUpIndexExn"),
4199 )
4200 .into(),
4201 )
4202 }
4203 }
4204 }
4205}
4206
4207pub mod client {
4209
4210 pub struct StorageServiceImpl<P, T, S = ::fbthrift::NoopSpawner> {
4211 transport: T,
4212 _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
4213 }
4214
4215 impl<P, T, S> StorageServiceImpl<P, T, S>
4216 where
4217 P: ::fbthrift::Protocol,
4218 T: ::fbthrift::Transport,
4219 P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
4220 ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
4221 P::Deserializer: ::std::marker::Send,
4222 S: ::fbthrift::help::Spawner,
4223 {
4224 pub fn new(
4225 transport: T,
4226 ) -> Self {
4227 Self {
4228 transport,
4229 _phantom: ::std::marker::PhantomData,
4230 }
4231 }
4232
4233 pub fn transport(&self) -> &T {
4234 &self.transport
4235 }
4236
4237
4238 fn _getBound_impl(
4239 &self,
4240 arg_req: &crate::types::GetNeighborsRequest,
4241 rpc_options: T::RpcOptions,
4242 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError>> {
4243 use ::const_cstr::const_cstr;
4244 use ::tracing::Instrument as _;
4245 use ::futures::FutureExt as _;
4246
4247 const_cstr! {
4248 SERVICE_NAME = "StorageService";
4249 METHOD_NAME = "StorageService.getBound";
4250 }
4251 let args = self::Args_StorageService_getBound {
4252 req: arg_req,
4253 _phantom: ::std::marker::PhantomData,
4254 };
4255
4256 let transport = self.transport();
4257
4258 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getBound", &args) {
4260 ::std::result::Result::Ok(res) => res,
4261 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4262 };
4263
4264 let call = transport
4265 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4266 .instrument(::tracing::trace_span!("call", function = "StorageService.getBound"));
4267
4268 async move {
4269 let reply_env = call.await?;
4270
4271 let de = P::deserializer(reply_env);
4272 let (res, _de): (::std::result::Result<crate::services::storage_service::GetBoundExn, _>, _) =
4273 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4274
4275 let res = match res {
4276 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4277 ::std::result::Result::Err(aexn) =>
4278 ::std::result::Result::Err(crate::errors::storage_service::GetBoundError::ApplicationException(aexn))
4279 };
4280 res
4281 }
4282 .instrument(::tracing::info_span!("StorageService.getBound"))
4283 .boxed()
4284 }
4285
4286 fn _boundStats_impl(
4287 &self,
4288 arg_req: &crate::types::GetNeighborsRequest,
4289 rpc_options: T::RpcOptions,
4290 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError>> {
4291 use ::const_cstr::const_cstr;
4292 use ::tracing::Instrument as _;
4293 use ::futures::FutureExt as _;
4294
4295 const_cstr! {
4296 SERVICE_NAME = "StorageService";
4297 METHOD_NAME = "StorageService.boundStats";
4298 }
4299 let args = self::Args_StorageService_boundStats {
4300 req: arg_req,
4301 _phantom: ::std::marker::PhantomData,
4302 };
4303
4304 let transport = self.transport();
4305
4306 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("boundStats", &args) {
4308 ::std::result::Result::Ok(res) => res,
4309 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4310 };
4311
4312 let call = transport
4313 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4314 .instrument(::tracing::trace_span!("call", function = "StorageService.boundStats"));
4315
4316 async move {
4317 let reply_env = call.await?;
4318
4319 let de = P::deserializer(reply_env);
4320 let (res, _de): (::std::result::Result<crate::services::storage_service::BoundStatsExn, _>, _) =
4321 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4322
4323 let res = match res {
4324 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4325 ::std::result::Result::Err(aexn) =>
4326 ::std::result::Result::Err(crate::errors::storage_service::BoundStatsError::ApplicationException(aexn))
4327 };
4328 res
4329 }
4330 .instrument(::tracing::info_span!("StorageService.boundStats"))
4331 .boxed()
4332 }
4333
4334 fn _getProps_impl(
4335 &self,
4336 arg_req: &crate::types::VertexPropRequest,
4337 rpc_options: T::RpcOptions,
4338 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError>> {
4339 use ::const_cstr::const_cstr;
4340 use ::tracing::Instrument as _;
4341 use ::futures::FutureExt as _;
4342
4343 const_cstr! {
4344 SERVICE_NAME = "StorageService";
4345 METHOD_NAME = "StorageService.getProps";
4346 }
4347 let args = self::Args_StorageService_getProps {
4348 req: arg_req,
4349 _phantom: ::std::marker::PhantomData,
4350 };
4351
4352 let transport = self.transport();
4353
4354 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getProps", &args) {
4356 ::std::result::Result::Ok(res) => res,
4357 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4358 };
4359
4360 let call = transport
4361 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4362 .instrument(::tracing::trace_span!("call", function = "StorageService.getProps"));
4363
4364 async move {
4365 let reply_env = call.await?;
4366
4367 let de = P::deserializer(reply_env);
4368 let (res, _de): (::std::result::Result<crate::services::storage_service::GetPropsExn, _>, _) =
4369 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4370
4371 let res = match res {
4372 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4373 ::std::result::Result::Err(aexn) =>
4374 ::std::result::Result::Err(crate::errors::storage_service::GetPropsError::ApplicationException(aexn))
4375 };
4376 res
4377 }
4378 .instrument(::tracing::info_span!("StorageService.getProps"))
4379 .boxed()
4380 }
4381
4382 fn _getEdgeProps_impl(
4383 &self,
4384 arg_req: &crate::types::EdgePropRequest,
4385 rpc_options: T::RpcOptions,
4386 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError>> {
4387 use ::const_cstr::const_cstr;
4388 use ::tracing::Instrument as _;
4389 use ::futures::FutureExt as _;
4390
4391 const_cstr! {
4392 SERVICE_NAME = "StorageService";
4393 METHOD_NAME = "StorageService.getEdgeProps";
4394 }
4395 let args = self::Args_StorageService_getEdgeProps {
4396 req: arg_req,
4397 _phantom: ::std::marker::PhantomData,
4398 };
4399
4400 let transport = self.transport();
4401
4402 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getEdgeProps", &args) {
4404 ::std::result::Result::Ok(res) => res,
4405 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4406 };
4407
4408 let call = transport
4409 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4410 .instrument(::tracing::trace_span!("call", function = "StorageService.getEdgeProps"));
4411
4412 async move {
4413 let reply_env = call.await?;
4414
4415 let de = P::deserializer(reply_env);
4416 let (res, _de): (::std::result::Result<crate::services::storage_service::GetEdgePropsExn, _>, _) =
4417 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4418
4419 let res = match res {
4420 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4421 ::std::result::Result::Err(aexn) =>
4422 ::std::result::Result::Err(crate::errors::storage_service::GetEdgePropsError::ApplicationException(aexn))
4423 };
4424 res
4425 }
4426 .instrument(::tracing::info_span!("StorageService.getEdgeProps"))
4427 .boxed()
4428 }
4429
4430 fn _addVertices_impl(
4431 &self,
4432 arg_req: &crate::types::AddVerticesRequest,
4433 rpc_options: T::RpcOptions,
4434 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError>> {
4435 use ::const_cstr::const_cstr;
4436 use ::tracing::Instrument as _;
4437 use ::futures::FutureExt as _;
4438
4439 const_cstr! {
4440 SERVICE_NAME = "StorageService";
4441 METHOD_NAME = "StorageService.addVertices";
4442 }
4443 let args = self::Args_StorageService_addVertices {
4444 req: arg_req,
4445 _phantom: ::std::marker::PhantomData,
4446 };
4447
4448 let transport = self.transport();
4449
4450 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addVertices", &args) {
4452 ::std::result::Result::Ok(res) => res,
4453 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4454 };
4455
4456 let call = transport
4457 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4458 .instrument(::tracing::trace_span!("call", function = "StorageService.addVertices"));
4459
4460 async move {
4461 let reply_env = call.await?;
4462
4463 let de = P::deserializer(reply_env);
4464 let (res, _de): (::std::result::Result<crate::services::storage_service::AddVerticesExn, _>, _) =
4465 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4466
4467 let res = match res {
4468 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4469 ::std::result::Result::Err(aexn) =>
4470 ::std::result::Result::Err(crate::errors::storage_service::AddVerticesError::ApplicationException(aexn))
4471 };
4472 res
4473 }
4474 .instrument(::tracing::info_span!("StorageService.addVertices"))
4475 .boxed()
4476 }
4477
4478 fn _addEdges_impl(
4479 &self,
4480 arg_req: &crate::types::AddEdgesRequest,
4481 rpc_options: T::RpcOptions,
4482 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError>> {
4483 use ::const_cstr::const_cstr;
4484 use ::tracing::Instrument as _;
4485 use ::futures::FutureExt as _;
4486
4487 const_cstr! {
4488 SERVICE_NAME = "StorageService";
4489 METHOD_NAME = "StorageService.addEdges";
4490 }
4491 let args = self::Args_StorageService_addEdges {
4492 req: arg_req,
4493 _phantom: ::std::marker::PhantomData,
4494 };
4495
4496 let transport = self.transport();
4497
4498 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addEdges", &args) {
4500 ::std::result::Result::Ok(res) => res,
4501 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4502 };
4503
4504 let call = transport
4505 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4506 .instrument(::tracing::trace_span!("call", function = "StorageService.addEdges"));
4507
4508 async move {
4509 let reply_env = call.await?;
4510
4511 let de = P::deserializer(reply_env);
4512 let (res, _de): (::std::result::Result<crate::services::storage_service::AddEdgesExn, _>, _) =
4513 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4514
4515 let res = match res {
4516 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4517 ::std::result::Result::Err(aexn) =>
4518 ::std::result::Result::Err(crate::errors::storage_service::AddEdgesError::ApplicationException(aexn))
4519 };
4520 res
4521 }
4522 .instrument(::tracing::info_span!("StorageService.addEdges"))
4523 .boxed()
4524 }
4525
4526 fn _deleteEdges_impl(
4527 &self,
4528 arg_req: &crate::types::DeleteEdgesRequest,
4529 rpc_options: T::RpcOptions,
4530 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError>> {
4531 use ::const_cstr::const_cstr;
4532 use ::tracing::Instrument as _;
4533 use ::futures::FutureExt as _;
4534
4535 const_cstr! {
4536 SERVICE_NAME = "StorageService";
4537 METHOD_NAME = "StorageService.deleteEdges";
4538 }
4539 let args = self::Args_StorageService_deleteEdges {
4540 req: arg_req,
4541 _phantom: ::std::marker::PhantomData,
4542 };
4543
4544 let transport = self.transport();
4545
4546 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("deleteEdges", &args) {
4548 ::std::result::Result::Ok(res) => res,
4549 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4550 };
4551
4552 let call = transport
4553 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4554 .instrument(::tracing::trace_span!("call", function = "StorageService.deleteEdges"));
4555
4556 async move {
4557 let reply_env = call.await?;
4558
4559 let de = P::deserializer(reply_env);
4560 let (res, _de): (::std::result::Result<crate::services::storage_service::DeleteEdgesExn, _>, _) =
4561 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4562
4563 let res = match res {
4564 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4565 ::std::result::Result::Err(aexn) =>
4566 ::std::result::Result::Err(crate::errors::storage_service::DeleteEdgesError::ApplicationException(aexn))
4567 };
4568 res
4569 }
4570 .instrument(::tracing::info_span!("StorageService.deleteEdges"))
4571 .boxed()
4572 }
4573
4574 fn _deleteVertices_impl(
4575 &self,
4576 arg_req: &crate::types::DeleteVerticesRequest,
4577 rpc_options: T::RpcOptions,
4578 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError>> {
4579 use ::const_cstr::const_cstr;
4580 use ::tracing::Instrument as _;
4581 use ::futures::FutureExt as _;
4582
4583 const_cstr! {
4584 SERVICE_NAME = "StorageService";
4585 METHOD_NAME = "StorageService.deleteVertices";
4586 }
4587 let args = self::Args_StorageService_deleteVertices {
4588 req: arg_req,
4589 _phantom: ::std::marker::PhantomData,
4590 };
4591
4592 let transport = self.transport();
4593
4594 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("deleteVertices", &args) {
4596 ::std::result::Result::Ok(res) => res,
4597 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4598 };
4599
4600 let call = transport
4601 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4602 .instrument(::tracing::trace_span!("call", function = "StorageService.deleteVertices"));
4603
4604 async move {
4605 let reply_env = call.await?;
4606
4607 let de = P::deserializer(reply_env);
4608 let (res, _de): (::std::result::Result<crate::services::storage_service::DeleteVerticesExn, _>, _) =
4609 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4610
4611 let res = match res {
4612 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4613 ::std::result::Result::Err(aexn) =>
4614 ::std::result::Result::Err(crate::errors::storage_service::DeleteVerticesError::ApplicationException(aexn))
4615 };
4616 res
4617 }
4618 .instrument(::tracing::info_span!("StorageService.deleteVertices"))
4619 .boxed()
4620 }
4621
4622 fn _updateVertex_impl(
4623 &self,
4624 arg_req: &crate::types::UpdateVertexRequest,
4625 rpc_options: T::RpcOptions,
4626 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError>> {
4627 use ::const_cstr::const_cstr;
4628 use ::tracing::Instrument as _;
4629 use ::futures::FutureExt as _;
4630
4631 const_cstr! {
4632 SERVICE_NAME = "StorageService";
4633 METHOD_NAME = "StorageService.updateVertex";
4634 }
4635 let args = self::Args_StorageService_updateVertex {
4636 req: arg_req,
4637 _phantom: ::std::marker::PhantomData,
4638 };
4639
4640 let transport = self.transport();
4641
4642 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("updateVertex", &args) {
4644 ::std::result::Result::Ok(res) => res,
4645 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4646 };
4647
4648 let call = transport
4649 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4650 .instrument(::tracing::trace_span!("call", function = "StorageService.updateVertex"));
4651
4652 async move {
4653 let reply_env = call.await?;
4654
4655 let de = P::deserializer(reply_env);
4656 let (res, _de): (::std::result::Result<crate::services::storage_service::UpdateVertexExn, _>, _) =
4657 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4658
4659 let res = match res {
4660 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4661 ::std::result::Result::Err(aexn) =>
4662 ::std::result::Result::Err(crate::errors::storage_service::UpdateVertexError::ApplicationException(aexn))
4663 };
4664 res
4665 }
4666 .instrument(::tracing::info_span!("StorageService.updateVertex"))
4667 .boxed()
4668 }
4669
4670 fn _updateEdge_impl(
4671 &self,
4672 arg_req: &crate::types::UpdateEdgeRequest,
4673 rpc_options: T::RpcOptions,
4674 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError>> {
4675 use ::const_cstr::const_cstr;
4676 use ::tracing::Instrument as _;
4677 use ::futures::FutureExt as _;
4678
4679 const_cstr! {
4680 SERVICE_NAME = "StorageService";
4681 METHOD_NAME = "StorageService.updateEdge";
4682 }
4683 let args = self::Args_StorageService_updateEdge {
4684 req: arg_req,
4685 _phantom: ::std::marker::PhantomData,
4686 };
4687
4688 let transport = self.transport();
4689
4690 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("updateEdge", &args) {
4692 ::std::result::Result::Ok(res) => res,
4693 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4694 };
4695
4696 let call = transport
4697 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4698 .instrument(::tracing::trace_span!("call", function = "StorageService.updateEdge"));
4699
4700 async move {
4701 let reply_env = call.await?;
4702
4703 let de = P::deserializer(reply_env);
4704 let (res, _de): (::std::result::Result<crate::services::storage_service::UpdateEdgeExn, _>, _) =
4705 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4706
4707 let res = match res {
4708 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4709 ::std::result::Result::Err(aexn) =>
4710 ::std::result::Result::Err(crate::errors::storage_service::UpdateEdgeError::ApplicationException(aexn))
4711 };
4712 res
4713 }
4714 .instrument(::tracing::info_span!("StorageService.updateEdge"))
4715 .boxed()
4716 }
4717
4718 fn _scanEdge_impl(
4719 &self,
4720 arg_req: &crate::types::ScanEdgeRequest,
4721 rpc_options: T::RpcOptions,
4722 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError>> {
4723 use ::const_cstr::const_cstr;
4724 use ::tracing::Instrument as _;
4725 use ::futures::FutureExt as _;
4726
4727 const_cstr! {
4728 SERVICE_NAME = "StorageService";
4729 METHOD_NAME = "StorageService.scanEdge";
4730 }
4731 let args = self::Args_StorageService_scanEdge {
4732 req: arg_req,
4733 _phantom: ::std::marker::PhantomData,
4734 };
4735
4736 let transport = self.transport();
4737
4738 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("scanEdge", &args) {
4740 ::std::result::Result::Ok(res) => res,
4741 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4742 };
4743
4744 let call = transport
4745 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4746 .instrument(::tracing::trace_span!("call", function = "StorageService.scanEdge"));
4747
4748 async move {
4749 let reply_env = call.await?;
4750
4751 let de = P::deserializer(reply_env);
4752 let (res, _de): (::std::result::Result<crate::services::storage_service::ScanEdgeExn, _>, _) =
4753 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4754
4755 let res = match res {
4756 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4757 ::std::result::Result::Err(aexn) =>
4758 ::std::result::Result::Err(crate::errors::storage_service::ScanEdgeError::ApplicationException(aexn))
4759 };
4760 res
4761 }
4762 .instrument(::tracing::info_span!("StorageService.scanEdge"))
4763 .boxed()
4764 }
4765
4766 fn _scanVertex_impl(
4767 &self,
4768 arg_req: &crate::types::ScanVertexRequest,
4769 rpc_options: T::RpcOptions,
4770 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError>> {
4771 use ::const_cstr::const_cstr;
4772 use ::tracing::Instrument as _;
4773 use ::futures::FutureExt as _;
4774
4775 const_cstr! {
4776 SERVICE_NAME = "StorageService";
4777 METHOD_NAME = "StorageService.scanVertex";
4778 }
4779 let args = self::Args_StorageService_scanVertex {
4780 req: arg_req,
4781 _phantom: ::std::marker::PhantomData,
4782 };
4783
4784 let transport = self.transport();
4785
4786 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("scanVertex", &args) {
4788 ::std::result::Result::Ok(res) => res,
4789 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4790 };
4791
4792 let call = transport
4793 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4794 .instrument(::tracing::trace_span!("call", function = "StorageService.scanVertex"));
4795
4796 async move {
4797 let reply_env = call.await?;
4798
4799 let de = P::deserializer(reply_env);
4800 let (res, _de): (::std::result::Result<crate::services::storage_service::ScanVertexExn, _>, _) =
4801 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4802
4803 let res = match res {
4804 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4805 ::std::result::Result::Err(aexn) =>
4806 ::std::result::Result::Err(crate::errors::storage_service::ScanVertexError::ApplicationException(aexn))
4807 };
4808 res
4809 }
4810 .instrument(::tracing::info_span!("StorageService.scanVertex"))
4811 .boxed()
4812 }
4813
4814 fn _transLeader_impl(
4815 &self,
4816 arg_req: &crate::types::TransLeaderReq,
4817 rpc_options: T::RpcOptions,
4818 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::TransLeaderError>> {
4819 use ::const_cstr::const_cstr;
4820 use ::tracing::Instrument as _;
4821 use ::futures::FutureExt as _;
4822
4823 const_cstr! {
4824 SERVICE_NAME = "StorageService";
4825 METHOD_NAME = "StorageService.transLeader";
4826 }
4827 let args = self::Args_StorageService_transLeader {
4828 req: arg_req,
4829 _phantom: ::std::marker::PhantomData,
4830 };
4831
4832 let transport = self.transport();
4833
4834 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("transLeader", &args) {
4836 ::std::result::Result::Ok(res) => res,
4837 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4838 };
4839
4840 let call = transport
4841 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4842 .instrument(::tracing::trace_span!("call", function = "StorageService.transLeader"));
4843
4844 async move {
4845 let reply_env = call.await?;
4846
4847 let de = P::deserializer(reply_env);
4848 let (res, _de): (::std::result::Result<crate::services::storage_service::TransLeaderExn, _>, _) =
4849 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4850
4851 let res = match res {
4852 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4853 ::std::result::Result::Err(aexn) =>
4854 ::std::result::Result::Err(crate::errors::storage_service::TransLeaderError::ApplicationException(aexn))
4855 };
4856 res
4857 }
4858 .instrument(::tracing::info_span!("StorageService.transLeader"))
4859 .boxed()
4860 }
4861
4862 fn _addPart_impl(
4863 &self,
4864 arg_req: &crate::types::AddPartReq,
4865 rpc_options: T::RpcOptions,
4866 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError>> {
4867 use ::const_cstr::const_cstr;
4868 use ::tracing::Instrument as _;
4869 use ::futures::FutureExt as _;
4870
4871 const_cstr! {
4872 SERVICE_NAME = "StorageService";
4873 METHOD_NAME = "StorageService.addPart";
4874 }
4875 let args = self::Args_StorageService_addPart {
4876 req: arg_req,
4877 _phantom: ::std::marker::PhantomData,
4878 };
4879
4880 let transport = self.transport();
4881
4882 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addPart", &args) {
4884 ::std::result::Result::Ok(res) => res,
4885 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4886 };
4887
4888 let call = transport
4889 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4890 .instrument(::tracing::trace_span!("call", function = "StorageService.addPart"));
4891
4892 async move {
4893 let reply_env = call.await?;
4894
4895 let de = P::deserializer(reply_env);
4896 let (res, _de): (::std::result::Result<crate::services::storage_service::AddPartExn, _>, _) =
4897 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4898
4899 let res = match res {
4900 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4901 ::std::result::Result::Err(aexn) =>
4902 ::std::result::Result::Err(crate::errors::storage_service::AddPartError::ApplicationException(aexn))
4903 };
4904 res
4905 }
4906 .instrument(::tracing::info_span!("StorageService.addPart"))
4907 .boxed()
4908 }
4909
4910 fn _addLearner_impl(
4911 &self,
4912 arg_req: &crate::types::AddLearnerReq,
4913 rpc_options: T::RpcOptions,
4914 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError>> {
4915 use ::const_cstr::const_cstr;
4916 use ::tracing::Instrument as _;
4917 use ::futures::FutureExt as _;
4918
4919 const_cstr! {
4920 SERVICE_NAME = "StorageService";
4921 METHOD_NAME = "StorageService.addLearner";
4922 }
4923 let args = self::Args_StorageService_addLearner {
4924 req: arg_req,
4925 _phantom: ::std::marker::PhantomData,
4926 };
4927
4928 let transport = self.transport();
4929
4930 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("addLearner", &args) {
4932 ::std::result::Result::Ok(res) => res,
4933 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4934 };
4935
4936 let call = transport
4937 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4938 .instrument(::tracing::trace_span!("call", function = "StorageService.addLearner"));
4939
4940 async move {
4941 let reply_env = call.await?;
4942
4943 let de = P::deserializer(reply_env);
4944 let (res, _de): (::std::result::Result<crate::services::storage_service::AddLearnerExn, _>, _) =
4945 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4946
4947 let res = match res {
4948 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4949 ::std::result::Result::Err(aexn) =>
4950 ::std::result::Result::Err(crate::errors::storage_service::AddLearnerError::ApplicationException(aexn))
4951 };
4952 res
4953 }
4954 .instrument(::tracing::info_span!("StorageService.addLearner"))
4955 .boxed()
4956 }
4957
4958 fn _waitingForCatchUpData_impl(
4959 &self,
4960 arg_req: &crate::types::CatchUpDataReq,
4961 rpc_options: T::RpcOptions,
4962 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError>> {
4963 use ::const_cstr::const_cstr;
4964 use ::tracing::Instrument as _;
4965 use ::futures::FutureExt as _;
4966
4967 const_cstr! {
4968 SERVICE_NAME = "StorageService";
4969 METHOD_NAME = "StorageService.waitingForCatchUpData";
4970 }
4971 let args = self::Args_StorageService_waitingForCatchUpData {
4972 req: arg_req,
4973 _phantom: ::std::marker::PhantomData,
4974 };
4975
4976 let transport = self.transport();
4977
4978 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("waitingForCatchUpData", &args) {
4980 ::std::result::Result::Ok(res) => res,
4981 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
4982 };
4983
4984 let call = transport
4985 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
4986 .instrument(::tracing::trace_span!("call", function = "StorageService.waitingForCatchUpData"));
4987
4988 async move {
4989 let reply_env = call.await?;
4990
4991 let de = P::deserializer(reply_env);
4992 let (res, _de): (::std::result::Result<crate::services::storage_service::WaitingForCatchUpDataExn, _>, _) =
4993 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
4994
4995 let res = match res {
4996 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
4997 ::std::result::Result::Err(aexn) =>
4998 ::std::result::Result::Err(crate::errors::storage_service::WaitingForCatchUpDataError::ApplicationException(aexn))
4999 };
5000 res
5001 }
5002 .instrument(::tracing::info_span!("StorageService.waitingForCatchUpData"))
5003 .boxed()
5004 }
5005
5006 fn _removePart_impl(
5007 &self,
5008 arg_req: &crate::types::RemovePartReq,
5009 rpc_options: T::RpcOptions,
5010 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError>> {
5011 use ::const_cstr::const_cstr;
5012 use ::tracing::Instrument as _;
5013 use ::futures::FutureExt as _;
5014
5015 const_cstr! {
5016 SERVICE_NAME = "StorageService";
5017 METHOD_NAME = "StorageService.removePart";
5018 }
5019 let args = self::Args_StorageService_removePart {
5020 req: arg_req,
5021 _phantom: ::std::marker::PhantomData,
5022 };
5023
5024 let transport = self.transport();
5025
5026 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("removePart", &args) {
5028 ::std::result::Result::Ok(res) => res,
5029 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5030 };
5031
5032 let call = transport
5033 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5034 .instrument(::tracing::trace_span!("call", function = "StorageService.removePart"));
5035
5036 async move {
5037 let reply_env = call.await?;
5038
5039 let de = P::deserializer(reply_env);
5040 let (res, _de): (::std::result::Result<crate::services::storage_service::RemovePartExn, _>, _) =
5041 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5042
5043 let res = match res {
5044 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5045 ::std::result::Result::Err(aexn) =>
5046 ::std::result::Result::Err(crate::errors::storage_service::RemovePartError::ApplicationException(aexn))
5047 };
5048 res
5049 }
5050 .instrument(::tracing::info_span!("StorageService.removePart"))
5051 .boxed()
5052 }
5053
5054 fn _memberChange_impl(
5055 &self,
5056 arg_req: &crate::types::MemberChangeReq,
5057 rpc_options: T::RpcOptions,
5058 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError>> {
5059 use ::const_cstr::const_cstr;
5060 use ::tracing::Instrument as _;
5061 use ::futures::FutureExt as _;
5062
5063 const_cstr! {
5064 SERVICE_NAME = "StorageService";
5065 METHOD_NAME = "StorageService.memberChange";
5066 }
5067 let args = self::Args_StorageService_memberChange {
5068 req: arg_req,
5069 _phantom: ::std::marker::PhantomData,
5070 };
5071
5072 let transport = self.transport();
5073
5074 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("memberChange", &args) {
5076 ::std::result::Result::Ok(res) => res,
5077 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5078 };
5079
5080 let call = transport
5081 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5082 .instrument(::tracing::trace_span!("call", function = "StorageService.memberChange"));
5083
5084 async move {
5085 let reply_env = call.await?;
5086
5087 let de = P::deserializer(reply_env);
5088 let (res, _de): (::std::result::Result<crate::services::storage_service::MemberChangeExn, _>, _) =
5089 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5090
5091 let res = match res {
5092 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5093 ::std::result::Result::Err(aexn) =>
5094 ::std::result::Result::Err(crate::errors::storage_service::MemberChangeError::ApplicationException(aexn))
5095 };
5096 res
5097 }
5098 .instrument(::tracing::info_span!("StorageService.memberChange"))
5099 .boxed()
5100 }
5101
5102 fn _checkPeers_impl(
5103 &self,
5104 arg_req: &crate::types::CheckPeersReq,
5105 rpc_options: T::RpcOptions,
5106 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError>> {
5107 use ::const_cstr::const_cstr;
5108 use ::tracing::Instrument as _;
5109 use ::futures::FutureExt as _;
5110
5111 const_cstr! {
5112 SERVICE_NAME = "StorageService";
5113 METHOD_NAME = "StorageService.checkPeers";
5114 }
5115 let args = self::Args_StorageService_checkPeers {
5116 req: arg_req,
5117 _phantom: ::std::marker::PhantomData,
5118 };
5119
5120 let transport = self.transport();
5121
5122 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("checkPeers", &args) {
5124 ::std::result::Result::Ok(res) => res,
5125 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5126 };
5127
5128 let call = transport
5129 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5130 .instrument(::tracing::trace_span!("call", function = "StorageService.checkPeers"));
5131
5132 async move {
5133 let reply_env = call.await?;
5134
5135 let de = P::deserializer(reply_env);
5136 let (res, _de): (::std::result::Result<crate::services::storage_service::CheckPeersExn, _>, _) =
5137 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5138
5139 let res = match res {
5140 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5141 ::std::result::Result::Err(aexn) =>
5142 ::std::result::Result::Err(crate::errors::storage_service::CheckPeersError::ApplicationException(aexn))
5143 };
5144 res
5145 }
5146 .instrument(::tracing::info_span!("StorageService.checkPeers"))
5147 .boxed()
5148 }
5149
5150 fn _getLeaderPart_impl(
5151 &self,
5152 arg_req: &crate::types::GetLeaderReq,
5153 rpc_options: T::RpcOptions,
5154 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError>> {
5155 use ::const_cstr::const_cstr;
5156 use ::tracing::Instrument as _;
5157 use ::futures::FutureExt as _;
5158
5159 const_cstr! {
5160 SERVICE_NAME = "StorageService";
5161 METHOD_NAME = "StorageService.getLeaderPart";
5162 }
5163 let args = self::Args_StorageService_getLeaderPart {
5164 req: arg_req,
5165 _phantom: ::std::marker::PhantomData,
5166 };
5167
5168 let transport = self.transport();
5169
5170 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getLeaderPart", &args) {
5172 ::std::result::Result::Ok(res) => res,
5173 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5174 };
5175
5176 let call = transport
5177 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5178 .instrument(::tracing::trace_span!("call", function = "StorageService.getLeaderPart"));
5179
5180 async move {
5181 let reply_env = call.await?;
5182
5183 let de = P::deserializer(reply_env);
5184 let (res, _de): (::std::result::Result<crate::services::storage_service::GetLeaderPartExn, _>, _) =
5185 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5186
5187 let res = match res {
5188 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5189 ::std::result::Result::Err(aexn) =>
5190 ::std::result::Result::Err(crate::errors::storage_service::GetLeaderPartError::ApplicationException(aexn))
5191 };
5192 res
5193 }
5194 .instrument(::tracing::info_span!("StorageService.getLeaderPart"))
5195 .boxed()
5196 }
5197
5198 fn _createCheckpoint_impl(
5199 &self,
5200 arg_req: &crate::types::CreateCPRequest,
5201 rpc_options: T::RpcOptions,
5202 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError>> {
5203 use ::const_cstr::const_cstr;
5204 use ::tracing::Instrument as _;
5205 use ::futures::FutureExt as _;
5206
5207 const_cstr! {
5208 SERVICE_NAME = "StorageService";
5209 METHOD_NAME = "StorageService.createCheckpoint";
5210 }
5211 let args = self::Args_StorageService_createCheckpoint {
5212 req: arg_req,
5213 _phantom: ::std::marker::PhantomData,
5214 };
5215
5216 let transport = self.transport();
5217
5218 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("createCheckpoint", &args) {
5220 ::std::result::Result::Ok(res) => res,
5221 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5222 };
5223
5224 let call = transport
5225 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5226 .instrument(::tracing::trace_span!("call", function = "StorageService.createCheckpoint"));
5227
5228 async move {
5229 let reply_env = call.await?;
5230
5231 let de = P::deserializer(reply_env);
5232 let (res, _de): (::std::result::Result<crate::services::storage_service::CreateCheckpointExn, _>, _) =
5233 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5234
5235 let res = match res {
5236 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5237 ::std::result::Result::Err(aexn) =>
5238 ::std::result::Result::Err(crate::errors::storage_service::CreateCheckpointError::ApplicationException(aexn))
5239 };
5240 res
5241 }
5242 .instrument(::tracing::info_span!("StorageService.createCheckpoint"))
5243 .boxed()
5244 }
5245
5246 fn _dropCheckpoint_impl(
5247 &self,
5248 arg_req: &crate::types::DropCPRequest,
5249 rpc_options: T::RpcOptions,
5250 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError>> {
5251 use ::const_cstr::const_cstr;
5252 use ::tracing::Instrument as _;
5253 use ::futures::FutureExt as _;
5254
5255 const_cstr! {
5256 SERVICE_NAME = "StorageService";
5257 METHOD_NAME = "StorageService.dropCheckpoint";
5258 }
5259 let args = self::Args_StorageService_dropCheckpoint {
5260 req: arg_req,
5261 _phantom: ::std::marker::PhantomData,
5262 };
5263
5264 let transport = self.transport();
5265
5266 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("dropCheckpoint", &args) {
5268 ::std::result::Result::Ok(res) => res,
5269 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5270 };
5271
5272 let call = transport
5273 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5274 .instrument(::tracing::trace_span!("call", function = "StorageService.dropCheckpoint"));
5275
5276 async move {
5277 let reply_env = call.await?;
5278
5279 let de = P::deserializer(reply_env);
5280 let (res, _de): (::std::result::Result<crate::services::storage_service::DropCheckpointExn, _>, _) =
5281 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5282
5283 let res = match res {
5284 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5285 ::std::result::Result::Err(aexn) =>
5286 ::std::result::Result::Err(crate::errors::storage_service::DropCheckpointError::ApplicationException(aexn))
5287 };
5288 res
5289 }
5290 .instrument(::tracing::info_span!("StorageService.dropCheckpoint"))
5291 .boxed()
5292 }
5293
5294 fn _blockingWrites_impl(
5295 &self,
5296 arg_req: &crate::types::BlockingSignRequest,
5297 rpc_options: T::RpcOptions,
5298 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError>> {
5299 use ::const_cstr::const_cstr;
5300 use ::tracing::Instrument as _;
5301 use ::futures::FutureExt as _;
5302
5303 const_cstr! {
5304 SERVICE_NAME = "StorageService";
5305 METHOD_NAME = "StorageService.blockingWrites";
5306 }
5307 let args = self::Args_StorageService_blockingWrites {
5308 req: arg_req,
5309 _phantom: ::std::marker::PhantomData,
5310 };
5311
5312 let transport = self.transport();
5313
5314 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("blockingWrites", &args) {
5316 ::std::result::Result::Ok(res) => res,
5317 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5318 };
5319
5320 let call = transport
5321 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5322 .instrument(::tracing::trace_span!("call", function = "StorageService.blockingWrites"));
5323
5324 async move {
5325 let reply_env = call.await?;
5326
5327 let de = P::deserializer(reply_env);
5328 let (res, _de): (::std::result::Result<crate::services::storage_service::BlockingWritesExn, _>, _) =
5329 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5330
5331 let res = match res {
5332 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5333 ::std::result::Result::Err(aexn) =>
5334 ::std::result::Result::Err(crate::errors::storage_service::BlockingWritesError::ApplicationException(aexn))
5335 };
5336 res
5337 }
5338 .instrument(::tracing::info_span!("StorageService.blockingWrites"))
5339 .boxed()
5340 }
5341
5342 fn _rebuildTagIndex_impl(
5343 &self,
5344 arg_req: &crate::types::RebuildIndexRequest,
5345 rpc_options: T::RpcOptions,
5346 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError>> {
5347 use ::const_cstr::const_cstr;
5348 use ::tracing::Instrument as _;
5349 use ::futures::FutureExt as _;
5350
5351 const_cstr! {
5352 SERVICE_NAME = "StorageService";
5353 METHOD_NAME = "StorageService.rebuildTagIndex";
5354 }
5355 let args = self::Args_StorageService_rebuildTagIndex {
5356 req: arg_req,
5357 _phantom: ::std::marker::PhantomData,
5358 };
5359
5360 let transport = self.transport();
5361
5362 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("rebuildTagIndex", &args) {
5364 ::std::result::Result::Ok(res) => res,
5365 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5366 };
5367
5368 let call = transport
5369 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5370 .instrument(::tracing::trace_span!("call", function = "StorageService.rebuildTagIndex"));
5371
5372 async move {
5373 let reply_env = call.await?;
5374
5375 let de = P::deserializer(reply_env);
5376 let (res, _de): (::std::result::Result<crate::services::storage_service::RebuildTagIndexExn, _>, _) =
5377 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5378
5379 let res = match res {
5380 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5381 ::std::result::Result::Err(aexn) =>
5382 ::std::result::Result::Err(crate::errors::storage_service::RebuildTagIndexError::ApplicationException(aexn))
5383 };
5384 res
5385 }
5386 .instrument(::tracing::info_span!("StorageService.rebuildTagIndex"))
5387 .boxed()
5388 }
5389
5390 fn _rebuildEdgeIndex_impl(
5391 &self,
5392 arg_req: &crate::types::RebuildIndexRequest,
5393 rpc_options: T::RpcOptions,
5394 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError>> {
5395 use ::const_cstr::const_cstr;
5396 use ::tracing::Instrument as _;
5397 use ::futures::FutureExt as _;
5398
5399 const_cstr! {
5400 SERVICE_NAME = "StorageService";
5401 METHOD_NAME = "StorageService.rebuildEdgeIndex";
5402 }
5403 let args = self::Args_StorageService_rebuildEdgeIndex {
5404 req: arg_req,
5405 _phantom: ::std::marker::PhantomData,
5406 };
5407
5408 let transport = self.transport();
5409
5410 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("rebuildEdgeIndex", &args) {
5412 ::std::result::Result::Ok(res) => res,
5413 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5414 };
5415
5416 let call = transport
5417 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5418 .instrument(::tracing::trace_span!("call", function = "StorageService.rebuildEdgeIndex"));
5419
5420 async move {
5421 let reply_env = call.await?;
5422
5423 let de = P::deserializer(reply_env);
5424 let (res, _de): (::std::result::Result<crate::services::storage_service::RebuildEdgeIndexExn, _>, _) =
5425 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5426
5427 let res = match res {
5428 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5429 ::std::result::Result::Err(aexn) =>
5430 ::std::result::Result::Err(crate::errors::storage_service::RebuildEdgeIndexError::ApplicationException(aexn))
5431 };
5432 res
5433 }
5434 .instrument(::tracing::info_span!("StorageService.rebuildEdgeIndex"))
5435 .boxed()
5436 }
5437
5438 fn _put_impl(
5439 &self,
5440 arg_req: &crate::types::PutRequest,
5441 rpc_options: T::RpcOptions,
5442 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError>> {
5443 use ::const_cstr::const_cstr;
5444 use ::tracing::Instrument as _;
5445 use ::futures::FutureExt as _;
5446
5447 const_cstr! {
5448 SERVICE_NAME = "StorageService";
5449 METHOD_NAME = "StorageService.put";
5450 }
5451 let args = self::Args_StorageService_put {
5452 req: arg_req,
5453 _phantom: ::std::marker::PhantomData,
5454 };
5455
5456 let transport = self.transport();
5457
5458 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("put", &args) {
5460 ::std::result::Result::Ok(res) => res,
5461 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5462 };
5463
5464 let call = transport
5465 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5466 .instrument(::tracing::trace_span!("call", function = "StorageService.put"));
5467
5468 async move {
5469 let reply_env = call.await?;
5470
5471 let de = P::deserializer(reply_env);
5472 let (res, _de): (::std::result::Result<crate::services::storage_service::PutExn, _>, _) =
5473 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5474
5475 let res = match res {
5476 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5477 ::std::result::Result::Err(aexn) =>
5478 ::std::result::Result::Err(crate::errors::storage_service::PutError::ApplicationException(aexn))
5479 };
5480 res
5481 }
5482 .instrument(::tracing::info_span!("StorageService.put"))
5483 .boxed()
5484 }
5485
5486 fn _get_impl(
5487 &self,
5488 arg_req: &crate::types::GetRequest,
5489 rpc_options: T::RpcOptions,
5490 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError>> {
5491 use ::const_cstr::const_cstr;
5492 use ::tracing::Instrument as _;
5493 use ::futures::FutureExt as _;
5494
5495 const_cstr! {
5496 SERVICE_NAME = "StorageService";
5497 METHOD_NAME = "StorageService.get";
5498 }
5499 let args = self::Args_StorageService_get {
5500 req: arg_req,
5501 _phantom: ::std::marker::PhantomData,
5502 };
5503
5504 let transport = self.transport();
5505
5506 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("get", &args) {
5508 ::std::result::Result::Ok(res) => res,
5509 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5510 };
5511
5512 let call = transport
5513 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5514 .instrument(::tracing::trace_span!("call", function = "StorageService.get"));
5515
5516 async move {
5517 let reply_env = call.await?;
5518
5519 let de = P::deserializer(reply_env);
5520 let (res, _de): (::std::result::Result<crate::services::storage_service::GetExn, _>, _) =
5521 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5522
5523 let res = match res {
5524 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5525 ::std::result::Result::Err(aexn) =>
5526 ::std::result::Result::Err(crate::errors::storage_service::GetError::ApplicationException(aexn))
5527 };
5528 res
5529 }
5530 .instrument(::tracing::info_span!("StorageService.get"))
5531 .boxed()
5532 }
5533
5534 fn _remove_impl(
5535 &self,
5536 arg_req: &crate::types::RemoveRequest,
5537 rpc_options: T::RpcOptions,
5538 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError>> {
5539 use ::const_cstr::const_cstr;
5540 use ::tracing::Instrument as _;
5541 use ::futures::FutureExt as _;
5542
5543 const_cstr! {
5544 SERVICE_NAME = "StorageService";
5545 METHOD_NAME = "StorageService.remove";
5546 }
5547 let args = self::Args_StorageService_remove {
5548 req: arg_req,
5549 _phantom: ::std::marker::PhantomData,
5550 };
5551
5552 let transport = self.transport();
5553
5554 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("remove", &args) {
5556 ::std::result::Result::Ok(res) => res,
5557 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5558 };
5559
5560 let call = transport
5561 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5562 .instrument(::tracing::trace_span!("call", function = "StorageService.remove"));
5563
5564 async move {
5565 let reply_env = call.await?;
5566
5567 let de = P::deserializer(reply_env);
5568 let (res, _de): (::std::result::Result<crate::services::storage_service::RemoveExn, _>, _) =
5569 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5570
5571 let res = match res {
5572 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5573 ::std::result::Result::Err(aexn) =>
5574 ::std::result::Result::Err(crate::errors::storage_service::RemoveError::ApplicationException(aexn))
5575 };
5576 res
5577 }
5578 .instrument(::tracing::info_span!("StorageService.remove"))
5579 .boxed()
5580 }
5581
5582 fn _removeRange_impl(
5583 &self,
5584 arg_req: &crate::types::RemoveRangeRequest,
5585 rpc_options: T::RpcOptions,
5586 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError>> {
5587 use ::const_cstr::const_cstr;
5588 use ::tracing::Instrument as _;
5589 use ::futures::FutureExt as _;
5590
5591 const_cstr! {
5592 SERVICE_NAME = "StorageService";
5593 METHOD_NAME = "StorageService.removeRange";
5594 }
5595 let args = self::Args_StorageService_removeRange {
5596 req: arg_req,
5597 _phantom: ::std::marker::PhantomData,
5598 };
5599
5600 let transport = self.transport();
5601
5602 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("removeRange", &args) {
5604 ::std::result::Result::Ok(res) => res,
5605 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5606 };
5607
5608 let call = transport
5609 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5610 .instrument(::tracing::trace_span!("call", function = "StorageService.removeRange"));
5611
5612 async move {
5613 let reply_env = call.await?;
5614
5615 let de = P::deserializer(reply_env);
5616 let (res, _de): (::std::result::Result<crate::services::storage_service::RemoveRangeExn, _>, _) =
5617 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5618
5619 let res = match res {
5620 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5621 ::std::result::Result::Err(aexn) =>
5622 ::std::result::Result::Err(crate::errors::storage_service::RemoveRangeError::ApplicationException(aexn))
5623 };
5624 res
5625 }
5626 .instrument(::tracing::info_span!("StorageService.removeRange"))
5627 .boxed()
5628 }
5629
5630 fn _getUUID_impl(
5631 &self,
5632 arg_req: &crate::types::GetUUIDReq,
5633 rpc_options: T::RpcOptions,
5634 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError>> {
5635 use ::const_cstr::const_cstr;
5636 use ::tracing::Instrument as _;
5637 use ::futures::FutureExt as _;
5638
5639 const_cstr! {
5640 SERVICE_NAME = "StorageService";
5641 METHOD_NAME = "StorageService.getUUID";
5642 }
5643 let args = self::Args_StorageService_getUUID {
5644 req: arg_req,
5645 _phantom: ::std::marker::PhantomData,
5646 };
5647
5648 let transport = self.transport();
5649
5650 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("getUUID", &args) {
5652 ::std::result::Result::Ok(res) => res,
5653 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5654 };
5655
5656 let call = transport
5657 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5658 .instrument(::tracing::trace_span!("call", function = "StorageService.getUUID"));
5659
5660 async move {
5661 let reply_env = call.await?;
5662
5663 let de = P::deserializer(reply_env);
5664 let (res, _de): (::std::result::Result<crate::services::storage_service::GetUUIDExn, _>, _) =
5665 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5666
5667 let res = match res {
5668 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5669 ::std::result::Result::Err(aexn) =>
5670 ::std::result::Result::Err(crate::errors::storage_service::GetUUIDError::ApplicationException(aexn))
5671 };
5672 res
5673 }
5674 .instrument(::tracing::info_span!("StorageService.getUUID"))
5675 .boxed()
5676 }
5677
5678 fn _lookUpIndex_impl(
5679 &self,
5680 arg_req: &crate::types::LookUpIndexRequest,
5681 rpc_options: T::RpcOptions,
5682 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError>> {
5683 use ::const_cstr::const_cstr;
5684 use ::tracing::Instrument as _;
5685 use ::futures::FutureExt as _;
5686
5687 const_cstr! {
5688 SERVICE_NAME = "StorageService";
5689 METHOD_NAME = "StorageService.lookUpIndex";
5690 }
5691 let args = self::Args_StorageService_lookUpIndex {
5692 req: arg_req,
5693 _phantom: ::std::marker::PhantomData,
5694 };
5695
5696 let transport = self.transport();
5697
5698 let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("lookUpIndex", &args) {
5700 ::std::result::Result::Ok(res) => res,
5701 ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
5702 };
5703
5704 let call = transport
5705 .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
5706 .instrument(::tracing::trace_span!("call", function = "StorageService.lookUpIndex"));
5707
5708 async move {
5709 let reply_env = call.await?;
5710
5711 let de = P::deserializer(reply_env);
5712 let (res, _de): (::std::result::Result<crate::services::storage_service::LookUpIndexExn, _>, _) =
5713 ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
5714
5715 let res = match res {
5716 ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
5717 ::std::result::Result::Err(aexn) =>
5718 ::std::result::Result::Err(crate::errors::storage_service::LookUpIndexError::ApplicationException(aexn))
5719 };
5720 res
5721 }
5722 .instrument(::tracing::info_span!("StorageService.lookUpIndex"))
5723 .boxed()
5724 }
5725 }
5726
5727 pub trait StorageService: ::std::marker::Send {
5728 fn getBound(
5729 &self,
5730 arg_req: &crate::types::GetNeighborsRequest,
5731 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError>>;
5732
5733 fn boundStats(
5734 &self,
5735 arg_req: &crate::types::GetNeighborsRequest,
5736 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError>>;
5737
5738 fn getProps(
5739 &self,
5740 arg_req: &crate::types::VertexPropRequest,
5741 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError>>;
5742
5743 fn getEdgeProps(
5744 &self,
5745 arg_req: &crate::types::EdgePropRequest,
5746 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError>>;
5747
5748 fn addVertices(
5749 &self,
5750 arg_req: &crate::types::AddVerticesRequest,
5751 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError>>;
5752
5753 fn addEdges(
5754 &self,
5755 arg_req: &crate::types::AddEdgesRequest,
5756 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError>>;
5757
5758 fn deleteEdges(
5759 &self,
5760 arg_req: &crate::types::DeleteEdgesRequest,
5761 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError>>;
5762
5763 fn deleteVertices(
5764 &self,
5765 arg_req: &crate::types::DeleteVerticesRequest,
5766 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError>>;
5767
5768 fn updateVertex(
5769 &self,
5770 arg_req: &crate::types::UpdateVertexRequest,
5771 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError>>;
5772
5773 fn updateEdge(
5774 &self,
5775 arg_req: &crate::types::UpdateEdgeRequest,
5776 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError>>;
5777
5778 fn scanEdge(
5779 &self,
5780 arg_req: &crate::types::ScanEdgeRequest,
5781 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError>>;
5782
5783 fn scanVertex(
5784 &self,
5785 arg_req: &crate::types::ScanVertexRequest,
5786 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError>>;
5787
5788 fn transLeader(
5789 &self,
5790 arg_req: &crate::types::TransLeaderReq,
5791 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::TransLeaderError>>;
5792
5793 fn addPart(
5794 &self,
5795 arg_req: &crate::types::AddPartReq,
5796 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError>>;
5797
5798 fn addLearner(
5799 &self,
5800 arg_req: &crate::types::AddLearnerReq,
5801 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError>>;
5802
5803 fn waitingForCatchUpData(
5804 &self,
5805 arg_req: &crate::types::CatchUpDataReq,
5806 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError>>;
5807
5808 fn removePart(
5809 &self,
5810 arg_req: &crate::types::RemovePartReq,
5811 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError>>;
5812
5813 fn memberChange(
5814 &self,
5815 arg_req: &crate::types::MemberChangeReq,
5816 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError>>;
5817
5818 fn checkPeers(
5819 &self,
5820 arg_req: &crate::types::CheckPeersReq,
5821 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError>>;
5822
5823 fn getLeaderPart(
5824 &self,
5825 arg_req: &crate::types::GetLeaderReq,
5826 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError>>;
5827
5828 fn createCheckpoint(
5829 &self,
5830 arg_req: &crate::types::CreateCPRequest,
5831 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError>>;
5832
5833 fn dropCheckpoint(
5834 &self,
5835 arg_req: &crate::types::DropCPRequest,
5836 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError>>;
5837
5838 fn blockingWrites(
5839 &self,
5840 arg_req: &crate::types::BlockingSignRequest,
5841 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError>>;
5842
5843 fn rebuildTagIndex(
5844 &self,
5845 arg_req: &crate::types::RebuildIndexRequest,
5846 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError>>;
5847
5848 fn rebuildEdgeIndex(
5849 &self,
5850 arg_req: &crate::types::RebuildIndexRequest,
5851 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError>>;
5852
5853 fn put(
5854 &self,
5855 arg_req: &crate::types::PutRequest,
5856 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError>>;
5857
5858 fn get(
5859 &self,
5860 arg_req: &crate::types::GetRequest,
5861 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError>>;
5862
5863 fn remove(
5864 &self,
5865 arg_req: &crate::types::RemoveRequest,
5866 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError>>;
5867
5868 fn removeRange(
5869 &self,
5870 arg_req: &crate::types::RemoveRangeRequest,
5871 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError>>;
5872
5873 fn getUUID(
5874 &self,
5875 arg_req: &crate::types::GetUUIDReq,
5876 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError>>;
5877
5878 fn lookUpIndex(
5879 &self,
5880 arg_req: &crate::types::LookUpIndexRequest,
5881 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError>>;
5882 }
5883
5884 pub trait StorageServiceExt<T>: StorageService
5885 where
5886 T: ::fbthrift::Transport,
5887 {
5888 fn getBound_with_rpc_opts(
5889 &self,
5890 arg_req: &crate::types::GetNeighborsRequest,
5891 rpc_options: T::RpcOptions,
5892 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError>>;
5893 fn boundStats_with_rpc_opts(
5894 &self,
5895 arg_req: &crate::types::GetNeighborsRequest,
5896 rpc_options: T::RpcOptions,
5897 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError>>;
5898 fn getProps_with_rpc_opts(
5899 &self,
5900 arg_req: &crate::types::VertexPropRequest,
5901 rpc_options: T::RpcOptions,
5902 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError>>;
5903 fn getEdgeProps_with_rpc_opts(
5904 &self,
5905 arg_req: &crate::types::EdgePropRequest,
5906 rpc_options: T::RpcOptions,
5907 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError>>;
5908 fn addVertices_with_rpc_opts(
5909 &self,
5910 arg_req: &crate::types::AddVerticesRequest,
5911 rpc_options: T::RpcOptions,
5912 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError>>;
5913 fn addEdges_with_rpc_opts(
5914 &self,
5915 arg_req: &crate::types::AddEdgesRequest,
5916 rpc_options: T::RpcOptions,
5917 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError>>;
5918 fn deleteEdges_with_rpc_opts(
5919 &self,
5920 arg_req: &crate::types::DeleteEdgesRequest,
5921 rpc_options: T::RpcOptions,
5922 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError>>;
5923 fn deleteVertices_with_rpc_opts(
5924 &self,
5925 arg_req: &crate::types::DeleteVerticesRequest,
5926 rpc_options: T::RpcOptions,
5927 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError>>;
5928 fn updateVertex_with_rpc_opts(
5929 &self,
5930 arg_req: &crate::types::UpdateVertexRequest,
5931 rpc_options: T::RpcOptions,
5932 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError>>;
5933 fn updateEdge_with_rpc_opts(
5934 &self,
5935 arg_req: &crate::types::UpdateEdgeRequest,
5936 rpc_options: T::RpcOptions,
5937 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError>>;
5938 fn scanEdge_with_rpc_opts(
5939 &self,
5940 arg_req: &crate::types::ScanEdgeRequest,
5941 rpc_options: T::RpcOptions,
5942 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError>>;
5943 fn scanVertex_with_rpc_opts(
5944 &self,
5945 arg_req: &crate::types::ScanVertexRequest,
5946 rpc_options: T::RpcOptions,
5947 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError>>;
5948 fn transLeader_with_rpc_opts(
5949 &self,
5950 arg_req: &crate::types::TransLeaderReq,
5951 rpc_options: T::RpcOptions,
5952 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::TransLeaderError>>;
5953 fn addPart_with_rpc_opts(
5954 &self,
5955 arg_req: &crate::types::AddPartReq,
5956 rpc_options: T::RpcOptions,
5957 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError>>;
5958 fn addLearner_with_rpc_opts(
5959 &self,
5960 arg_req: &crate::types::AddLearnerReq,
5961 rpc_options: T::RpcOptions,
5962 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError>>;
5963 fn waitingForCatchUpData_with_rpc_opts(
5964 &self,
5965 arg_req: &crate::types::CatchUpDataReq,
5966 rpc_options: T::RpcOptions,
5967 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError>>;
5968 fn removePart_with_rpc_opts(
5969 &self,
5970 arg_req: &crate::types::RemovePartReq,
5971 rpc_options: T::RpcOptions,
5972 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError>>;
5973 fn memberChange_with_rpc_opts(
5974 &self,
5975 arg_req: &crate::types::MemberChangeReq,
5976 rpc_options: T::RpcOptions,
5977 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError>>;
5978 fn checkPeers_with_rpc_opts(
5979 &self,
5980 arg_req: &crate::types::CheckPeersReq,
5981 rpc_options: T::RpcOptions,
5982 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError>>;
5983 fn getLeaderPart_with_rpc_opts(
5984 &self,
5985 arg_req: &crate::types::GetLeaderReq,
5986 rpc_options: T::RpcOptions,
5987 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError>>;
5988 fn createCheckpoint_with_rpc_opts(
5989 &self,
5990 arg_req: &crate::types::CreateCPRequest,
5991 rpc_options: T::RpcOptions,
5992 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError>>;
5993 fn dropCheckpoint_with_rpc_opts(
5994 &self,
5995 arg_req: &crate::types::DropCPRequest,
5996 rpc_options: T::RpcOptions,
5997 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError>>;
5998 fn blockingWrites_with_rpc_opts(
5999 &self,
6000 arg_req: &crate::types::BlockingSignRequest,
6001 rpc_options: T::RpcOptions,
6002 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError>>;
6003 fn rebuildTagIndex_with_rpc_opts(
6004 &self,
6005 arg_req: &crate::types::RebuildIndexRequest,
6006 rpc_options: T::RpcOptions,
6007 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError>>;
6008 fn rebuildEdgeIndex_with_rpc_opts(
6009 &self,
6010 arg_req: &crate::types::RebuildIndexRequest,
6011 rpc_options: T::RpcOptions,
6012 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError>>;
6013 fn put_with_rpc_opts(
6014 &self,
6015 arg_req: &crate::types::PutRequest,
6016 rpc_options: T::RpcOptions,
6017 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError>>;
6018 fn get_with_rpc_opts(
6019 &self,
6020 arg_req: &crate::types::GetRequest,
6021 rpc_options: T::RpcOptions,
6022 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError>>;
6023 fn remove_with_rpc_opts(
6024 &self,
6025 arg_req: &crate::types::RemoveRequest,
6026 rpc_options: T::RpcOptions,
6027 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError>>;
6028 fn removeRange_with_rpc_opts(
6029 &self,
6030 arg_req: &crate::types::RemoveRangeRequest,
6031 rpc_options: T::RpcOptions,
6032 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError>>;
6033 fn getUUID_with_rpc_opts(
6034 &self,
6035 arg_req: &crate::types::GetUUIDReq,
6036 rpc_options: T::RpcOptions,
6037 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError>>;
6038 fn lookUpIndex_with_rpc_opts(
6039 &self,
6040 arg_req: &crate::types::LookUpIndexRequest,
6041 rpc_options: T::RpcOptions,
6042 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError>>;
6043 }
6044
6045 struct Args_StorageService_getBound<'a> {
6046 req: &'a crate::types::GetNeighborsRequest,
6047 _phantom: ::std::marker::PhantomData<&'a ()>,
6048 }
6049
6050 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_getBound<'a> {
6051 #[inline]
6052 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.getBound"))]
6053 fn write(&self, p: &mut P) {
6054 p.write_struct_begin("args");
6055 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6056 ::fbthrift::Serialize::write(&self.req, p);
6057 p.write_field_end();
6058 p.write_field_stop();
6059 p.write_struct_end();
6060 }
6061 }
6062
6063 struct Args_StorageService_boundStats<'a> {
6064 req: &'a crate::types::GetNeighborsRequest,
6065 _phantom: ::std::marker::PhantomData<&'a ()>,
6066 }
6067
6068 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_boundStats<'a> {
6069 #[inline]
6070 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.boundStats"))]
6071 fn write(&self, p: &mut P) {
6072 p.write_struct_begin("args");
6073 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6074 ::fbthrift::Serialize::write(&self.req, p);
6075 p.write_field_end();
6076 p.write_field_stop();
6077 p.write_struct_end();
6078 }
6079 }
6080
6081 struct Args_StorageService_getProps<'a> {
6082 req: &'a crate::types::VertexPropRequest,
6083 _phantom: ::std::marker::PhantomData<&'a ()>,
6084 }
6085
6086 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_getProps<'a> {
6087 #[inline]
6088 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.getProps"))]
6089 fn write(&self, p: &mut P) {
6090 p.write_struct_begin("args");
6091 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6092 ::fbthrift::Serialize::write(&self.req, p);
6093 p.write_field_end();
6094 p.write_field_stop();
6095 p.write_struct_end();
6096 }
6097 }
6098
6099 struct Args_StorageService_getEdgeProps<'a> {
6100 req: &'a crate::types::EdgePropRequest,
6101 _phantom: ::std::marker::PhantomData<&'a ()>,
6102 }
6103
6104 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_getEdgeProps<'a> {
6105 #[inline]
6106 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.getEdgeProps"))]
6107 fn write(&self, p: &mut P) {
6108 p.write_struct_begin("args");
6109 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6110 ::fbthrift::Serialize::write(&self.req, p);
6111 p.write_field_end();
6112 p.write_field_stop();
6113 p.write_struct_end();
6114 }
6115 }
6116
6117 struct Args_StorageService_addVertices<'a> {
6118 req: &'a crate::types::AddVerticesRequest,
6119 _phantom: ::std::marker::PhantomData<&'a ()>,
6120 }
6121
6122 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_addVertices<'a> {
6123 #[inline]
6124 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.addVertices"))]
6125 fn write(&self, p: &mut P) {
6126 p.write_struct_begin("args");
6127 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6128 ::fbthrift::Serialize::write(&self.req, p);
6129 p.write_field_end();
6130 p.write_field_stop();
6131 p.write_struct_end();
6132 }
6133 }
6134
6135 struct Args_StorageService_addEdges<'a> {
6136 req: &'a crate::types::AddEdgesRequest,
6137 _phantom: ::std::marker::PhantomData<&'a ()>,
6138 }
6139
6140 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_addEdges<'a> {
6141 #[inline]
6142 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.addEdges"))]
6143 fn write(&self, p: &mut P) {
6144 p.write_struct_begin("args");
6145 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6146 ::fbthrift::Serialize::write(&self.req, p);
6147 p.write_field_end();
6148 p.write_field_stop();
6149 p.write_struct_end();
6150 }
6151 }
6152
6153 struct Args_StorageService_deleteEdges<'a> {
6154 req: &'a crate::types::DeleteEdgesRequest,
6155 _phantom: ::std::marker::PhantomData<&'a ()>,
6156 }
6157
6158 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_deleteEdges<'a> {
6159 #[inline]
6160 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.deleteEdges"))]
6161 fn write(&self, p: &mut P) {
6162 p.write_struct_begin("args");
6163 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6164 ::fbthrift::Serialize::write(&self.req, p);
6165 p.write_field_end();
6166 p.write_field_stop();
6167 p.write_struct_end();
6168 }
6169 }
6170
6171 struct Args_StorageService_deleteVertices<'a> {
6172 req: &'a crate::types::DeleteVerticesRequest,
6173 _phantom: ::std::marker::PhantomData<&'a ()>,
6174 }
6175
6176 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_deleteVertices<'a> {
6177 #[inline]
6178 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.deleteVertices"))]
6179 fn write(&self, p: &mut P) {
6180 p.write_struct_begin("args");
6181 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6182 ::fbthrift::Serialize::write(&self.req, p);
6183 p.write_field_end();
6184 p.write_field_stop();
6185 p.write_struct_end();
6186 }
6187 }
6188
6189 struct Args_StorageService_updateVertex<'a> {
6190 req: &'a crate::types::UpdateVertexRequest,
6191 _phantom: ::std::marker::PhantomData<&'a ()>,
6192 }
6193
6194 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_updateVertex<'a> {
6195 #[inline]
6196 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.updateVertex"))]
6197 fn write(&self, p: &mut P) {
6198 p.write_struct_begin("args");
6199 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6200 ::fbthrift::Serialize::write(&self.req, p);
6201 p.write_field_end();
6202 p.write_field_stop();
6203 p.write_struct_end();
6204 }
6205 }
6206
6207 struct Args_StorageService_updateEdge<'a> {
6208 req: &'a crate::types::UpdateEdgeRequest,
6209 _phantom: ::std::marker::PhantomData<&'a ()>,
6210 }
6211
6212 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_updateEdge<'a> {
6213 #[inline]
6214 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.updateEdge"))]
6215 fn write(&self, p: &mut P) {
6216 p.write_struct_begin("args");
6217 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6218 ::fbthrift::Serialize::write(&self.req, p);
6219 p.write_field_end();
6220 p.write_field_stop();
6221 p.write_struct_end();
6222 }
6223 }
6224
6225 struct Args_StorageService_scanEdge<'a> {
6226 req: &'a crate::types::ScanEdgeRequest,
6227 _phantom: ::std::marker::PhantomData<&'a ()>,
6228 }
6229
6230 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_scanEdge<'a> {
6231 #[inline]
6232 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.scanEdge"))]
6233 fn write(&self, p: &mut P) {
6234 p.write_struct_begin("args");
6235 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6236 ::fbthrift::Serialize::write(&self.req, p);
6237 p.write_field_end();
6238 p.write_field_stop();
6239 p.write_struct_end();
6240 }
6241 }
6242
6243 struct Args_StorageService_scanVertex<'a> {
6244 req: &'a crate::types::ScanVertexRequest,
6245 _phantom: ::std::marker::PhantomData<&'a ()>,
6246 }
6247
6248 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_scanVertex<'a> {
6249 #[inline]
6250 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.scanVertex"))]
6251 fn write(&self, p: &mut P) {
6252 p.write_struct_begin("args");
6253 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6254 ::fbthrift::Serialize::write(&self.req, p);
6255 p.write_field_end();
6256 p.write_field_stop();
6257 p.write_struct_end();
6258 }
6259 }
6260
6261 struct Args_StorageService_transLeader<'a> {
6262 req: &'a crate::types::TransLeaderReq,
6263 _phantom: ::std::marker::PhantomData<&'a ()>,
6264 }
6265
6266 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_transLeader<'a> {
6267 #[inline]
6268 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.transLeader"))]
6269 fn write(&self, p: &mut P) {
6270 p.write_struct_begin("args");
6271 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6272 ::fbthrift::Serialize::write(&self.req, p);
6273 p.write_field_end();
6274 p.write_field_stop();
6275 p.write_struct_end();
6276 }
6277 }
6278
6279 struct Args_StorageService_addPart<'a> {
6280 req: &'a crate::types::AddPartReq,
6281 _phantom: ::std::marker::PhantomData<&'a ()>,
6282 }
6283
6284 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_addPart<'a> {
6285 #[inline]
6286 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.addPart"))]
6287 fn write(&self, p: &mut P) {
6288 p.write_struct_begin("args");
6289 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6290 ::fbthrift::Serialize::write(&self.req, p);
6291 p.write_field_end();
6292 p.write_field_stop();
6293 p.write_struct_end();
6294 }
6295 }
6296
6297 struct Args_StorageService_addLearner<'a> {
6298 req: &'a crate::types::AddLearnerReq,
6299 _phantom: ::std::marker::PhantomData<&'a ()>,
6300 }
6301
6302 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_addLearner<'a> {
6303 #[inline]
6304 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.addLearner"))]
6305 fn write(&self, p: &mut P) {
6306 p.write_struct_begin("args");
6307 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6308 ::fbthrift::Serialize::write(&self.req, p);
6309 p.write_field_end();
6310 p.write_field_stop();
6311 p.write_struct_end();
6312 }
6313 }
6314
6315 struct Args_StorageService_waitingForCatchUpData<'a> {
6316 req: &'a crate::types::CatchUpDataReq,
6317 _phantom: ::std::marker::PhantomData<&'a ()>,
6318 }
6319
6320 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_waitingForCatchUpData<'a> {
6321 #[inline]
6322 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.waitingForCatchUpData"))]
6323 fn write(&self, p: &mut P) {
6324 p.write_struct_begin("args");
6325 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6326 ::fbthrift::Serialize::write(&self.req, p);
6327 p.write_field_end();
6328 p.write_field_stop();
6329 p.write_struct_end();
6330 }
6331 }
6332
6333 struct Args_StorageService_removePart<'a> {
6334 req: &'a crate::types::RemovePartReq,
6335 _phantom: ::std::marker::PhantomData<&'a ()>,
6336 }
6337
6338 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_removePart<'a> {
6339 #[inline]
6340 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.removePart"))]
6341 fn write(&self, p: &mut P) {
6342 p.write_struct_begin("args");
6343 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6344 ::fbthrift::Serialize::write(&self.req, p);
6345 p.write_field_end();
6346 p.write_field_stop();
6347 p.write_struct_end();
6348 }
6349 }
6350
6351 struct Args_StorageService_memberChange<'a> {
6352 req: &'a crate::types::MemberChangeReq,
6353 _phantom: ::std::marker::PhantomData<&'a ()>,
6354 }
6355
6356 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_memberChange<'a> {
6357 #[inline]
6358 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.memberChange"))]
6359 fn write(&self, p: &mut P) {
6360 p.write_struct_begin("args");
6361 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6362 ::fbthrift::Serialize::write(&self.req, p);
6363 p.write_field_end();
6364 p.write_field_stop();
6365 p.write_struct_end();
6366 }
6367 }
6368
6369 struct Args_StorageService_checkPeers<'a> {
6370 req: &'a crate::types::CheckPeersReq,
6371 _phantom: ::std::marker::PhantomData<&'a ()>,
6372 }
6373
6374 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_checkPeers<'a> {
6375 #[inline]
6376 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.checkPeers"))]
6377 fn write(&self, p: &mut P) {
6378 p.write_struct_begin("args");
6379 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6380 ::fbthrift::Serialize::write(&self.req, p);
6381 p.write_field_end();
6382 p.write_field_stop();
6383 p.write_struct_end();
6384 }
6385 }
6386
6387 struct Args_StorageService_getLeaderPart<'a> {
6388 req: &'a crate::types::GetLeaderReq,
6389 _phantom: ::std::marker::PhantomData<&'a ()>,
6390 }
6391
6392 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_getLeaderPart<'a> {
6393 #[inline]
6394 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.getLeaderPart"))]
6395 fn write(&self, p: &mut P) {
6396 p.write_struct_begin("args");
6397 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6398 ::fbthrift::Serialize::write(&self.req, p);
6399 p.write_field_end();
6400 p.write_field_stop();
6401 p.write_struct_end();
6402 }
6403 }
6404
6405 struct Args_StorageService_createCheckpoint<'a> {
6406 req: &'a crate::types::CreateCPRequest,
6407 _phantom: ::std::marker::PhantomData<&'a ()>,
6408 }
6409
6410 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_createCheckpoint<'a> {
6411 #[inline]
6412 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.createCheckpoint"))]
6413 fn write(&self, p: &mut P) {
6414 p.write_struct_begin("args");
6415 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6416 ::fbthrift::Serialize::write(&self.req, p);
6417 p.write_field_end();
6418 p.write_field_stop();
6419 p.write_struct_end();
6420 }
6421 }
6422
6423 struct Args_StorageService_dropCheckpoint<'a> {
6424 req: &'a crate::types::DropCPRequest,
6425 _phantom: ::std::marker::PhantomData<&'a ()>,
6426 }
6427
6428 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_dropCheckpoint<'a> {
6429 #[inline]
6430 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.dropCheckpoint"))]
6431 fn write(&self, p: &mut P) {
6432 p.write_struct_begin("args");
6433 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6434 ::fbthrift::Serialize::write(&self.req, p);
6435 p.write_field_end();
6436 p.write_field_stop();
6437 p.write_struct_end();
6438 }
6439 }
6440
6441 struct Args_StorageService_blockingWrites<'a> {
6442 req: &'a crate::types::BlockingSignRequest,
6443 _phantom: ::std::marker::PhantomData<&'a ()>,
6444 }
6445
6446 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_blockingWrites<'a> {
6447 #[inline]
6448 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.blockingWrites"))]
6449 fn write(&self, p: &mut P) {
6450 p.write_struct_begin("args");
6451 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6452 ::fbthrift::Serialize::write(&self.req, p);
6453 p.write_field_end();
6454 p.write_field_stop();
6455 p.write_struct_end();
6456 }
6457 }
6458
6459 struct Args_StorageService_rebuildTagIndex<'a> {
6460 req: &'a crate::types::RebuildIndexRequest,
6461 _phantom: ::std::marker::PhantomData<&'a ()>,
6462 }
6463
6464 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_rebuildTagIndex<'a> {
6465 #[inline]
6466 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.rebuildTagIndex"))]
6467 fn write(&self, p: &mut P) {
6468 p.write_struct_begin("args");
6469 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6470 ::fbthrift::Serialize::write(&self.req, p);
6471 p.write_field_end();
6472 p.write_field_stop();
6473 p.write_struct_end();
6474 }
6475 }
6476
6477 struct Args_StorageService_rebuildEdgeIndex<'a> {
6478 req: &'a crate::types::RebuildIndexRequest,
6479 _phantom: ::std::marker::PhantomData<&'a ()>,
6480 }
6481
6482 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_rebuildEdgeIndex<'a> {
6483 #[inline]
6484 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.rebuildEdgeIndex"))]
6485 fn write(&self, p: &mut P) {
6486 p.write_struct_begin("args");
6487 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6488 ::fbthrift::Serialize::write(&self.req, p);
6489 p.write_field_end();
6490 p.write_field_stop();
6491 p.write_struct_end();
6492 }
6493 }
6494
6495 struct Args_StorageService_put<'a> {
6496 req: &'a crate::types::PutRequest,
6497 _phantom: ::std::marker::PhantomData<&'a ()>,
6498 }
6499
6500 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_put<'a> {
6501 #[inline]
6502 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.put"))]
6503 fn write(&self, p: &mut P) {
6504 p.write_struct_begin("args");
6505 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6506 ::fbthrift::Serialize::write(&self.req, p);
6507 p.write_field_end();
6508 p.write_field_stop();
6509 p.write_struct_end();
6510 }
6511 }
6512
6513 struct Args_StorageService_get<'a> {
6514 req: &'a crate::types::GetRequest,
6515 _phantom: ::std::marker::PhantomData<&'a ()>,
6516 }
6517
6518 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_get<'a> {
6519 #[inline]
6520 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.get"))]
6521 fn write(&self, p: &mut P) {
6522 p.write_struct_begin("args");
6523 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6524 ::fbthrift::Serialize::write(&self.req, p);
6525 p.write_field_end();
6526 p.write_field_stop();
6527 p.write_struct_end();
6528 }
6529 }
6530
6531 struct Args_StorageService_remove<'a> {
6532 req: &'a crate::types::RemoveRequest,
6533 _phantom: ::std::marker::PhantomData<&'a ()>,
6534 }
6535
6536 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_remove<'a> {
6537 #[inline]
6538 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.remove"))]
6539 fn write(&self, p: &mut P) {
6540 p.write_struct_begin("args");
6541 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6542 ::fbthrift::Serialize::write(&self.req, p);
6543 p.write_field_end();
6544 p.write_field_stop();
6545 p.write_struct_end();
6546 }
6547 }
6548
6549 struct Args_StorageService_removeRange<'a> {
6550 req: &'a crate::types::RemoveRangeRequest,
6551 _phantom: ::std::marker::PhantomData<&'a ()>,
6552 }
6553
6554 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_removeRange<'a> {
6555 #[inline]
6556 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.removeRange"))]
6557 fn write(&self, p: &mut P) {
6558 p.write_struct_begin("args");
6559 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6560 ::fbthrift::Serialize::write(&self.req, p);
6561 p.write_field_end();
6562 p.write_field_stop();
6563 p.write_struct_end();
6564 }
6565 }
6566
6567 struct Args_StorageService_getUUID<'a> {
6568 req: &'a crate::types::GetUUIDReq,
6569 _phantom: ::std::marker::PhantomData<&'a ()>,
6570 }
6571
6572 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_getUUID<'a> {
6573 #[inline]
6574 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.getUUID"))]
6575 fn write(&self, p: &mut P) {
6576 p.write_struct_begin("args");
6577 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6578 ::fbthrift::Serialize::write(&self.req, p);
6579 p.write_field_end();
6580 p.write_field_stop();
6581 p.write_struct_end();
6582 }
6583 }
6584
6585 struct Args_StorageService_lookUpIndex<'a> {
6586 req: &'a crate::types::LookUpIndexRequest,
6587 _phantom: ::std::marker::PhantomData<&'a ()>,
6588 }
6589
6590 impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_StorageService_lookUpIndex<'a> {
6591 #[inline]
6592 #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "StorageService.lookUpIndex"))]
6593 fn write(&self, p: &mut P) {
6594 p.write_struct_begin("args");
6595 p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
6596 ::fbthrift::Serialize::write(&self.req, p);
6597 p.write_field_end();
6598 p.write_field_stop();
6599 p.write_struct_end();
6600 }
6601 }
6602
6603 impl<P, T, S> StorageService for StorageServiceImpl<P, T, S>
6604 where
6605 P: ::fbthrift::Protocol,
6606 T: ::fbthrift::Transport,
6607 P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
6608 ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
6609 P::Deserializer: ::std::marker::Send,
6610 S: ::fbthrift::help::Spawner,
6611 {
6612 fn getBound(
6613 &self,
6614 arg_req: &crate::types::GetNeighborsRequest,
6615 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError>> {
6616 let rpc_options = T::RpcOptions::default();
6617 self._getBound_impl(
6618 arg_req,
6619 rpc_options,
6620 )
6621 }
6622 fn boundStats(
6623 &self,
6624 arg_req: &crate::types::GetNeighborsRequest,
6625 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError>> {
6626 let rpc_options = T::RpcOptions::default();
6627 self._boundStats_impl(
6628 arg_req,
6629 rpc_options,
6630 )
6631 }
6632 fn getProps(
6633 &self,
6634 arg_req: &crate::types::VertexPropRequest,
6635 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError>> {
6636 let rpc_options = T::RpcOptions::default();
6637 self._getProps_impl(
6638 arg_req,
6639 rpc_options,
6640 )
6641 }
6642 fn getEdgeProps(
6643 &self,
6644 arg_req: &crate::types::EdgePropRequest,
6645 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError>> {
6646 let rpc_options = T::RpcOptions::default();
6647 self._getEdgeProps_impl(
6648 arg_req,
6649 rpc_options,
6650 )
6651 }
6652 fn addVertices(
6653 &self,
6654 arg_req: &crate::types::AddVerticesRequest,
6655 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError>> {
6656 let rpc_options = T::RpcOptions::default();
6657 self._addVertices_impl(
6658 arg_req,
6659 rpc_options,
6660 )
6661 }
6662 fn addEdges(
6663 &self,
6664 arg_req: &crate::types::AddEdgesRequest,
6665 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError>> {
6666 let rpc_options = T::RpcOptions::default();
6667 self._addEdges_impl(
6668 arg_req,
6669 rpc_options,
6670 )
6671 }
6672 fn deleteEdges(
6673 &self,
6674 arg_req: &crate::types::DeleteEdgesRequest,
6675 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError>> {
6676 let rpc_options = T::RpcOptions::default();
6677 self._deleteEdges_impl(
6678 arg_req,
6679 rpc_options,
6680 )
6681 }
6682 fn deleteVertices(
6683 &self,
6684 arg_req: &crate::types::DeleteVerticesRequest,
6685 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError>> {
6686 let rpc_options = T::RpcOptions::default();
6687 self._deleteVertices_impl(
6688 arg_req,
6689 rpc_options,
6690 )
6691 }
6692 fn updateVertex(
6693 &self,
6694 arg_req: &crate::types::UpdateVertexRequest,
6695 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError>> {
6696 let rpc_options = T::RpcOptions::default();
6697 self._updateVertex_impl(
6698 arg_req,
6699 rpc_options,
6700 )
6701 }
6702 fn updateEdge(
6703 &self,
6704 arg_req: &crate::types::UpdateEdgeRequest,
6705 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError>> {
6706 let rpc_options = T::RpcOptions::default();
6707 self._updateEdge_impl(
6708 arg_req,
6709 rpc_options,
6710 )
6711 }
6712 fn scanEdge(
6713 &self,
6714 arg_req: &crate::types::ScanEdgeRequest,
6715 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError>> {
6716 let rpc_options = T::RpcOptions::default();
6717 self._scanEdge_impl(
6718 arg_req,
6719 rpc_options,
6720 )
6721 }
6722 fn scanVertex(
6723 &self,
6724 arg_req: &crate::types::ScanVertexRequest,
6725 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError>> {
6726 let rpc_options = T::RpcOptions::default();
6727 self._scanVertex_impl(
6728 arg_req,
6729 rpc_options,
6730 )
6731 }
6732 fn transLeader(
6733 &self,
6734 arg_req: &crate::types::TransLeaderReq,
6735 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::TransLeaderError>> {
6736 let rpc_options = T::RpcOptions::default();
6737 self._transLeader_impl(
6738 arg_req,
6739 rpc_options,
6740 )
6741 }
6742 fn addPart(
6743 &self,
6744 arg_req: &crate::types::AddPartReq,
6745 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError>> {
6746 let rpc_options = T::RpcOptions::default();
6747 self._addPart_impl(
6748 arg_req,
6749 rpc_options,
6750 )
6751 }
6752 fn addLearner(
6753 &self,
6754 arg_req: &crate::types::AddLearnerReq,
6755 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError>> {
6756 let rpc_options = T::RpcOptions::default();
6757 self._addLearner_impl(
6758 arg_req,
6759 rpc_options,
6760 )
6761 }
6762 fn waitingForCatchUpData(
6763 &self,
6764 arg_req: &crate::types::CatchUpDataReq,
6765 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError>> {
6766 let rpc_options = T::RpcOptions::default();
6767 self._waitingForCatchUpData_impl(
6768 arg_req,
6769 rpc_options,
6770 )
6771 }
6772 fn removePart(
6773 &self,
6774 arg_req: &crate::types::RemovePartReq,
6775 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError>> {
6776 let rpc_options = T::RpcOptions::default();
6777 self._removePart_impl(
6778 arg_req,
6779 rpc_options,
6780 )
6781 }
6782 fn memberChange(
6783 &self,
6784 arg_req: &crate::types::MemberChangeReq,
6785 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError>> {
6786 let rpc_options = T::RpcOptions::default();
6787 self._memberChange_impl(
6788 arg_req,
6789 rpc_options,
6790 )
6791 }
6792 fn checkPeers(
6793 &self,
6794 arg_req: &crate::types::CheckPeersReq,
6795 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError>> {
6796 let rpc_options = T::RpcOptions::default();
6797 self._checkPeers_impl(
6798 arg_req,
6799 rpc_options,
6800 )
6801 }
6802 fn getLeaderPart(
6803 &self,
6804 arg_req: &crate::types::GetLeaderReq,
6805 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError>> {
6806 let rpc_options = T::RpcOptions::default();
6807 self._getLeaderPart_impl(
6808 arg_req,
6809 rpc_options,
6810 )
6811 }
6812 fn createCheckpoint(
6813 &self,
6814 arg_req: &crate::types::CreateCPRequest,
6815 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError>> {
6816 let rpc_options = T::RpcOptions::default();
6817 self._createCheckpoint_impl(
6818 arg_req,
6819 rpc_options,
6820 )
6821 }
6822 fn dropCheckpoint(
6823 &self,
6824 arg_req: &crate::types::DropCPRequest,
6825 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError>> {
6826 let rpc_options = T::RpcOptions::default();
6827 self._dropCheckpoint_impl(
6828 arg_req,
6829 rpc_options,
6830 )
6831 }
6832 fn blockingWrites(
6833 &self,
6834 arg_req: &crate::types::BlockingSignRequest,
6835 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError>> {
6836 let rpc_options = T::RpcOptions::default();
6837 self._blockingWrites_impl(
6838 arg_req,
6839 rpc_options,
6840 )
6841 }
6842 fn rebuildTagIndex(
6843 &self,
6844 arg_req: &crate::types::RebuildIndexRequest,
6845 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError>> {
6846 let rpc_options = T::RpcOptions::default();
6847 self._rebuildTagIndex_impl(
6848 arg_req,
6849 rpc_options,
6850 )
6851 }
6852 fn rebuildEdgeIndex(
6853 &self,
6854 arg_req: &crate::types::RebuildIndexRequest,
6855 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError>> {
6856 let rpc_options = T::RpcOptions::default();
6857 self._rebuildEdgeIndex_impl(
6858 arg_req,
6859 rpc_options,
6860 )
6861 }
6862 fn put(
6863 &self,
6864 arg_req: &crate::types::PutRequest,
6865 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError>> {
6866 let rpc_options = T::RpcOptions::default();
6867 self._put_impl(
6868 arg_req,
6869 rpc_options,
6870 )
6871 }
6872 fn get(
6873 &self,
6874 arg_req: &crate::types::GetRequest,
6875 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError>> {
6876 let rpc_options = T::RpcOptions::default();
6877 self._get_impl(
6878 arg_req,
6879 rpc_options,
6880 )
6881 }
6882 fn remove(
6883 &self,
6884 arg_req: &crate::types::RemoveRequest,
6885 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError>> {
6886 let rpc_options = T::RpcOptions::default();
6887 self._remove_impl(
6888 arg_req,
6889 rpc_options,
6890 )
6891 }
6892 fn removeRange(
6893 &self,
6894 arg_req: &crate::types::RemoveRangeRequest,
6895 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError>> {
6896 let rpc_options = T::RpcOptions::default();
6897 self._removeRange_impl(
6898 arg_req,
6899 rpc_options,
6900 )
6901 }
6902 fn getUUID(
6903 &self,
6904 arg_req: &crate::types::GetUUIDReq,
6905 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError>> {
6906 let rpc_options = T::RpcOptions::default();
6907 self._getUUID_impl(
6908 arg_req,
6909 rpc_options,
6910 )
6911 }
6912 fn lookUpIndex(
6913 &self,
6914 arg_req: &crate::types::LookUpIndexRequest,
6915 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError>> {
6916 let rpc_options = T::RpcOptions::default();
6917 self._lookUpIndex_impl(
6918 arg_req,
6919 rpc_options,
6920 )
6921 }
6922 }
6923
6924 impl<P, T, S> StorageServiceExt<T> for StorageServiceImpl<P, T, S>
6925 where
6926 P: ::fbthrift::Protocol,
6927 T: ::fbthrift::Transport,
6928 P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
6929 ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
6930 P::Deserializer: ::std::marker::Send,
6931 S: ::fbthrift::help::Spawner,
6932 {
6933 fn getBound_with_rpc_opts(
6934 &self,
6935 arg_req: &crate::types::GetNeighborsRequest,
6936 rpc_options: T::RpcOptions,
6937 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError>> {
6938 self._getBound_impl(
6939 arg_req,
6940 rpc_options,
6941 )
6942 }
6943 fn boundStats_with_rpc_opts(
6944 &self,
6945 arg_req: &crate::types::GetNeighborsRequest,
6946 rpc_options: T::RpcOptions,
6947 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError>> {
6948 self._boundStats_impl(
6949 arg_req,
6950 rpc_options,
6951 )
6952 }
6953 fn getProps_with_rpc_opts(
6954 &self,
6955 arg_req: &crate::types::VertexPropRequest,
6956 rpc_options: T::RpcOptions,
6957 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError>> {
6958 self._getProps_impl(
6959 arg_req,
6960 rpc_options,
6961 )
6962 }
6963 fn getEdgeProps_with_rpc_opts(
6964 &self,
6965 arg_req: &crate::types::EdgePropRequest,
6966 rpc_options: T::RpcOptions,
6967 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError>> {
6968 self._getEdgeProps_impl(
6969 arg_req,
6970 rpc_options,
6971 )
6972 }
6973 fn addVertices_with_rpc_opts(
6974 &self,
6975 arg_req: &crate::types::AddVerticesRequest,
6976 rpc_options: T::RpcOptions,
6977 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError>> {
6978 self._addVertices_impl(
6979 arg_req,
6980 rpc_options,
6981 )
6982 }
6983 fn addEdges_with_rpc_opts(
6984 &self,
6985 arg_req: &crate::types::AddEdgesRequest,
6986 rpc_options: T::RpcOptions,
6987 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError>> {
6988 self._addEdges_impl(
6989 arg_req,
6990 rpc_options,
6991 )
6992 }
6993 fn deleteEdges_with_rpc_opts(
6994 &self,
6995 arg_req: &crate::types::DeleteEdgesRequest,
6996 rpc_options: T::RpcOptions,
6997 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError>> {
6998 self._deleteEdges_impl(
6999 arg_req,
7000 rpc_options,
7001 )
7002 }
7003 fn deleteVertices_with_rpc_opts(
7004 &self,
7005 arg_req: &crate::types::DeleteVerticesRequest,
7006 rpc_options: T::RpcOptions,
7007 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError>> {
7008 self._deleteVertices_impl(
7009 arg_req,
7010 rpc_options,
7011 )
7012 }
7013 fn updateVertex_with_rpc_opts(
7014 &self,
7015 arg_req: &crate::types::UpdateVertexRequest,
7016 rpc_options: T::RpcOptions,
7017 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError>> {
7018 self._updateVertex_impl(
7019 arg_req,
7020 rpc_options,
7021 )
7022 }
7023 fn updateEdge_with_rpc_opts(
7024 &self,
7025 arg_req: &crate::types::UpdateEdgeRequest,
7026 rpc_options: T::RpcOptions,
7027 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError>> {
7028 self._updateEdge_impl(
7029 arg_req,
7030 rpc_options,
7031 )
7032 }
7033 fn scanEdge_with_rpc_opts(
7034 &self,
7035 arg_req: &crate::types::ScanEdgeRequest,
7036 rpc_options: T::RpcOptions,
7037 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError>> {
7038 self._scanEdge_impl(
7039 arg_req,
7040 rpc_options,
7041 )
7042 }
7043 fn scanVertex_with_rpc_opts(
7044 &self,
7045 arg_req: &crate::types::ScanVertexRequest,
7046 rpc_options: T::RpcOptions,
7047 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError>> {
7048 self._scanVertex_impl(
7049 arg_req,
7050 rpc_options,
7051 )
7052 }
7053 fn transLeader_with_rpc_opts(
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_service::TransLeaderError>> {
7058 self._transLeader_impl(
7059 arg_req,
7060 rpc_options,
7061 )
7062 }
7063 fn addPart_with_rpc_opts(
7064 &self,
7065 arg_req: &crate::types::AddPartReq,
7066 rpc_options: T::RpcOptions,
7067 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError>> {
7068 self._addPart_impl(
7069 arg_req,
7070 rpc_options,
7071 )
7072 }
7073 fn addLearner_with_rpc_opts(
7074 &self,
7075 arg_req: &crate::types::AddLearnerReq,
7076 rpc_options: T::RpcOptions,
7077 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError>> {
7078 self._addLearner_impl(
7079 arg_req,
7080 rpc_options,
7081 )
7082 }
7083 fn waitingForCatchUpData_with_rpc_opts(
7084 &self,
7085 arg_req: &crate::types::CatchUpDataReq,
7086 rpc_options: T::RpcOptions,
7087 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError>> {
7088 self._waitingForCatchUpData_impl(
7089 arg_req,
7090 rpc_options,
7091 )
7092 }
7093 fn removePart_with_rpc_opts(
7094 &self,
7095 arg_req: &crate::types::RemovePartReq,
7096 rpc_options: T::RpcOptions,
7097 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError>> {
7098 self._removePart_impl(
7099 arg_req,
7100 rpc_options,
7101 )
7102 }
7103 fn memberChange_with_rpc_opts(
7104 &self,
7105 arg_req: &crate::types::MemberChangeReq,
7106 rpc_options: T::RpcOptions,
7107 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError>> {
7108 self._memberChange_impl(
7109 arg_req,
7110 rpc_options,
7111 )
7112 }
7113 fn checkPeers_with_rpc_opts(
7114 &self,
7115 arg_req: &crate::types::CheckPeersReq,
7116 rpc_options: T::RpcOptions,
7117 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError>> {
7118 self._checkPeers_impl(
7119 arg_req,
7120 rpc_options,
7121 )
7122 }
7123 fn getLeaderPart_with_rpc_opts(
7124 &self,
7125 arg_req: &crate::types::GetLeaderReq,
7126 rpc_options: T::RpcOptions,
7127 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError>> {
7128 self._getLeaderPart_impl(
7129 arg_req,
7130 rpc_options,
7131 )
7132 }
7133 fn createCheckpoint_with_rpc_opts(
7134 &self,
7135 arg_req: &crate::types::CreateCPRequest,
7136 rpc_options: T::RpcOptions,
7137 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError>> {
7138 self._createCheckpoint_impl(
7139 arg_req,
7140 rpc_options,
7141 )
7142 }
7143 fn dropCheckpoint_with_rpc_opts(
7144 &self,
7145 arg_req: &crate::types::DropCPRequest,
7146 rpc_options: T::RpcOptions,
7147 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError>> {
7148 self._dropCheckpoint_impl(
7149 arg_req,
7150 rpc_options,
7151 )
7152 }
7153 fn blockingWrites_with_rpc_opts(
7154 &self,
7155 arg_req: &crate::types::BlockingSignRequest,
7156 rpc_options: T::RpcOptions,
7157 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError>> {
7158 self._blockingWrites_impl(
7159 arg_req,
7160 rpc_options,
7161 )
7162 }
7163 fn rebuildTagIndex_with_rpc_opts(
7164 &self,
7165 arg_req: &crate::types::RebuildIndexRequest,
7166 rpc_options: T::RpcOptions,
7167 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError>> {
7168 self._rebuildTagIndex_impl(
7169 arg_req,
7170 rpc_options,
7171 )
7172 }
7173 fn rebuildEdgeIndex_with_rpc_opts(
7174 &self,
7175 arg_req: &crate::types::RebuildIndexRequest,
7176 rpc_options: T::RpcOptions,
7177 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError>> {
7178 self._rebuildEdgeIndex_impl(
7179 arg_req,
7180 rpc_options,
7181 )
7182 }
7183 fn put_with_rpc_opts(
7184 &self,
7185 arg_req: &crate::types::PutRequest,
7186 rpc_options: T::RpcOptions,
7187 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError>> {
7188 self._put_impl(
7189 arg_req,
7190 rpc_options,
7191 )
7192 }
7193 fn get_with_rpc_opts(
7194 &self,
7195 arg_req: &crate::types::GetRequest,
7196 rpc_options: T::RpcOptions,
7197 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError>> {
7198 self._get_impl(
7199 arg_req,
7200 rpc_options,
7201 )
7202 }
7203 fn remove_with_rpc_opts(
7204 &self,
7205 arg_req: &crate::types::RemoveRequest,
7206 rpc_options: T::RpcOptions,
7207 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError>> {
7208 self._remove_impl(
7209 arg_req,
7210 rpc_options,
7211 )
7212 }
7213 fn removeRange_with_rpc_opts(
7214 &self,
7215 arg_req: &crate::types::RemoveRangeRequest,
7216 rpc_options: T::RpcOptions,
7217 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError>> {
7218 self._removeRange_impl(
7219 arg_req,
7220 rpc_options,
7221 )
7222 }
7223 fn getUUID_with_rpc_opts(
7224 &self,
7225 arg_req: &crate::types::GetUUIDReq,
7226 rpc_options: T::RpcOptions,
7227 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError>> {
7228 self._getUUID_impl(
7229 arg_req,
7230 rpc_options,
7231 )
7232 }
7233 fn lookUpIndex_with_rpc_opts(
7234 &self,
7235 arg_req: &crate::types::LookUpIndexRequest,
7236 rpc_options: T::RpcOptions,
7237 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError>> {
7238 self._lookUpIndex_impl(
7239 arg_req,
7240 rpc_options,
7241 )
7242 }
7243 }
7244
7245 impl<'a, S> StorageService for S
7246 where
7247 S: ::std::convert::AsRef<dyn StorageService + 'a>,
7248 S: ::std::marker::Send,
7249 {
7250 fn getBound(
7251 &self,
7252 arg_req: &crate::types::GetNeighborsRequest,
7253 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError>> {
7254 self.as_ref().getBound(
7255 arg_req,
7256 )
7257 }
7258 fn boundStats(
7259 &self,
7260 arg_req: &crate::types::GetNeighborsRequest,
7261 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError>> {
7262 self.as_ref().boundStats(
7263 arg_req,
7264 )
7265 }
7266 fn getProps(
7267 &self,
7268 arg_req: &crate::types::VertexPropRequest,
7269 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError>> {
7270 self.as_ref().getProps(
7271 arg_req,
7272 )
7273 }
7274 fn getEdgeProps(
7275 &self,
7276 arg_req: &crate::types::EdgePropRequest,
7277 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError>> {
7278 self.as_ref().getEdgeProps(
7279 arg_req,
7280 )
7281 }
7282 fn addVertices(
7283 &self,
7284 arg_req: &crate::types::AddVerticesRequest,
7285 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError>> {
7286 self.as_ref().addVertices(
7287 arg_req,
7288 )
7289 }
7290 fn addEdges(
7291 &self,
7292 arg_req: &crate::types::AddEdgesRequest,
7293 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError>> {
7294 self.as_ref().addEdges(
7295 arg_req,
7296 )
7297 }
7298 fn deleteEdges(
7299 &self,
7300 arg_req: &crate::types::DeleteEdgesRequest,
7301 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError>> {
7302 self.as_ref().deleteEdges(
7303 arg_req,
7304 )
7305 }
7306 fn deleteVertices(
7307 &self,
7308 arg_req: &crate::types::DeleteVerticesRequest,
7309 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError>> {
7310 self.as_ref().deleteVertices(
7311 arg_req,
7312 )
7313 }
7314 fn updateVertex(
7315 &self,
7316 arg_req: &crate::types::UpdateVertexRequest,
7317 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError>> {
7318 self.as_ref().updateVertex(
7319 arg_req,
7320 )
7321 }
7322 fn updateEdge(
7323 &self,
7324 arg_req: &crate::types::UpdateEdgeRequest,
7325 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError>> {
7326 self.as_ref().updateEdge(
7327 arg_req,
7328 )
7329 }
7330 fn scanEdge(
7331 &self,
7332 arg_req: &crate::types::ScanEdgeRequest,
7333 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError>> {
7334 self.as_ref().scanEdge(
7335 arg_req,
7336 )
7337 }
7338 fn scanVertex(
7339 &self,
7340 arg_req: &crate::types::ScanVertexRequest,
7341 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError>> {
7342 self.as_ref().scanVertex(
7343 arg_req,
7344 )
7345 }
7346 fn transLeader(
7347 &self,
7348 arg_req: &crate::types::TransLeaderReq,
7349 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::TransLeaderError>> {
7350 self.as_ref().transLeader(
7351 arg_req,
7352 )
7353 }
7354 fn addPart(
7355 &self,
7356 arg_req: &crate::types::AddPartReq,
7357 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError>> {
7358 self.as_ref().addPart(
7359 arg_req,
7360 )
7361 }
7362 fn addLearner(
7363 &self,
7364 arg_req: &crate::types::AddLearnerReq,
7365 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError>> {
7366 self.as_ref().addLearner(
7367 arg_req,
7368 )
7369 }
7370 fn waitingForCatchUpData(
7371 &self,
7372 arg_req: &crate::types::CatchUpDataReq,
7373 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError>> {
7374 self.as_ref().waitingForCatchUpData(
7375 arg_req,
7376 )
7377 }
7378 fn removePart(
7379 &self,
7380 arg_req: &crate::types::RemovePartReq,
7381 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError>> {
7382 self.as_ref().removePart(
7383 arg_req,
7384 )
7385 }
7386 fn memberChange(
7387 &self,
7388 arg_req: &crate::types::MemberChangeReq,
7389 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError>> {
7390 self.as_ref().memberChange(
7391 arg_req,
7392 )
7393 }
7394 fn checkPeers(
7395 &self,
7396 arg_req: &crate::types::CheckPeersReq,
7397 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError>> {
7398 self.as_ref().checkPeers(
7399 arg_req,
7400 )
7401 }
7402 fn getLeaderPart(
7403 &self,
7404 arg_req: &crate::types::GetLeaderReq,
7405 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError>> {
7406 self.as_ref().getLeaderPart(
7407 arg_req,
7408 )
7409 }
7410 fn createCheckpoint(
7411 &self,
7412 arg_req: &crate::types::CreateCPRequest,
7413 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError>> {
7414 self.as_ref().createCheckpoint(
7415 arg_req,
7416 )
7417 }
7418 fn dropCheckpoint(
7419 &self,
7420 arg_req: &crate::types::DropCPRequest,
7421 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError>> {
7422 self.as_ref().dropCheckpoint(
7423 arg_req,
7424 )
7425 }
7426 fn blockingWrites(
7427 &self,
7428 arg_req: &crate::types::BlockingSignRequest,
7429 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError>> {
7430 self.as_ref().blockingWrites(
7431 arg_req,
7432 )
7433 }
7434 fn rebuildTagIndex(
7435 &self,
7436 arg_req: &crate::types::RebuildIndexRequest,
7437 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError>> {
7438 self.as_ref().rebuildTagIndex(
7439 arg_req,
7440 )
7441 }
7442 fn rebuildEdgeIndex(
7443 &self,
7444 arg_req: &crate::types::RebuildIndexRequest,
7445 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError>> {
7446 self.as_ref().rebuildEdgeIndex(
7447 arg_req,
7448 )
7449 }
7450 fn put(
7451 &self,
7452 arg_req: &crate::types::PutRequest,
7453 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError>> {
7454 self.as_ref().put(
7455 arg_req,
7456 )
7457 }
7458 fn get(
7459 &self,
7460 arg_req: &crate::types::GetRequest,
7461 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError>> {
7462 self.as_ref().get(
7463 arg_req,
7464 )
7465 }
7466 fn remove(
7467 &self,
7468 arg_req: &crate::types::RemoveRequest,
7469 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError>> {
7470 self.as_ref().remove(
7471 arg_req,
7472 )
7473 }
7474 fn removeRange(
7475 &self,
7476 arg_req: &crate::types::RemoveRangeRequest,
7477 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError>> {
7478 self.as_ref().removeRange(
7479 arg_req,
7480 )
7481 }
7482 fn getUUID(
7483 &self,
7484 arg_req: &crate::types::GetUUIDReq,
7485 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError>> {
7486 self.as_ref().getUUID(
7487 arg_req,
7488 )
7489 }
7490 fn lookUpIndex(
7491 &self,
7492 arg_req: &crate::types::LookUpIndexRequest,
7493 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError>> {
7494 self.as_ref().lookUpIndex(
7495 arg_req,
7496 )
7497 }
7498 }
7499
7500 impl<'a, S, T> StorageServiceExt<T> for S
7501 where
7502 S: ::std::convert::AsRef<dyn StorageService + 'a>,
7503 S: ::std::convert::AsRef<dyn StorageServiceExt<T> + 'a>,
7504 S: ::std::marker::Send,
7505 T: ::fbthrift::Transport,
7506 {
7507 fn getBound_with_rpc_opts(
7508 &self,
7509 arg_req: &crate::types::GetNeighborsRequest,
7510 rpc_options: T::RpcOptions,
7511 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError>> {
7512 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).getBound_with_rpc_opts(
7513 arg_req,
7514 rpc_options,
7515 )
7516 }
7517 fn boundStats_with_rpc_opts(
7518 &self,
7519 arg_req: &crate::types::GetNeighborsRequest,
7520 rpc_options: T::RpcOptions,
7521 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError>> {
7522 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).boundStats_with_rpc_opts(
7523 arg_req,
7524 rpc_options,
7525 )
7526 }
7527 fn getProps_with_rpc_opts(
7528 &self,
7529 arg_req: &crate::types::VertexPropRequest,
7530 rpc_options: T::RpcOptions,
7531 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError>> {
7532 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).getProps_with_rpc_opts(
7533 arg_req,
7534 rpc_options,
7535 )
7536 }
7537 fn getEdgeProps_with_rpc_opts(
7538 &self,
7539 arg_req: &crate::types::EdgePropRequest,
7540 rpc_options: T::RpcOptions,
7541 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError>> {
7542 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).getEdgeProps_with_rpc_opts(
7543 arg_req,
7544 rpc_options,
7545 )
7546 }
7547 fn addVertices_with_rpc_opts(
7548 &self,
7549 arg_req: &crate::types::AddVerticesRequest,
7550 rpc_options: T::RpcOptions,
7551 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError>> {
7552 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).addVertices_with_rpc_opts(
7553 arg_req,
7554 rpc_options,
7555 )
7556 }
7557 fn addEdges_with_rpc_opts(
7558 &self,
7559 arg_req: &crate::types::AddEdgesRequest,
7560 rpc_options: T::RpcOptions,
7561 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError>> {
7562 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).addEdges_with_rpc_opts(
7563 arg_req,
7564 rpc_options,
7565 )
7566 }
7567 fn deleteEdges_with_rpc_opts(
7568 &self,
7569 arg_req: &crate::types::DeleteEdgesRequest,
7570 rpc_options: T::RpcOptions,
7571 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError>> {
7572 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).deleteEdges_with_rpc_opts(
7573 arg_req,
7574 rpc_options,
7575 )
7576 }
7577 fn deleteVertices_with_rpc_opts(
7578 &self,
7579 arg_req: &crate::types::DeleteVerticesRequest,
7580 rpc_options: T::RpcOptions,
7581 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError>> {
7582 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).deleteVertices_with_rpc_opts(
7583 arg_req,
7584 rpc_options,
7585 )
7586 }
7587 fn updateVertex_with_rpc_opts(
7588 &self,
7589 arg_req: &crate::types::UpdateVertexRequest,
7590 rpc_options: T::RpcOptions,
7591 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError>> {
7592 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).updateVertex_with_rpc_opts(
7593 arg_req,
7594 rpc_options,
7595 )
7596 }
7597 fn updateEdge_with_rpc_opts(
7598 &self,
7599 arg_req: &crate::types::UpdateEdgeRequest,
7600 rpc_options: T::RpcOptions,
7601 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError>> {
7602 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).updateEdge_with_rpc_opts(
7603 arg_req,
7604 rpc_options,
7605 )
7606 }
7607 fn scanEdge_with_rpc_opts(
7608 &self,
7609 arg_req: &crate::types::ScanEdgeRequest,
7610 rpc_options: T::RpcOptions,
7611 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError>> {
7612 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).scanEdge_with_rpc_opts(
7613 arg_req,
7614 rpc_options,
7615 )
7616 }
7617 fn scanVertex_with_rpc_opts(
7618 &self,
7619 arg_req: &crate::types::ScanVertexRequest,
7620 rpc_options: T::RpcOptions,
7621 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError>> {
7622 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).scanVertex_with_rpc_opts(
7623 arg_req,
7624 rpc_options,
7625 )
7626 }
7627 fn transLeader_with_rpc_opts(
7628 &self,
7629 arg_req: &crate::types::TransLeaderReq,
7630 rpc_options: T::RpcOptions,
7631 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::TransLeaderError>> {
7632 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).transLeader_with_rpc_opts(
7633 arg_req,
7634 rpc_options,
7635 )
7636 }
7637 fn addPart_with_rpc_opts(
7638 &self,
7639 arg_req: &crate::types::AddPartReq,
7640 rpc_options: T::RpcOptions,
7641 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError>> {
7642 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).addPart_with_rpc_opts(
7643 arg_req,
7644 rpc_options,
7645 )
7646 }
7647 fn addLearner_with_rpc_opts(
7648 &self,
7649 arg_req: &crate::types::AddLearnerReq,
7650 rpc_options: T::RpcOptions,
7651 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError>> {
7652 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).addLearner_with_rpc_opts(
7653 arg_req,
7654 rpc_options,
7655 )
7656 }
7657 fn waitingForCatchUpData_with_rpc_opts(
7658 &self,
7659 arg_req: &crate::types::CatchUpDataReq,
7660 rpc_options: T::RpcOptions,
7661 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError>> {
7662 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).waitingForCatchUpData_with_rpc_opts(
7663 arg_req,
7664 rpc_options,
7665 )
7666 }
7667 fn removePart_with_rpc_opts(
7668 &self,
7669 arg_req: &crate::types::RemovePartReq,
7670 rpc_options: T::RpcOptions,
7671 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError>> {
7672 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).removePart_with_rpc_opts(
7673 arg_req,
7674 rpc_options,
7675 )
7676 }
7677 fn memberChange_with_rpc_opts(
7678 &self,
7679 arg_req: &crate::types::MemberChangeReq,
7680 rpc_options: T::RpcOptions,
7681 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError>> {
7682 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).memberChange_with_rpc_opts(
7683 arg_req,
7684 rpc_options,
7685 )
7686 }
7687 fn checkPeers_with_rpc_opts(
7688 &self,
7689 arg_req: &crate::types::CheckPeersReq,
7690 rpc_options: T::RpcOptions,
7691 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError>> {
7692 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).checkPeers_with_rpc_opts(
7693 arg_req,
7694 rpc_options,
7695 )
7696 }
7697 fn getLeaderPart_with_rpc_opts(
7698 &self,
7699 arg_req: &crate::types::GetLeaderReq,
7700 rpc_options: T::RpcOptions,
7701 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError>> {
7702 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).getLeaderPart_with_rpc_opts(
7703 arg_req,
7704 rpc_options,
7705 )
7706 }
7707 fn createCheckpoint_with_rpc_opts(
7708 &self,
7709 arg_req: &crate::types::CreateCPRequest,
7710 rpc_options: T::RpcOptions,
7711 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError>> {
7712 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).createCheckpoint_with_rpc_opts(
7713 arg_req,
7714 rpc_options,
7715 )
7716 }
7717 fn dropCheckpoint_with_rpc_opts(
7718 &self,
7719 arg_req: &crate::types::DropCPRequest,
7720 rpc_options: T::RpcOptions,
7721 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError>> {
7722 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).dropCheckpoint_with_rpc_opts(
7723 arg_req,
7724 rpc_options,
7725 )
7726 }
7727 fn blockingWrites_with_rpc_opts(
7728 &self,
7729 arg_req: &crate::types::BlockingSignRequest,
7730 rpc_options: T::RpcOptions,
7731 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError>> {
7732 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).blockingWrites_with_rpc_opts(
7733 arg_req,
7734 rpc_options,
7735 )
7736 }
7737 fn rebuildTagIndex_with_rpc_opts(
7738 &self,
7739 arg_req: &crate::types::RebuildIndexRequest,
7740 rpc_options: T::RpcOptions,
7741 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError>> {
7742 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).rebuildTagIndex_with_rpc_opts(
7743 arg_req,
7744 rpc_options,
7745 )
7746 }
7747 fn rebuildEdgeIndex_with_rpc_opts(
7748 &self,
7749 arg_req: &crate::types::RebuildIndexRequest,
7750 rpc_options: T::RpcOptions,
7751 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError>> {
7752 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).rebuildEdgeIndex_with_rpc_opts(
7753 arg_req,
7754 rpc_options,
7755 )
7756 }
7757 fn put_with_rpc_opts(
7758 &self,
7759 arg_req: &crate::types::PutRequest,
7760 rpc_options: T::RpcOptions,
7761 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError>> {
7762 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).put_with_rpc_opts(
7763 arg_req,
7764 rpc_options,
7765 )
7766 }
7767 fn get_with_rpc_opts(
7768 &self,
7769 arg_req: &crate::types::GetRequest,
7770 rpc_options: T::RpcOptions,
7771 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError>> {
7772 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).get_with_rpc_opts(
7773 arg_req,
7774 rpc_options,
7775 )
7776 }
7777 fn remove_with_rpc_opts(
7778 &self,
7779 arg_req: &crate::types::RemoveRequest,
7780 rpc_options: T::RpcOptions,
7781 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError>> {
7782 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).remove_with_rpc_opts(
7783 arg_req,
7784 rpc_options,
7785 )
7786 }
7787 fn removeRange_with_rpc_opts(
7788 &self,
7789 arg_req: &crate::types::RemoveRangeRequest,
7790 rpc_options: T::RpcOptions,
7791 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError>> {
7792 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).removeRange_with_rpc_opts(
7793 arg_req,
7794 rpc_options,
7795 )
7796 }
7797 fn getUUID_with_rpc_opts(
7798 &self,
7799 arg_req: &crate::types::GetUUIDReq,
7800 rpc_options: T::RpcOptions,
7801 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError>> {
7802 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).getUUID_with_rpc_opts(
7803 arg_req,
7804 rpc_options,
7805 )
7806 }
7807 fn lookUpIndex_with_rpc_opts(
7808 &self,
7809 arg_req: &crate::types::LookUpIndexRequest,
7810 rpc_options: T::RpcOptions,
7811 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError>> {
7812 <Self as ::std::convert::AsRef<dyn StorageServiceExt<T>>>::as_ref(self).lookUpIndex_with_rpc_opts(
7813 arg_req,
7814 rpc_options,
7815 )
7816 }
7817 }
7818
7819 #[derive(Clone)]
7820 pub struct make_StorageService;
7821
7822 impl dyn StorageService {
7836 pub fn new<P, T>(
7837 protocol: P,
7838 transport: T,
7839 ) -> ::std::sync::Arc<impl StorageService + ::std::marker::Send + ::std::marker::Sync + 'static>
7840 where
7841 P: ::fbthrift::Protocol<Frame = T>,
7842 T: ::fbthrift::Transport,
7843 P::Deserializer: ::std::marker::Send,
7844 {
7845 let spawner = ::fbthrift::help::NoopSpawner;
7846 Self::with_spawner(protocol, transport, spawner)
7847 }
7848
7849 pub fn with_spawner<P, T, S>(
7850 protocol: P,
7851 transport: T,
7852 spawner: S,
7853 ) -> ::std::sync::Arc<impl StorageService + ::std::marker::Send + ::std::marker::Sync + 'static>
7854 where
7855 P: ::fbthrift::Protocol<Frame = T>,
7856 T: ::fbthrift::Transport,
7857 P::Deserializer: ::std::marker::Send,
7858 S: ::fbthrift::help::Spawner,
7859 {
7860 let _ = protocol;
7861 let _ = spawner;
7862 ::std::sync::Arc::new(StorageServiceImpl::<P, T, S>::new(transport))
7863 }
7864 }
7865
7866 impl<T> dyn StorageServiceExt<T>
7867 where
7868 T: ::fbthrift::Transport,
7869 {
7870 pub fn new<P>(
7871 protocol: P,
7872 transport: T,
7873 ) -> ::std::sync::Arc<impl StorageServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
7874 where
7875 P: ::fbthrift::Protocol<Frame = T>,
7876 P::Deserializer: ::std::marker::Send,
7877 {
7878 let spawner = ::fbthrift::help::NoopSpawner;
7879 Self::with_spawner(protocol, transport, spawner)
7880 }
7881
7882 pub fn with_spawner<P, S>(
7883 protocol: P,
7884 transport: T,
7885 spawner: S,
7886 ) -> ::std::sync::Arc<impl StorageServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
7887 where
7888 P: ::fbthrift::Protocol<Frame = T>,
7889 P::Deserializer: ::std::marker::Send,
7890 S: ::fbthrift::help::Spawner,
7891 {
7892 let _ = protocol;
7893 let _ = spawner;
7894 ::std::sync::Arc::new(StorageServiceImpl::<P, T, S>::new(transport))
7895 }
7896 }
7897
7898 pub type StorageServiceDynClient = <make_StorageService as ::fbthrift::ClientFactory>::Api;
7899 pub type StorageServiceClient = ::std::sync::Arc<StorageServiceDynClient>;
7900
7901 impl ::fbthrift::ClientFactory for make_StorageService {
7904 type Api = dyn StorageService + ::std::marker::Send + ::std::marker::Sync + 'static;
7905
7906 fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
7907 where
7908 P: ::fbthrift::Protocol<Frame = T>,
7909 T: ::fbthrift::Transport,
7910 P::Deserializer: ::std::marker::Send,
7911 S: ::fbthrift::help::Spawner,
7912 {
7913 <dyn StorageService>::with_spawner(protocol, transport, spawner)
7914 }
7915 }
7916
7917}
7918
7919pub mod server {
7921 #[::async_trait::async_trait]
7922 pub trait StorageService: ::std::marker::Send + ::std::marker::Sync + 'static {
7923 async fn getBound(
7924 &self,
7925 _req: crate::types::GetNeighborsRequest,
7926 ) -> ::std::result::Result<crate::types::QueryResponse, crate::services::storage_service::GetBoundExn> {
7927 ::std::result::Result::Err(crate::services::storage_service::GetBoundExn::ApplicationException(
7928 ::fbthrift::ApplicationException::unimplemented_method(
7929 "StorageService",
7930 "getBound",
7931 ),
7932 ))
7933 }
7934 async fn boundStats(
7935 &self,
7936 _req: crate::types::GetNeighborsRequest,
7937 ) -> ::std::result::Result<crate::types::QueryStatsResponse, crate::services::storage_service::BoundStatsExn> {
7938 ::std::result::Result::Err(crate::services::storage_service::BoundStatsExn::ApplicationException(
7939 ::fbthrift::ApplicationException::unimplemented_method(
7940 "StorageService",
7941 "boundStats",
7942 ),
7943 ))
7944 }
7945 async fn getProps(
7946 &self,
7947 _req: crate::types::VertexPropRequest,
7948 ) -> ::std::result::Result<crate::types::QueryResponse, crate::services::storage_service::GetPropsExn> {
7949 ::std::result::Result::Err(crate::services::storage_service::GetPropsExn::ApplicationException(
7950 ::fbthrift::ApplicationException::unimplemented_method(
7951 "StorageService",
7952 "getProps",
7953 ),
7954 ))
7955 }
7956 async fn getEdgeProps(
7957 &self,
7958 _req: crate::types::EdgePropRequest,
7959 ) -> ::std::result::Result<crate::types::EdgePropResponse, crate::services::storage_service::GetEdgePropsExn> {
7960 ::std::result::Result::Err(crate::services::storage_service::GetEdgePropsExn::ApplicationException(
7961 ::fbthrift::ApplicationException::unimplemented_method(
7962 "StorageService",
7963 "getEdgeProps",
7964 ),
7965 ))
7966 }
7967 async fn addVertices(
7968 &self,
7969 _req: crate::types::AddVerticesRequest,
7970 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::AddVerticesExn> {
7971 ::std::result::Result::Err(crate::services::storage_service::AddVerticesExn::ApplicationException(
7972 ::fbthrift::ApplicationException::unimplemented_method(
7973 "StorageService",
7974 "addVertices",
7975 ),
7976 ))
7977 }
7978 async fn addEdges(
7979 &self,
7980 _req: crate::types::AddEdgesRequest,
7981 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::AddEdgesExn> {
7982 ::std::result::Result::Err(crate::services::storage_service::AddEdgesExn::ApplicationException(
7983 ::fbthrift::ApplicationException::unimplemented_method(
7984 "StorageService",
7985 "addEdges",
7986 ),
7987 ))
7988 }
7989 async fn deleteEdges(
7990 &self,
7991 _req: crate::types::DeleteEdgesRequest,
7992 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::DeleteEdgesExn> {
7993 ::std::result::Result::Err(crate::services::storage_service::DeleteEdgesExn::ApplicationException(
7994 ::fbthrift::ApplicationException::unimplemented_method(
7995 "StorageService",
7996 "deleteEdges",
7997 ),
7998 ))
7999 }
8000 async fn deleteVertices(
8001 &self,
8002 _req: crate::types::DeleteVerticesRequest,
8003 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::DeleteVerticesExn> {
8004 ::std::result::Result::Err(crate::services::storage_service::DeleteVerticesExn::ApplicationException(
8005 ::fbthrift::ApplicationException::unimplemented_method(
8006 "StorageService",
8007 "deleteVertices",
8008 ),
8009 ))
8010 }
8011 async fn updateVertex(
8012 &self,
8013 _req: crate::types::UpdateVertexRequest,
8014 ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::storage_service::UpdateVertexExn> {
8015 ::std::result::Result::Err(crate::services::storage_service::UpdateVertexExn::ApplicationException(
8016 ::fbthrift::ApplicationException::unimplemented_method(
8017 "StorageService",
8018 "updateVertex",
8019 ),
8020 ))
8021 }
8022 async fn updateEdge(
8023 &self,
8024 _req: crate::types::UpdateEdgeRequest,
8025 ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::storage_service::UpdateEdgeExn> {
8026 ::std::result::Result::Err(crate::services::storage_service::UpdateEdgeExn::ApplicationException(
8027 ::fbthrift::ApplicationException::unimplemented_method(
8028 "StorageService",
8029 "updateEdge",
8030 ),
8031 ))
8032 }
8033 async fn scanEdge(
8034 &self,
8035 _req: crate::types::ScanEdgeRequest,
8036 ) -> ::std::result::Result<crate::types::ScanEdgeResponse, crate::services::storage_service::ScanEdgeExn> {
8037 ::std::result::Result::Err(crate::services::storage_service::ScanEdgeExn::ApplicationException(
8038 ::fbthrift::ApplicationException::unimplemented_method(
8039 "StorageService",
8040 "scanEdge",
8041 ),
8042 ))
8043 }
8044 async fn scanVertex(
8045 &self,
8046 _req: crate::types::ScanVertexRequest,
8047 ) -> ::std::result::Result<crate::types::ScanVertexResponse, crate::services::storage_service::ScanVertexExn> {
8048 ::std::result::Result::Err(crate::services::storage_service::ScanVertexExn::ApplicationException(
8049 ::fbthrift::ApplicationException::unimplemented_method(
8050 "StorageService",
8051 "scanVertex",
8052 ),
8053 ))
8054 }
8055 async fn transLeader(
8056 &self,
8057 _req: crate::types::TransLeaderReq,
8058 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::TransLeaderExn> {
8059 ::std::result::Result::Err(crate::services::storage_service::TransLeaderExn::ApplicationException(
8060 ::fbthrift::ApplicationException::unimplemented_method(
8061 "StorageService",
8062 "transLeader",
8063 ),
8064 ))
8065 }
8066 async fn addPart(
8067 &self,
8068 _req: crate::types::AddPartReq,
8069 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::AddPartExn> {
8070 ::std::result::Result::Err(crate::services::storage_service::AddPartExn::ApplicationException(
8071 ::fbthrift::ApplicationException::unimplemented_method(
8072 "StorageService",
8073 "addPart",
8074 ),
8075 ))
8076 }
8077 async fn addLearner(
8078 &self,
8079 _req: crate::types::AddLearnerReq,
8080 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::AddLearnerExn> {
8081 ::std::result::Result::Err(crate::services::storage_service::AddLearnerExn::ApplicationException(
8082 ::fbthrift::ApplicationException::unimplemented_method(
8083 "StorageService",
8084 "addLearner",
8085 ),
8086 ))
8087 }
8088 async fn waitingForCatchUpData(
8089 &self,
8090 _req: crate::types::CatchUpDataReq,
8091 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::WaitingForCatchUpDataExn> {
8092 ::std::result::Result::Err(crate::services::storage_service::WaitingForCatchUpDataExn::ApplicationException(
8093 ::fbthrift::ApplicationException::unimplemented_method(
8094 "StorageService",
8095 "waitingForCatchUpData",
8096 ),
8097 ))
8098 }
8099 async fn removePart(
8100 &self,
8101 _req: crate::types::RemovePartReq,
8102 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::RemovePartExn> {
8103 ::std::result::Result::Err(crate::services::storage_service::RemovePartExn::ApplicationException(
8104 ::fbthrift::ApplicationException::unimplemented_method(
8105 "StorageService",
8106 "removePart",
8107 ),
8108 ))
8109 }
8110 async fn memberChange(
8111 &self,
8112 _req: crate::types::MemberChangeReq,
8113 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::MemberChangeExn> {
8114 ::std::result::Result::Err(crate::services::storage_service::MemberChangeExn::ApplicationException(
8115 ::fbthrift::ApplicationException::unimplemented_method(
8116 "StorageService",
8117 "memberChange",
8118 ),
8119 ))
8120 }
8121 async fn checkPeers(
8122 &self,
8123 _req: crate::types::CheckPeersReq,
8124 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::CheckPeersExn> {
8125 ::std::result::Result::Err(crate::services::storage_service::CheckPeersExn::ApplicationException(
8126 ::fbthrift::ApplicationException::unimplemented_method(
8127 "StorageService",
8128 "checkPeers",
8129 ),
8130 ))
8131 }
8132 async fn getLeaderPart(
8133 &self,
8134 _req: crate::types::GetLeaderReq,
8135 ) -> ::std::result::Result<crate::types::GetLeaderResp, crate::services::storage_service::GetLeaderPartExn> {
8136 ::std::result::Result::Err(crate::services::storage_service::GetLeaderPartExn::ApplicationException(
8137 ::fbthrift::ApplicationException::unimplemented_method(
8138 "StorageService",
8139 "getLeaderPart",
8140 ),
8141 ))
8142 }
8143 async fn createCheckpoint(
8144 &self,
8145 _req: crate::types::CreateCPRequest,
8146 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::CreateCheckpointExn> {
8147 ::std::result::Result::Err(crate::services::storage_service::CreateCheckpointExn::ApplicationException(
8148 ::fbthrift::ApplicationException::unimplemented_method(
8149 "StorageService",
8150 "createCheckpoint",
8151 ),
8152 ))
8153 }
8154 async fn dropCheckpoint(
8155 &self,
8156 _req: crate::types::DropCPRequest,
8157 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::DropCheckpointExn> {
8158 ::std::result::Result::Err(crate::services::storage_service::DropCheckpointExn::ApplicationException(
8159 ::fbthrift::ApplicationException::unimplemented_method(
8160 "StorageService",
8161 "dropCheckpoint",
8162 ),
8163 ))
8164 }
8165 async fn blockingWrites(
8166 &self,
8167 _req: crate::types::BlockingSignRequest,
8168 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::BlockingWritesExn> {
8169 ::std::result::Result::Err(crate::services::storage_service::BlockingWritesExn::ApplicationException(
8170 ::fbthrift::ApplicationException::unimplemented_method(
8171 "StorageService",
8172 "blockingWrites",
8173 ),
8174 ))
8175 }
8176 async fn rebuildTagIndex(
8177 &self,
8178 _req: crate::types::RebuildIndexRequest,
8179 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::RebuildTagIndexExn> {
8180 ::std::result::Result::Err(crate::services::storage_service::RebuildTagIndexExn::ApplicationException(
8181 ::fbthrift::ApplicationException::unimplemented_method(
8182 "StorageService",
8183 "rebuildTagIndex",
8184 ),
8185 ))
8186 }
8187 async fn rebuildEdgeIndex(
8188 &self,
8189 _req: crate::types::RebuildIndexRequest,
8190 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::RebuildEdgeIndexExn> {
8191 ::std::result::Result::Err(crate::services::storage_service::RebuildEdgeIndexExn::ApplicationException(
8192 ::fbthrift::ApplicationException::unimplemented_method(
8193 "StorageService",
8194 "rebuildEdgeIndex",
8195 ),
8196 ))
8197 }
8198 async fn put(
8199 &self,
8200 _req: crate::types::PutRequest,
8201 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::PutExn> {
8202 ::std::result::Result::Err(crate::services::storage_service::PutExn::ApplicationException(
8203 ::fbthrift::ApplicationException::unimplemented_method(
8204 "StorageService",
8205 "put",
8206 ),
8207 ))
8208 }
8209 async fn get(
8210 &self,
8211 _req: crate::types::GetRequest,
8212 ) -> ::std::result::Result<crate::types::GeneralResponse, crate::services::storage_service::GetExn> {
8213 ::std::result::Result::Err(crate::services::storage_service::GetExn::ApplicationException(
8214 ::fbthrift::ApplicationException::unimplemented_method(
8215 "StorageService",
8216 "get",
8217 ),
8218 ))
8219 }
8220 async fn remove(
8221 &self,
8222 _req: crate::types::RemoveRequest,
8223 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::RemoveExn> {
8224 ::std::result::Result::Err(crate::services::storage_service::RemoveExn::ApplicationException(
8225 ::fbthrift::ApplicationException::unimplemented_method(
8226 "StorageService",
8227 "remove",
8228 ),
8229 ))
8230 }
8231 async fn removeRange(
8232 &self,
8233 _req: crate::types::RemoveRangeRequest,
8234 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::RemoveRangeExn> {
8235 ::std::result::Result::Err(crate::services::storage_service::RemoveRangeExn::ApplicationException(
8236 ::fbthrift::ApplicationException::unimplemented_method(
8237 "StorageService",
8238 "removeRange",
8239 ),
8240 ))
8241 }
8242 async fn getUUID(
8243 &self,
8244 _req: crate::types::GetUUIDReq,
8245 ) -> ::std::result::Result<crate::types::GetUUIDResp, crate::services::storage_service::GetUUIDExn> {
8246 ::std::result::Result::Err(crate::services::storage_service::GetUUIDExn::ApplicationException(
8247 ::fbthrift::ApplicationException::unimplemented_method(
8248 "StorageService",
8249 "getUUID",
8250 ),
8251 ))
8252 }
8253 async fn lookUpIndex(
8254 &self,
8255 _req: crate::types::LookUpIndexRequest,
8256 ) -> ::std::result::Result<crate::types::LookUpIndexResp, crate::services::storage_service::LookUpIndexExn> {
8257 ::std::result::Result::Err(crate::services::storage_service::LookUpIndexExn::ApplicationException(
8258 ::fbthrift::ApplicationException::unimplemented_method(
8259 "StorageService",
8260 "lookUpIndex",
8261 ),
8262 ))
8263 }
8264 }
8265
8266 #[::async_trait::async_trait]
8267 impl<T> StorageService for ::std::boxed::Box<T>
8268 where
8269 T: StorageService + Send + Sync + ?Sized,
8270 {
8271 async fn getBound(
8272 &self,
8273 req: crate::types::GetNeighborsRequest,
8274 ) -> ::std::result::Result<crate::types::QueryResponse, crate::services::storage_service::GetBoundExn> {
8275 (**self).getBound(
8276 req,
8277 ).await
8278 }
8279 async fn boundStats(
8280 &self,
8281 req: crate::types::GetNeighborsRequest,
8282 ) -> ::std::result::Result<crate::types::QueryStatsResponse, crate::services::storage_service::BoundStatsExn> {
8283 (**self).boundStats(
8284 req,
8285 ).await
8286 }
8287 async fn getProps(
8288 &self,
8289 req: crate::types::VertexPropRequest,
8290 ) -> ::std::result::Result<crate::types::QueryResponse, crate::services::storage_service::GetPropsExn> {
8291 (**self).getProps(
8292 req,
8293 ).await
8294 }
8295 async fn getEdgeProps(
8296 &self,
8297 req: crate::types::EdgePropRequest,
8298 ) -> ::std::result::Result<crate::types::EdgePropResponse, crate::services::storage_service::GetEdgePropsExn> {
8299 (**self).getEdgeProps(
8300 req,
8301 ).await
8302 }
8303 async fn addVertices(
8304 &self,
8305 req: crate::types::AddVerticesRequest,
8306 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::AddVerticesExn> {
8307 (**self).addVertices(
8308 req,
8309 ).await
8310 }
8311 async fn addEdges(
8312 &self,
8313 req: crate::types::AddEdgesRequest,
8314 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::AddEdgesExn> {
8315 (**self).addEdges(
8316 req,
8317 ).await
8318 }
8319 async fn deleteEdges(
8320 &self,
8321 req: crate::types::DeleteEdgesRequest,
8322 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::DeleteEdgesExn> {
8323 (**self).deleteEdges(
8324 req,
8325 ).await
8326 }
8327 async fn deleteVertices(
8328 &self,
8329 req: crate::types::DeleteVerticesRequest,
8330 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::DeleteVerticesExn> {
8331 (**self).deleteVertices(
8332 req,
8333 ).await
8334 }
8335 async fn updateVertex(
8336 &self,
8337 req: crate::types::UpdateVertexRequest,
8338 ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::storage_service::UpdateVertexExn> {
8339 (**self).updateVertex(
8340 req,
8341 ).await
8342 }
8343 async fn updateEdge(
8344 &self,
8345 req: crate::types::UpdateEdgeRequest,
8346 ) -> ::std::result::Result<crate::types::UpdateResponse, crate::services::storage_service::UpdateEdgeExn> {
8347 (**self).updateEdge(
8348 req,
8349 ).await
8350 }
8351 async fn scanEdge(
8352 &self,
8353 req: crate::types::ScanEdgeRequest,
8354 ) -> ::std::result::Result<crate::types::ScanEdgeResponse, crate::services::storage_service::ScanEdgeExn> {
8355 (**self).scanEdge(
8356 req,
8357 ).await
8358 }
8359 async fn scanVertex(
8360 &self,
8361 req: crate::types::ScanVertexRequest,
8362 ) -> ::std::result::Result<crate::types::ScanVertexResponse, crate::services::storage_service::ScanVertexExn> {
8363 (**self).scanVertex(
8364 req,
8365 ).await
8366 }
8367 async fn transLeader(
8368 &self,
8369 req: crate::types::TransLeaderReq,
8370 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::TransLeaderExn> {
8371 (**self).transLeader(
8372 req,
8373 ).await
8374 }
8375 async fn addPart(
8376 &self,
8377 req: crate::types::AddPartReq,
8378 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::AddPartExn> {
8379 (**self).addPart(
8380 req,
8381 ).await
8382 }
8383 async fn addLearner(
8384 &self,
8385 req: crate::types::AddLearnerReq,
8386 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::AddLearnerExn> {
8387 (**self).addLearner(
8388 req,
8389 ).await
8390 }
8391 async fn waitingForCatchUpData(
8392 &self,
8393 req: crate::types::CatchUpDataReq,
8394 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::WaitingForCatchUpDataExn> {
8395 (**self).waitingForCatchUpData(
8396 req,
8397 ).await
8398 }
8399 async fn removePart(
8400 &self,
8401 req: crate::types::RemovePartReq,
8402 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::RemovePartExn> {
8403 (**self).removePart(
8404 req,
8405 ).await
8406 }
8407 async fn memberChange(
8408 &self,
8409 req: crate::types::MemberChangeReq,
8410 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::MemberChangeExn> {
8411 (**self).memberChange(
8412 req,
8413 ).await
8414 }
8415 async fn checkPeers(
8416 &self,
8417 req: crate::types::CheckPeersReq,
8418 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::CheckPeersExn> {
8419 (**self).checkPeers(
8420 req,
8421 ).await
8422 }
8423 async fn getLeaderPart(
8424 &self,
8425 req: crate::types::GetLeaderReq,
8426 ) -> ::std::result::Result<crate::types::GetLeaderResp, crate::services::storage_service::GetLeaderPartExn> {
8427 (**self).getLeaderPart(
8428 req,
8429 ).await
8430 }
8431 async fn createCheckpoint(
8432 &self,
8433 req: crate::types::CreateCPRequest,
8434 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::CreateCheckpointExn> {
8435 (**self).createCheckpoint(
8436 req,
8437 ).await
8438 }
8439 async fn dropCheckpoint(
8440 &self,
8441 req: crate::types::DropCPRequest,
8442 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::DropCheckpointExn> {
8443 (**self).dropCheckpoint(
8444 req,
8445 ).await
8446 }
8447 async fn blockingWrites(
8448 &self,
8449 req: crate::types::BlockingSignRequest,
8450 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::BlockingWritesExn> {
8451 (**self).blockingWrites(
8452 req,
8453 ).await
8454 }
8455 async fn rebuildTagIndex(
8456 &self,
8457 req: crate::types::RebuildIndexRequest,
8458 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::RebuildTagIndexExn> {
8459 (**self).rebuildTagIndex(
8460 req,
8461 ).await
8462 }
8463 async fn rebuildEdgeIndex(
8464 &self,
8465 req: crate::types::RebuildIndexRequest,
8466 ) -> ::std::result::Result<crate::types::AdminExecResp, crate::services::storage_service::RebuildEdgeIndexExn> {
8467 (**self).rebuildEdgeIndex(
8468 req,
8469 ).await
8470 }
8471 async fn put(
8472 &self,
8473 req: crate::types::PutRequest,
8474 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::PutExn> {
8475 (**self).put(
8476 req,
8477 ).await
8478 }
8479 async fn get(
8480 &self,
8481 req: crate::types::GetRequest,
8482 ) -> ::std::result::Result<crate::types::GeneralResponse, crate::services::storage_service::GetExn> {
8483 (**self).get(
8484 req,
8485 ).await
8486 }
8487 async fn remove(
8488 &self,
8489 req: crate::types::RemoveRequest,
8490 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::RemoveExn> {
8491 (**self).remove(
8492 req,
8493 ).await
8494 }
8495 async fn removeRange(
8496 &self,
8497 req: crate::types::RemoveRangeRequest,
8498 ) -> ::std::result::Result<crate::types::ExecResponse, crate::services::storage_service::RemoveRangeExn> {
8499 (**self).removeRange(
8500 req,
8501 ).await
8502 }
8503 async fn getUUID(
8504 &self,
8505 req: crate::types::GetUUIDReq,
8506 ) -> ::std::result::Result<crate::types::GetUUIDResp, crate::services::storage_service::GetUUIDExn> {
8507 (**self).getUUID(
8508 req,
8509 ).await
8510 }
8511 async fn lookUpIndex(
8512 &self,
8513 req: crate::types::LookUpIndexRequest,
8514 ) -> ::std::result::Result<crate::types::LookUpIndexResp, crate::services::storage_service::LookUpIndexExn> {
8515 (**self).lookUpIndex(
8516 req,
8517 ).await
8518 }
8519 }
8520
8521 #[derive(Clone, Debug)]
8523 pub struct StorageServiceProcessor<P, H, R, RS> {
8524 service: H,
8525 supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
8526 _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
8527 }
8528
8529 struct Args_StorageService_getBound {
8530 req: crate::types::GetNeighborsRequest,
8531 }
8532 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_getBound {
8533 #[inline]
8534 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.getBound"))]
8535 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8536 static ARGS: &[::fbthrift::Field] = &[
8537 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8538 ];
8539 let mut field_req = ::std::option::Option::None;
8540 let _ = p.read_struct_begin(|_| ())?;
8541 loop {
8542 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8543 match (fty, fid as ::std::primitive::i32) {
8544 (::fbthrift::TType::Stop, _) => break,
8545 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8546 (fty, _) => p.skip(fty)?,
8547 }
8548 p.read_field_end()?;
8549 }
8550 p.read_struct_end()?;
8551 ::std::result::Result::Ok(Self {
8552 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.getBound", "req"))?,
8553 })
8554 }
8555 }
8556
8557 struct Args_StorageService_boundStats {
8558 req: crate::types::GetNeighborsRequest,
8559 }
8560 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_boundStats {
8561 #[inline]
8562 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.boundStats"))]
8563 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8564 static ARGS: &[::fbthrift::Field] = &[
8565 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8566 ];
8567 let mut field_req = ::std::option::Option::None;
8568 let _ = p.read_struct_begin(|_| ())?;
8569 loop {
8570 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8571 match (fty, fid as ::std::primitive::i32) {
8572 (::fbthrift::TType::Stop, _) => break,
8573 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8574 (fty, _) => p.skip(fty)?,
8575 }
8576 p.read_field_end()?;
8577 }
8578 p.read_struct_end()?;
8579 ::std::result::Result::Ok(Self {
8580 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.boundStats", "req"))?,
8581 })
8582 }
8583 }
8584
8585 struct Args_StorageService_getProps {
8586 req: crate::types::VertexPropRequest,
8587 }
8588 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_getProps {
8589 #[inline]
8590 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.getProps"))]
8591 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8592 static ARGS: &[::fbthrift::Field] = &[
8593 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8594 ];
8595 let mut field_req = ::std::option::Option::None;
8596 let _ = p.read_struct_begin(|_| ())?;
8597 loop {
8598 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8599 match (fty, fid as ::std::primitive::i32) {
8600 (::fbthrift::TType::Stop, _) => break,
8601 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8602 (fty, _) => p.skip(fty)?,
8603 }
8604 p.read_field_end()?;
8605 }
8606 p.read_struct_end()?;
8607 ::std::result::Result::Ok(Self {
8608 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.getProps", "req"))?,
8609 })
8610 }
8611 }
8612
8613 struct Args_StorageService_getEdgeProps {
8614 req: crate::types::EdgePropRequest,
8615 }
8616 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_getEdgeProps {
8617 #[inline]
8618 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.getEdgeProps"))]
8619 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8620 static ARGS: &[::fbthrift::Field] = &[
8621 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8622 ];
8623 let mut field_req = ::std::option::Option::None;
8624 let _ = p.read_struct_begin(|_| ())?;
8625 loop {
8626 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8627 match (fty, fid as ::std::primitive::i32) {
8628 (::fbthrift::TType::Stop, _) => break,
8629 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8630 (fty, _) => p.skip(fty)?,
8631 }
8632 p.read_field_end()?;
8633 }
8634 p.read_struct_end()?;
8635 ::std::result::Result::Ok(Self {
8636 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.getEdgeProps", "req"))?,
8637 })
8638 }
8639 }
8640
8641 struct Args_StorageService_addVertices {
8642 req: crate::types::AddVerticesRequest,
8643 }
8644 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_addVertices {
8645 #[inline]
8646 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.addVertices"))]
8647 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8648 static ARGS: &[::fbthrift::Field] = &[
8649 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8650 ];
8651 let mut field_req = ::std::option::Option::None;
8652 let _ = p.read_struct_begin(|_| ())?;
8653 loop {
8654 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8655 match (fty, fid as ::std::primitive::i32) {
8656 (::fbthrift::TType::Stop, _) => break,
8657 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8658 (fty, _) => p.skip(fty)?,
8659 }
8660 p.read_field_end()?;
8661 }
8662 p.read_struct_end()?;
8663 ::std::result::Result::Ok(Self {
8664 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.addVertices", "req"))?,
8665 })
8666 }
8667 }
8668
8669 struct Args_StorageService_addEdges {
8670 req: crate::types::AddEdgesRequest,
8671 }
8672 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_addEdges {
8673 #[inline]
8674 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.addEdges"))]
8675 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8676 static ARGS: &[::fbthrift::Field] = &[
8677 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8678 ];
8679 let mut field_req = ::std::option::Option::None;
8680 let _ = p.read_struct_begin(|_| ())?;
8681 loop {
8682 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8683 match (fty, fid as ::std::primitive::i32) {
8684 (::fbthrift::TType::Stop, _) => break,
8685 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8686 (fty, _) => p.skip(fty)?,
8687 }
8688 p.read_field_end()?;
8689 }
8690 p.read_struct_end()?;
8691 ::std::result::Result::Ok(Self {
8692 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.addEdges", "req"))?,
8693 })
8694 }
8695 }
8696
8697 struct Args_StorageService_deleteEdges {
8698 req: crate::types::DeleteEdgesRequest,
8699 }
8700 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_deleteEdges {
8701 #[inline]
8702 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.deleteEdges"))]
8703 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8704 static ARGS: &[::fbthrift::Field] = &[
8705 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8706 ];
8707 let mut field_req = ::std::option::Option::None;
8708 let _ = p.read_struct_begin(|_| ())?;
8709 loop {
8710 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8711 match (fty, fid as ::std::primitive::i32) {
8712 (::fbthrift::TType::Stop, _) => break,
8713 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8714 (fty, _) => p.skip(fty)?,
8715 }
8716 p.read_field_end()?;
8717 }
8718 p.read_struct_end()?;
8719 ::std::result::Result::Ok(Self {
8720 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.deleteEdges", "req"))?,
8721 })
8722 }
8723 }
8724
8725 struct Args_StorageService_deleteVertices {
8726 req: crate::types::DeleteVerticesRequest,
8727 }
8728 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_deleteVertices {
8729 #[inline]
8730 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.deleteVertices"))]
8731 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8732 static ARGS: &[::fbthrift::Field] = &[
8733 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8734 ];
8735 let mut field_req = ::std::option::Option::None;
8736 let _ = p.read_struct_begin(|_| ())?;
8737 loop {
8738 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8739 match (fty, fid as ::std::primitive::i32) {
8740 (::fbthrift::TType::Stop, _) => break,
8741 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8742 (fty, _) => p.skip(fty)?,
8743 }
8744 p.read_field_end()?;
8745 }
8746 p.read_struct_end()?;
8747 ::std::result::Result::Ok(Self {
8748 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.deleteVertices", "req"))?,
8749 })
8750 }
8751 }
8752
8753 struct Args_StorageService_updateVertex {
8754 req: crate::types::UpdateVertexRequest,
8755 }
8756 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_updateVertex {
8757 #[inline]
8758 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.updateVertex"))]
8759 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8760 static ARGS: &[::fbthrift::Field] = &[
8761 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8762 ];
8763 let mut field_req = ::std::option::Option::None;
8764 let _ = p.read_struct_begin(|_| ())?;
8765 loop {
8766 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8767 match (fty, fid as ::std::primitive::i32) {
8768 (::fbthrift::TType::Stop, _) => break,
8769 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8770 (fty, _) => p.skip(fty)?,
8771 }
8772 p.read_field_end()?;
8773 }
8774 p.read_struct_end()?;
8775 ::std::result::Result::Ok(Self {
8776 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.updateVertex", "req"))?,
8777 })
8778 }
8779 }
8780
8781 struct Args_StorageService_updateEdge {
8782 req: crate::types::UpdateEdgeRequest,
8783 }
8784 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_updateEdge {
8785 #[inline]
8786 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.updateEdge"))]
8787 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8788 static ARGS: &[::fbthrift::Field] = &[
8789 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8790 ];
8791 let mut field_req = ::std::option::Option::None;
8792 let _ = p.read_struct_begin(|_| ())?;
8793 loop {
8794 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8795 match (fty, fid as ::std::primitive::i32) {
8796 (::fbthrift::TType::Stop, _) => break,
8797 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8798 (fty, _) => p.skip(fty)?,
8799 }
8800 p.read_field_end()?;
8801 }
8802 p.read_struct_end()?;
8803 ::std::result::Result::Ok(Self {
8804 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.updateEdge", "req"))?,
8805 })
8806 }
8807 }
8808
8809 struct Args_StorageService_scanEdge {
8810 req: crate::types::ScanEdgeRequest,
8811 }
8812 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_scanEdge {
8813 #[inline]
8814 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.scanEdge"))]
8815 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8816 static ARGS: &[::fbthrift::Field] = &[
8817 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8818 ];
8819 let mut field_req = ::std::option::Option::None;
8820 let _ = p.read_struct_begin(|_| ())?;
8821 loop {
8822 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8823 match (fty, fid as ::std::primitive::i32) {
8824 (::fbthrift::TType::Stop, _) => break,
8825 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8826 (fty, _) => p.skip(fty)?,
8827 }
8828 p.read_field_end()?;
8829 }
8830 p.read_struct_end()?;
8831 ::std::result::Result::Ok(Self {
8832 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.scanEdge", "req"))?,
8833 })
8834 }
8835 }
8836
8837 struct Args_StorageService_scanVertex {
8838 req: crate::types::ScanVertexRequest,
8839 }
8840 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_scanVertex {
8841 #[inline]
8842 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.scanVertex"))]
8843 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8844 static ARGS: &[::fbthrift::Field] = &[
8845 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8846 ];
8847 let mut field_req = ::std::option::Option::None;
8848 let _ = p.read_struct_begin(|_| ())?;
8849 loop {
8850 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8851 match (fty, fid as ::std::primitive::i32) {
8852 (::fbthrift::TType::Stop, _) => break,
8853 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8854 (fty, _) => p.skip(fty)?,
8855 }
8856 p.read_field_end()?;
8857 }
8858 p.read_struct_end()?;
8859 ::std::result::Result::Ok(Self {
8860 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.scanVertex", "req"))?,
8861 })
8862 }
8863 }
8864
8865 struct Args_StorageService_transLeader {
8866 req: crate::types::TransLeaderReq,
8867 }
8868 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_transLeader {
8869 #[inline]
8870 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.transLeader"))]
8871 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8872 static ARGS: &[::fbthrift::Field] = &[
8873 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8874 ];
8875 let mut field_req = ::std::option::Option::None;
8876 let _ = p.read_struct_begin(|_| ())?;
8877 loop {
8878 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8879 match (fty, fid as ::std::primitive::i32) {
8880 (::fbthrift::TType::Stop, _) => break,
8881 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8882 (fty, _) => p.skip(fty)?,
8883 }
8884 p.read_field_end()?;
8885 }
8886 p.read_struct_end()?;
8887 ::std::result::Result::Ok(Self {
8888 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.transLeader", "req"))?,
8889 })
8890 }
8891 }
8892
8893 struct Args_StorageService_addPart {
8894 req: crate::types::AddPartReq,
8895 }
8896 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_addPart {
8897 #[inline]
8898 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.addPart"))]
8899 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8900 static ARGS: &[::fbthrift::Field] = &[
8901 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8902 ];
8903 let mut field_req = ::std::option::Option::None;
8904 let _ = p.read_struct_begin(|_| ())?;
8905 loop {
8906 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8907 match (fty, fid as ::std::primitive::i32) {
8908 (::fbthrift::TType::Stop, _) => break,
8909 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8910 (fty, _) => p.skip(fty)?,
8911 }
8912 p.read_field_end()?;
8913 }
8914 p.read_struct_end()?;
8915 ::std::result::Result::Ok(Self {
8916 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.addPart", "req"))?,
8917 })
8918 }
8919 }
8920
8921 struct Args_StorageService_addLearner {
8922 req: crate::types::AddLearnerReq,
8923 }
8924 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_addLearner {
8925 #[inline]
8926 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.addLearner"))]
8927 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8928 static ARGS: &[::fbthrift::Field] = &[
8929 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8930 ];
8931 let mut field_req = ::std::option::Option::None;
8932 let _ = p.read_struct_begin(|_| ())?;
8933 loop {
8934 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8935 match (fty, fid as ::std::primitive::i32) {
8936 (::fbthrift::TType::Stop, _) => break,
8937 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8938 (fty, _) => p.skip(fty)?,
8939 }
8940 p.read_field_end()?;
8941 }
8942 p.read_struct_end()?;
8943 ::std::result::Result::Ok(Self {
8944 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.addLearner", "req"))?,
8945 })
8946 }
8947 }
8948
8949 struct Args_StorageService_waitingForCatchUpData {
8950 req: crate::types::CatchUpDataReq,
8951 }
8952 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_waitingForCatchUpData {
8953 #[inline]
8954 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.waitingForCatchUpData"))]
8955 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8956 static ARGS: &[::fbthrift::Field] = &[
8957 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8958 ];
8959 let mut field_req = ::std::option::Option::None;
8960 let _ = p.read_struct_begin(|_| ())?;
8961 loop {
8962 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8963 match (fty, fid as ::std::primitive::i32) {
8964 (::fbthrift::TType::Stop, _) => break,
8965 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8966 (fty, _) => p.skip(fty)?,
8967 }
8968 p.read_field_end()?;
8969 }
8970 p.read_struct_end()?;
8971 ::std::result::Result::Ok(Self {
8972 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.waitingForCatchUpData", "req"))?,
8973 })
8974 }
8975 }
8976
8977 struct Args_StorageService_removePart {
8978 req: crate::types::RemovePartReq,
8979 }
8980 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_removePart {
8981 #[inline]
8982 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.removePart"))]
8983 fn read(p: &mut P) -> ::anyhow::Result<Self> {
8984 static ARGS: &[::fbthrift::Field] = &[
8985 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
8986 ];
8987 let mut field_req = ::std::option::Option::None;
8988 let _ = p.read_struct_begin(|_| ())?;
8989 loop {
8990 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
8991 match (fty, fid as ::std::primitive::i32) {
8992 (::fbthrift::TType::Stop, _) => break,
8993 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
8994 (fty, _) => p.skip(fty)?,
8995 }
8996 p.read_field_end()?;
8997 }
8998 p.read_struct_end()?;
8999 ::std::result::Result::Ok(Self {
9000 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.removePart", "req"))?,
9001 })
9002 }
9003 }
9004
9005 struct Args_StorageService_memberChange {
9006 req: crate::types::MemberChangeReq,
9007 }
9008 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_memberChange {
9009 #[inline]
9010 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.memberChange"))]
9011 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9012 static ARGS: &[::fbthrift::Field] = &[
9013 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9014 ];
9015 let mut field_req = ::std::option::Option::None;
9016 let _ = p.read_struct_begin(|_| ())?;
9017 loop {
9018 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9019 match (fty, fid as ::std::primitive::i32) {
9020 (::fbthrift::TType::Stop, _) => break,
9021 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9022 (fty, _) => p.skip(fty)?,
9023 }
9024 p.read_field_end()?;
9025 }
9026 p.read_struct_end()?;
9027 ::std::result::Result::Ok(Self {
9028 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.memberChange", "req"))?,
9029 })
9030 }
9031 }
9032
9033 struct Args_StorageService_checkPeers {
9034 req: crate::types::CheckPeersReq,
9035 }
9036 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_checkPeers {
9037 #[inline]
9038 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.checkPeers"))]
9039 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9040 static ARGS: &[::fbthrift::Field] = &[
9041 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9042 ];
9043 let mut field_req = ::std::option::Option::None;
9044 let _ = p.read_struct_begin(|_| ())?;
9045 loop {
9046 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9047 match (fty, fid as ::std::primitive::i32) {
9048 (::fbthrift::TType::Stop, _) => break,
9049 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9050 (fty, _) => p.skip(fty)?,
9051 }
9052 p.read_field_end()?;
9053 }
9054 p.read_struct_end()?;
9055 ::std::result::Result::Ok(Self {
9056 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.checkPeers", "req"))?,
9057 })
9058 }
9059 }
9060
9061 struct Args_StorageService_getLeaderPart {
9062 req: crate::types::GetLeaderReq,
9063 }
9064 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_getLeaderPart {
9065 #[inline]
9066 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.getLeaderPart"))]
9067 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9068 static ARGS: &[::fbthrift::Field] = &[
9069 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9070 ];
9071 let mut field_req = ::std::option::Option::None;
9072 let _ = p.read_struct_begin(|_| ())?;
9073 loop {
9074 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9075 match (fty, fid as ::std::primitive::i32) {
9076 (::fbthrift::TType::Stop, _) => break,
9077 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9078 (fty, _) => p.skip(fty)?,
9079 }
9080 p.read_field_end()?;
9081 }
9082 p.read_struct_end()?;
9083 ::std::result::Result::Ok(Self {
9084 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.getLeaderPart", "req"))?,
9085 })
9086 }
9087 }
9088
9089 struct Args_StorageService_createCheckpoint {
9090 req: crate::types::CreateCPRequest,
9091 }
9092 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_createCheckpoint {
9093 #[inline]
9094 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.createCheckpoint"))]
9095 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9096 static ARGS: &[::fbthrift::Field] = &[
9097 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9098 ];
9099 let mut field_req = ::std::option::Option::None;
9100 let _ = p.read_struct_begin(|_| ())?;
9101 loop {
9102 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9103 match (fty, fid as ::std::primitive::i32) {
9104 (::fbthrift::TType::Stop, _) => break,
9105 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9106 (fty, _) => p.skip(fty)?,
9107 }
9108 p.read_field_end()?;
9109 }
9110 p.read_struct_end()?;
9111 ::std::result::Result::Ok(Self {
9112 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.createCheckpoint", "req"))?,
9113 })
9114 }
9115 }
9116
9117 struct Args_StorageService_dropCheckpoint {
9118 req: crate::types::DropCPRequest,
9119 }
9120 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_dropCheckpoint {
9121 #[inline]
9122 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.dropCheckpoint"))]
9123 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9124 static ARGS: &[::fbthrift::Field] = &[
9125 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9126 ];
9127 let mut field_req = ::std::option::Option::None;
9128 let _ = p.read_struct_begin(|_| ())?;
9129 loop {
9130 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9131 match (fty, fid as ::std::primitive::i32) {
9132 (::fbthrift::TType::Stop, _) => break,
9133 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9134 (fty, _) => p.skip(fty)?,
9135 }
9136 p.read_field_end()?;
9137 }
9138 p.read_struct_end()?;
9139 ::std::result::Result::Ok(Self {
9140 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.dropCheckpoint", "req"))?,
9141 })
9142 }
9143 }
9144
9145 struct Args_StorageService_blockingWrites {
9146 req: crate::types::BlockingSignRequest,
9147 }
9148 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_blockingWrites {
9149 #[inline]
9150 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.blockingWrites"))]
9151 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9152 static ARGS: &[::fbthrift::Field] = &[
9153 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9154 ];
9155 let mut field_req = ::std::option::Option::None;
9156 let _ = p.read_struct_begin(|_| ())?;
9157 loop {
9158 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9159 match (fty, fid as ::std::primitive::i32) {
9160 (::fbthrift::TType::Stop, _) => break,
9161 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9162 (fty, _) => p.skip(fty)?,
9163 }
9164 p.read_field_end()?;
9165 }
9166 p.read_struct_end()?;
9167 ::std::result::Result::Ok(Self {
9168 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.blockingWrites", "req"))?,
9169 })
9170 }
9171 }
9172
9173 struct Args_StorageService_rebuildTagIndex {
9174 req: crate::types::RebuildIndexRequest,
9175 }
9176 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_rebuildTagIndex {
9177 #[inline]
9178 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.rebuildTagIndex"))]
9179 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9180 static ARGS: &[::fbthrift::Field] = &[
9181 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9182 ];
9183 let mut field_req = ::std::option::Option::None;
9184 let _ = p.read_struct_begin(|_| ())?;
9185 loop {
9186 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9187 match (fty, fid as ::std::primitive::i32) {
9188 (::fbthrift::TType::Stop, _) => break,
9189 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9190 (fty, _) => p.skip(fty)?,
9191 }
9192 p.read_field_end()?;
9193 }
9194 p.read_struct_end()?;
9195 ::std::result::Result::Ok(Self {
9196 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.rebuildTagIndex", "req"))?,
9197 })
9198 }
9199 }
9200
9201 struct Args_StorageService_rebuildEdgeIndex {
9202 req: crate::types::RebuildIndexRequest,
9203 }
9204 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_rebuildEdgeIndex {
9205 #[inline]
9206 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.rebuildEdgeIndex"))]
9207 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9208 static ARGS: &[::fbthrift::Field] = &[
9209 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9210 ];
9211 let mut field_req = ::std::option::Option::None;
9212 let _ = p.read_struct_begin(|_| ())?;
9213 loop {
9214 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9215 match (fty, fid as ::std::primitive::i32) {
9216 (::fbthrift::TType::Stop, _) => break,
9217 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9218 (fty, _) => p.skip(fty)?,
9219 }
9220 p.read_field_end()?;
9221 }
9222 p.read_struct_end()?;
9223 ::std::result::Result::Ok(Self {
9224 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.rebuildEdgeIndex", "req"))?,
9225 })
9226 }
9227 }
9228
9229 struct Args_StorageService_put {
9230 req: crate::types::PutRequest,
9231 }
9232 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_put {
9233 #[inline]
9234 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.put"))]
9235 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9236 static ARGS: &[::fbthrift::Field] = &[
9237 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9238 ];
9239 let mut field_req = ::std::option::Option::None;
9240 let _ = p.read_struct_begin(|_| ())?;
9241 loop {
9242 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9243 match (fty, fid as ::std::primitive::i32) {
9244 (::fbthrift::TType::Stop, _) => break,
9245 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9246 (fty, _) => p.skip(fty)?,
9247 }
9248 p.read_field_end()?;
9249 }
9250 p.read_struct_end()?;
9251 ::std::result::Result::Ok(Self {
9252 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.put", "req"))?,
9253 })
9254 }
9255 }
9256
9257 struct Args_StorageService_get {
9258 req: crate::types::GetRequest,
9259 }
9260 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_get {
9261 #[inline]
9262 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.get"))]
9263 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9264 static ARGS: &[::fbthrift::Field] = &[
9265 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9266 ];
9267 let mut field_req = ::std::option::Option::None;
9268 let _ = p.read_struct_begin(|_| ())?;
9269 loop {
9270 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9271 match (fty, fid as ::std::primitive::i32) {
9272 (::fbthrift::TType::Stop, _) => break,
9273 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9274 (fty, _) => p.skip(fty)?,
9275 }
9276 p.read_field_end()?;
9277 }
9278 p.read_struct_end()?;
9279 ::std::result::Result::Ok(Self {
9280 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.get", "req"))?,
9281 })
9282 }
9283 }
9284
9285 struct Args_StorageService_remove {
9286 req: crate::types::RemoveRequest,
9287 }
9288 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_remove {
9289 #[inline]
9290 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.remove"))]
9291 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9292 static ARGS: &[::fbthrift::Field] = &[
9293 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9294 ];
9295 let mut field_req = ::std::option::Option::None;
9296 let _ = p.read_struct_begin(|_| ())?;
9297 loop {
9298 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9299 match (fty, fid as ::std::primitive::i32) {
9300 (::fbthrift::TType::Stop, _) => break,
9301 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9302 (fty, _) => p.skip(fty)?,
9303 }
9304 p.read_field_end()?;
9305 }
9306 p.read_struct_end()?;
9307 ::std::result::Result::Ok(Self {
9308 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.remove", "req"))?,
9309 })
9310 }
9311 }
9312
9313 struct Args_StorageService_removeRange {
9314 req: crate::types::RemoveRangeRequest,
9315 }
9316 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_removeRange {
9317 #[inline]
9318 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.removeRange"))]
9319 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9320 static ARGS: &[::fbthrift::Field] = &[
9321 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9322 ];
9323 let mut field_req = ::std::option::Option::None;
9324 let _ = p.read_struct_begin(|_| ())?;
9325 loop {
9326 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9327 match (fty, fid as ::std::primitive::i32) {
9328 (::fbthrift::TType::Stop, _) => break,
9329 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9330 (fty, _) => p.skip(fty)?,
9331 }
9332 p.read_field_end()?;
9333 }
9334 p.read_struct_end()?;
9335 ::std::result::Result::Ok(Self {
9336 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.removeRange", "req"))?,
9337 })
9338 }
9339 }
9340
9341 struct Args_StorageService_getUUID {
9342 req: crate::types::GetUUIDReq,
9343 }
9344 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_getUUID {
9345 #[inline]
9346 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.getUUID"))]
9347 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9348 static ARGS: &[::fbthrift::Field] = &[
9349 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9350 ];
9351 let mut field_req = ::std::option::Option::None;
9352 let _ = p.read_struct_begin(|_| ())?;
9353 loop {
9354 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9355 match (fty, fid as ::std::primitive::i32) {
9356 (::fbthrift::TType::Stop, _) => break,
9357 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9358 (fty, _) => p.skip(fty)?,
9359 }
9360 p.read_field_end()?;
9361 }
9362 p.read_struct_end()?;
9363 ::std::result::Result::Ok(Self {
9364 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.getUUID", "req"))?,
9365 })
9366 }
9367 }
9368
9369 struct Args_StorageService_lookUpIndex {
9370 req: crate::types::LookUpIndexRequest,
9371 }
9372 impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_StorageService_lookUpIndex {
9373 #[inline]
9374 #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "StorageService.lookUpIndex"))]
9375 fn read(p: &mut P) -> ::anyhow::Result<Self> {
9376 static ARGS: &[::fbthrift::Field] = &[
9377 ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
9378 ];
9379 let mut field_req = ::std::option::Option::None;
9380 let _ = p.read_struct_begin(|_| ())?;
9381 loop {
9382 let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
9383 match (fty, fid as ::std::primitive::i32) {
9384 (::fbthrift::TType::Stop, _) => break,
9385 (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
9386 (fty, _) => p.skip(fty)?,
9387 }
9388 p.read_field_end()?;
9389 }
9390 p.read_struct_end()?;
9391 ::std::result::Result::Ok(Self {
9392 req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "StorageService.lookUpIndex", "req"))?,
9393 })
9394 }
9395 }
9396
9397
9398 impl<P, H, R, RS> StorageServiceProcessor<P, H, R, RS>
9399 where
9400 P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
9401 P::Frame: ::std::marker::Send + 'static,
9402 P::Deserializer: ::std::marker::Send,
9403 H: StorageService,
9404 R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
9405 RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
9406 <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
9407 + ::std::marker::Send + ::std::marker::Sync,
9408 {
9409 pub fn new(service: H) -> Self {
9410 Self {
9411 service,
9412 supa: ::fbthrift::NullServiceProcessor::new(),
9413 _phantom: ::std::marker::PhantomData,
9414 }
9415 }
9416
9417 pub fn into_inner(self) -> H {
9418 self.service
9419 }
9420
9421 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.getBound"))]
9422 async fn handle_getBound<'a>(
9423 &'a self,
9424 p: &'a mut P::Deserializer,
9425 req_ctxt: &R,
9426 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9427 _seqid: ::std::primitive::u32,
9428 ) -> ::anyhow::Result<()> {
9429 use ::const_cstr::const_cstr;
9430 use ::futures::FutureExt as _;
9431
9432 const_cstr! {
9433 SERVICE_NAME = "StorageService";
9434 METHOD_NAME = "StorageService.getBound";
9435 }
9436 let mut ctx_stack = req_ctxt.get_context_stack(
9437 SERVICE_NAME.as_cstr(),
9438 METHOD_NAME.as_cstr(),
9439 )?;
9440 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
9441 let _args: self::Args_StorageService_getBound = ::fbthrift::Deserialize::read(p)?;
9442 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
9443 protocol: P::PROTOCOL_ID,
9444 method_name: METHOD_NAME.as_cstr(),
9445 buffer: ::std::marker::PhantomData, })?;
9447 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
9448
9449 let res = ::std::panic::AssertUnwindSafe(
9450 self.service.getBound(
9451 _args.req,
9452 )
9453 )
9454 .catch_unwind()
9455 .await;
9456
9457 let res = match res {
9459 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
9460 ::tracing::info!("success");
9461 crate::services::storage_service::GetBoundExn::Success(res)
9462 }
9463 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::GetBoundExn::Success(_))) => {
9464 panic!(
9465 "{} attempted to return success via error",
9466 "getBound",
9467 )
9468 }
9469 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
9470 ::tracing::error!(exception = ?exn);
9471 exn
9472 }
9473 ::std::result::Result::Err(exn) => {
9474 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.getBound", exn);
9475 crate::services::storage_service::GetBoundExn::ApplicationException(aexn)
9476 }
9477 };
9478
9479 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
9480 "getBound",
9481 METHOD_NAME.as_cstr(),
9482 _seqid,
9483 req_ctxt,
9484 &mut ctx_stack,
9485 res
9486 )?;
9487 reply_state.lock().unwrap().send_reply(env);
9488 Ok(())
9489 }
9490
9491 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.boundStats"))]
9492 async fn handle_boundStats<'a>(
9493 &'a self,
9494 p: &'a mut P::Deserializer,
9495 req_ctxt: &R,
9496 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9497 _seqid: ::std::primitive::u32,
9498 ) -> ::anyhow::Result<()> {
9499 use ::const_cstr::const_cstr;
9500 use ::futures::FutureExt as _;
9501
9502 const_cstr! {
9503 SERVICE_NAME = "StorageService";
9504 METHOD_NAME = "StorageService.boundStats";
9505 }
9506 let mut ctx_stack = req_ctxt.get_context_stack(
9507 SERVICE_NAME.as_cstr(),
9508 METHOD_NAME.as_cstr(),
9509 )?;
9510 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
9511 let _args: self::Args_StorageService_boundStats = ::fbthrift::Deserialize::read(p)?;
9512 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
9513 protocol: P::PROTOCOL_ID,
9514 method_name: METHOD_NAME.as_cstr(),
9515 buffer: ::std::marker::PhantomData, })?;
9517 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
9518
9519 let res = ::std::panic::AssertUnwindSafe(
9520 self.service.boundStats(
9521 _args.req,
9522 )
9523 )
9524 .catch_unwind()
9525 .await;
9526
9527 let res = match res {
9529 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
9530 ::tracing::info!("success");
9531 crate::services::storage_service::BoundStatsExn::Success(res)
9532 }
9533 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::BoundStatsExn::Success(_))) => {
9534 panic!(
9535 "{} attempted to return success via error",
9536 "boundStats",
9537 )
9538 }
9539 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
9540 ::tracing::error!(exception = ?exn);
9541 exn
9542 }
9543 ::std::result::Result::Err(exn) => {
9544 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.boundStats", exn);
9545 crate::services::storage_service::BoundStatsExn::ApplicationException(aexn)
9546 }
9547 };
9548
9549 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
9550 "boundStats",
9551 METHOD_NAME.as_cstr(),
9552 _seqid,
9553 req_ctxt,
9554 &mut ctx_stack,
9555 res
9556 )?;
9557 reply_state.lock().unwrap().send_reply(env);
9558 Ok(())
9559 }
9560
9561 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.getProps"))]
9562 async fn handle_getProps<'a>(
9563 &'a self,
9564 p: &'a mut P::Deserializer,
9565 req_ctxt: &R,
9566 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9567 _seqid: ::std::primitive::u32,
9568 ) -> ::anyhow::Result<()> {
9569 use ::const_cstr::const_cstr;
9570 use ::futures::FutureExt as _;
9571
9572 const_cstr! {
9573 SERVICE_NAME = "StorageService";
9574 METHOD_NAME = "StorageService.getProps";
9575 }
9576 let mut ctx_stack = req_ctxt.get_context_stack(
9577 SERVICE_NAME.as_cstr(),
9578 METHOD_NAME.as_cstr(),
9579 )?;
9580 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
9581 let _args: self::Args_StorageService_getProps = ::fbthrift::Deserialize::read(p)?;
9582 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
9583 protocol: P::PROTOCOL_ID,
9584 method_name: METHOD_NAME.as_cstr(),
9585 buffer: ::std::marker::PhantomData, })?;
9587 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
9588
9589 let res = ::std::panic::AssertUnwindSafe(
9590 self.service.getProps(
9591 _args.req,
9592 )
9593 )
9594 .catch_unwind()
9595 .await;
9596
9597 let res = match res {
9599 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
9600 ::tracing::info!("success");
9601 crate::services::storage_service::GetPropsExn::Success(res)
9602 }
9603 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::GetPropsExn::Success(_))) => {
9604 panic!(
9605 "{} attempted to return success via error",
9606 "getProps",
9607 )
9608 }
9609 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
9610 ::tracing::error!(exception = ?exn);
9611 exn
9612 }
9613 ::std::result::Result::Err(exn) => {
9614 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.getProps", exn);
9615 crate::services::storage_service::GetPropsExn::ApplicationException(aexn)
9616 }
9617 };
9618
9619 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
9620 "getProps",
9621 METHOD_NAME.as_cstr(),
9622 _seqid,
9623 req_ctxt,
9624 &mut ctx_stack,
9625 res
9626 )?;
9627 reply_state.lock().unwrap().send_reply(env);
9628 Ok(())
9629 }
9630
9631 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.getEdgeProps"))]
9632 async fn handle_getEdgeProps<'a>(
9633 &'a self,
9634 p: &'a mut P::Deserializer,
9635 req_ctxt: &R,
9636 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9637 _seqid: ::std::primitive::u32,
9638 ) -> ::anyhow::Result<()> {
9639 use ::const_cstr::const_cstr;
9640 use ::futures::FutureExt as _;
9641
9642 const_cstr! {
9643 SERVICE_NAME = "StorageService";
9644 METHOD_NAME = "StorageService.getEdgeProps";
9645 }
9646 let mut ctx_stack = req_ctxt.get_context_stack(
9647 SERVICE_NAME.as_cstr(),
9648 METHOD_NAME.as_cstr(),
9649 )?;
9650 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
9651 let _args: self::Args_StorageService_getEdgeProps = ::fbthrift::Deserialize::read(p)?;
9652 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
9653 protocol: P::PROTOCOL_ID,
9654 method_name: METHOD_NAME.as_cstr(),
9655 buffer: ::std::marker::PhantomData, })?;
9657 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
9658
9659 let res = ::std::panic::AssertUnwindSafe(
9660 self.service.getEdgeProps(
9661 _args.req,
9662 )
9663 )
9664 .catch_unwind()
9665 .await;
9666
9667 let res = match res {
9669 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
9670 ::tracing::info!("success");
9671 crate::services::storage_service::GetEdgePropsExn::Success(res)
9672 }
9673 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::GetEdgePropsExn::Success(_))) => {
9674 panic!(
9675 "{} attempted to return success via error",
9676 "getEdgeProps",
9677 )
9678 }
9679 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
9680 ::tracing::error!(exception = ?exn);
9681 exn
9682 }
9683 ::std::result::Result::Err(exn) => {
9684 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.getEdgeProps", exn);
9685 crate::services::storage_service::GetEdgePropsExn::ApplicationException(aexn)
9686 }
9687 };
9688
9689 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
9690 "getEdgeProps",
9691 METHOD_NAME.as_cstr(),
9692 _seqid,
9693 req_ctxt,
9694 &mut ctx_stack,
9695 res
9696 )?;
9697 reply_state.lock().unwrap().send_reply(env);
9698 Ok(())
9699 }
9700
9701 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.addVertices"))]
9702 async fn handle_addVertices<'a>(
9703 &'a self,
9704 p: &'a mut P::Deserializer,
9705 req_ctxt: &R,
9706 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9707 _seqid: ::std::primitive::u32,
9708 ) -> ::anyhow::Result<()> {
9709 use ::const_cstr::const_cstr;
9710 use ::futures::FutureExt as _;
9711
9712 const_cstr! {
9713 SERVICE_NAME = "StorageService";
9714 METHOD_NAME = "StorageService.addVertices";
9715 }
9716 let mut ctx_stack = req_ctxt.get_context_stack(
9717 SERVICE_NAME.as_cstr(),
9718 METHOD_NAME.as_cstr(),
9719 )?;
9720 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
9721 let _args: self::Args_StorageService_addVertices = ::fbthrift::Deserialize::read(p)?;
9722 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
9723 protocol: P::PROTOCOL_ID,
9724 method_name: METHOD_NAME.as_cstr(),
9725 buffer: ::std::marker::PhantomData, })?;
9727 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
9728
9729 let res = ::std::panic::AssertUnwindSafe(
9730 self.service.addVertices(
9731 _args.req,
9732 )
9733 )
9734 .catch_unwind()
9735 .await;
9736
9737 let res = match res {
9739 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
9740 ::tracing::info!("success");
9741 crate::services::storage_service::AddVerticesExn::Success(res)
9742 }
9743 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::AddVerticesExn::Success(_))) => {
9744 panic!(
9745 "{} attempted to return success via error",
9746 "addVertices",
9747 )
9748 }
9749 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
9750 ::tracing::error!(exception = ?exn);
9751 exn
9752 }
9753 ::std::result::Result::Err(exn) => {
9754 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.addVertices", exn);
9755 crate::services::storage_service::AddVerticesExn::ApplicationException(aexn)
9756 }
9757 };
9758
9759 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
9760 "addVertices",
9761 METHOD_NAME.as_cstr(),
9762 _seqid,
9763 req_ctxt,
9764 &mut ctx_stack,
9765 res
9766 )?;
9767 reply_state.lock().unwrap().send_reply(env);
9768 Ok(())
9769 }
9770
9771 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.addEdges"))]
9772 async fn handle_addEdges<'a>(
9773 &'a self,
9774 p: &'a mut P::Deserializer,
9775 req_ctxt: &R,
9776 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9777 _seqid: ::std::primitive::u32,
9778 ) -> ::anyhow::Result<()> {
9779 use ::const_cstr::const_cstr;
9780 use ::futures::FutureExt as _;
9781
9782 const_cstr! {
9783 SERVICE_NAME = "StorageService";
9784 METHOD_NAME = "StorageService.addEdges";
9785 }
9786 let mut ctx_stack = req_ctxt.get_context_stack(
9787 SERVICE_NAME.as_cstr(),
9788 METHOD_NAME.as_cstr(),
9789 )?;
9790 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
9791 let _args: self::Args_StorageService_addEdges = ::fbthrift::Deserialize::read(p)?;
9792 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
9793 protocol: P::PROTOCOL_ID,
9794 method_name: METHOD_NAME.as_cstr(),
9795 buffer: ::std::marker::PhantomData, })?;
9797 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
9798
9799 let res = ::std::panic::AssertUnwindSafe(
9800 self.service.addEdges(
9801 _args.req,
9802 )
9803 )
9804 .catch_unwind()
9805 .await;
9806
9807 let res = match res {
9809 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
9810 ::tracing::info!("success");
9811 crate::services::storage_service::AddEdgesExn::Success(res)
9812 }
9813 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::AddEdgesExn::Success(_))) => {
9814 panic!(
9815 "{} attempted to return success via error",
9816 "addEdges",
9817 )
9818 }
9819 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
9820 ::tracing::error!(exception = ?exn);
9821 exn
9822 }
9823 ::std::result::Result::Err(exn) => {
9824 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.addEdges", exn);
9825 crate::services::storage_service::AddEdgesExn::ApplicationException(aexn)
9826 }
9827 };
9828
9829 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
9830 "addEdges",
9831 METHOD_NAME.as_cstr(),
9832 _seqid,
9833 req_ctxt,
9834 &mut ctx_stack,
9835 res
9836 )?;
9837 reply_state.lock().unwrap().send_reply(env);
9838 Ok(())
9839 }
9840
9841 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.deleteEdges"))]
9842 async fn handle_deleteEdges<'a>(
9843 &'a self,
9844 p: &'a mut P::Deserializer,
9845 req_ctxt: &R,
9846 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9847 _seqid: ::std::primitive::u32,
9848 ) -> ::anyhow::Result<()> {
9849 use ::const_cstr::const_cstr;
9850 use ::futures::FutureExt as _;
9851
9852 const_cstr! {
9853 SERVICE_NAME = "StorageService";
9854 METHOD_NAME = "StorageService.deleteEdges";
9855 }
9856 let mut ctx_stack = req_ctxt.get_context_stack(
9857 SERVICE_NAME.as_cstr(),
9858 METHOD_NAME.as_cstr(),
9859 )?;
9860 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
9861 let _args: self::Args_StorageService_deleteEdges = ::fbthrift::Deserialize::read(p)?;
9862 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
9863 protocol: P::PROTOCOL_ID,
9864 method_name: METHOD_NAME.as_cstr(),
9865 buffer: ::std::marker::PhantomData, })?;
9867 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
9868
9869 let res = ::std::panic::AssertUnwindSafe(
9870 self.service.deleteEdges(
9871 _args.req,
9872 )
9873 )
9874 .catch_unwind()
9875 .await;
9876
9877 let res = match res {
9879 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
9880 ::tracing::info!("success");
9881 crate::services::storage_service::DeleteEdgesExn::Success(res)
9882 }
9883 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::DeleteEdgesExn::Success(_))) => {
9884 panic!(
9885 "{} attempted to return success via error",
9886 "deleteEdges",
9887 )
9888 }
9889 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
9890 ::tracing::error!(exception = ?exn);
9891 exn
9892 }
9893 ::std::result::Result::Err(exn) => {
9894 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.deleteEdges", exn);
9895 crate::services::storage_service::DeleteEdgesExn::ApplicationException(aexn)
9896 }
9897 };
9898
9899 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
9900 "deleteEdges",
9901 METHOD_NAME.as_cstr(),
9902 _seqid,
9903 req_ctxt,
9904 &mut ctx_stack,
9905 res
9906 )?;
9907 reply_state.lock().unwrap().send_reply(env);
9908 Ok(())
9909 }
9910
9911 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.deleteVertices"))]
9912 async fn handle_deleteVertices<'a>(
9913 &'a self,
9914 p: &'a mut P::Deserializer,
9915 req_ctxt: &R,
9916 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9917 _seqid: ::std::primitive::u32,
9918 ) -> ::anyhow::Result<()> {
9919 use ::const_cstr::const_cstr;
9920 use ::futures::FutureExt as _;
9921
9922 const_cstr! {
9923 SERVICE_NAME = "StorageService";
9924 METHOD_NAME = "StorageService.deleteVertices";
9925 }
9926 let mut ctx_stack = req_ctxt.get_context_stack(
9927 SERVICE_NAME.as_cstr(),
9928 METHOD_NAME.as_cstr(),
9929 )?;
9930 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
9931 let _args: self::Args_StorageService_deleteVertices = ::fbthrift::Deserialize::read(p)?;
9932 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
9933 protocol: P::PROTOCOL_ID,
9934 method_name: METHOD_NAME.as_cstr(),
9935 buffer: ::std::marker::PhantomData, })?;
9937 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
9938
9939 let res = ::std::panic::AssertUnwindSafe(
9940 self.service.deleteVertices(
9941 _args.req,
9942 )
9943 )
9944 .catch_unwind()
9945 .await;
9946
9947 let res = match res {
9949 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
9950 ::tracing::info!("success");
9951 crate::services::storage_service::DeleteVerticesExn::Success(res)
9952 }
9953 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::DeleteVerticesExn::Success(_))) => {
9954 panic!(
9955 "{} attempted to return success via error",
9956 "deleteVertices",
9957 )
9958 }
9959 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
9960 ::tracing::error!(exception = ?exn);
9961 exn
9962 }
9963 ::std::result::Result::Err(exn) => {
9964 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.deleteVertices", exn);
9965 crate::services::storage_service::DeleteVerticesExn::ApplicationException(aexn)
9966 }
9967 };
9968
9969 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
9970 "deleteVertices",
9971 METHOD_NAME.as_cstr(),
9972 _seqid,
9973 req_ctxt,
9974 &mut ctx_stack,
9975 res
9976 )?;
9977 reply_state.lock().unwrap().send_reply(env);
9978 Ok(())
9979 }
9980
9981 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.updateVertex"))]
9982 async fn handle_updateVertex<'a>(
9983 &'a self,
9984 p: &'a mut P::Deserializer,
9985 req_ctxt: &R,
9986 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
9987 _seqid: ::std::primitive::u32,
9988 ) -> ::anyhow::Result<()> {
9989 use ::const_cstr::const_cstr;
9990 use ::futures::FutureExt as _;
9991
9992 const_cstr! {
9993 SERVICE_NAME = "StorageService";
9994 METHOD_NAME = "StorageService.updateVertex";
9995 }
9996 let mut ctx_stack = req_ctxt.get_context_stack(
9997 SERVICE_NAME.as_cstr(),
9998 METHOD_NAME.as_cstr(),
9999 )?;
10000 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10001 let _args: self::Args_StorageService_updateVertex = ::fbthrift::Deserialize::read(p)?;
10002 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10003 protocol: P::PROTOCOL_ID,
10004 method_name: METHOD_NAME.as_cstr(),
10005 buffer: ::std::marker::PhantomData, })?;
10007 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10008
10009 let res = ::std::panic::AssertUnwindSafe(
10010 self.service.updateVertex(
10011 _args.req,
10012 )
10013 )
10014 .catch_unwind()
10015 .await;
10016
10017 let res = match res {
10019 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10020 ::tracing::info!("success");
10021 crate::services::storage_service::UpdateVertexExn::Success(res)
10022 }
10023 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::UpdateVertexExn::Success(_))) => {
10024 panic!(
10025 "{} attempted to return success via error",
10026 "updateVertex",
10027 )
10028 }
10029 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10030 ::tracing::error!(exception = ?exn);
10031 exn
10032 }
10033 ::std::result::Result::Err(exn) => {
10034 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.updateVertex", exn);
10035 crate::services::storage_service::UpdateVertexExn::ApplicationException(aexn)
10036 }
10037 };
10038
10039 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10040 "updateVertex",
10041 METHOD_NAME.as_cstr(),
10042 _seqid,
10043 req_ctxt,
10044 &mut ctx_stack,
10045 res
10046 )?;
10047 reply_state.lock().unwrap().send_reply(env);
10048 Ok(())
10049 }
10050
10051 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.updateEdge"))]
10052 async fn handle_updateEdge<'a>(
10053 &'a self,
10054 p: &'a mut P::Deserializer,
10055 req_ctxt: &R,
10056 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10057 _seqid: ::std::primitive::u32,
10058 ) -> ::anyhow::Result<()> {
10059 use ::const_cstr::const_cstr;
10060 use ::futures::FutureExt as _;
10061
10062 const_cstr! {
10063 SERVICE_NAME = "StorageService";
10064 METHOD_NAME = "StorageService.updateEdge";
10065 }
10066 let mut ctx_stack = req_ctxt.get_context_stack(
10067 SERVICE_NAME.as_cstr(),
10068 METHOD_NAME.as_cstr(),
10069 )?;
10070 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10071 let _args: self::Args_StorageService_updateEdge = ::fbthrift::Deserialize::read(p)?;
10072 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10073 protocol: P::PROTOCOL_ID,
10074 method_name: METHOD_NAME.as_cstr(),
10075 buffer: ::std::marker::PhantomData, })?;
10077 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10078
10079 let res = ::std::panic::AssertUnwindSafe(
10080 self.service.updateEdge(
10081 _args.req,
10082 )
10083 )
10084 .catch_unwind()
10085 .await;
10086
10087 let res = match res {
10089 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10090 ::tracing::info!("success");
10091 crate::services::storage_service::UpdateEdgeExn::Success(res)
10092 }
10093 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::UpdateEdgeExn::Success(_))) => {
10094 panic!(
10095 "{} attempted to return success via error",
10096 "updateEdge",
10097 )
10098 }
10099 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10100 ::tracing::error!(exception = ?exn);
10101 exn
10102 }
10103 ::std::result::Result::Err(exn) => {
10104 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.updateEdge", exn);
10105 crate::services::storage_service::UpdateEdgeExn::ApplicationException(aexn)
10106 }
10107 };
10108
10109 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10110 "updateEdge",
10111 METHOD_NAME.as_cstr(),
10112 _seqid,
10113 req_ctxt,
10114 &mut ctx_stack,
10115 res
10116 )?;
10117 reply_state.lock().unwrap().send_reply(env);
10118 Ok(())
10119 }
10120
10121 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.scanEdge"))]
10122 async fn handle_scanEdge<'a>(
10123 &'a self,
10124 p: &'a mut P::Deserializer,
10125 req_ctxt: &R,
10126 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10127 _seqid: ::std::primitive::u32,
10128 ) -> ::anyhow::Result<()> {
10129 use ::const_cstr::const_cstr;
10130 use ::futures::FutureExt as _;
10131
10132 const_cstr! {
10133 SERVICE_NAME = "StorageService";
10134 METHOD_NAME = "StorageService.scanEdge";
10135 }
10136 let mut ctx_stack = req_ctxt.get_context_stack(
10137 SERVICE_NAME.as_cstr(),
10138 METHOD_NAME.as_cstr(),
10139 )?;
10140 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10141 let _args: self::Args_StorageService_scanEdge = ::fbthrift::Deserialize::read(p)?;
10142 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10143 protocol: P::PROTOCOL_ID,
10144 method_name: METHOD_NAME.as_cstr(),
10145 buffer: ::std::marker::PhantomData, })?;
10147 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10148
10149 let res = ::std::panic::AssertUnwindSafe(
10150 self.service.scanEdge(
10151 _args.req,
10152 )
10153 )
10154 .catch_unwind()
10155 .await;
10156
10157 let res = match res {
10159 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10160 ::tracing::info!("success");
10161 crate::services::storage_service::ScanEdgeExn::Success(res)
10162 }
10163 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::ScanEdgeExn::Success(_))) => {
10164 panic!(
10165 "{} attempted to return success via error",
10166 "scanEdge",
10167 )
10168 }
10169 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10170 ::tracing::error!(exception = ?exn);
10171 exn
10172 }
10173 ::std::result::Result::Err(exn) => {
10174 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.scanEdge", exn);
10175 crate::services::storage_service::ScanEdgeExn::ApplicationException(aexn)
10176 }
10177 };
10178
10179 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10180 "scanEdge",
10181 METHOD_NAME.as_cstr(),
10182 _seqid,
10183 req_ctxt,
10184 &mut ctx_stack,
10185 res
10186 )?;
10187 reply_state.lock().unwrap().send_reply(env);
10188 Ok(())
10189 }
10190
10191 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.scanVertex"))]
10192 async fn handle_scanVertex<'a>(
10193 &'a self,
10194 p: &'a mut P::Deserializer,
10195 req_ctxt: &R,
10196 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10197 _seqid: ::std::primitive::u32,
10198 ) -> ::anyhow::Result<()> {
10199 use ::const_cstr::const_cstr;
10200 use ::futures::FutureExt as _;
10201
10202 const_cstr! {
10203 SERVICE_NAME = "StorageService";
10204 METHOD_NAME = "StorageService.scanVertex";
10205 }
10206 let mut ctx_stack = req_ctxt.get_context_stack(
10207 SERVICE_NAME.as_cstr(),
10208 METHOD_NAME.as_cstr(),
10209 )?;
10210 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10211 let _args: self::Args_StorageService_scanVertex = ::fbthrift::Deserialize::read(p)?;
10212 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10213 protocol: P::PROTOCOL_ID,
10214 method_name: METHOD_NAME.as_cstr(),
10215 buffer: ::std::marker::PhantomData, })?;
10217 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10218
10219 let res = ::std::panic::AssertUnwindSafe(
10220 self.service.scanVertex(
10221 _args.req,
10222 )
10223 )
10224 .catch_unwind()
10225 .await;
10226
10227 let res = match res {
10229 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10230 ::tracing::info!("success");
10231 crate::services::storage_service::ScanVertexExn::Success(res)
10232 }
10233 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::ScanVertexExn::Success(_))) => {
10234 panic!(
10235 "{} attempted to return success via error",
10236 "scanVertex",
10237 )
10238 }
10239 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10240 ::tracing::error!(exception = ?exn);
10241 exn
10242 }
10243 ::std::result::Result::Err(exn) => {
10244 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.scanVertex", exn);
10245 crate::services::storage_service::ScanVertexExn::ApplicationException(aexn)
10246 }
10247 };
10248
10249 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10250 "scanVertex",
10251 METHOD_NAME.as_cstr(),
10252 _seqid,
10253 req_ctxt,
10254 &mut ctx_stack,
10255 res
10256 )?;
10257 reply_state.lock().unwrap().send_reply(env);
10258 Ok(())
10259 }
10260
10261 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.transLeader"))]
10262 async fn handle_transLeader<'a>(
10263 &'a self,
10264 p: &'a mut P::Deserializer,
10265 req_ctxt: &R,
10266 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10267 _seqid: ::std::primitive::u32,
10268 ) -> ::anyhow::Result<()> {
10269 use ::const_cstr::const_cstr;
10270 use ::futures::FutureExt as _;
10271
10272 const_cstr! {
10273 SERVICE_NAME = "StorageService";
10274 METHOD_NAME = "StorageService.transLeader";
10275 }
10276 let mut ctx_stack = req_ctxt.get_context_stack(
10277 SERVICE_NAME.as_cstr(),
10278 METHOD_NAME.as_cstr(),
10279 )?;
10280 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10281 let _args: self::Args_StorageService_transLeader = ::fbthrift::Deserialize::read(p)?;
10282 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10283 protocol: P::PROTOCOL_ID,
10284 method_name: METHOD_NAME.as_cstr(),
10285 buffer: ::std::marker::PhantomData, })?;
10287 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10288
10289 let res = ::std::panic::AssertUnwindSafe(
10290 self.service.transLeader(
10291 _args.req,
10292 )
10293 )
10294 .catch_unwind()
10295 .await;
10296
10297 let res = match res {
10299 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10300 ::tracing::info!("success");
10301 crate::services::storage_service::TransLeaderExn::Success(res)
10302 }
10303 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::TransLeaderExn::Success(_))) => {
10304 panic!(
10305 "{} attempted to return success via error",
10306 "transLeader",
10307 )
10308 }
10309 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10310 ::tracing::error!(exception = ?exn);
10311 exn
10312 }
10313 ::std::result::Result::Err(exn) => {
10314 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.transLeader", exn);
10315 crate::services::storage_service::TransLeaderExn::ApplicationException(aexn)
10316 }
10317 };
10318
10319 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10320 "transLeader",
10321 METHOD_NAME.as_cstr(),
10322 _seqid,
10323 req_ctxt,
10324 &mut ctx_stack,
10325 res
10326 )?;
10327 reply_state.lock().unwrap().send_reply(env);
10328 Ok(())
10329 }
10330
10331 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.addPart"))]
10332 async fn handle_addPart<'a>(
10333 &'a self,
10334 p: &'a mut P::Deserializer,
10335 req_ctxt: &R,
10336 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10337 _seqid: ::std::primitive::u32,
10338 ) -> ::anyhow::Result<()> {
10339 use ::const_cstr::const_cstr;
10340 use ::futures::FutureExt as _;
10341
10342 const_cstr! {
10343 SERVICE_NAME = "StorageService";
10344 METHOD_NAME = "StorageService.addPart";
10345 }
10346 let mut ctx_stack = req_ctxt.get_context_stack(
10347 SERVICE_NAME.as_cstr(),
10348 METHOD_NAME.as_cstr(),
10349 )?;
10350 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10351 let _args: self::Args_StorageService_addPart = ::fbthrift::Deserialize::read(p)?;
10352 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10353 protocol: P::PROTOCOL_ID,
10354 method_name: METHOD_NAME.as_cstr(),
10355 buffer: ::std::marker::PhantomData, })?;
10357 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10358
10359 let res = ::std::panic::AssertUnwindSafe(
10360 self.service.addPart(
10361 _args.req,
10362 )
10363 )
10364 .catch_unwind()
10365 .await;
10366
10367 let res = match res {
10369 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10370 ::tracing::info!("success");
10371 crate::services::storage_service::AddPartExn::Success(res)
10372 }
10373 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::AddPartExn::Success(_))) => {
10374 panic!(
10375 "{} attempted to return success via error",
10376 "addPart",
10377 )
10378 }
10379 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10380 ::tracing::error!(exception = ?exn);
10381 exn
10382 }
10383 ::std::result::Result::Err(exn) => {
10384 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.addPart", exn);
10385 crate::services::storage_service::AddPartExn::ApplicationException(aexn)
10386 }
10387 };
10388
10389 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10390 "addPart",
10391 METHOD_NAME.as_cstr(),
10392 _seqid,
10393 req_ctxt,
10394 &mut ctx_stack,
10395 res
10396 )?;
10397 reply_state.lock().unwrap().send_reply(env);
10398 Ok(())
10399 }
10400
10401 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.addLearner"))]
10402 async fn handle_addLearner<'a>(
10403 &'a self,
10404 p: &'a mut P::Deserializer,
10405 req_ctxt: &R,
10406 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10407 _seqid: ::std::primitive::u32,
10408 ) -> ::anyhow::Result<()> {
10409 use ::const_cstr::const_cstr;
10410 use ::futures::FutureExt as _;
10411
10412 const_cstr! {
10413 SERVICE_NAME = "StorageService";
10414 METHOD_NAME = "StorageService.addLearner";
10415 }
10416 let mut ctx_stack = req_ctxt.get_context_stack(
10417 SERVICE_NAME.as_cstr(),
10418 METHOD_NAME.as_cstr(),
10419 )?;
10420 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10421 let _args: self::Args_StorageService_addLearner = ::fbthrift::Deserialize::read(p)?;
10422 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10423 protocol: P::PROTOCOL_ID,
10424 method_name: METHOD_NAME.as_cstr(),
10425 buffer: ::std::marker::PhantomData, })?;
10427 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10428
10429 let res = ::std::panic::AssertUnwindSafe(
10430 self.service.addLearner(
10431 _args.req,
10432 )
10433 )
10434 .catch_unwind()
10435 .await;
10436
10437 let res = match res {
10439 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10440 ::tracing::info!("success");
10441 crate::services::storage_service::AddLearnerExn::Success(res)
10442 }
10443 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::AddLearnerExn::Success(_))) => {
10444 panic!(
10445 "{} attempted to return success via error",
10446 "addLearner",
10447 )
10448 }
10449 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10450 ::tracing::error!(exception = ?exn);
10451 exn
10452 }
10453 ::std::result::Result::Err(exn) => {
10454 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.addLearner", exn);
10455 crate::services::storage_service::AddLearnerExn::ApplicationException(aexn)
10456 }
10457 };
10458
10459 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10460 "addLearner",
10461 METHOD_NAME.as_cstr(),
10462 _seqid,
10463 req_ctxt,
10464 &mut ctx_stack,
10465 res
10466 )?;
10467 reply_state.lock().unwrap().send_reply(env);
10468 Ok(())
10469 }
10470
10471 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.waitingForCatchUpData"))]
10472 async fn handle_waitingForCatchUpData<'a>(
10473 &'a self,
10474 p: &'a mut P::Deserializer,
10475 req_ctxt: &R,
10476 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10477 _seqid: ::std::primitive::u32,
10478 ) -> ::anyhow::Result<()> {
10479 use ::const_cstr::const_cstr;
10480 use ::futures::FutureExt as _;
10481
10482 const_cstr! {
10483 SERVICE_NAME = "StorageService";
10484 METHOD_NAME = "StorageService.waitingForCatchUpData";
10485 }
10486 let mut ctx_stack = req_ctxt.get_context_stack(
10487 SERVICE_NAME.as_cstr(),
10488 METHOD_NAME.as_cstr(),
10489 )?;
10490 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10491 let _args: self::Args_StorageService_waitingForCatchUpData = ::fbthrift::Deserialize::read(p)?;
10492 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10493 protocol: P::PROTOCOL_ID,
10494 method_name: METHOD_NAME.as_cstr(),
10495 buffer: ::std::marker::PhantomData, })?;
10497 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10498
10499 let res = ::std::panic::AssertUnwindSafe(
10500 self.service.waitingForCatchUpData(
10501 _args.req,
10502 )
10503 )
10504 .catch_unwind()
10505 .await;
10506
10507 let res = match res {
10509 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10510 ::tracing::info!("success");
10511 crate::services::storage_service::WaitingForCatchUpDataExn::Success(res)
10512 }
10513 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::WaitingForCatchUpDataExn::Success(_))) => {
10514 panic!(
10515 "{} attempted to return success via error",
10516 "waitingForCatchUpData",
10517 )
10518 }
10519 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10520 ::tracing::error!(exception = ?exn);
10521 exn
10522 }
10523 ::std::result::Result::Err(exn) => {
10524 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.waitingForCatchUpData", exn);
10525 crate::services::storage_service::WaitingForCatchUpDataExn::ApplicationException(aexn)
10526 }
10527 };
10528
10529 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10530 "waitingForCatchUpData",
10531 METHOD_NAME.as_cstr(),
10532 _seqid,
10533 req_ctxt,
10534 &mut ctx_stack,
10535 res
10536 )?;
10537 reply_state.lock().unwrap().send_reply(env);
10538 Ok(())
10539 }
10540
10541 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.removePart"))]
10542 async fn handle_removePart<'a>(
10543 &'a self,
10544 p: &'a mut P::Deserializer,
10545 req_ctxt: &R,
10546 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10547 _seqid: ::std::primitive::u32,
10548 ) -> ::anyhow::Result<()> {
10549 use ::const_cstr::const_cstr;
10550 use ::futures::FutureExt as _;
10551
10552 const_cstr! {
10553 SERVICE_NAME = "StorageService";
10554 METHOD_NAME = "StorageService.removePart";
10555 }
10556 let mut ctx_stack = req_ctxt.get_context_stack(
10557 SERVICE_NAME.as_cstr(),
10558 METHOD_NAME.as_cstr(),
10559 )?;
10560 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10561 let _args: self::Args_StorageService_removePart = ::fbthrift::Deserialize::read(p)?;
10562 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10563 protocol: P::PROTOCOL_ID,
10564 method_name: METHOD_NAME.as_cstr(),
10565 buffer: ::std::marker::PhantomData, })?;
10567 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10568
10569 let res = ::std::panic::AssertUnwindSafe(
10570 self.service.removePart(
10571 _args.req,
10572 )
10573 )
10574 .catch_unwind()
10575 .await;
10576
10577 let res = match res {
10579 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10580 ::tracing::info!("success");
10581 crate::services::storage_service::RemovePartExn::Success(res)
10582 }
10583 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::RemovePartExn::Success(_))) => {
10584 panic!(
10585 "{} attempted to return success via error",
10586 "removePart",
10587 )
10588 }
10589 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10590 ::tracing::error!(exception = ?exn);
10591 exn
10592 }
10593 ::std::result::Result::Err(exn) => {
10594 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.removePart", exn);
10595 crate::services::storage_service::RemovePartExn::ApplicationException(aexn)
10596 }
10597 };
10598
10599 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10600 "removePart",
10601 METHOD_NAME.as_cstr(),
10602 _seqid,
10603 req_ctxt,
10604 &mut ctx_stack,
10605 res
10606 )?;
10607 reply_state.lock().unwrap().send_reply(env);
10608 Ok(())
10609 }
10610
10611 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.memberChange"))]
10612 async fn handle_memberChange<'a>(
10613 &'a self,
10614 p: &'a mut P::Deserializer,
10615 req_ctxt: &R,
10616 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10617 _seqid: ::std::primitive::u32,
10618 ) -> ::anyhow::Result<()> {
10619 use ::const_cstr::const_cstr;
10620 use ::futures::FutureExt as _;
10621
10622 const_cstr! {
10623 SERVICE_NAME = "StorageService";
10624 METHOD_NAME = "StorageService.memberChange";
10625 }
10626 let mut ctx_stack = req_ctxt.get_context_stack(
10627 SERVICE_NAME.as_cstr(),
10628 METHOD_NAME.as_cstr(),
10629 )?;
10630 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10631 let _args: self::Args_StorageService_memberChange = ::fbthrift::Deserialize::read(p)?;
10632 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10633 protocol: P::PROTOCOL_ID,
10634 method_name: METHOD_NAME.as_cstr(),
10635 buffer: ::std::marker::PhantomData, })?;
10637 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10638
10639 let res = ::std::panic::AssertUnwindSafe(
10640 self.service.memberChange(
10641 _args.req,
10642 )
10643 )
10644 .catch_unwind()
10645 .await;
10646
10647 let res = match res {
10649 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10650 ::tracing::info!("success");
10651 crate::services::storage_service::MemberChangeExn::Success(res)
10652 }
10653 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::MemberChangeExn::Success(_))) => {
10654 panic!(
10655 "{} attempted to return success via error",
10656 "memberChange",
10657 )
10658 }
10659 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10660 ::tracing::error!(exception = ?exn);
10661 exn
10662 }
10663 ::std::result::Result::Err(exn) => {
10664 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.memberChange", exn);
10665 crate::services::storage_service::MemberChangeExn::ApplicationException(aexn)
10666 }
10667 };
10668
10669 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10670 "memberChange",
10671 METHOD_NAME.as_cstr(),
10672 _seqid,
10673 req_ctxt,
10674 &mut ctx_stack,
10675 res
10676 )?;
10677 reply_state.lock().unwrap().send_reply(env);
10678 Ok(())
10679 }
10680
10681 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.checkPeers"))]
10682 async fn handle_checkPeers<'a>(
10683 &'a self,
10684 p: &'a mut P::Deserializer,
10685 req_ctxt: &R,
10686 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10687 _seqid: ::std::primitive::u32,
10688 ) -> ::anyhow::Result<()> {
10689 use ::const_cstr::const_cstr;
10690 use ::futures::FutureExt as _;
10691
10692 const_cstr! {
10693 SERVICE_NAME = "StorageService";
10694 METHOD_NAME = "StorageService.checkPeers";
10695 }
10696 let mut ctx_stack = req_ctxt.get_context_stack(
10697 SERVICE_NAME.as_cstr(),
10698 METHOD_NAME.as_cstr(),
10699 )?;
10700 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10701 let _args: self::Args_StorageService_checkPeers = ::fbthrift::Deserialize::read(p)?;
10702 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10703 protocol: P::PROTOCOL_ID,
10704 method_name: METHOD_NAME.as_cstr(),
10705 buffer: ::std::marker::PhantomData, })?;
10707 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10708
10709 let res = ::std::panic::AssertUnwindSafe(
10710 self.service.checkPeers(
10711 _args.req,
10712 )
10713 )
10714 .catch_unwind()
10715 .await;
10716
10717 let res = match res {
10719 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10720 ::tracing::info!("success");
10721 crate::services::storage_service::CheckPeersExn::Success(res)
10722 }
10723 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::CheckPeersExn::Success(_))) => {
10724 panic!(
10725 "{} attempted to return success via error",
10726 "checkPeers",
10727 )
10728 }
10729 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10730 ::tracing::error!(exception = ?exn);
10731 exn
10732 }
10733 ::std::result::Result::Err(exn) => {
10734 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.checkPeers", exn);
10735 crate::services::storage_service::CheckPeersExn::ApplicationException(aexn)
10736 }
10737 };
10738
10739 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10740 "checkPeers",
10741 METHOD_NAME.as_cstr(),
10742 _seqid,
10743 req_ctxt,
10744 &mut ctx_stack,
10745 res
10746 )?;
10747 reply_state.lock().unwrap().send_reply(env);
10748 Ok(())
10749 }
10750
10751 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.getLeaderPart"))]
10752 async fn handle_getLeaderPart<'a>(
10753 &'a self,
10754 p: &'a mut P::Deserializer,
10755 req_ctxt: &R,
10756 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10757 _seqid: ::std::primitive::u32,
10758 ) -> ::anyhow::Result<()> {
10759 use ::const_cstr::const_cstr;
10760 use ::futures::FutureExt as _;
10761
10762 const_cstr! {
10763 SERVICE_NAME = "StorageService";
10764 METHOD_NAME = "StorageService.getLeaderPart";
10765 }
10766 let mut ctx_stack = req_ctxt.get_context_stack(
10767 SERVICE_NAME.as_cstr(),
10768 METHOD_NAME.as_cstr(),
10769 )?;
10770 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10771 let _args: self::Args_StorageService_getLeaderPart = ::fbthrift::Deserialize::read(p)?;
10772 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10773 protocol: P::PROTOCOL_ID,
10774 method_name: METHOD_NAME.as_cstr(),
10775 buffer: ::std::marker::PhantomData, })?;
10777 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10778
10779 let res = ::std::panic::AssertUnwindSafe(
10780 self.service.getLeaderPart(
10781 _args.req,
10782 )
10783 )
10784 .catch_unwind()
10785 .await;
10786
10787 let res = match res {
10789 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10790 ::tracing::info!("success");
10791 crate::services::storage_service::GetLeaderPartExn::Success(res)
10792 }
10793 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::GetLeaderPartExn::Success(_))) => {
10794 panic!(
10795 "{} attempted to return success via error",
10796 "getLeaderPart",
10797 )
10798 }
10799 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10800 ::tracing::error!(exception = ?exn);
10801 exn
10802 }
10803 ::std::result::Result::Err(exn) => {
10804 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.getLeaderPart", exn);
10805 crate::services::storage_service::GetLeaderPartExn::ApplicationException(aexn)
10806 }
10807 };
10808
10809 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10810 "getLeaderPart",
10811 METHOD_NAME.as_cstr(),
10812 _seqid,
10813 req_ctxt,
10814 &mut ctx_stack,
10815 res
10816 )?;
10817 reply_state.lock().unwrap().send_reply(env);
10818 Ok(())
10819 }
10820
10821 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.createCheckpoint"))]
10822 async fn handle_createCheckpoint<'a>(
10823 &'a self,
10824 p: &'a mut P::Deserializer,
10825 req_ctxt: &R,
10826 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10827 _seqid: ::std::primitive::u32,
10828 ) -> ::anyhow::Result<()> {
10829 use ::const_cstr::const_cstr;
10830 use ::futures::FutureExt as _;
10831
10832 const_cstr! {
10833 SERVICE_NAME = "StorageService";
10834 METHOD_NAME = "StorageService.createCheckpoint";
10835 }
10836 let mut ctx_stack = req_ctxt.get_context_stack(
10837 SERVICE_NAME.as_cstr(),
10838 METHOD_NAME.as_cstr(),
10839 )?;
10840 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10841 let _args: self::Args_StorageService_createCheckpoint = ::fbthrift::Deserialize::read(p)?;
10842 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10843 protocol: P::PROTOCOL_ID,
10844 method_name: METHOD_NAME.as_cstr(),
10845 buffer: ::std::marker::PhantomData, })?;
10847 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10848
10849 let res = ::std::panic::AssertUnwindSafe(
10850 self.service.createCheckpoint(
10851 _args.req,
10852 )
10853 )
10854 .catch_unwind()
10855 .await;
10856
10857 let res = match res {
10859 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10860 ::tracing::info!("success");
10861 crate::services::storage_service::CreateCheckpointExn::Success(res)
10862 }
10863 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::CreateCheckpointExn::Success(_))) => {
10864 panic!(
10865 "{} attempted to return success via error",
10866 "createCheckpoint",
10867 )
10868 }
10869 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10870 ::tracing::error!(exception = ?exn);
10871 exn
10872 }
10873 ::std::result::Result::Err(exn) => {
10874 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.createCheckpoint", exn);
10875 crate::services::storage_service::CreateCheckpointExn::ApplicationException(aexn)
10876 }
10877 };
10878
10879 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10880 "createCheckpoint",
10881 METHOD_NAME.as_cstr(),
10882 _seqid,
10883 req_ctxt,
10884 &mut ctx_stack,
10885 res
10886 )?;
10887 reply_state.lock().unwrap().send_reply(env);
10888 Ok(())
10889 }
10890
10891 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.dropCheckpoint"))]
10892 async fn handle_dropCheckpoint<'a>(
10893 &'a self,
10894 p: &'a mut P::Deserializer,
10895 req_ctxt: &R,
10896 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10897 _seqid: ::std::primitive::u32,
10898 ) -> ::anyhow::Result<()> {
10899 use ::const_cstr::const_cstr;
10900 use ::futures::FutureExt as _;
10901
10902 const_cstr! {
10903 SERVICE_NAME = "StorageService";
10904 METHOD_NAME = "StorageService.dropCheckpoint";
10905 }
10906 let mut ctx_stack = req_ctxt.get_context_stack(
10907 SERVICE_NAME.as_cstr(),
10908 METHOD_NAME.as_cstr(),
10909 )?;
10910 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10911 let _args: self::Args_StorageService_dropCheckpoint = ::fbthrift::Deserialize::read(p)?;
10912 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10913 protocol: P::PROTOCOL_ID,
10914 method_name: METHOD_NAME.as_cstr(),
10915 buffer: ::std::marker::PhantomData, })?;
10917 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10918
10919 let res = ::std::panic::AssertUnwindSafe(
10920 self.service.dropCheckpoint(
10921 _args.req,
10922 )
10923 )
10924 .catch_unwind()
10925 .await;
10926
10927 let res = match res {
10929 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
10930 ::tracing::info!("success");
10931 crate::services::storage_service::DropCheckpointExn::Success(res)
10932 }
10933 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::DropCheckpointExn::Success(_))) => {
10934 panic!(
10935 "{} attempted to return success via error",
10936 "dropCheckpoint",
10937 )
10938 }
10939 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
10940 ::tracing::error!(exception = ?exn);
10941 exn
10942 }
10943 ::std::result::Result::Err(exn) => {
10944 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.dropCheckpoint", exn);
10945 crate::services::storage_service::DropCheckpointExn::ApplicationException(aexn)
10946 }
10947 };
10948
10949 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
10950 "dropCheckpoint",
10951 METHOD_NAME.as_cstr(),
10952 _seqid,
10953 req_ctxt,
10954 &mut ctx_stack,
10955 res
10956 )?;
10957 reply_state.lock().unwrap().send_reply(env);
10958 Ok(())
10959 }
10960
10961 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.blockingWrites"))]
10962 async fn handle_blockingWrites<'a>(
10963 &'a self,
10964 p: &'a mut P::Deserializer,
10965 req_ctxt: &R,
10966 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
10967 _seqid: ::std::primitive::u32,
10968 ) -> ::anyhow::Result<()> {
10969 use ::const_cstr::const_cstr;
10970 use ::futures::FutureExt as _;
10971
10972 const_cstr! {
10973 SERVICE_NAME = "StorageService";
10974 METHOD_NAME = "StorageService.blockingWrites";
10975 }
10976 let mut ctx_stack = req_ctxt.get_context_stack(
10977 SERVICE_NAME.as_cstr(),
10978 METHOD_NAME.as_cstr(),
10979 )?;
10980 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
10981 let _args: self::Args_StorageService_blockingWrites = ::fbthrift::Deserialize::read(p)?;
10982 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
10983 protocol: P::PROTOCOL_ID,
10984 method_name: METHOD_NAME.as_cstr(),
10985 buffer: ::std::marker::PhantomData, })?;
10987 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
10988
10989 let res = ::std::panic::AssertUnwindSafe(
10990 self.service.blockingWrites(
10991 _args.req,
10992 )
10993 )
10994 .catch_unwind()
10995 .await;
10996
10997 let res = match res {
10999 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11000 ::tracing::info!("success");
11001 crate::services::storage_service::BlockingWritesExn::Success(res)
11002 }
11003 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::BlockingWritesExn::Success(_))) => {
11004 panic!(
11005 "{} attempted to return success via error",
11006 "blockingWrites",
11007 )
11008 }
11009 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11010 ::tracing::error!(exception = ?exn);
11011 exn
11012 }
11013 ::std::result::Result::Err(exn) => {
11014 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.blockingWrites", exn);
11015 crate::services::storage_service::BlockingWritesExn::ApplicationException(aexn)
11016 }
11017 };
11018
11019 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11020 "blockingWrites",
11021 METHOD_NAME.as_cstr(),
11022 _seqid,
11023 req_ctxt,
11024 &mut ctx_stack,
11025 res
11026 )?;
11027 reply_state.lock().unwrap().send_reply(env);
11028 Ok(())
11029 }
11030
11031 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.rebuildTagIndex"))]
11032 async fn handle_rebuildTagIndex<'a>(
11033 &'a self,
11034 p: &'a mut P::Deserializer,
11035 req_ctxt: &R,
11036 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11037 _seqid: ::std::primitive::u32,
11038 ) -> ::anyhow::Result<()> {
11039 use ::const_cstr::const_cstr;
11040 use ::futures::FutureExt as _;
11041
11042 const_cstr! {
11043 SERVICE_NAME = "StorageService";
11044 METHOD_NAME = "StorageService.rebuildTagIndex";
11045 }
11046 let mut ctx_stack = req_ctxt.get_context_stack(
11047 SERVICE_NAME.as_cstr(),
11048 METHOD_NAME.as_cstr(),
11049 )?;
11050 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11051 let _args: self::Args_StorageService_rebuildTagIndex = ::fbthrift::Deserialize::read(p)?;
11052 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11053 protocol: P::PROTOCOL_ID,
11054 method_name: METHOD_NAME.as_cstr(),
11055 buffer: ::std::marker::PhantomData, })?;
11057 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11058
11059 let res = ::std::panic::AssertUnwindSafe(
11060 self.service.rebuildTagIndex(
11061 _args.req,
11062 )
11063 )
11064 .catch_unwind()
11065 .await;
11066
11067 let res = match res {
11069 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11070 ::tracing::info!("success");
11071 crate::services::storage_service::RebuildTagIndexExn::Success(res)
11072 }
11073 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::RebuildTagIndexExn::Success(_))) => {
11074 panic!(
11075 "{} attempted to return success via error",
11076 "rebuildTagIndex",
11077 )
11078 }
11079 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11080 ::tracing::error!(exception = ?exn);
11081 exn
11082 }
11083 ::std::result::Result::Err(exn) => {
11084 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.rebuildTagIndex", exn);
11085 crate::services::storage_service::RebuildTagIndexExn::ApplicationException(aexn)
11086 }
11087 };
11088
11089 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11090 "rebuildTagIndex",
11091 METHOD_NAME.as_cstr(),
11092 _seqid,
11093 req_ctxt,
11094 &mut ctx_stack,
11095 res
11096 )?;
11097 reply_state.lock().unwrap().send_reply(env);
11098 Ok(())
11099 }
11100
11101 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.rebuildEdgeIndex"))]
11102 async fn handle_rebuildEdgeIndex<'a>(
11103 &'a self,
11104 p: &'a mut P::Deserializer,
11105 req_ctxt: &R,
11106 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11107 _seqid: ::std::primitive::u32,
11108 ) -> ::anyhow::Result<()> {
11109 use ::const_cstr::const_cstr;
11110 use ::futures::FutureExt as _;
11111
11112 const_cstr! {
11113 SERVICE_NAME = "StorageService";
11114 METHOD_NAME = "StorageService.rebuildEdgeIndex";
11115 }
11116 let mut ctx_stack = req_ctxt.get_context_stack(
11117 SERVICE_NAME.as_cstr(),
11118 METHOD_NAME.as_cstr(),
11119 )?;
11120 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11121 let _args: self::Args_StorageService_rebuildEdgeIndex = ::fbthrift::Deserialize::read(p)?;
11122 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11123 protocol: P::PROTOCOL_ID,
11124 method_name: METHOD_NAME.as_cstr(),
11125 buffer: ::std::marker::PhantomData, })?;
11127 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11128
11129 let res = ::std::panic::AssertUnwindSafe(
11130 self.service.rebuildEdgeIndex(
11131 _args.req,
11132 )
11133 )
11134 .catch_unwind()
11135 .await;
11136
11137 let res = match res {
11139 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11140 ::tracing::info!("success");
11141 crate::services::storage_service::RebuildEdgeIndexExn::Success(res)
11142 }
11143 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::RebuildEdgeIndexExn::Success(_))) => {
11144 panic!(
11145 "{} attempted to return success via error",
11146 "rebuildEdgeIndex",
11147 )
11148 }
11149 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11150 ::tracing::error!(exception = ?exn);
11151 exn
11152 }
11153 ::std::result::Result::Err(exn) => {
11154 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.rebuildEdgeIndex", exn);
11155 crate::services::storage_service::RebuildEdgeIndexExn::ApplicationException(aexn)
11156 }
11157 };
11158
11159 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11160 "rebuildEdgeIndex",
11161 METHOD_NAME.as_cstr(),
11162 _seqid,
11163 req_ctxt,
11164 &mut ctx_stack,
11165 res
11166 )?;
11167 reply_state.lock().unwrap().send_reply(env);
11168 Ok(())
11169 }
11170
11171 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.put"))]
11172 async fn handle_put<'a>(
11173 &'a self,
11174 p: &'a mut P::Deserializer,
11175 req_ctxt: &R,
11176 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11177 _seqid: ::std::primitive::u32,
11178 ) -> ::anyhow::Result<()> {
11179 use ::const_cstr::const_cstr;
11180 use ::futures::FutureExt as _;
11181
11182 const_cstr! {
11183 SERVICE_NAME = "StorageService";
11184 METHOD_NAME = "StorageService.put";
11185 }
11186 let mut ctx_stack = req_ctxt.get_context_stack(
11187 SERVICE_NAME.as_cstr(),
11188 METHOD_NAME.as_cstr(),
11189 )?;
11190 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11191 let _args: self::Args_StorageService_put = ::fbthrift::Deserialize::read(p)?;
11192 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11193 protocol: P::PROTOCOL_ID,
11194 method_name: METHOD_NAME.as_cstr(),
11195 buffer: ::std::marker::PhantomData, })?;
11197 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11198
11199 let res = ::std::panic::AssertUnwindSafe(
11200 self.service.put(
11201 _args.req,
11202 )
11203 )
11204 .catch_unwind()
11205 .await;
11206
11207 let res = match res {
11209 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11210 ::tracing::info!("success");
11211 crate::services::storage_service::PutExn::Success(res)
11212 }
11213 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::PutExn::Success(_))) => {
11214 panic!(
11215 "{} attempted to return success via error",
11216 "put",
11217 )
11218 }
11219 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11220 ::tracing::error!(exception = ?exn);
11221 exn
11222 }
11223 ::std::result::Result::Err(exn) => {
11224 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.put", exn);
11225 crate::services::storage_service::PutExn::ApplicationException(aexn)
11226 }
11227 };
11228
11229 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11230 "put",
11231 METHOD_NAME.as_cstr(),
11232 _seqid,
11233 req_ctxt,
11234 &mut ctx_stack,
11235 res
11236 )?;
11237 reply_state.lock().unwrap().send_reply(env);
11238 Ok(())
11239 }
11240
11241 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.get"))]
11242 async fn handle_get<'a>(
11243 &'a self,
11244 p: &'a mut P::Deserializer,
11245 req_ctxt: &R,
11246 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11247 _seqid: ::std::primitive::u32,
11248 ) -> ::anyhow::Result<()> {
11249 use ::const_cstr::const_cstr;
11250 use ::futures::FutureExt as _;
11251
11252 const_cstr! {
11253 SERVICE_NAME = "StorageService";
11254 METHOD_NAME = "StorageService.get";
11255 }
11256 let mut ctx_stack = req_ctxt.get_context_stack(
11257 SERVICE_NAME.as_cstr(),
11258 METHOD_NAME.as_cstr(),
11259 )?;
11260 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11261 let _args: self::Args_StorageService_get = ::fbthrift::Deserialize::read(p)?;
11262 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11263 protocol: P::PROTOCOL_ID,
11264 method_name: METHOD_NAME.as_cstr(),
11265 buffer: ::std::marker::PhantomData, })?;
11267 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11268
11269 let res = ::std::panic::AssertUnwindSafe(
11270 self.service.get(
11271 _args.req,
11272 )
11273 )
11274 .catch_unwind()
11275 .await;
11276
11277 let res = match res {
11279 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11280 ::tracing::info!("success");
11281 crate::services::storage_service::GetExn::Success(res)
11282 }
11283 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::GetExn::Success(_))) => {
11284 panic!(
11285 "{} attempted to return success via error",
11286 "get",
11287 )
11288 }
11289 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11290 ::tracing::error!(exception = ?exn);
11291 exn
11292 }
11293 ::std::result::Result::Err(exn) => {
11294 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.get", exn);
11295 crate::services::storage_service::GetExn::ApplicationException(aexn)
11296 }
11297 };
11298
11299 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11300 "get",
11301 METHOD_NAME.as_cstr(),
11302 _seqid,
11303 req_ctxt,
11304 &mut ctx_stack,
11305 res
11306 )?;
11307 reply_state.lock().unwrap().send_reply(env);
11308 Ok(())
11309 }
11310
11311 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.remove"))]
11312 async fn handle_remove<'a>(
11313 &'a self,
11314 p: &'a mut P::Deserializer,
11315 req_ctxt: &R,
11316 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11317 _seqid: ::std::primitive::u32,
11318 ) -> ::anyhow::Result<()> {
11319 use ::const_cstr::const_cstr;
11320 use ::futures::FutureExt as _;
11321
11322 const_cstr! {
11323 SERVICE_NAME = "StorageService";
11324 METHOD_NAME = "StorageService.remove";
11325 }
11326 let mut ctx_stack = req_ctxt.get_context_stack(
11327 SERVICE_NAME.as_cstr(),
11328 METHOD_NAME.as_cstr(),
11329 )?;
11330 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11331 let _args: self::Args_StorageService_remove = ::fbthrift::Deserialize::read(p)?;
11332 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11333 protocol: P::PROTOCOL_ID,
11334 method_name: METHOD_NAME.as_cstr(),
11335 buffer: ::std::marker::PhantomData, })?;
11337 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11338
11339 let res = ::std::panic::AssertUnwindSafe(
11340 self.service.remove(
11341 _args.req,
11342 )
11343 )
11344 .catch_unwind()
11345 .await;
11346
11347 let res = match res {
11349 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11350 ::tracing::info!("success");
11351 crate::services::storage_service::RemoveExn::Success(res)
11352 }
11353 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::RemoveExn::Success(_))) => {
11354 panic!(
11355 "{} attempted to return success via error",
11356 "remove",
11357 )
11358 }
11359 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11360 ::tracing::error!(exception = ?exn);
11361 exn
11362 }
11363 ::std::result::Result::Err(exn) => {
11364 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.remove", exn);
11365 crate::services::storage_service::RemoveExn::ApplicationException(aexn)
11366 }
11367 };
11368
11369 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11370 "remove",
11371 METHOD_NAME.as_cstr(),
11372 _seqid,
11373 req_ctxt,
11374 &mut ctx_stack,
11375 res
11376 )?;
11377 reply_state.lock().unwrap().send_reply(env);
11378 Ok(())
11379 }
11380
11381 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.removeRange"))]
11382 async fn handle_removeRange<'a>(
11383 &'a self,
11384 p: &'a mut P::Deserializer,
11385 req_ctxt: &R,
11386 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11387 _seqid: ::std::primitive::u32,
11388 ) -> ::anyhow::Result<()> {
11389 use ::const_cstr::const_cstr;
11390 use ::futures::FutureExt as _;
11391
11392 const_cstr! {
11393 SERVICE_NAME = "StorageService";
11394 METHOD_NAME = "StorageService.removeRange";
11395 }
11396 let mut ctx_stack = req_ctxt.get_context_stack(
11397 SERVICE_NAME.as_cstr(),
11398 METHOD_NAME.as_cstr(),
11399 )?;
11400 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11401 let _args: self::Args_StorageService_removeRange = ::fbthrift::Deserialize::read(p)?;
11402 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11403 protocol: P::PROTOCOL_ID,
11404 method_name: METHOD_NAME.as_cstr(),
11405 buffer: ::std::marker::PhantomData, })?;
11407 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11408
11409 let res = ::std::panic::AssertUnwindSafe(
11410 self.service.removeRange(
11411 _args.req,
11412 )
11413 )
11414 .catch_unwind()
11415 .await;
11416
11417 let res = match res {
11419 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11420 ::tracing::info!("success");
11421 crate::services::storage_service::RemoveRangeExn::Success(res)
11422 }
11423 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::RemoveRangeExn::Success(_))) => {
11424 panic!(
11425 "{} attempted to return success via error",
11426 "removeRange",
11427 )
11428 }
11429 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11430 ::tracing::error!(exception = ?exn);
11431 exn
11432 }
11433 ::std::result::Result::Err(exn) => {
11434 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.removeRange", exn);
11435 crate::services::storage_service::RemoveRangeExn::ApplicationException(aexn)
11436 }
11437 };
11438
11439 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11440 "removeRange",
11441 METHOD_NAME.as_cstr(),
11442 _seqid,
11443 req_ctxt,
11444 &mut ctx_stack,
11445 res
11446 )?;
11447 reply_state.lock().unwrap().send_reply(env);
11448 Ok(())
11449 }
11450
11451 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.getUUID"))]
11452 async fn handle_getUUID<'a>(
11453 &'a self,
11454 p: &'a mut P::Deserializer,
11455 req_ctxt: &R,
11456 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11457 _seqid: ::std::primitive::u32,
11458 ) -> ::anyhow::Result<()> {
11459 use ::const_cstr::const_cstr;
11460 use ::futures::FutureExt as _;
11461
11462 const_cstr! {
11463 SERVICE_NAME = "StorageService";
11464 METHOD_NAME = "StorageService.getUUID";
11465 }
11466 let mut ctx_stack = req_ctxt.get_context_stack(
11467 SERVICE_NAME.as_cstr(),
11468 METHOD_NAME.as_cstr(),
11469 )?;
11470 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11471 let _args: self::Args_StorageService_getUUID = ::fbthrift::Deserialize::read(p)?;
11472 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11473 protocol: P::PROTOCOL_ID,
11474 method_name: METHOD_NAME.as_cstr(),
11475 buffer: ::std::marker::PhantomData, })?;
11477 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11478
11479 let res = ::std::panic::AssertUnwindSafe(
11480 self.service.getUUID(
11481 _args.req,
11482 )
11483 )
11484 .catch_unwind()
11485 .await;
11486
11487 let res = match res {
11489 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11490 ::tracing::info!("success");
11491 crate::services::storage_service::GetUUIDExn::Success(res)
11492 }
11493 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::GetUUIDExn::Success(_))) => {
11494 panic!(
11495 "{} attempted to return success via error",
11496 "getUUID",
11497 )
11498 }
11499 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11500 ::tracing::error!(exception = ?exn);
11501 exn
11502 }
11503 ::std::result::Result::Err(exn) => {
11504 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.getUUID", exn);
11505 crate::services::storage_service::GetUUIDExn::ApplicationException(aexn)
11506 }
11507 };
11508
11509 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11510 "getUUID",
11511 METHOD_NAME.as_cstr(),
11512 _seqid,
11513 req_ctxt,
11514 &mut ctx_stack,
11515 res
11516 )?;
11517 reply_state.lock().unwrap().send_reply(env);
11518 Ok(())
11519 }
11520
11521 #[::tracing::instrument(skip_all, name = "handler", fields(method = "StorageService.lookUpIndex"))]
11522 async fn handle_lookUpIndex<'a>(
11523 &'a self,
11524 p: &'a mut P::Deserializer,
11525 req_ctxt: &R,
11526 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11527 _seqid: ::std::primitive::u32,
11528 ) -> ::anyhow::Result<()> {
11529 use ::const_cstr::const_cstr;
11530 use ::futures::FutureExt as _;
11531
11532 const_cstr! {
11533 SERVICE_NAME = "StorageService";
11534 METHOD_NAME = "StorageService.lookUpIndex";
11535 }
11536 let mut ctx_stack = req_ctxt.get_context_stack(
11537 SERVICE_NAME.as_cstr(),
11538 METHOD_NAME.as_cstr(),
11539 )?;
11540 ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
11541 let _args: self::Args_StorageService_lookUpIndex = ::fbthrift::Deserialize::read(p)?;
11542 ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
11543 protocol: P::PROTOCOL_ID,
11544 method_name: METHOD_NAME.as_cstr(),
11545 buffer: ::std::marker::PhantomData, })?;
11547 ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
11548
11549 let res = ::std::panic::AssertUnwindSafe(
11550 self.service.lookUpIndex(
11551 _args.req,
11552 )
11553 )
11554 .catch_unwind()
11555 .await;
11556
11557 let res = match res {
11559 ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
11560 ::tracing::info!("success");
11561 crate::services::storage_service::LookUpIndexExn::Success(res)
11562 }
11563 ::std::result::Result::Ok(::std::result::Result::Err(crate::services::storage_service::LookUpIndexExn::Success(_))) => {
11564 panic!(
11565 "{} attempted to return success via error",
11566 "lookUpIndex",
11567 )
11568 }
11569 ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
11570 ::tracing::error!(exception = ?exn);
11571 exn
11572 }
11573 ::std::result::Result::Err(exn) => {
11574 let aexn = ::fbthrift::ApplicationException::handler_panic("StorageService.lookUpIndex", exn);
11575 crate::services::storage_service::LookUpIndexExn::ApplicationException(aexn)
11576 }
11577 };
11578
11579 let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
11580 "lookUpIndex",
11581 METHOD_NAME.as_cstr(),
11582 _seqid,
11583 req_ctxt,
11584 &mut ctx_stack,
11585 res
11586 )?;
11587 reply_state.lock().unwrap().send_reply(env);
11588 Ok(())
11589 }
11590 }
11591
11592 #[::async_trait::async_trait]
11593 impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for StorageServiceProcessor<P, H, R, RS>
11594 where
11595 P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
11596 P::Deserializer: ::std::marker::Send,
11597 H: StorageService,
11598 P::Frame: ::std::marker::Send + 'static,
11599 R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
11600 <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
11601 + ::std::marker::Send + ::std::marker::Sync + 'static,
11602 RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
11603 {
11604 type RequestContext = R;
11605 type ReplyState = RS;
11606
11607 #[inline]
11608 fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
11609 match name {
11610 b"getBound" => ::std::result::Result::Ok(0usize),
11611 b"boundStats" => ::std::result::Result::Ok(1usize),
11612 b"getProps" => ::std::result::Result::Ok(2usize),
11613 b"getEdgeProps" => ::std::result::Result::Ok(3usize),
11614 b"addVertices" => ::std::result::Result::Ok(4usize),
11615 b"addEdges" => ::std::result::Result::Ok(5usize),
11616 b"deleteEdges" => ::std::result::Result::Ok(6usize),
11617 b"deleteVertices" => ::std::result::Result::Ok(7usize),
11618 b"updateVertex" => ::std::result::Result::Ok(8usize),
11619 b"updateEdge" => ::std::result::Result::Ok(9usize),
11620 b"scanEdge" => ::std::result::Result::Ok(10usize),
11621 b"scanVertex" => ::std::result::Result::Ok(11usize),
11622 b"transLeader" => ::std::result::Result::Ok(12usize),
11623 b"addPart" => ::std::result::Result::Ok(13usize),
11624 b"addLearner" => ::std::result::Result::Ok(14usize),
11625 b"waitingForCatchUpData" => ::std::result::Result::Ok(15usize),
11626 b"removePart" => ::std::result::Result::Ok(16usize),
11627 b"memberChange" => ::std::result::Result::Ok(17usize),
11628 b"checkPeers" => ::std::result::Result::Ok(18usize),
11629 b"getLeaderPart" => ::std::result::Result::Ok(19usize),
11630 b"createCheckpoint" => ::std::result::Result::Ok(20usize),
11631 b"dropCheckpoint" => ::std::result::Result::Ok(21usize),
11632 b"blockingWrites" => ::std::result::Result::Ok(22usize),
11633 b"rebuildTagIndex" => ::std::result::Result::Ok(23usize),
11634 b"rebuildEdgeIndex" => ::std::result::Result::Ok(24usize),
11635 b"put" => ::std::result::Result::Ok(25usize),
11636 b"get" => ::std::result::Result::Ok(26usize),
11637 b"remove" => ::std::result::Result::Ok(27usize),
11638 b"removeRange" => ::std::result::Result::Ok(28usize),
11639 b"getUUID" => ::std::result::Result::Ok(29usize),
11640 b"lookUpIndex" => ::std::result::Result::Ok(30usize),
11641 _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
11642 }
11643 }
11644
11645 #[allow(clippy::match_single_binding)]
11646 async fn handle_method(
11647 &self,
11648 idx: ::std::primitive::usize,
11649 _p: &mut P::Deserializer,
11650 _r: &R,
11651 _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11652 _seqid: ::std::primitive::u32,
11653 ) -> ::anyhow::Result<()> {
11654 match idx {
11655 0usize => {
11656 self.handle_getBound(_p, _r, _reply_state, _seqid).await
11657 }
11658 1usize => {
11659 self.handle_boundStats(_p, _r, _reply_state, _seqid).await
11660 }
11661 2usize => {
11662 self.handle_getProps(_p, _r, _reply_state, _seqid).await
11663 }
11664 3usize => {
11665 self.handle_getEdgeProps(_p, _r, _reply_state, _seqid).await
11666 }
11667 4usize => {
11668 self.handle_addVertices(_p, _r, _reply_state, _seqid).await
11669 }
11670 5usize => {
11671 self.handle_addEdges(_p, _r, _reply_state, _seqid).await
11672 }
11673 6usize => {
11674 self.handle_deleteEdges(_p, _r, _reply_state, _seqid).await
11675 }
11676 7usize => {
11677 self.handle_deleteVertices(_p, _r, _reply_state, _seqid).await
11678 }
11679 8usize => {
11680 self.handle_updateVertex(_p, _r, _reply_state, _seqid).await
11681 }
11682 9usize => {
11683 self.handle_updateEdge(_p, _r, _reply_state, _seqid).await
11684 }
11685 10usize => {
11686 self.handle_scanEdge(_p, _r, _reply_state, _seqid).await
11687 }
11688 11usize => {
11689 self.handle_scanVertex(_p, _r, _reply_state, _seqid).await
11690 }
11691 12usize => {
11692 self.handle_transLeader(_p, _r, _reply_state, _seqid).await
11693 }
11694 13usize => {
11695 self.handle_addPart(_p, _r, _reply_state, _seqid).await
11696 }
11697 14usize => {
11698 self.handle_addLearner(_p, _r, _reply_state, _seqid).await
11699 }
11700 15usize => {
11701 self.handle_waitingForCatchUpData(_p, _r, _reply_state, _seqid).await
11702 }
11703 16usize => {
11704 self.handle_removePart(_p, _r, _reply_state, _seqid).await
11705 }
11706 17usize => {
11707 self.handle_memberChange(_p, _r, _reply_state, _seqid).await
11708 }
11709 18usize => {
11710 self.handle_checkPeers(_p, _r, _reply_state, _seqid).await
11711 }
11712 19usize => {
11713 self.handle_getLeaderPart(_p, _r, _reply_state, _seqid).await
11714 }
11715 20usize => {
11716 self.handle_createCheckpoint(_p, _r, _reply_state, _seqid).await
11717 }
11718 21usize => {
11719 self.handle_dropCheckpoint(_p, _r, _reply_state, _seqid).await
11720 }
11721 22usize => {
11722 self.handle_blockingWrites(_p, _r, _reply_state, _seqid).await
11723 }
11724 23usize => {
11725 self.handle_rebuildTagIndex(_p, _r, _reply_state, _seqid).await
11726 }
11727 24usize => {
11728 self.handle_rebuildEdgeIndex(_p, _r, _reply_state, _seqid).await
11729 }
11730 25usize => {
11731 self.handle_put(_p, _r, _reply_state, _seqid).await
11732 }
11733 26usize => {
11734 self.handle_get(_p, _r, _reply_state, _seqid).await
11735 }
11736 27usize => {
11737 self.handle_remove(_p, _r, _reply_state, _seqid).await
11738 }
11739 28usize => {
11740 self.handle_removeRange(_p, _r, _reply_state, _seqid).await
11741 }
11742 29usize => {
11743 self.handle_getUUID(_p, _r, _reply_state, _seqid).await
11744 }
11745 30usize => {
11746 self.handle_lookUpIndex(_p, _r, _reply_state, _seqid).await
11747 }
11748 bad => panic!(
11749 "{}: unexpected method idx {}",
11750 "StorageServiceProcessor",
11751 bad
11752 ),
11753 }
11754 }
11755
11756 #[allow(clippy::match_single_binding)]
11757 #[inline]
11758 fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
11759 match name {
11760 _ => ::anyhow::bail!("Unknown interaction"),
11761 }
11762 }
11763
11764 #[allow(clippy::match_single_binding)]
11765 fn handle_create_interaction(
11766 &self,
11767 idx: ::std::primitive::usize,
11768 ) -> ::anyhow::Result<
11769 ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
11770 > {
11771 match idx {
11772 bad => panic!(
11773 "{}: unexpected method idx {}",
11774 "StorageServiceProcessor",
11775 bad
11776 ),
11777 }
11778 }
11779 }
11780
11781 #[::async_trait::async_trait]
11782 impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for StorageServiceProcessor<P, H, R, RS>
11783 where
11784 P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
11785 P::Deserializer: ::std::marker::Send,
11786 P::Frame: ::std::marker::Send + 'static,
11787 H: StorageService,
11788 R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
11789 <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
11790 + ::std::marker::Send + ::std::marker::Sync + 'static,
11791 RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
11792 {
11793 type Handler = H;
11794 type RequestContext = R;
11795 type ReplyState = RS;
11796
11797 #[tracing::instrument(level="trace", skip_all, fields(service = "StorageService"))]
11798 async fn call(
11799 &self,
11800 req: ::fbthrift::ProtocolDecoded<P>,
11801 req_ctxt: &R,
11802 reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
11803 ) -> ::anyhow::Result<()> {
11804 use ::fbthrift::{BufExt as _, ProtocolReader as _, ServiceProcessor as _};
11805 let mut p = P::deserializer(req);
11806 let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
11807 if mty != ::fbthrift::MessageType::Call {
11808 return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
11809 ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
11810 format!("message type {:?} not handled", mty)
11811 )));
11812 }
11813 let idx = match idx {
11814 ::std::result::Result::Ok(idx) => idx,
11815 ::std::result::Result::Err(_) => {
11816 let cur = P::into_buffer(p).reset();
11817 return self.supa.call(cur, req_ctxt, reply_state).await;
11818 }
11819 };
11820 self.handle_method(idx, &mut p, req_ctxt, reply_state, seqid).await?;
11821 p.read_message_end()?;
11822
11823 Ok(())
11824 }
11825
11826 fn create_interaction(
11827 &self,
11828 name: &str,
11829 ) -> ::anyhow::Result<
11830 ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
11831 > {
11832 use ::fbthrift::{ServiceProcessor as _};
11833 let idx = self.create_interaction_idx(name);
11834 let idx = match idx {
11835 ::anyhow::Result::Ok(idx) => idx,
11836 ::anyhow::Result::Err(_) => {
11837 return self.supa.create_interaction(name);
11838 }
11839 };
11840 self.handle_create_interaction(idx)
11841 }
11842
11843 fn get_method_names(&self) -> &'static [&'static str] {
11844 &[
11845 "getBound",
11847 "boundStats",
11848 "getProps",
11849 "getEdgeProps",
11850 "addVertices",
11851 "addEdges",
11852 "deleteEdges",
11853 "deleteVertices",
11854 "updateVertex",
11855 "updateEdge",
11856 "scanEdge",
11857 "scanVertex",
11858 "transLeader",
11859 "addPart",
11860 "addLearner",
11861 "waitingForCatchUpData",
11862 "removePart",
11863 "memberChange",
11864 "checkPeers",
11865 "getLeaderPart",
11866 "createCheckpoint",
11867 "dropCheckpoint",
11868 "blockingWrites",
11869 "rebuildTagIndex",
11870 "rebuildEdgeIndex",
11871 "put",
11872 "get",
11873 "remove",
11874 "removeRange",
11875 "getUUID",
11876 "lookUpIndex",
11877 ]
11878 }
11879 }
11880
11881 #[::tracing::instrument(level="debug", skip_all, fields(proto = ?proto))]
11886 pub fn make_StorageService_server<F, H, R, RS>(
11887 proto: ::fbthrift::ProtocolID,
11888 handler: H,
11889 ) -> ::std::result::Result<::std::boxed::Box<dyn ::fbthrift::ThriftService<F, Handler = H, RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>, ::fbthrift::ApplicationException>
11890 where
11891 F: ::fbthrift::Framing + ::std::marker::Send + ::std::marker::Sync + 'static,
11892 H: StorageService,
11893 R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
11894 <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = F::DecBuf> + ::std::marker::Send + ::std::marker::Sync + 'static,
11895 RS: ::fbthrift::ReplyState<F, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
11896 {
11897 match proto {
11898 ::fbthrift::ProtocolID::BinaryProtocol => {
11899 ::std::result::Result::Ok(::std::boxed::Box::new(StorageServiceProcessor::<::fbthrift::BinaryProtocol<F>, H, R, RS>::new(handler)))
11900 }
11901 ::fbthrift::ProtocolID::CompactProtocol => {
11902 ::std::result::Result::Ok(::std::boxed::Box::new(StorageServiceProcessor::<::fbthrift::CompactProtocol<F>, H, R, RS>::new(handler)))
11903 }
11904 bad => {
11905 ::tracing::error!(method = "StorageService.", invalid_protocol = ?bad);
11906 ::std::result::Result::Err(::fbthrift::ApplicationException::invalid_protocol(bad))
11907 }
11908 }
11909 }
11910}
11911
11912pub mod mock {
12006 pub struct StorageService<'mock> {
12007 pub getBound: r#impl::storage_service::getBound<'mock>,
12008 pub boundStats: r#impl::storage_service::boundStats<'mock>,
12009 pub getProps: r#impl::storage_service::getProps<'mock>,
12010 pub getEdgeProps: r#impl::storage_service::getEdgeProps<'mock>,
12011 pub addVertices: r#impl::storage_service::addVertices<'mock>,
12012 pub addEdges: r#impl::storage_service::addEdges<'mock>,
12013 pub deleteEdges: r#impl::storage_service::deleteEdges<'mock>,
12014 pub deleteVertices: r#impl::storage_service::deleteVertices<'mock>,
12015 pub updateVertex: r#impl::storage_service::updateVertex<'mock>,
12016 pub updateEdge: r#impl::storage_service::updateEdge<'mock>,
12017 pub scanEdge: r#impl::storage_service::scanEdge<'mock>,
12018 pub scanVertex: r#impl::storage_service::scanVertex<'mock>,
12019 pub transLeader: r#impl::storage_service::transLeader<'mock>,
12020 pub addPart: r#impl::storage_service::addPart<'mock>,
12021 pub addLearner: r#impl::storage_service::addLearner<'mock>,
12022 pub waitingForCatchUpData: r#impl::storage_service::waitingForCatchUpData<'mock>,
12023 pub removePart: r#impl::storage_service::removePart<'mock>,
12024 pub memberChange: r#impl::storage_service::memberChange<'mock>,
12025 pub checkPeers: r#impl::storage_service::checkPeers<'mock>,
12026 pub getLeaderPart: r#impl::storage_service::getLeaderPart<'mock>,
12027 pub createCheckpoint: r#impl::storage_service::createCheckpoint<'mock>,
12028 pub dropCheckpoint: r#impl::storage_service::dropCheckpoint<'mock>,
12029 pub blockingWrites: r#impl::storage_service::blockingWrites<'mock>,
12030 pub rebuildTagIndex: r#impl::storage_service::rebuildTagIndex<'mock>,
12031 pub rebuildEdgeIndex: r#impl::storage_service::rebuildEdgeIndex<'mock>,
12032 pub put: r#impl::storage_service::put<'mock>,
12033 pub get: r#impl::storage_service::get<'mock>,
12034 pub remove: r#impl::storage_service::remove<'mock>,
12035 pub removeRange: r#impl::storage_service::removeRange<'mock>,
12036 pub getUUID: r#impl::storage_service::getUUID<'mock>,
12037 pub lookUpIndex: r#impl::storage_service::lookUpIndex<'mock>,
12038 _marker: ::std::marker::PhantomData<&'mock ()>,
12039 }
12040
12041 impl dyn super::client::StorageService {
12042 pub fn mock<'mock>() -> StorageService<'mock> {
12043 StorageService {
12044 getBound: r#impl::storage_service::getBound::unimplemented(),
12045 boundStats: r#impl::storage_service::boundStats::unimplemented(),
12046 getProps: r#impl::storage_service::getProps::unimplemented(),
12047 getEdgeProps: r#impl::storage_service::getEdgeProps::unimplemented(),
12048 addVertices: r#impl::storage_service::addVertices::unimplemented(),
12049 addEdges: r#impl::storage_service::addEdges::unimplemented(),
12050 deleteEdges: r#impl::storage_service::deleteEdges::unimplemented(),
12051 deleteVertices: r#impl::storage_service::deleteVertices::unimplemented(),
12052 updateVertex: r#impl::storage_service::updateVertex::unimplemented(),
12053 updateEdge: r#impl::storage_service::updateEdge::unimplemented(),
12054 scanEdge: r#impl::storage_service::scanEdge::unimplemented(),
12055 scanVertex: r#impl::storage_service::scanVertex::unimplemented(),
12056 transLeader: r#impl::storage_service::transLeader::unimplemented(),
12057 addPart: r#impl::storage_service::addPart::unimplemented(),
12058 addLearner: r#impl::storage_service::addLearner::unimplemented(),
12059 waitingForCatchUpData: r#impl::storage_service::waitingForCatchUpData::unimplemented(),
12060 removePart: r#impl::storage_service::removePart::unimplemented(),
12061 memberChange: r#impl::storage_service::memberChange::unimplemented(),
12062 checkPeers: r#impl::storage_service::checkPeers::unimplemented(),
12063 getLeaderPart: r#impl::storage_service::getLeaderPart::unimplemented(),
12064 createCheckpoint: r#impl::storage_service::createCheckpoint::unimplemented(),
12065 dropCheckpoint: r#impl::storage_service::dropCheckpoint::unimplemented(),
12066 blockingWrites: r#impl::storage_service::blockingWrites::unimplemented(),
12067 rebuildTagIndex: r#impl::storage_service::rebuildTagIndex::unimplemented(),
12068 rebuildEdgeIndex: r#impl::storage_service::rebuildEdgeIndex::unimplemented(),
12069 put: r#impl::storage_service::put::unimplemented(),
12070 get: r#impl::storage_service::get::unimplemented(),
12071 remove: r#impl::storage_service::remove::unimplemented(),
12072 removeRange: r#impl::storage_service::removeRange::unimplemented(),
12073 getUUID: r#impl::storage_service::getUUID::unimplemented(),
12074 lookUpIndex: r#impl::storage_service::lookUpIndex::unimplemented(),
12075 _marker: ::std::marker::PhantomData,
12076 }
12077 }
12078 }
12079
12080 impl<'mock> super::client::StorageService for StorageService<'mock> {
12081 fn getBound(
12082 &self,
12083 arg_req: &crate::types::GetNeighborsRequest,
12084 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError>> {
12085 let mut closure = self.getBound.closure.lock().unwrap();
12086 let closure: &mut dyn ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> _ = &mut **closure;
12087 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12088 }
12089 fn boundStats(
12090 &self,
12091 arg_req: &crate::types::GetNeighborsRequest,
12092 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError>> {
12093 let mut closure = self.boundStats.closure.lock().unwrap();
12094 let closure: &mut dyn ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> _ = &mut **closure;
12095 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12096 }
12097 fn getProps(
12098 &self,
12099 arg_req: &crate::types::VertexPropRequest,
12100 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError>> {
12101 let mut closure = self.getProps.closure.lock().unwrap();
12102 let closure: &mut dyn ::std::ops::FnMut(crate::types::VertexPropRequest) -> _ = &mut **closure;
12103 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12104 }
12105 fn getEdgeProps(
12106 &self,
12107 arg_req: &crate::types::EdgePropRequest,
12108 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError>> {
12109 let mut closure = self.getEdgeProps.closure.lock().unwrap();
12110 let closure: &mut dyn ::std::ops::FnMut(crate::types::EdgePropRequest) -> _ = &mut **closure;
12111 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12112 }
12113 fn addVertices(
12114 &self,
12115 arg_req: &crate::types::AddVerticesRequest,
12116 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError>> {
12117 let mut closure = self.addVertices.closure.lock().unwrap();
12118 let closure: &mut dyn ::std::ops::FnMut(crate::types::AddVerticesRequest) -> _ = &mut **closure;
12119 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12120 }
12121 fn addEdges(
12122 &self,
12123 arg_req: &crate::types::AddEdgesRequest,
12124 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError>> {
12125 let mut closure = self.addEdges.closure.lock().unwrap();
12126 let closure: &mut dyn ::std::ops::FnMut(crate::types::AddEdgesRequest) -> _ = &mut **closure;
12127 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12128 }
12129 fn deleteEdges(
12130 &self,
12131 arg_req: &crate::types::DeleteEdgesRequest,
12132 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError>> {
12133 let mut closure = self.deleteEdges.closure.lock().unwrap();
12134 let closure: &mut dyn ::std::ops::FnMut(crate::types::DeleteEdgesRequest) -> _ = &mut **closure;
12135 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12136 }
12137 fn deleteVertices(
12138 &self,
12139 arg_req: &crate::types::DeleteVerticesRequest,
12140 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError>> {
12141 let mut closure = self.deleteVertices.closure.lock().unwrap();
12142 let closure: &mut dyn ::std::ops::FnMut(crate::types::DeleteVerticesRequest) -> _ = &mut **closure;
12143 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12144 }
12145 fn updateVertex(
12146 &self,
12147 arg_req: &crate::types::UpdateVertexRequest,
12148 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError>> {
12149 let mut closure = self.updateVertex.closure.lock().unwrap();
12150 let closure: &mut dyn ::std::ops::FnMut(crate::types::UpdateVertexRequest) -> _ = &mut **closure;
12151 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12152 }
12153 fn updateEdge(
12154 &self,
12155 arg_req: &crate::types::UpdateEdgeRequest,
12156 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError>> {
12157 let mut closure = self.updateEdge.closure.lock().unwrap();
12158 let closure: &mut dyn ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> _ = &mut **closure;
12159 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12160 }
12161 fn scanEdge(
12162 &self,
12163 arg_req: &crate::types::ScanEdgeRequest,
12164 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError>> {
12165 let mut closure = self.scanEdge.closure.lock().unwrap();
12166 let closure: &mut dyn ::std::ops::FnMut(crate::types::ScanEdgeRequest) -> _ = &mut **closure;
12167 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12168 }
12169 fn scanVertex(
12170 &self,
12171 arg_req: &crate::types::ScanVertexRequest,
12172 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError>> {
12173 let mut closure = self.scanVertex.closure.lock().unwrap();
12174 let closure: &mut dyn ::std::ops::FnMut(crate::types::ScanVertexRequest) -> _ = &mut **closure;
12175 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12176 }
12177 fn transLeader(
12178 &self,
12179 arg_req: &crate::types::TransLeaderReq,
12180 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::TransLeaderError>> {
12181 let mut closure = self.transLeader.closure.lock().unwrap();
12182 let closure: &mut dyn ::std::ops::FnMut(crate::types::TransLeaderReq) -> _ = &mut **closure;
12183 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12184 }
12185 fn addPart(
12186 &self,
12187 arg_req: &crate::types::AddPartReq,
12188 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError>> {
12189 let mut closure = self.addPart.closure.lock().unwrap();
12190 let closure: &mut dyn ::std::ops::FnMut(crate::types::AddPartReq) -> _ = &mut **closure;
12191 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12192 }
12193 fn addLearner(
12194 &self,
12195 arg_req: &crate::types::AddLearnerReq,
12196 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError>> {
12197 let mut closure = self.addLearner.closure.lock().unwrap();
12198 let closure: &mut dyn ::std::ops::FnMut(crate::types::AddLearnerReq) -> _ = &mut **closure;
12199 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12200 }
12201 fn waitingForCatchUpData(
12202 &self,
12203 arg_req: &crate::types::CatchUpDataReq,
12204 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError>> {
12205 let mut closure = self.waitingForCatchUpData.closure.lock().unwrap();
12206 let closure: &mut dyn ::std::ops::FnMut(crate::types::CatchUpDataReq) -> _ = &mut **closure;
12207 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12208 }
12209 fn removePart(
12210 &self,
12211 arg_req: &crate::types::RemovePartReq,
12212 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError>> {
12213 let mut closure = self.removePart.closure.lock().unwrap();
12214 let closure: &mut dyn ::std::ops::FnMut(crate::types::RemovePartReq) -> _ = &mut **closure;
12215 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12216 }
12217 fn memberChange(
12218 &self,
12219 arg_req: &crate::types::MemberChangeReq,
12220 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError>> {
12221 let mut closure = self.memberChange.closure.lock().unwrap();
12222 let closure: &mut dyn ::std::ops::FnMut(crate::types::MemberChangeReq) -> _ = &mut **closure;
12223 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12224 }
12225 fn checkPeers(
12226 &self,
12227 arg_req: &crate::types::CheckPeersReq,
12228 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError>> {
12229 let mut closure = self.checkPeers.closure.lock().unwrap();
12230 let closure: &mut dyn ::std::ops::FnMut(crate::types::CheckPeersReq) -> _ = &mut **closure;
12231 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12232 }
12233 fn getLeaderPart(
12234 &self,
12235 arg_req: &crate::types::GetLeaderReq,
12236 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError>> {
12237 let mut closure = self.getLeaderPart.closure.lock().unwrap();
12238 let closure: &mut dyn ::std::ops::FnMut(crate::types::GetLeaderReq) -> _ = &mut **closure;
12239 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12240 }
12241 fn createCheckpoint(
12242 &self,
12243 arg_req: &crate::types::CreateCPRequest,
12244 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError>> {
12245 let mut closure = self.createCheckpoint.closure.lock().unwrap();
12246 let closure: &mut dyn ::std::ops::FnMut(crate::types::CreateCPRequest) -> _ = &mut **closure;
12247 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12248 }
12249 fn dropCheckpoint(
12250 &self,
12251 arg_req: &crate::types::DropCPRequest,
12252 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError>> {
12253 let mut closure = self.dropCheckpoint.closure.lock().unwrap();
12254 let closure: &mut dyn ::std::ops::FnMut(crate::types::DropCPRequest) -> _ = &mut **closure;
12255 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12256 }
12257 fn blockingWrites(
12258 &self,
12259 arg_req: &crate::types::BlockingSignRequest,
12260 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError>> {
12261 let mut closure = self.blockingWrites.closure.lock().unwrap();
12262 let closure: &mut dyn ::std::ops::FnMut(crate::types::BlockingSignRequest) -> _ = &mut **closure;
12263 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12264 }
12265 fn rebuildTagIndex(
12266 &self,
12267 arg_req: &crate::types::RebuildIndexRequest,
12268 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError>> {
12269 let mut closure = self.rebuildTagIndex.closure.lock().unwrap();
12270 let closure: &mut dyn ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> _ = &mut **closure;
12271 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12272 }
12273 fn rebuildEdgeIndex(
12274 &self,
12275 arg_req: &crate::types::RebuildIndexRequest,
12276 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError>> {
12277 let mut closure = self.rebuildEdgeIndex.closure.lock().unwrap();
12278 let closure: &mut dyn ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> _ = &mut **closure;
12279 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12280 }
12281 fn put(
12282 &self,
12283 arg_req: &crate::types::PutRequest,
12284 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError>> {
12285 let mut closure = self.put.closure.lock().unwrap();
12286 let closure: &mut dyn ::std::ops::FnMut(crate::types::PutRequest) -> _ = &mut **closure;
12287 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12288 }
12289 fn get(
12290 &self,
12291 arg_req: &crate::types::GetRequest,
12292 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError>> {
12293 let mut closure = self.get.closure.lock().unwrap();
12294 let closure: &mut dyn ::std::ops::FnMut(crate::types::GetRequest) -> _ = &mut **closure;
12295 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12296 }
12297 fn remove(
12298 &self,
12299 arg_req: &crate::types::RemoveRequest,
12300 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError>> {
12301 let mut closure = self.remove.closure.lock().unwrap();
12302 let closure: &mut dyn ::std::ops::FnMut(crate::types::RemoveRequest) -> _ = &mut **closure;
12303 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12304 }
12305 fn removeRange(
12306 &self,
12307 arg_req: &crate::types::RemoveRangeRequest,
12308 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError>> {
12309 let mut closure = self.removeRange.closure.lock().unwrap();
12310 let closure: &mut dyn ::std::ops::FnMut(crate::types::RemoveRangeRequest) -> _ = &mut **closure;
12311 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12312 }
12313 fn getUUID(
12314 &self,
12315 arg_req: &crate::types::GetUUIDReq,
12316 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError>> {
12317 let mut closure = self.getUUID.closure.lock().unwrap();
12318 let closure: &mut dyn ::std::ops::FnMut(crate::types::GetUUIDReq) -> _ = &mut **closure;
12319 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12320 }
12321 fn lookUpIndex(
12322 &self,
12323 arg_req: &crate::types::LookUpIndexRequest,
12324 ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError>> {
12325 let mut closure = self.lookUpIndex.closure.lock().unwrap();
12326 let closure: &mut dyn ::std::ops::FnMut(crate::types::LookUpIndexRequest) -> _ = &mut **closure;
12327 ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
12328 }
12329 }
12330
12331 mod r#impl {
12332 pub mod storage_service {
12333
12334 pub struct getBound<'mock> {
12335 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12336 dyn ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> ::std::result::Result<
12337 crate::types::QueryResponse,
12338 crate::errors::storage_service::GetBoundError,
12339 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12340 >>,
12341 }
12342
12343 #[allow(clippy::redundant_closure)]
12344 impl<'mock> getBound<'mock> {
12345 pub fn unimplemented() -> Self {
12346 Self {
12347 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetNeighborsRequest| panic!(
12348 "{}::{} is not mocked",
12349 "StorageService",
12350 "getBound",
12351 ))),
12352 }
12353 }
12354
12355 pub fn ret(&self, value: crate::types::QueryResponse) {
12356 self.mock(move |_: crate::types::GetNeighborsRequest| value.clone());
12357 }
12358
12359 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> crate::types::QueryResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12360 let mut closure = self.closure.lock().unwrap();
12361 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12362 }
12363
12364 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetBoundError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12365 let mut closure = self.closure.lock().unwrap();
12366 *closure = ::std::boxed::Box::new(move |req| mock(req));
12367 }
12368
12369 pub fn throw<E>(&self, exception: E)
12370 where
12371 E: ::std::convert::Into<crate::errors::storage_service::GetBoundError>,
12372 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12373 {
12374 let mut closure = self.closure.lock().unwrap();
12375 *closure = ::std::boxed::Box::new(move |_: crate::types::GetNeighborsRequest| ::std::result::Result::Err(exception.clone().into()));
12376 }
12377 }
12378
12379 pub struct boundStats<'mock> {
12380 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12381 dyn ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> ::std::result::Result<
12382 crate::types::QueryStatsResponse,
12383 crate::errors::storage_service::BoundStatsError,
12384 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12385 >>,
12386 }
12387
12388 #[allow(clippy::redundant_closure)]
12389 impl<'mock> boundStats<'mock> {
12390 pub fn unimplemented() -> Self {
12391 Self {
12392 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetNeighborsRequest| panic!(
12393 "{}::{} is not mocked",
12394 "StorageService",
12395 "boundStats",
12396 ))),
12397 }
12398 }
12399
12400 pub fn ret(&self, value: crate::types::QueryStatsResponse) {
12401 self.mock(move |_: crate::types::GetNeighborsRequest| value.clone());
12402 }
12403
12404 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> crate::types::QueryStatsResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12405 let mut closure = self.closure.lock().unwrap();
12406 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12407 }
12408
12409 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetNeighborsRequest) -> ::std::result::Result<crate::types::QueryStatsResponse, crate::errors::storage_service::BoundStatsError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12410 let mut closure = self.closure.lock().unwrap();
12411 *closure = ::std::boxed::Box::new(move |req| mock(req));
12412 }
12413
12414 pub fn throw<E>(&self, exception: E)
12415 where
12416 E: ::std::convert::Into<crate::errors::storage_service::BoundStatsError>,
12417 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12418 {
12419 let mut closure = self.closure.lock().unwrap();
12420 *closure = ::std::boxed::Box::new(move |_: crate::types::GetNeighborsRequest| ::std::result::Result::Err(exception.clone().into()));
12421 }
12422 }
12423
12424 pub struct getProps<'mock> {
12425 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12426 dyn ::std::ops::FnMut(crate::types::VertexPropRequest) -> ::std::result::Result<
12427 crate::types::QueryResponse,
12428 crate::errors::storage_service::GetPropsError,
12429 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12430 >>,
12431 }
12432
12433 #[allow(clippy::redundant_closure)]
12434 impl<'mock> getProps<'mock> {
12435 pub fn unimplemented() -> Self {
12436 Self {
12437 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::VertexPropRequest| panic!(
12438 "{}::{} is not mocked",
12439 "StorageService",
12440 "getProps",
12441 ))),
12442 }
12443 }
12444
12445 pub fn ret(&self, value: crate::types::QueryResponse) {
12446 self.mock(move |_: crate::types::VertexPropRequest| value.clone());
12447 }
12448
12449 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::VertexPropRequest) -> crate::types::QueryResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12450 let mut closure = self.closure.lock().unwrap();
12451 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12452 }
12453
12454 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::VertexPropRequest) -> ::std::result::Result<crate::types::QueryResponse, crate::errors::storage_service::GetPropsError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12455 let mut closure = self.closure.lock().unwrap();
12456 *closure = ::std::boxed::Box::new(move |req| mock(req));
12457 }
12458
12459 pub fn throw<E>(&self, exception: E)
12460 where
12461 E: ::std::convert::Into<crate::errors::storage_service::GetPropsError>,
12462 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12463 {
12464 let mut closure = self.closure.lock().unwrap();
12465 *closure = ::std::boxed::Box::new(move |_: crate::types::VertexPropRequest| ::std::result::Result::Err(exception.clone().into()));
12466 }
12467 }
12468
12469 pub struct getEdgeProps<'mock> {
12470 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12471 dyn ::std::ops::FnMut(crate::types::EdgePropRequest) -> ::std::result::Result<
12472 crate::types::EdgePropResponse,
12473 crate::errors::storage_service::GetEdgePropsError,
12474 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12475 >>,
12476 }
12477
12478 #[allow(clippy::redundant_closure)]
12479 impl<'mock> getEdgeProps<'mock> {
12480 pub fn unimplemented() -> Self {
12481 Self {
12482 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::EdgePropRequest| panic!(
12483 "{}::{} is not mocked",
12484 "StorageService",
12485 "getEdgeProps",
12486 ))),
12487 }
12488 }
12489
12490 pub fn ret(&self, value: crate::types::EdgePropResponse) {
12491 self.mock(move |_: crate::types::EdgePropRequest| value.clone());
12492 }
12493
12494 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::EdgePropRequest) -> crate::types::EdgePropResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12495 let mut closure = self.closure.lock().unwrap();
12496 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12497 }
12498
12499 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::EdgePropRequest) -> ::std::result::Result<crate::types::EdgePropResponse, crate::errors::storage_service::GetEdgePropsError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12500 let mut closure = self.closure.lock().unwrap();
12501 *closure = ::std::boxed::Box::new(move |req| mock(req));
12502 }
12503
12504 pub fn throw<E>(&self, exception: E)
12505 where
12506 E: ::std::convert::Into<crate::errors::storage_service::GetEdgePropsError>,
12507 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12508 {
12509 let mut closure = self.closure.lock().unwrap();
12510 *closure = ::std::boxed::Box::new(move |_: crate::types::EdgePropRequest| ::std::result::Result::Err(exception.clone().into()));
12511 }
12512 }
12513
12514 pub struct addVertices<'mock> {
12515 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12516 dyn ::std::ops::FnMut(crate::types::AddVerticesRequest) -> ::std::result::Result<
12517 crate::types::ExecResponse,
12518 crate::errors::storage_service::AddVerticesError,
12519 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12520 >>,
12521 }
12522
12523 #[allow(clippy::redundant_closure)]
12524 impl<'mock> addVertices<'mock> {
12525 pub fn unimplemented() -> Self {
12526 Self {
12527 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddVerticesRequest| panic!(
12528 "{}::{} is not mocked",
12529 "StorageService",
12530 "addVertices",
12531 ))),
12532 }
12533 }
12534
12535 pub fn ret(&self, value: crate::types::ExecResponse) {
12536 self.mock(move |_: crate::types::AddVerticesRequest| value.clone());
12537 }
12538
12539 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddVerticesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12540 let mut closure = self.closure.lock().unwrap();
12541 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12542 }
12543
12544 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddVerticesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddVerticesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12545 let mut closure = self.closure.lock().unwrap();
12546 *closure = ::std::boxed::Box::new(move |req| mock(req));
12547 }
12548
12549 pub fn throw<E>(&self, exception: E)
12550 where
12551 E: ::std::convert::Into<crate::errors::storage_service::AddVerticesError>,
12552 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12553 {
12554 let mut closure = self.closure.lock().unwrap();
12555 *closure = ::std::boxed::Box::new(move |_: crate::types::AddVerticesRequest| ::std::result::Result::Err(exception.clone().into()));
12556 }
12557 }
12558
12559 pub struct addEdges<'mock> {
12560 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12561 dyn ::std::ops::FnMut(crate::types::AddEdgesRequest) -> ::std::result::Result<
12562 crate::types::ExecResponse,
12563 crate::errors::storage_service::AddEdgesError,
12564 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12565 >>,
12566 }
12567
12568 #[allow(clippy::redundant_closure)]
12569 impl<'mock> addEdges<'mock> {
12570 pub fn unimplemented() -> Self {
12571 Self {
12572 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddEdgesRequest| panic!(
12573 "{}::{} is not mocked",
12574 "StorageService",
12575 "addEdges",
12576 ))),
12577 }
12578 }
12579
12580 pub fn ret(&self, value: crate::types::ExecResponse) {
12581 self.mock(move |_: crate::types::AddEdgesRequest| value.clone());
12582 }
12583
12584 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddEdgesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12585 let mut closure = self.closure.lock().unwrap();
12586 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12587 }
12588
12589 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddEdgesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::AddEdgesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12590 let mut closure = self.closure.lock().unwrap();
12591 *closure = ::std::boxed::Box::new(move |req| mock(req));
12592 }
12593
12594 pub fn throw<E>(&self, exception: E)
12595 where
12596 E: ::std::convert::Into<crate::errors::storage_service::AddEdgesError>,
12597 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12598 {
12599 let mut closure = self.closure.lock().unwrap();
12600 *closure = ::std::boxed::Box::new(move |_: crate::types::AddEdgesRequest| ::std::result::Result::Err(exception.clone().into()));
12601 }
12602 }
12603
12604 pub struct deleteEdges<'mock> {
12605 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12606 dyn ::std::ops::FnMut(crate::types::DeleteEdgesRequest) -> ::std::result::Result<
12607 crate::types::ExecResponse,
12608 crate::errors::storage_service::DeleteEdgesError,
12609 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12610 >>,
12611 }
12612
12613 #[allow(clippy::redundant_closure)]
12614 impl<'mock> deleteEdges<'mock> {
12615 pub fn unimplemented() -> Self {
12616 Self {
12617 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::DeleteEdgesRequest| panic!(
12618 "{}::{} is not mocked",
12619 "StorageService",
12620 "deleteEdges",
12621 ))),
12622 }
12623 }
12624
12625 pub fn ret(&self, value: crate::types::ExecResponse) {
12626 self.mock(move |_: crate::types::DeleteEdgesRequest| value.clone());
12627 }
12628
12629 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteEdgesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12630 let mut closure = self.closure.lock().unwrap();
12631 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12632 }
12633
12634 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteEdgesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteEdgesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12635 let mut closure = self.closure.lock().unwrap();
12636 *closure = ::std::boxed::Box::new(move |req| mock(req));
12637 }
12638
12639 pub fn throw<E>(&self, exception: E)
12640 where
12641 E: ::std::convert::Into<crate::errors::storage_service::DeleteEdgesError>,
12642 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12643 {
12644 let mut closure = self.closure.lock().unwrap();
12645 *closure = ::std::boxed::Box::new(move |_: crate::types::DeleteEdgesRequest| ::std::result::Result::Err(exception.clone().into()));
12646 }
12647 }
12648
12649 pub struct deleteVertices<'mock> {
12650 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12651 dyn ::std::ops::FnMut(crate::types::DeleteVerticesRequest) -> ::std::result::Result<
12652 crate::types::ExecResponse,
12653 crate::errors::storage_service::DeleteVerticesError,
12654 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12655 >>,
12656 }
12657
12658 #[allow(clippy::redundant_closure)]
12659 impl<'mock> deleteVertices<'mock> {
12660 pub fn unimplemented() -> Self {
12661 Self {
12662 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::DeleteVerticesRequest| panic!(
12663 "{}::{} is not mocked",
12664 "StorageService",
12665 "deleteVertices",
12666 ))),
12667 }
12668 }
12669
12670 pub fn ret(&self, value: crate::types::ExecResponse) {
12671 self.mock(move |_: crate::types::DeleteVerticesRequest| value.clone());
12672 }
12673
12674 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteVerticesRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12675 let mut closure = self.closure.lock().unwrap();
12676 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12677 }
12678
12679 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::DeleteVerticesRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::DeleteVerticesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12680 let mut closure = self.closure.lock().unwrap();
12681 *closure = ::std::boxed::Box::new(move |req| mock(req));
12682 }
12683
12684 pub fn throw<E>(&self, exception: E)
12685 where
12686 E: ::std::convert::Into<crate::errors::storage_service::DeleteVerticesError>,
12687 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12688 {
12689 let mut closure = self.closure.lock().unwrap();
12690 *closure = ::std::boxed::Box::new(move |_: crate::types::DeleteVerticesRequest| ::std::result::Result::Err(exception.clone().into()));
12691 }
12692 }
12693
12694 pub struct updateVertex<'mock> {
12695 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12696 dyn ::std::ops::FnMut(crate::types::UpdateVertexRequest) -> ::std::result::Result<
12697 crate::types::UpdateResponse,
12698 crate::errors::storage_service::UpdateVertexError,
12699 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12700 >>,
12701 }
12702
12703 #[allow(clippy::redundant_closure)]
12704 impl<'mock> updateVertex<'mock> {
12705 pub fn unimplemented() -> Self {
12706 Self {
12707 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::UpdateVertexRequest| panic!(
12708 "{}::{} is not mocked",
12709 "StorageService",
12710 "updateVertex",
12711 ))),
12712 }
12713 }
12714
12715 pub fn ret(&self, value: crate::types::UpdateResponse) {
12716 self.mock(move |_: crate::types::UpdateVertexRequest| value.clone());
12717 }
12718
12719 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateVertexRequest) -> crate::types::UpdateResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12720 let mut closure = self.closure.lock().unwrap();
12721 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12722 }
12723
12724 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateVertexRequest) -> ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateVertexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12725 let mut closure = self.closure.lock().unwrap();
12726 *closure = ::std::boxed::Box::new(move |req| mock(req));
12727 }
12728
12729 pub fn throw<E>(&self, exception: E)
12730 where
12731 E: ::std::convert::Into<crate::errors::storage_service::UpdateVertexError>,
12732 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12733 {
12734 let mut closure = self.closure.lock().unwrap();
12735 *closure = ::std::boxed::Box::new(move |_: crate::types::UpdateVertexRequest| ::std::result::Result::Err(exception.clone().into()));
12736 }
12737 }
12738
12739 pub struct updateEdge<'mock> {
12740 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12741 dyn ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> ::std::result::Result<
12742 crate::types::UpdateResponse,
12743 crate::errors::storage_service::UpdateEdgeError,
12744 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12745 >>,
12746 }
12747
12748 #[allow(clippy::redundant_closure)]
12749 impl<'mock> updateEdge<'mock> {
12750 pub fn unimplemented() -> Self {
12751 Self {
12752 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::UpdateEdgeRequest| panic!(
12753 "{}::{} is not mocked",
12754 "StorageService",
12755 "updateEdge",
12756 ))),
12757 }
12758 }
12759
12760 pub fn ret(&self, value: crate::types::UpdateResponse) {
12761 self.mock(move |_: crate::types::UpdateEdgeRequest| value.clone());
12762 }
12763
12764 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> crate::types::UpdateResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12765 let mut closure = self.closure.lock().unwrap();
12766 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12767 }
12768
12769 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateEdgeRequest) -> ::std::result::Result<crate::types::UpdateResponse, crate::errors::storage_service::UpdateEdgeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12770 let mut closure = self.closure.lock().unwrap();
12771 *closure = ::std::boxed::Box::new(move |req| mock(req));
12772 }
12773
12774 pub fn throw<E>(&self, exception: E)
12775 where
12776 E: ::std::convert::Into<crate::errors::storage_service::UpdateEdgeError>,
12777 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12778 {
12779 let mut closure = self.closure.lock().unwrap();
12780 *closure = ::std::boxed::Box::new(move |_: crate::types::UpdateEdgeRequest| ::std::result::Result::Err(exception.clone().into()));
12781 }
12782 }
12783
12784 pub struct scanEdge<'mock> {
12785 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12786 dyn ::std::ops::FnMut(crate::types::ScanEdgeRequest) -> ::std::result::Result<
12787 crate::types::ScanEdgeResponse,
12788 crate::errors::storage_service::ScanEdgeError,
12789 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12790 >>,
12791 }
12792
12793 #[allow(clippy::redundant_closure)]
12794 impl<'mock> scanEdge<'mock> {
12795 pub fn unimplemented() -> Self {
12796 Self {
12797 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ScanEdgeRequest| panic!(
12798 "{}::{} is not mocked",
12799 "StorageService",
12800 "scanEdge",
12801 ))),
12802 }
12803 }
12804
12805 pub fn ret(&self, value: crate::types::ScanEdgeResponse) {
12806 self.mock(move |_: crate::types::ScanEdgeRequest| value.clone());
12807 }
12808
12809 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ScanEdgeRequest) -> crate::types::ScanEdgeResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12810 let mut closure = self.closure.lock().unwrap();
12811 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12812 }
12813
12814 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ScanEdgeRequest) -> ::std::result::Result<crate::types::ScanEdgeResponse, crate::errors::storage_service::ScanEdgeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12815 let mut closure = self.closure.lock().unwrap();
12816 *closure = ::std::boxed::Box::new(move |req| mock(req));
12817 }
12818
12819 pub fn throw<E>(&self, exception: E)
12820 where
12821 E: ::std::convert::Into<crate::errors::storage_service::ScanEdgeError>,
12822 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12823 {
12824 let mut closure = self.closure.lock().unwrap();
12825 *closure = ::std::boxed::Box::new(move |_: crate::types::ScanEdgeRequest| ::std::result::Result::Err(exception.clone().into()));
12826 }
12827 }
12828
12829 pub struct scanVertex<'mock> {
12830 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12831 dyn ::std::ops::FnMut(crate::types::ScanVertexRequest) -> ::std::result::Result<
12832 crate::types::ScanVertexResponse,
12833 crate::errors::storage_service::ScanVertexError,
12834 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12835 >>,
12836 }
12837
12838 #[allow(clippy::redundant_closure)]
12839 impl<'mock> scanVertex<'mock> {
12840 pub fn unimplemented() -> Self {
12841 Self {
12842 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ScanVertexRequest| panic!(
12843 "{}::{} is not mocked",
12844 "StorageService",
12845 "scanVertex",
12846 ))),
12847 }
12848 }
12849
12850 pub fn ret(&self, value: crate::types::ScanVertexResponse) {
12851 self.mock(move |_: crate::types::ScanVertexRequest| value.clone());
12852 }
12853
12854 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ScanVertexRequest) -> crate::types::ScanVertexResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12855 let mut closure = self.closure.lock().unwrap();
12856 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12857 }
12858
12859 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ScanVertexRequest) -> ::std::result::Result<crate::types::ScanVertexResponse, crate::errors::storage_service::ScanVertexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12860 let mut closure = self.closure.lock().unwrap();
12861 *closure = ::std::boxed::Box::new(move |req| mock(req));
12862 }
12863
12864 pub fn throw<E>(&self, exception: E)
12865 where
12866 E: ::std::convert::Into<crate::errors::storage_service::ScanVertexError>,
12867 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12868 {
12869 let mut closure = self.closure.lock().unwrap();
12870 *closure = ::std::boxed::Box::new(move |_: crate::types::ScanVertexRequest| ::std::result::Result::Err(exception.clone().into()));
12871 }
12872 }
12873
12874 pub struct transLeader<'mock> {
12875 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12876 dyn ::std::ops::FnMut(crate::types::TransLeaderReq) -> ::std::result::Result<
12877 crate::types::AdminExecResp,
12878 crate::errors::storage_service::TransLeaderError,
12879 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12880 >>,
12881 }
12882
12883 #[allow(clippy::redundant_closure)]
12884 impl<'mock> transLeader<'mock> {
12885 pub fn unimplemented() -> Self {
12886 Self {
12887 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::TransLeaderReq| panic!(
12888 "{}::{} is not mocked",
12889 "StorageService",
12890 "transLeader",
12891 ))),
12892 }
12893 }
12894
12895 pub fn ret(&self, value: crate::types::AdminExecResp) {
12896 self.mock(move |_: crate::types::TransLeaderReq| value.clone());
12897 }
12898
12899 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::TransLeaderReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12900 let mut closure = self.closure.lock().unwrap();
12901 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12902 }
12903
12904 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::TransLeaderReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::TransLeaderError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12905 let mut closure = self.closure.lock().unwrap();
12906 *closure = ::std::boxed::Box::new(move |req| mock(req));
12907 }
12908
12909 pub fn throw<E>(&self, exception: E)
12910 where
12911 E: ::std::convert::Into<crate::errors::storage_service::TransLeaderError>,
12912 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12913 {
12914 let mut closure = self.closure.lock().unwrap();
12915 *closure = ::std::boxed::Box::new(move |_: crate::types::TransLeaderReq| ::std::result::Result::Err(exception.clone().into()));
12916 }
12917 }
12918
12919 pub struct addPart<'mock> {
12920 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12921 dyn ::std::ops::FnMut(crate::types::AddPartReq) -> ::std::result::Result<
12922 crate::types::AdminExecResp,
12923 crate::errors::storage_service::AddPartError,
12924 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12925 >>,
12926 }
12927
12928 #[allow(clippy::redundant_closure)]
12929 impl<'mock> addPart<'mock> {
12930 pub fn unimplemented() -> Self {
12931 Self {
12932 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddPartReq| panic!(
12933 "{}::{} is not mocked",
12934 "StorageService",
12935 "addPart",
12936 ))),
12937 }
12938 }
12939
12940 pub fn ret(&self, value: crate::types::AdminExecResp) {
12941 self.mock(move |_: crate::types::AddPartReq| value.clone());
12942 }
12943
12944 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddPartReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12945 let mut closure = self.closure.lock().unwrap();
12946 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12947 }
12948
12949 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddPartReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddPartError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12950 let mut closure = self.closure.lock().unwrap();
12951 *closure = ::std::boxed::Box::new(move |req| mock(req));
12952 }
12953
12954 pub fn throw<E>(&self, exception: E)
12955 where
12956 E: ::std::convert::Into<crate::errors::storage_service::AddPartError>,
12957 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
12958 {
12959 let mut closure = self.closure.lock().unwrap();
12960 *closure = ::std::boxed::Box::new(move |_: crate::types::AddPartReq| ::std::result::Result::Err(exception.clone().into()));
12961 }
12962 }
12963
12964 pub struct addLearner<'mock> {
12965 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
12966 dyn ::std::ops::FnMut(crate::types::AddLearnerReq) -> ::std::result::Result<
12967 crate::types::AdminExecResp,
12968 crate::errors::storage_service::AddLearnerError,
12969 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
12970 >>,
12971 }
12972
12973 #[allow(clippy::redundant_closure)]
12974 impl<'mock> addLearner<'mock> {
12975 pub fn unimplemented() -> Self {
12976 Self {
12977 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::AddLearnerReq| panic!(
12978 "{}::{} is not mocked",
12979 "StorageService",
12980 "addLearner",
12981 ))),
12982 }
12983 }
12984
12985 pub fn ret(&self, value: crate::types::AdminExecResp) {
12986 self.mock(move |_: crate::types::AddLearnerReq| value.clone());
12987 }
12988
12989 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddLearnerReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12990 let mut closure = self.closure.lock().unwrap();
12991 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
12992 }
12993
12994 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::AddLearnerReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::AddLearnerError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
12995 let mut closure = self.closure.lock().unwrap();
12996 *closure = ::std::boxed::Box::new(move |req| mock(req));
12997 }
12998
12999 pub fn throw<E>(&self, exception: E)
13000 where
13001 E: ::std::convert::Into<crate::errors::storage_service::AddLearnerError>,
13002 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13003 {
13004 let mut closure = self.closure.lock().unwrap();
13005 *closure = ::std::boxed::Box::new(move |_: crate::types::AddLearnerReq| ::std::result::Result::Err(exception.clone().into()));
13006 }
13007 }
13008
13009 pub struct waitingForCatchUpData<'mock> {
13010 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13011 dyn ::std::ops::FnMut(crate::types::CatchUpDataReq) -> ::std::result::Result<
13012 crate::types::AdminExecResp,
13013 crate::errors::storage_service::WaitingForCatchUpDataError,
13014 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13015 >>,
13016 }
13017
13018 #[allow(clippy::redundant_closure)]
13019 impl<'mock> waitingForCatchUpData<'mock> {
13020 pub fn unimplemented() -> Self {
13021 Self {
13022 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::CatchUpDataReq| panic!(
13023 "{}::{} is not mocked",
13024 "StorageService",
13025 "waitingForCatchUpData",
13026 ))),
13027 }
13028 }
13029
13030 pub fn ret(&self, value: crate::types::AdminExecResp) {
13031 self.mock(move |_: crate::types::CatchUpDataReq| value.clone());
13032 }
13033
13034 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::CatchUpDataReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13035 let mut closure = self.closure.lock().unwrap();
13036 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13037 }
13038
13039 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::CatchUpDataReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::WaitingForCatchUpDataError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13040 let mut closure = self.closure.lock().unwrap();
13041 *closure = ::std::boxed::Box::new(move |req| mock(req));
13042 }
13043
13044 pub fn throw<E>(&self, exception: E)
13045 where
13046 E: ::std::convert::Into<crate::errors::storage_service::WaitingForCatchUpDataError>,
13047 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13048 {
13049 let mut closure = self.closure.lock().unwrap();
13050 *closure = ::std::boxed::Box::new(move |_: crate::types::CatchUpDataReq| ::std::result::Result::Err(exception.clone().into()));
13051 }
13052 }
13053
13054 pub struct removePart<'mock> {
13055 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13056 dyn ::std::ops::FnMut(crate::types::RemovePartReq) -> ::std::result::Result<
13057 crate::types::AdminExecResp,
13058 crate::errors::storage_service::RemovePartError,
13059 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13060 >>,
13061 }
13062
13063 #[allow(clippy::redundant_closure)]
13064 impl<'mock> removePart<'mock> {
13065 pub fn unimplemented() -> Self {
13066 Self {
13067 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::RemovePartReq| panic!(
13068 "{}::{} is not mocked",
13069 "StorageService",
13070 "removePart",
13071 ))),
13072 }
13073 }
13074
13075 pub fn ret(&self, value: crate::types::AdminExecResp) {
13076 self.mock(move |_: crate::types::RemovePartReq| value.clone());
13077 }
13078
13079 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::RemovePartReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13080 let mut closure = self.closure.lock().unwrap();
13081 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13082 }
13083
13084 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::RemovePartReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RemovePartError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13085 let mut closure = self.closure.lock().unwrap();
13086 *closure = ::std::boxed::Box::new(move |req| mock(req));
13087 }
13088
13089 pub fn throw<E>(&self, exception: E)
13090 where
13091 E: ::std::convert::Into<crate::errors::storage_service::RemovePartError>,
13092 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13093 {
13094 let mut closure = self.closure.lock().unwrap();
13095 *closure = ::std::boxed::Box::new(move |_: crate::types::RemovePartReq| ::std::result::Result::Err(exception.clone().into()));
13096 }
13097 }
13098
13099 pub struct memberChange<'mock> {
13100 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13101 dyn ::std::ops::FnMut(crate::types::MemberChangeReq) -> ::std::result::Result<
13102 crate::types::AdminExecResp,
13103 crate::errors::storage_service::MemberChangeError,
13104 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13105 >>,
13106 }
13107
13108 #[allow(clippy::redundant_closure)]
13109 impl<'mock> memberChange<'mock> {
13110 pub fn unimplemented() -> Self {
13111 Self {
13112 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::MemberChangeReq| panic!(
13113 "{}::{} is not mocked",
13114 "StorageService",
13115 "memberChange",
13116 ))),
13117 }
13118 }
13119
13120 pub fn ret(&self, value: crate::types::AdminExecResp) {
13121 self.mock(move |_: crate::types::MemberChangeReq| value.clone());
13122 }
13123
13124 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::MemberChangeReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13125 let mut closure = self.closure.lock().unwrap();
13126 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13127 }
13128
13129 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::MemberChangeReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::MemberChangeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13130 let mut closure = self.closure.lock().unwrap();
13131 *closure = ::std::boxed::Box::new(move |req| mock(req));
13132 }
13133
13134 pub fn throw<E>(&self, exception: E)
13135 where
13136 E: ::std::convert::Into<crate::errors::storage_service::MemberChangeError>,
13137 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13138 {
13139 let mut closure = self.closure.lock().unwrap();
13140 *closure = ::std::boxed::Box::new(move |_: crate::types::MemberChangeReq| ::std::result::Result::Err(exception.clone().into()));
13141 }
13142 }
13143
13144 pub struct checkPeers<'mock> {
13145 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13146 dyn ::std::ops::FnMut(crate::types::CheckPeersReq) -> ::std::result::Result<
13147 crate::types::AdminExecResp,
13148 crate::errors::storage_service::CheckPeersError,
13149 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13150 >>,
13151 }
13152
13153 #[allow(clippy::redundant_closure)]
13154 impl<'mock> checkPeers<'mock> {
13155 pub fn unimplemented() -> Self {
13156 Self {
13157 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::CheckPeersReq| panic!(
13158 "{}::{} is not mocked",
13159 "StorageService",
13160 "checkPeers",
13161 ))),
13162 }
13163 }
13164
13165 pub fn ret(&self, value: crate::types::AdminExecResp) {
13166 self.mock(move |_: crate::types::CheckPeersReq| value.clone());
13167 }
13168
13169 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::CheckPeersReq) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13170 let mut closure = self.closure.lock().unwrap();
13171 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13172 }
13173
13174 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::CheckPeersReq) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CheckPeersError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13175 let mut closure = self.closure.lock().unwrap();
13176 *closure = ::std::boxed::Box::new(move |req| mock(req));
13177 }
13178
13179 pub fn throw<E>(&self, exception: E)
13180 where
13181 E: ::std::convert::Into<crate::errors::storage_service::CheckPeersError>,
13182 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13183 {
13184 let mut closure = self.closure.lock().unwrap();
13185 *closure = ::std::boxed::Box::new(move |_: crate::types::CheckPeersReq| ::std::result::Result::Err(exception.clone().into()));
13186 }
13187 }
13188
13189 pub struct getLeaderPart<'mock> {
13190 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13191 dyn ::std::ops::FnMut(crate::types::GetLeaderReq) -> ::std::result::Result<
13192 crate::types::GetLeaderResp,
13193 crate::errors::storage_service::GetLeaderPartError,
13194 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13195 >>,
13196 }
13197
13198 #[allow(clippy::redundant_closure)]
13199 impl<'mock> getLeaderPart<'mock> {
13200 pub fn unimplemented() -> Self {
13201 Self {
13202 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetLeaderReq| panic!(
13203 "{}::{} is not mocked",
13204 "StorageService",
13205 "getLeaderPart",
13206 ))),
13207 }
13208 }
13209
13210 pub fn ret(&self, value: crate::types::GetLeaderResp) {
13211 self.mock(move |_: crate::types::GetLeaderReq| value.clone());
13212 }
13213
13214 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetLeaderReq) -> crate::types::GetLeaderResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13215 let mut closure = self.closure.lock().unwrap();
13216 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13217 }
13218
13219 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetLeaderReq) -> ::std::result::Result<crate::types::GetLeaderResp, crate::errors::storage_service::GetLeaderPartError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13220 let mut closure = self.closure.lock().unwrap();
13221 *closure = ::std::boxed::Box::new(move |req| mock(req));
13222 }
13223
13224 pub fn throw<E>(&self, exception: E)
13225 where
13226 E: ::std::convert::Into<crate::errors::storage_service::GetLeaderPartError>,
13227 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13228 {
13229 let mut closure = self.closure.lock().unwrap();
13230 *closure = ::std::boxed::Box::new(move |_: crate::types::GetLeaderReq| ::std::result::Result::Err(exception.clone().into()));
13231 }
13232 }
13233
13234 pub struct createCheckpoint<'mock> {
13235 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13236 dyn ::std::ops::FnMut(crate::types::CreateCPRequest) -> ::std::result::Result<
13237 crate::types::AdminExecResp,
13238 crate::errors::storage_service::CreateCheckpointError,
13239 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13240 >>,
13241 }
13242
13243 #[allow(clippy::redundant_closure)]
13244 impl<'mock> createCheckpoint<'mock> {
13245 pub fn unimplemented() -> Self {
13246 Self {
13247 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::CreateCPRequest| panic!(
13248 "{}::{} is not mocked",
13249 "StorageService",
13250 "createCheckpoint",
13251 ))),
13252 }
13253 }
13254
13255 pub fn ret(&self, value: crate::types::AdminExecResp) {
13256 self.mock(move |_: crate::types::CreateCPRequest| value.clone());
13257 }
13258
13259 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::CreateCPRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13260 let mut closure = self.closure.lock().unwrap();
13261 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13262 }
13263
13264 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::CreateCPRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::CreateCheckpointError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13265 let mut closure = self.closure.lock().unwrap();
13266 *closure = ::std::boxed::Box::new(move |req| mock(req));
13267 }
13268
13269 pub fn throw<E>(&self, exception: E)
13270 where
13271 E: ::std::convert::Into<crate::errors::storage_service::CreateCheckpointError>,
13272 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13273 {
13274 let mut closure = self.closure.lock().unwrap();
13275 *closure = ::std::boxed::Box::new(move |_: crate::types::CreateCPRequest| ::std::result::Result::Err(exception.clone().into()));
13276 }
13277 }
13278
13279 pub struct dropCheckpoint<'mock> {
13280 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13281 dyn ::std::ops::FnMut(crate::types::DropCPRequest) -> ::std::result::Result<
13282 crate::types::AdminExecResp,
13283 crate::errors::storage_service::DropCheckpointError,
13284 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13285 >>,
13286 }
13287
13288 #[allow(clippy::redundant_closure)]
13289 impl<'mock> dropCheckpoint<'mock> {
13290 pub fn unimplemented() -> Self {
13291 Self {
13292 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::DropCPRequest| panic!(
13293 "{}::{} is not mocked",
13294 "StorageService",
13295 "dropCheckpoint",
13296 ))),
13297 }
13298 }
13299
13300 pub fn ret(&self, value: crate::types::AdminExecResp) {
13301 self.mock(move |_: crate::types::DropCPRequest| value.clone());
13302 }
13303
13304 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::DropCPRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13305 let mut closure = self.closure.lock().unwrap();
13306 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13307 }
13308
13309 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::DropCPRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::DropCheckpointError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13310 let mut closure = self.closure.lock().unwrap();
13311 *closure = ::std::boxed::Box::new(move |req| mock(req));
13312 }
13313
13314 pub fn throw<E>(&self, exception: E)
13315 where
13316 E: ::std::convert::Into<crate::errors::storage_service::DropCheckpointError>,
13317 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13318 {
13319 let mut closure = self.closure.lock().unwrap();
13320 *closure = ::std::boxed::Box::new(move |_: crate::types::DropCPRequest| ::std::result::Result::Err(exception.clone().into()));
13321 }
13322 }
13323
13324 pub struct blockingWrites<'mock> {
13325 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13326 dyn ::std::ops::FnMut(crate::types::BlockingSignRequest) -> ::std::result::Result<
13327 crate::types::AdminExecResp,
13328 crate::errors::storage_service::BlockingWritesError,
13329 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13330 >>,
13331 }
13332
13333 #[allow(clippy::redundant_closure)]
13334 impl<'mock> blockingWrites<'mock> {
13335 pub fn unimplemented() -> Self {
13336 Self {
13337 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::BlockingSignRequest| panic!(
13338 "{}::{} is not mocked",
13339 "StorageService",
13340 "blockingWrites",
13341 ))),
13342 }
13343 }
13344
13345 pub fn ret(&self, value: crate::types::AdminExecResp) {
13346 self.mock(move |_: crate::types::BlockingSignRequest| value.clone());
13347 }
13348
13349 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::BlockingSignRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13350 let mut closure = self.closure.lock().unwrap();
13351 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13352 }
13353
13354 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::BlockingSignRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::BlockingWritesError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13355 let mut closure = self.closure.lock().unwrap();
13356 *closure = ::std::boxed::Box::new(move |req| mock(req));
13357 }
13358
13359 pub fn throw<E>(&self, exception: E)
13360 where
13361 E: ::std::convert::Into<crate::errors::storage_service::BlockingWritesError>,
13362 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13363 {
13364 let mut closure = self.closure.lock().unwrap();
13365 *closure = ::std::boxed::Box::new(move |_: crate::types::BlockingSignRequest| ::std::result::Result::Err(exception.clone().into()));
13366 }
13367 }
13368
13369 pub struct rebuildTagIndex<'mock> {
13370 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13371 dyn ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> ::std::result::Result<
13372 crate::types::AdminExecResp,
13373 crate::errors::storage_service::RebuildTagIndexError,
13374 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13375 >>,
13376 }
13377
13378 #[allow(clippy::redundant_closure)]
13379 impl<'mock> rebuildTagIndex<'mock> {
13380 pub fn unimplemented() -> Self {
13381 Self {
13382 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::RebuildIndexRequest| panic!(
13383 "{}::{} is not mocked",
13384 "StorageService",
13385 "rebuildTagIndex",
13386 ))),
13387 }
13388 }
13389
13390 pub fn ret(&self, value: crate::types::AdminExecResp) {
13391 self.mock(move |_: crate::types::RebuildIndexRequest| value.clone());
13392 }
13393
13394 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13395 let mut closure = self.closure.lock().unwrap();
13396 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13397 }
13398
13399 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildTagIndexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13400 let mut closure = self.closure.lock().unwrap();
13401 *closure = ::std::boxed::Box::new(move |req| mock(req));
13402 }
13403
13404 pub fn throw<E>(&self, exception: E)
13405 where
13406 E: ::std::convert::Into<crate::errors::storage_service::RebuildTagIndexError>,
13407 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13408 {
13409 let mut closure = self.closure.lock().unwrap();
13410 *closure = ::std::boxed::Box::new(move |_: crate::types::RebuildIndexRequest| ::std::result::Result::Err(exception.clone().into()));
13411 }
13412 }
13413
13414 pub struct rebuildEdgeIndex<'mock> {
13415 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13416 dyn ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> ::std::result::Result<
13417 crate::types::AdminExecResp,
13418 crate::errors::storage_service::RebuildEdgeIndexError,
13419 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13420 >>,
13421 }
13422
13423 #[allow(clippy::redundant_closure)]
13424 impl<'mock> rebuildEdgeIndex<'mock> {
13425 pub fn unimplemented() -> Self {
13426 Self {
13427 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::RebuildIndexRequest| panic!(
13428 "{}::{} is not mocked",
13429 "StorageService",
13430 "rebuildEdgeIndex",
13431 ))),
13432 }
13433 }
13434
13435 pub fn ret(&self, value: crate::types::AdminExecResp) {
13436 self.mock(move |_: crate::types::RebuildIndexRequest| value.clone());
13437 }
13438
13439 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> crate::types::AdminExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13440 let mut closure = self.closure.lock().unwrap();
13441 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13442 }
13443
13444 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::RebuildIndexRequest) -> ::std::result::Result<crate::types::AdminExecResp, crate::errors::storage_service::RebuildEdgeIndexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13445 let mut closure = self.closure.lock().unwrap();
13446 *closure = ::std::boxed::Box::new(move |req| mock(req));
13447 }
13448
13449 pub fn throw<E>(&self, exception: E)
13450 where
13451 E: ::std::convert::Into<crate::errors::storage_service::RebuildEdgeIndexError>,
13452 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13453 {
13454 let mut closure = self.closure.lock().unwrap();
13455 *closure = ::std::boxed::Box::new(move |_: crate::types::RebuildIndexRequest| ::std::result::Result::Err(exception.clone().into()));
13456 }
13457 }
13458
13459 pub struct put<'mock> {
13460 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13461 dyn ::std::ops::FnMut(crate::types::PutRequest) -> ::std::result::Result<
13462 crate::types::ExecResponse,
13463 crate::errors::storage_service::PutError,
13464 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13465 >>,
13466 }
13467
13468 #[allow(clippy::redundant_closure)]
13469 impl<'mock> put<'mock> {
13470 pub fn unimplemented() -> Self {
13471 Self {
13472 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::PutRequest| panic!(
13473 "{}::{} is not mocked",
13474 "StorageService",
13475 "put",
13476 ))),
13477 }
13478 }
13479
13480 pub fn ret(&self, value: crate::types::ExecResponse) {
13481 self.mock(move |_: crate::types::PutRequest| value.clone());
13482 }
13483
13484 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::PutRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13485 let mut closure = self.closure.lock().unwrap();
13486 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13487 }
13488
13489 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::PutRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::PutError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13490 let mut closure = self.closure.lock().unwrap();
13491 *closure = ::std::boxed::Box::new(move |req| mock(req));
13492 }
13493
13494 pub fn throw<E>(&self, exception: E)
13495 where
13496 E: ::std::convert::Into<crate::errors::storage_service::PutError>,
13497 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13498 {
13499 let mut closure = self.closure.lock().unwrap();
13500 *closure = ::std::boxed::Box::new(move |_: crate::types::PutRequest| ::std::result::Result::Err(exception.clone().into()));
13501 }
13502 }
13503
13504 pub struct get<'mock> {
13505 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13506 dyn ::std::ops::FnMut(crate::types::GetRequest) -> ::std::result::Result<
13507 crate::types::GeneralResponse,
13508 crate::errors::storage_service::GetError,
13509 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13510 >>,
13511 }
13512
13513 #[allow(clippy::redundant_closure)]
13514 impl<'mock> get<'mock> {
13515 pub fn unimplemented() -> Self {
13516 Self {
13517 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetRequest| panic!(
13518 "{}::{} is not mocked",
13519 "StorageService",
13520 "get",
13521 ))),
13522 }
13523 }
13524
13525 pub fn ret(&self, value: crate::types::GeneralResponse) {
13526 self.mock(move |_: crate::types::GetRequest| value.clone());
13527 }
13528
13529 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetRequest) -> crate::types::GeneralResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13530 let mut closure = self.closure.lock().unwrap();
13531 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13532 }
13533
13534 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetRequest) -> ::std::result::Result<crate::types::GeneralResponse, crate::errors::storage_service::GetError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13535 let mut closure = self.closure.lock().unwrap();
13536 *closure = ::std::boxed::Box::new(move |req| mock(req));
13537 }
13538
13539 pub fn throw<E>(&self, exception: E)
13540 where
13541 E: ::std::convert::Into<crate::errors::storage_service::GetError>,
13542 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13543 {
13544 let mut closure = self.closure.lock().unwrap();
13545 *closure = ::std::boxed::Box::new(move |_: crate::types::GetRequest| ::std::result::Result::Err(exception.clone().into()));
13546 }
13547 }
13548
13549 pub struct remove<'mock> {
13550 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13551 dyn ::std::ops::FnMut(crate::types::RemoveRequest) -> ::std::result::Result<
13552 crate::types::ExecResponse,
13553 crate::errors::storage_service::RemoveError,
13554 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13555 >>,
13556 }
13557
13558 #[allow(clippy::redundant_closure)]
13559 impl<'mock> remove<'mock> {
13560 pub fn unimplemented() -> Self {
13561 Self {
13562 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::RemoveRequest| panic!(
13563 "{}::{} is not mocked",
13564 "StorageService",
13565 "remove",
13566 ))),
13567 }
13568 }
13569
13570 pub fn ret(&self, value: crate::types::ExecResponse) {
13571 self.mock(move |_: crate::types::RemoveRequest| value.clone());
13572 }
13573
13574 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::RemoveRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13575 let mut closure = self.closure.lock().unwrap();
13576 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13577 }
13578
13579 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::RemoveRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13580 let mut closure = self.closure.lock().unwrap();
13581 *closure = ::std::boxed::Box::new(move |req| mock(req));
13582 }
13583
13584 pub fn throw<E>(&self, exception: E)
13585 where
13586 E: ::std::convert::Into<crate::errors::storage_service::RemoveError>,
13587 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13588 {
13589 let mut closure = self.closure.lock().unwrap();
13590 *closure = ::std::boxed::Box::new(move |_: crate::types::RemoveRequest| ::std::result::Result::Err(exception.clone().into()));
13591 }
13592 }
13593
13594 pub struct removeRange<'mock> {
13595 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13596 dyn ::std::ops::FnMut(crate::types::RemoveRangeRequest) -> ::std::result::Result<
13597 crate::types::ExecResponse,
13598 crate::errors::storage_service::RemoveRangeError,
13599 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13600 >>,
13601 }
13602
13603 #[allow(clippy::redundant_closure)]
13604 impl<'mock> removeRange<'mock> {
13605 pub fn unimplemented() -> Self {
13606 Self {
13607 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::RemoveRangeRequest| panic!(
13608 "{}::{} is not mocked",
13609 "StorageService",
13610 "removeRange",
13611 ))),
13612 }
13613 }
13614
13615 pub fn ret(&self, value: crate::types::ExecResponse) {
13616 self.mock(move |_: crate::types::RemoveRangeRequest| value.clone());
13617 }
13618
13619 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::RemoveRangeRequest) -> crate::types::ExecResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13620 let mut closure = self.closure.lock().unwrap();
13621 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13622 }
13623
13624 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::RemoveRangeRequest) -> ::std::result::Result<crate::types::ExecResponse, crate::errors::storage_service::RemoveRangeError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13625 let mut closure = self.closure.lock().unwrap();
13626 *closure = ::std::boxed::Box::new(move |req| mock(req));
13627 }
13628
13629 pub fn throw<E>(&self, exception: E)
13630 where
13631 E: ::std::convert::Into<crate::errors::storage_service::RemoveRangeError>,
13632 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13633 {
13634 let mut closure = self.closure.lock().unwrap();
13635 *closure = ::std::boxed::Box::new(move |_: crate::types::RemoveRangeRequest| ::std::result::Result::Err(exception.clone().into()));
13636 }
13637 }
13638
13639 pub struct getUUID<'mock> {
13640 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13641 dyn ::std::ops::FnMut(crate::types::GetUUIDReq) -> ::std::result::Result<
13642 crate::types::GetUUIDResp,
13643 crate::errors::storage_service::GetUUIDError,
13644 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13645 >>,
13646 }
13647
13648 #[allow(clippy::redundant_closure)]
13649 impl<'mock> getUUID<'mock> {
13650 pub fn unimplemented() -> Self {
13651 Self {
13652 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetUUIDReq| panic!(
13653 "{}::{} is not mocked",
13654 "StorageService",
13655 "getUUID",
13656 ))),
13657 }
13658 }
13659
13660 pub fn ret(&self, value: crate::types::GetUUIDResp) {
13661 self.mock(move |_: crate::types::GetUUIDReq| value.clone());
13662 }
13663
13664 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetUUIDReq) -> crate::types::GetUUIDResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13665 let mut closure = self.closure.lock().unwrap();
13666 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13667 }
13668
13669 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetUUIDReq) -> ::std::result::Result<crate::types::GetUUIDResp, crate::errors::storage_service::GetUUIDError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13670 let mut closure = self.closure.lock().unwrap();
13671 *closure = ::std::boxed::Box::new(move |req| mock(req));
13672 }
13673
13674 pub fn throw<E>(&self, exception: E)
13675 where
13676 E: ::std::convert::Into<crate::errors::storage_service::GetUUIDError>,
13677 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13678 {
13679 let mut closure = self.closure.lock().unwrap();
13680 *closure = ::std::boxed::Box::new(move |_: crate::types::GetUUIDReq| ::std::result::Result::Err(exception.clone().into()));
13681 }
13682 }
13683
13684 pub struct lookUpIndex<'mock> {
13685 pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
13686 dyn ::std::ops::FnMut(crate::types::LookUpIndexRequest) -> ::std::result::Result<
13687 crate::types::LookUpIndexResp,
13688 crate::errors::storage_service::LookUpIndexError,
13689 > + ::std::marker::Send + ::std::marker::Sync + 'mock,
13690 >>,
13691 }
13692
13693 #[allow(clippy::redundant_closure)]
13694 impl<'mock> lookUpIndex<'mock> {
13695 pub fn unimplemented() -> Self {
13696 Self {
13697 closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::LookUpIndexRequest| panic!(
13698 "{}::{} is not mocked",
13699 "StorageService",
13700 "lookUpIndex",
13701 ))),
13702 }
13703 }
13704
13705 pub fn ret(&self, value: crate::types::LookUpIndexResp) {
13706 self.mock(move |_: crate::types::LookUpIndexRequest| value.clone());
13707 }
13708
13709 pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::LookUpIndexRequest) -> crate::types::LookUpIndexResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13710 let mut closure = self.closure.lock().unwrap();
13711 *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
13712 }
13713
13714 pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::LookUpIndexRequest) -> ::std::result::Result<crate::types::LookUpIndexResp, crate::errors::storage_service::LookUpIndexError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
13715 let mut closure = self.closure.lock().unwrap();
13716 *closure = ::std::boxed::Box::new(move |req| mock(req));
13717 }
13718
13719 pub fn throw<E>(&self, exception: E)
13720 where
13721 E: ::std::convert::Into<crate::errors::storage_service::LookUpIndexError>,
13722 E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
13723 {
13724 let mut closure = self.closure.lock().unwrap();
13725 *closure = ::std::boxed::Box::new(move |_: crate::types::LookUpIndexRequest| ::std::result::Result::Err(exception.clone().into()));
13726 }
13727 }
13728 }
13729 }
13730}
13731
13732pub mod errors {
13734 pub mod storage_service {
13736
13737 pub type GetBoundError = ::fbthrift::NonthrowingFunctionError;
13738
13739 impl ::std::convert::From<crate::services::storage_service::GetBoundExn> for
13740 ::std::result::Result<crate::types::QueryResponse, GetBoundError>
13741 {
13742 fn from(e: crate::services::storage_service::GetBoundExn) -> Self {
13743 match e {
13744 crate::services::storage_service::GetBoundExn::Success(res) => {
13745 ::std::result::Result::Ok(res)
13746 }
13747 crate::services::storage_service::GetBoundExn::ApplicationException(aexn) =>
13748 ::std::result::Result::Err(GetBoundError::ApplicationException(aexn)),
13749 }
13750 }
13751 }
13752
13753 pub type BoundStatsError = ::fbthrift::NonthrowingFunctionError;
13754
13755 impl ::std::convert::From<crate::services::storage_service::BoundStatsExn> for
13756 ::std::result::Result<crate::types::QueryStatsResponse, BoundStatsError>
13757 {
13758 fn from(e: crate::services::storage_service::BoundStatsExn) -> Self {
13759 match e {
13760 crate::services::storage_service::BoundStatsExn::Success(res) => {
13761 ::std::result::Result::Ok(res)
13762 }
13763 crate::services::storage_service::BoundStatsExn::ApplicationException(aexn) =>
13764 ::std::result::Result::Err(BoundStatsError::ApplicationException(aexn)),
13765 }
13766 }
13767 }
13768
13769 pub type GetPropsError = ::fbthrift::NonthrowingFunctionError;
13770
13771 impl ::std::convert::From<crate::services::storage_service::GetPropsExn> for
13772 ::std::result::Result<crate::types::QueryResponse, GetPropsError>
13773 {
13774 fn from(e: crate::services::storage_service::GetPropsExn) -> Self {
13775 match e {
13776 crate::services::storage_service::GetPropsExn::Success(res) => {
13777 ::std::result::Result::Ok(res)
13778 }
13779 crate::services::storage_service::GetPropsExn::ApplicationException(aexn) =>
13780 ::std::result::Result::Err(GetPropsError::ApplicationException(aexn)),
13781 }
13782 }
13783 }
13784
13785 pub type GetEdgePropsError = ::fbthrift::NonthrowingFunctionError;
13786
13787 impl ::std::convert::From<crate::services::storage_service::GetEdgePropsExn> for
13788 ::std::result::Result<crate::types::EdgePropResponse, GetEdgePropsError>
13789 {
13790 fn from(e: crate::services::storage_service::GetEdgePropsExn) -> Self {
13791 match e {
13792 crate::services::storage_service::GetEdgePropsExn::Success(res) => {
13793 ::std::result::Result::Ok(res)
13794 }
13795 crate::services::storage_service::GetEdgePropsExn::ApplicationException(aexn) =>
13796 ::std::result::Result::Err(GetEdgePropsError::ApplicationException(aexn)),
13797 }
13798 }
13799 }
13800
13801 pub type AddVerticesError = ::fbthrift::NonthrowingFunctionError;
13802
13803 impl ::std::convert::From<crate::services::storage_service::AddVerticesExn> for
13804 ::std::result::Result<crate::types::ExecResponse, AddVerticesError>
13805 {
13806 fn from(e: crate::services::storage_service::AddVerticesExn) -> Self {
13807 match e {
13808 crate::services::storage_service::AddVerticesExn::Success(res) => {
13809 ::std::result::Result::Ok(res)
13810 }
13811 crate::services::storage_service::AddVerticesExn::ApplicationException(aexn) =>
13812 ::std::result::Result::Err(AddVerticesError::ApplicationException(aexn)),
13813 }
13814 }
13815 }
13816
13817 pub type AddEdgesError = ::fbthrift::NonthrowingFunctionError;
13818
13819 impl ::std::convert::From<crate::services::storage_service::AddEdgesExn> for
13820 ::std::result::Result<crate::types::ExecResponse, AddEdgesError>
13821 {
13822 fn from(e: crate::services::storage_service::AddEdgesExn) -> Self {
13823 match e {
13824 crate::services::storage_service::AddEdgesExn::Success(res) => {
13825 ::std::result::Result::Ok(res)
13826 }
13827 crate::services::storage_service::AddEdgesExn::ApplicationException(aexn) =>
13828 ::std::result::Result::Err(AddEdgesError::ApplicationException(aexn)),
13829 }
13830 }
13831 }
13832
13833 pub type DeleteEdgesError = ::fbthrift::NonthrowingFunctionError;
13834
13835 impl ::std::convert::From<crate::services::storage_service::DeleteEdgesExn> for
13836 ::std::result::Result<crate::types::ExecResponse, DeleteEdgesError>
13837 {
13838 fn from(e: crate::services::storage_service::DeleteEdgesExn) -> Self {
13839 match e {
13840 crate::services::storage_service::DeleteEdgesExn::Success(res) => {
13841 ::std::result::Result::Ok(res)
13842 }
13843 crate::services::storage_service::DeleteEdgesExn::ApplicationException(aexn) =>
13844 ::std::result::Result::Err(DeleteEdgesError::ApplicationException(aexn)),
13845 }
13846 }
13847 }
13848
13849 pub type DeleteVerticesError = ::fbthrift::NonthrowingFunctionError;
13850
13851 impl ::std::convert::From<crate::services::storage_service::DeleteVerticesExn> for
13852 ::std::result::Result<crate::types::ExecResponse, DeleteVerticesError>
13853 {
13854 fn from(e: crate::services::storage_service::DeleteVerticesExn) -> Self {
13855 match e {
13856 crate::services::storage_service::DeleteVerticesExn::Success(res) => {
13857 ::std::result::Result::Ok(res)
13858 }
13859 crate::services::storage_service::DeleteVerticesExn::ApplicationException(aexn) =>
13860 ::std::result::Result::Err(DeleteVerticesError::ApplicationException(aexn)),
13861 }
13862 }
13863 }
13864
13865 pub type UpdateVertexError = ::fbthrift::NonthrowingFunctionError;
13866
13867 impl ::std::convert::From<crate::services::storage_service::UpdateVertexExn> for
13868 ::std::result::Result<crate::types::UpdateResponse, UpdateVertexError>
13869 {
13870 fn from(e: crate::services::storage_service::UpdateVertexExn) -> Self {
13871 match e {
13872 crate::services::storage_service::UpdateVertexExn::Success(res) => {
13873 ::std::result::Result::Ok(res)
13874 }
13875 crate::services::storage_service::UpdateVertexExn::ApplicationException(aexn) =>
13876 ::std::result::Result::Err(UpdateVertexError::ApplicationException(aexn)),
13877 }
13878 }
13879 }
13880
13881 pub type UpdateEdgeError = ::fbthrift::NonthrowingFunctionError;
13882
13883 impl ::std::convert::From<crate::services::storage_service::UpdateEdgeExn> for
13884 ::std::result::Result<crate::types::UpdateResponse, UpdateEdgeError>
13885 {
13886 fn from(e: crate::services::storage_service::UpdateEdgeExn) -> Self {
13887 match e {
13888 crate::services::storage_service::UpdateEdgeExn::Success(res) => {
13889 ::std::result::Result::Ok(res)
13890 }
13891 crate::services::storage_service::UpdateEdgeExn::ApplicationException(aexn) =>
13892 ::std::result::Result::Err(UpdateEdgeError::ApplicationException(aexn)),
13893 }
13894 }
13895 }
13896
13897 pub type ScanEdgeError = ::fbthrift::NonthrowingFunctionError;
13898
13899 impl ::std::convert::From<crate::services::storage_service::ScanEdgeExn> for
13900 ::std::result::Result<crate::types::ScanEdgeResponse, ScanEdgeError>
13901 {
13902 fn from(e: crate::services::storage_service::ScanEdgeExn) -> Self {
13903 match e {
13904 crate::services::storage_service::ScanEdgeExn::Success(res) => {
13905 ::std::result::Result::Ok(res)
13906 }
13907 crate::services::storage_service::ScanEdgeExn::ApplicationException(aexn) =>
13908 ::std::result::Result::Err(ScanEdgeError::ApplicationException(aexn)),
13909 }
13910 }
13911 }
13912
13913 pub type ScanVertexError = ::fbthrift::NonthrowingFunctionError;
13914
13915 impl ::std::convert::From<crate::services::storage_service::ScanVertexExn> for
13916 ::std::result::Result<crate::types::ScanVertexResponse, ScanVertexError>
13917 {
13918 fn from(e: crate::services::storage_service::ScanVertexExn) -> Self {
13919 match e {
13920 crate::services::storage_service::ScanVertexExn::Success(res) => {
13921 ::std::result::Result::Ok(res)
13922 }
13923 crate::services::storage_service::ScanVertexExn::ApplicationException(aexn) =>
13924 ::std::result::Result::Err(ScanVertexError::ApplicationException(aexn)),
13925 }
13926 }
13927 }
13928
13929 pub type TransLeaderError = ::fbthrift::NonthrowingFunctionError;
13930
13931 impl ::std::convert::From<crate::services::storage_service::TransLeaderExn> for
13932 ::std::result::Result<crate::types::AdminExecResp, TransLeaderError>
13933 {
13934 fn from(e: crate::services::storage_service::TransLeaderExn) -> Self {
13935 match e {
13936 crate::services::storage_service::TransLeaderExn::Success(res) => {
13937 ::std::result::Result::Ok(res)
13938 }
13939 crate::services::storage_service::TransLeaderExn::ApplicationException(aexn) =>
13940 ::std::result::Result::Err(TransLeaderError::ApplicationException(aexn)),
13941 }
13942 }
13943 }
13944
13945 pub type AddPartError = ::fbthrift::NonthrowingFunctionError;
13946
13947 impl ::std::convert::From<crate::services::storage_service::AddPartExn> for
13948 ::std::result::Result<crate::types::AdminExecResp, AddPartError>
13949 {
13950 fn from(e: crate::services::storage_service::AddPartExn) -> Self {
13951 match e {
13952 crate::services::storage_service::AddPartExn::Success(res) => {
13953 ::std::result::Result::Ok(res)
13954 }
13955 crate::services::storage_service::AddPartExn::ApplicationException(aexn) =>
13956 ::std::result::Result::Err(AddPartError::ApplicationException(aexn)),
13957 }
13958 }
13959 }
13960
13961 pub type AddLearnerError = ::fbthrift::NonthrowingFunctionError;
13962
13963 impl ::std::convert::From<crate::services::storage_service::AddLearnerExn> for
13964 ::std::result::Result<crate::types::AdminExecResp, AddLearnerError>
13965 {
13966 fn from(e: crate::services::storage_service::AddLearnerExn) -> Self {
13967 match e {
13968 crate::services::storage_service::AddLearnerExn::Success(res) => {
13969 ::std::result::Result::Ok(res)
13970 }
13971 crate::services::storage_service::AddLearnerExn::ApplicationException(aexn) =>
13972 ::std::result::Result::Err(AddLearnerError::ApplicationException(aexn)),
13973 }
13974 }
13975 }
13976
13977 pub type WaitingForCatchUpDataError = ::fbthrift::NonthrowingFunctionError;
13978
13979 impl ::std::convert::From<crate::services::storage_service::WaitingForCatchUpDataExn> for
13980 ::std::result::Result<crate::types::AdminExecResp, WaitingForCatchUpDataError>
13981 {
13982 fn from(e: crate::services::storage_service::WaitingForCatchUpDataExn) -> Self {
13983 match e {
13984 crate::services::storage_service::WaitingForCatchUpDataExn::Success(res) => {
13985 ::std::result::Result::Ok(res)
13986 }
13987 crate::services::storage_service::WaitingForCatchUpDataExn::ApplicationException(aexn) =>
13988 ::std::result::Result::Err(WaitingForCatchUpDataError::ApplicationException(aexn)),
13989 }
13990 }
13991 }
13992
13993 pub type RemovePartError = ::fbthrift::NonthrowingFunctionError;
13994
13995 impl ::std::convert::From<crate::services::storage_service::RemovePartExn> for
13996 ::std::result::Result<crate::types::AdminExecResp, RemovePartError>
13997 {
13998 fn from(e: crate::services::storage_service::RemovePartExn) -> Self {
13999 match e {
14000 crate::services::storage_service::RemovePartExn::Success(res) => {
14001 ::std::result::Result::Ok(res)
14002 }
14003 crate::services::storage_service::RemovePartExn::ApplicationException(aexn) =>
14004 ::std::result::Result::Err(RemovePartError::ApplicationException(aexn)),
14005 }
14006 }
14007 }
14008
14009 pub type MemberChangeError = ::fbthrift::NonthrowingFunctionError;
14010
14011 impl ::std::convert::From<crate::services::storage_service::MemberChangeExn> for
14012 ::std::result::Result<crate::types::AdminExecResp, MemberChangeError>
14013 {
14014 fn from(e: crate::services::storage_service::MemberChangeExn) -> Self {
14015 match e {
14016 crate::services::storage_service::MemberChangeExn::Success(res) => {
14017 ::std::result::Result::Ok(res)
14018 }
14019 crate::services::storage_service::MemberChangeExn::ApplicationException(aexn) =>
14020 ::std::result::Result::Err(MemberChangeError::ApplicationException(aexn)),
14021 }
14022 }
14023 }
14024
14025 pub type CheckPeersError = ::fbthrift::NonthrowingFunctionError;
14026
14027 impl ::std::convert::From<crate::services::storage_service::CheckPeersExn> for
14028 ::std::result::Result<crate::types::AdminExecResp, CheckPeersError>
14029 {
14030 fn from(e: crate::services::storage_service::CheckPeersExn) -> Self {
14031 match e {
14032 crate::services::storage_service::CheckPeersExn::Success(res) => {
14033 ::std::result::Result::Ok(res)
14034 }
14035 crate::services::storage_service::CheckPeersExn::ApplicationException(aexn) =>
14036 ::std::result::Result::Err(CheckPeersError::ApplicationException(aexn)),
14037 }
14038 }
14039 }
14040
14041 pub type GetLeaderPartError = ::fbthrift::NonthrowingFunctionError;
14042
14043 impl ::std::convert::From<crate::services::storage_service::GetLeaderPartExn> for
14044 ::std::result::Result<crate::types::GetLeaderResp, GetLeaderPartError>
14045 {
14046 fn from(e: crate::services::storage_service::GetLeaderPartExn) -> Self {
14047 match e {
14048 crate::services::storage_service::GetLeaderPartExn::Success(res) => {
14049 ::std::result::Result::Ok(res)
14050 }
14051 crate::services::storage_service::GetLeaderPartExn::ApplicationException(aexn) =>
14052 ::std::result::Result::Err(GetLeaderPartError::ApplicationException(aexn)),
14053 }
14054 }
14055 }
14056
14057 pub type CreateCheckpointError = ::fbthrift::NonthrowingFunctionError;
14058
14059 impl ::std::convert::From<crate::services::storage_service::CreateCheckpointExn> for
14060 ::std::result::Result<crate::types::AdminExecResp, CreateCheckpointError>
14061 {
14062 fn from(e: crate::services::storage_service::CreateCheckpointExn) -> Self {
14063 match e {
14064 crate::services::storage_service::CreateCheckpointExn::Success(res) => {
14065 ::std::result::Result::Ok(res)
14066 }
14067 crate::services::storage_service::CreateCheckpointExn::ApplicationException(aexn) =>
14068 ::std::result::Result::Err(CreateCheckpointError::ApplicationException(aexn)),
14069 }
14070 }
14071 }
14072
14073 pub type DropCheckpointError = ::fbthrift::NonthrowingFunctionError;
14074
14075 impl ::std::convert::From<crate::services::storage_service::DropCheckpointExn> for
14076 ::std::result::Result<crate::types::AdminExecResp, DropCheckpointError>
14077 {
14078 fn from(e: crate::services::storage_service::DropCheckpointExn) -> Self {
14079 match e {
14080 crate::services::storage_service::DropCheckpointExn::Success(res) => {
14081 ::std::result::Result::Ok(res)
14082 }
14083 crate::services::storage_service::DropCheckpointExn::ApplicationException(aexn) =>
14084 ::std::result::Result::Err(DropCheckpointError::ApplicationException(aexn)),
14085 }
14086 }
14087 }
14088
14089 pub type BlockingWritesError = ::fbthrift::NonthrowingFunctionError;
14090
14091 impl ::std::convert::From<crate::services::storage_service::BlockingWritesExn> for
14092 ::std::result::Result<crate::types::AdminExecResp, BlockingWritesError>
14093 {
14094 fn from(e: crate::services::storage_service::BlockingWritesExn) -> Self {
14095 match e {
14096 crate::services::storage_service::BlockingWritesExn::Success(res) => {
14097 ::std::result::Result::Ok(res)
14098 }
14099 crate::services::storage_service::BlockingWritesExn::ApplicationException(aexn) =>
14100 ::std::result::Result::Err(BlockingWritesError::ApplicationException(aexn)),
14101 }
14102 }
14103 }
14104
14105 pub type RebuildTagIndexError = ::fbthrift::NonthrowingFunctionError;
14106
14107 impl ::std::convert::From<crate::services::storage_service::RebuildTagIndexExn> for
14108 ::std::result::Result<crate::types::AdminExecResp, RebuildTagIndexError>
14109 {
14110 fn from(e: crate::services::storage_service::RebuildTagIndexExn) -> Self {
14111 match e {
14112 crate::services::storage_service::RebuildTagIndexExn::Success(res) => {
14113 ::std::result::Result::Ok(res)
14114 }
14115 crate::services::storage_service::RebuildTagIndexExn::ApplicationException(aexn) =>
14116 ::std::result::Result::Err(RebuildTagIndexError::ApplicationException(aexn)),
14117 }
14118 }
14119 }
14120
14121 pub type RebuildEdgeIndexError = ::fbthrift::NonthrowingFunctionError;
14122
14123 impl ::std::convert::From<crate::services::storage_service::RebuildEdgeIndexExn> for
14124 ::std::result::Result<crate::types::AdminExecResp, RebuildEdgeIndexError>
14125 {
14126 fn from(e: crate::services::storage_service::RebuildEdgeIndexExn) -> Self {
14127 match e {
14128 crate::services::storage_service::RebuildEdgeIndexExn::Success(res) => {
14129 ::std::result::Result::Ok(res)
14130 }
14131 crate::services::storage_service::RebuildEdgeIndexExn::ApplicationException(aexn) =>
14132 ::std::result::Result::Err(RebuildEdgeIndexError::ApplicationException(aexn)),
14133 }
14134 }
14135 }
14136
14137 pub type PutError = ::fbthrift::NonthrowingFunctionError;
14138
14139 impl ::std::convert::From<crate::services::storage_service::PutExn> for
14140 ::std::result::Result<crate::types::ExecResponse, PutError>
14141 {
14142 fn from(e: crate::services::storage_service::PutExn) -> Self {
14143 match e {
14144 crate::services::storage_service::PutExn::Success(res) => {
14145 ::std::result::Result::Ok(res)
14146 }
14147 crate::services::storage_service::PutExn::ApplicationException(aexn) =>
14148 ::std::result::Result::Err(PutError::ApplicationException(aexn)),
14149 }
14150 }
14151 }
14152
14153 pub type GetError = ::fbthrift::NonthrowingFunctionError;
14154
14155 impl ::std::convert::From<crate::services::storage_service::GetExn> for
14156 ::std::result::Result<crate::types::GeneralResponse, GetError>
14157 {
14158 fn from(e: crate::services::storage_service::GetExn) -> Self {
14159 match e {
14160 crate::services::storage_service::GetExn::Success(res) => {
14161 ::std::result::Result::Ok(res)
14162 }
14163 crate::services::storage_service::GetExn::ApplicationException(aexn) =>
14164 ::std::result::Result::Err(GetError::ApplicationException(aexn)),
14165 }
14166 }
14167 }
14168
14169 pub type RemoveError = ::fbthrift::NonthrowingFunctionError;
14170
14171 impl ::std::convert::From<crate::services::storage_service::RemoveExn> for
14172 ::std::result::Result<crate::types::ExecResponse, RemoveError>
14173 {
14174 fn from(e: crate::services::storage_service::RemoveExn) -> Self {
14175 match e {
14176 crate::services::storage_service::RemoveExn::Success(res) => {
14177 ::std::result::Result::Ok(res)
14178 }
14179 crate::services::storage_service::RemoveExn::ApplicationException(aexn) =>
14180 ::std::result::Result::Err(RemoveError::ApplicationException(aexn)),
14181 }
14182 }
14183 }
14184
14185 pub type RemoveRangeError = ::fbthrift::NonthrowingFunctionError;
14186
14187 impl ::std::convert::From<crate::services::storage_service::RemoveRangeExn> for
14188 ::std::result::Result<crate::types::ExecResponse, RemoveRangeError>
14189 {
14190 fn from(e: crate::services::storage_service::RemoveRangeExn) -> Self {
14191 match e {
14192 crate::services::storage_service::RemoveRangeExn::Success(res) => {
14193 ::std::result::Result::Ok(res)
14194 }
14195 crate::services::storage_service::RemoveRangeExn::ApplicationException(aexn) =>
14196 ::std::result::Result::Err(RemoveRangeError::ApplicationException(aexn)),
14197 }
14198 }
14199 }
14200
14201 pub type GetUUIDError = ::fbthrift::NonthrowingFunctionError;
14202
14203 impl ::std::convert::From<crate::services::storage_service::GetUUIDExn> for
14204 ::std::result::Result<crate::types::GetUUIDResp, GetUUIDError>
14205 {
14206 fn from(e: crate::services::storage_service::GetUUIDExn) -> Self {
14207 match e {
14208 crate::services::storage_service::GetUUIDExn::Success(res) => {
14209 ::std::result::Result::Ok(res)
14210 }
14211 crate::services::storage_service::GetUUIDExn::ApplicationException(aexn) =>
14212 ::std::result::Result::Err(GetUUIDError::ApplicationException(aexn)),
14213 }
14214 }
14215 }
14216
14217 pub type LookUpIndexError = ::fbthrift::NonthrowingFunctionError;
14218
14219 impl ::std::convert::From<crate::services::storage_service::LookUpIndexExn> for
14220 ::std::result::Result<crate::types::LookUpIndexResp, LookUpIndexError>
14221 {
14222 fn from(e: crate::services::storage_service::LookUpIndexExn) -> Self {
14223 match e {
14224 crate::services::storage_service::LookUpIndexExn::Success(res) => {
14225 ::std::result::Result::Ok(res)
14226 }
14227 crate::services::storage_service::LookUpIndexExn::ApplicationException(aexn) =>
14228 ::std::result::Result::Err(LookUpIndexError::ApplicationException(aexn)),
14229 }
14230 }
14231 }
14232
14233 }
14234
14235}