1#[allow(unused_imports)]
2pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue};
3#[allow(unused_imports)]
4use progenitor_client::{encode_path, ClientHooks, OperationInfo, RequestBuilderExt};
5#[allow(clippy::all)]
7pub mod types {
8 pub mod error {
10 pub struct ConversionError(::std::borrow::Cow<'static, str>);
12 impl ::std::error::Error for ConversionError {}
13 impl ::std::fmt::Display for ConversionError {
14 fn fmt(
15 &self,
16 f: &mut ::std::fmt::Formatter<'_>,
17 ) -> Result<(), ::std::fmt::Error> {
18 ::std::fmt::Display::fmt(&self.0, f)
19 }
20 }
21 impl ::std::fmt::Debug for ConversionError {
22 fn fmt(
23 &self,
24 f: &mut ::std::fmt::Formatter<'_>,
25 ) -> Result<(), ::std::fmt::Error> {
26 ::std::fmt::Debug::fmt(&self.0, f)
27 }
28 }
29 impl From<&'static str> for ConversionError {
30 fn from(value: &'static str) -> Self {
31 Self(value.into())
32 }
33 }
34 impl From<String> for ConversionError {
35 fn from(value: String) -> Self {
36 Self(value.into())
37 }
38 }
39 }
40 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
89 #[serde(deny_unknown_fields)]
90 pub struct Account {
91 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
92 pub address: ::std::option::Option<SerializablePubkey>,
93 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
94 pub data: ::std::option::Option<AccountData>,
95 pub hash: Hash,
96 pub lamports: UnsignedInteger,
97 #[serde(rename = "leafIndex")]
98 pub leaf_index: UnsignedInteger,
99 pub owner: SerializablePubkey,
100 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
101 pub seq: ::std::option::Option<UnsignedInteger>,
102 #[serde(rename = "slotCreated")]
103 pub slot_created: UnsignedInteger,
104 pub tree: SerializablePubkey,
105 }
106 impl Account {
107 pub fn builder() -> builder::Account {
108 Default::default()
109 }
110 }
111 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
163 #[serde(deny_unknown_fields)]
164 pub struct AccountContext {
165 #[serde(rename = "inOutputQueue")]
166 pub in_output_queue: bool,
167 #[serde(rename = "nullifiedInTree")]
168 pub nullified_in_tree: bool,
169 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
170 pub nullifier: ::std::option::Option<Hash>,
171 #[serde(
172 rename = "nullifierQueueIndex",
173 default,
174 skip_serializing_if = "::std::option::Option::is_none"
175 )]
176 pub nullifier_queue_index: ::std::option::Option<UnsignedInteger>,
177 pub queue: SerializablePubkey,
178 pub spent: bool,
179 #[serde(rename = "treeType")]
180 pub tree_type: u16,
181 #[serde(
182 rename = "txHash",
183 default,
184 skip_serializing_if = "::std::option::Option::is_none"
185 )]
186 pub tx_hash: ::std::option::Option<Hash>,
187 }
188 impl AccountContext {
189 pub fn builder() -> builder::AccountContext {
190 Default::default()
191 }
192 }
193 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
221 #[serde(deny_unknown_fields)]
222 pub struct AccountData {
223 pub data: Base64String,
224 #[serde(rename = "dataHash")]
225 pub data_hash: Hash,
226 pub discriminator: UnsignedInteger,
227 }
228 impl AccountData {
229 pub fn builder() -> builder::AccountData {
230 Default::default()
231 }
232 }
233 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
267 pub struct AccountInterface {
268 pub account: SolanaAccountData,
269 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
271 pub cold: ::std::option::Option<::std::vec::Vec<AccountV2>>,
272 pub key: SerializablePubkey,
273 }
274 impl AccountInterface {
275 pub fn builder() -> builder::AccountInterface {
276 Default::default()
277 }
278 }
279 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
313 #[serde(deny_unknown_fields)]
314 pub struct AccountList {
315 pub items: ::std::vec::Vec<::std::option::Option<Account>>,
316 }
317 impl AccountList {
318 pub fn builder() -> builder::AccountList {
319 Default::default()
320 }
321 }
322 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
355 pub struct AccountListV2 {
356 pub items: ::std::vec::Vec<::std::option::Option<AccountV2>>,
357 }
358 impl AccountListV2 {
359 pub fn builder() -> builder::AccountListV2 {
360 Default::default()
361 }
362 }
363 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
400 pub struct AccountProofInputs {
401 pub hash: ::std::string::String,
402 #[serde(rename = "leafIndex")]
403 pub leaf_index: u64,
404 #[serde(rename = "merkleContext")]
405 pub merkle_context: MerkleContextV2,
406 pub root: ::std::string::String,
407 #[serde(rename = "rootIndex")]
408 pub root_index: RootIndex,
409 }
410 impl AccountProofInputs {
411 pub fn builder() -> builder::AccountProofInputs {
412 Default::default()
413 }
414 }
415 #[derive(
430 ::serde::Deserialize,
431 ::serde::Serialize,
432 Clone,
433 Copy,
434 Debug,
435 Eq,
436 Hash,
437 Ord,
438 PartialEq,
439 PartialOrd
440 )]
441 pub enum AccountState {
442 #[serde(rename = "initialized")]
443 Initialized,
444 #[serde(rename = "frozen")]
445 Frozen,
446 }
447 impl ::std::fmt::Display for AccountState {
448 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
449 match *self {
450 Self::Initialized => f.write_str("initialized"),
451 Self::Frozen => f.write_str("frozen"),
452 }
453 }
454 }
455 impl ::std::str::FromStr for AccountState {
456 type Err = self::error::ConversionError;
457 fn from_str(
458 value: &str,
459 ) -> ::std::result::Result<Self, self::error::ConversionError> {
460 match value {
461 "initialized" => Ok(Self::Initialized),
462 "frozen" => Ok(Self::Frozen),
463 _ => Err("invalid value".into()),
464 }
465 }
466 }
467 impl ::std::convert::TryFrom<&str> for AccountState {
468 type Error = self::error::ConversionError;
469 fn try_from(
470 value: &str,
471 ) -> ::std::result::Result<Self, self::error::ConversionError> {
472 value.parse()
473 }
474 }
475 impl ::std::convert::TryFrom<&::std::string::String> for AccountState {
476 type Error = self::error::ConversionError;
477 fn try_from(
478 value: &::std::string::String,
479 ) -> ::std::result::Result<Self, self::error::ConversionError> {
480 value.parse()
481 }
482 }
483 impl ::std::convert::TryFrom<::std::string::String> for AccountState {
484 type Error = self::error::ConversionError;
485 fn try_from(
486 value: ::std::string::String,
487 ) -> ::std::result::Result<Self, self::error::ConversionError> {
488 value.parse()
489 }
490 }
491 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
544 #[serde(deny_unknown_fields)]
545 pub struct AccountV2 {
546 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
547 pub address: ::std::option::Option<SerializablePubkey>,
548 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
549 pub data: ::std::option::Option<AccountData>,
550 pub hash: Hash,
551 pub lamports: UnsignedInteger,
552 #[serde(rename = "leafIndex")]
553 pub leaf_index: UnsignedInteger,
554 #[serde(rename = "merkleContext")]
555 pub merkle_context: MerkleContextV2,
556 pub owner: SerializablePubkey,
557 #[serde(rename = "proveByIndex")]
558 pub prove_by_index: bool,
559 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
560 pub seq: ::std::option::Option<UnsignedInteger>,
561 #[serde(rename = "slotCreated")]
562 pub slot_created: UnsignedInteger,
563 }
564 impl AccountV2 {
565 pub fn builder() -> builder::AccountV2 {
566 Default::default()
567 }
568 }
569 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
593 #[serde(deny_unknown_fields)]
594 pub struct AccountWithContext {
595 pub account: Account,
596 pub context: AccountContext,
597 }
598 impl AccountWithContext {
599 pub fn builder() -> builder::AccountWithContext {
600 Default::default()
601 }
602 }
603 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
626 #[serde(deny_unknown_fields)]
627 pub struct AccountWithOptionalTokenData {
628 pub account: Account,
629 #[serde(
630 rename = "optionalTokenData",
631 default,
632 skip_serializing_if = "::std::option::Option::is_none"
633 )]
634 pub optional_token_data: ::std::option::Option<TokenData>,
635 }
636 impl AccountWithOptionalTokenData {
637 pub fn builder() -> builder::AccountWithOptionalTokenData {
638 Default::default()
639 }
640 }
641 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
664 #[serde(deny_unknown_fields)]
665 pub struct AccountWithOptionalTokenDataV2 {
666 pub account: AccountV2,
667 #[serde(
668 rename = "optionalTokenData",
669 default,
670 skip_serializing_if = "::std::option::Option::is_none"
671 )]
672 pub optional_token_data: ::std::option::Option<TokenData>,
673 }
674 impl AccountWithOptionalTokenDataV2 {
675 pub fn builder() -> builder::AccountWithOptionalTokenDataV2 {
676 Default::default()
677 }
678 }
679 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
693 #[serde(transparent)]
694 pub struct AddressListWithTrees(pub ::std::vec::Vec<AddressWithTree>);
695 impl ::std::ops::Deref for AddressListWithTrees {
696 type Target = ::std::vec::Vec<AddressWithTree>;
697 fn deref(&self) -> &::std::vec::Vec<AddressWithTree> {
698 &self.0
699 }
700 }
701 impl ::std::convert::From<AddressListWithTrees>
702 for ::std::vec::Vec<AddressWithTree> {
703 fn from(value: AddressListWithTrees) -> Self {
704 value.0
705 }
706 }
707 impl ::std::convert::From<::std::vec::Vec<AddressWithTree>>
708 for AddressListWithTrees {
709 fn from(value: ::std::vec::Vec<AddressWithTree>) -> Self {
710 Self(value)
711 }
712 }
713 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
746 pub struct AddressProofInputs {
747 pub address: ::std::string::String,
748 #[serde(rename = "merkleContext")]
749 pub merkle_context: MerkleContextV2,
750 pub root: ::std::string::String,
751 #[serde(rename = "rootIndex")]
752 pub root_index: u16,
753 }
754 impl AddressProofInputs {
755 pub fn builder() -> builder::AddressProofInputs {
756 Default::default()
757 }
758 }
759 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
861 #[serde(deny_unknown_fields)]
862 pub struct AddressQueueData {
863 pub addresses: ::std::vec::Vec<SerializablePubkey>,
864 #[serde(rename = "initialRoot")]
865 pub initial_root: Hash,
866 #[serde(rename = "leavesHashChains")]
867 pub leaves_hash_chains: ::std::vec::Vec<Hash>,
868 #[serde(rename = "lowElementIndices")]
869 pub low_element_indices: ::std::vec::Vec<u64>,
870 #[serde(rename = "lowElementNextIndices")]
871 pub low_element_next_indices: ::std::vec::Vec<u64>,
872 #[serde(rename = "lowElementNextValues")]
873 pub low_element_next_values: ::std::vec::Vec<Hash>,
874 #[serde(rename = "lowElementValues")]
875 pub low_element_values: ::std::vec::Vec<Hash>,
876 pub nodes: ::std::vec::Vec<Node>,
878 #[serde(rename = "queueIndices")]
879 pub queue_indices: ::std::vec::Vec<u64>,
880 #[serde(rename = "rootSeq")]
881 pub root_seq: u64,
882 #[serde(rename = "startIndex")]
883 pub start_index: u64,
884 pub subtrees: ::std::vec::Vec<Hash>,
885 }
886 impl AddressQueueData {
887 pub fn builder() -> builder::AddressQueueData {
888 Default::default()
889 }
890 }
891 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
915 #[serde(deny_unknown_fields)]
916 pub struct AddressWithTree {
917 pub address: SerializablePubkey,
918 pub tree: SerializablePubkey,
919 }
920 impl AddressWithTree {
921 pub fn builder() -> builder::AddressWithTree {
922 Default::default()
923 }
924 }
925 #[derive(
941 ::serde::Deserialize,
942 ::serde::Serialize,
943 Clone,
944 Debug,
945 Eq,
946 Hash,
947 Ord,
948 PartialEq,
949 PartialOrd
950 )]
951 #[serde(transparent)]
952 pub struct Base58String(pub ::std::string::String);
953 impl ::std::ops::Deref for Base58String {
954 type Target = ::std::string::String;
955 fn deref(&self) -> &::std::string::String {
956 &self.0
957 }
958 }
959 impl ::std::convert::From<Base58String> for ::std::string::String {
960 fn from(value: Base58String) -> Self {
961 value.0
962 }
963 }
964 impl ::std::convert::From<::std::string::String> for Base58String {
965 fn from(value: ::std::string::String) -> Self {
966 Self(value)
967 }
968 }
969 impl ::std::str::FromStr for Base58String {
970 type Err = ::std::convert::Infallible;
971 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
972 Ok(Self(value.to_string()))
973 }
974 }
975 impl ::std::fmt::Display for Base58String {
976 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
977 self.0.fmt(f)
978 }
979 }
980 #[derive(
996 ::serde::Deserialize,
997 ::serde::Serialize,
998 Clone,
999 Debug,
1000 Eq,
1001 Hash,
1002 Ord,
1003 PartialEq,
1004 PartialOrd
1005 )]
1006 #[serde(transparent)]
1007 pub struct Base64String(pub ::std::string::String);
1008 impl ::std::ops::Deref for Base64String {
1009 type Target = ::std::string::String;
1010 fn deref(&self) -> &::std::string::String {
1011 &self.0
1012 }
1013 }
1014 impl ::std::convert::From<Base64String> for ::std::string::String {
1015 fn from(value: Base64String) -> Self {
1016 value.0
1017 }
1018 }
1019 impl ::std::convert::From<::std::string::String> for Base64String {
1020 fn from(value: ::std::string::String) -> Self {
1021 Self(value)
1022 }
1023 }
1024 impl ::std::str::FromStr for Base64String {
1025 type Err = ::std::convert::Infallible;
1026 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
1027 Ok(Self(value.to_string()))
1028 }
1029 }
1030 impl ::std::fmt::Display for Base64String {
1031 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1032 self.0.fmt(f)
1033 }
1034 }
1035 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1063 #[serde(deny_unknown_fields)]
1064 pub struct ClosedAccountV2 {
1065 pub account: AccountV2,
1066 pub nullifier: Hash,
1067 #[serde(rename = "txHash")]
1068 pub tx_hash: Hash,
1069 }
1070 impl ClosedAccountV2 {
1071 pub fn builder() -> builder::ClosedAccountV2 {
1072 Default::default()
1073 }
1074 }
1075 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1098 #[serde(deny_unknown_fields)]
1099 pub struct ClosedAccountWithOptionalTokenDataV2 {
1100 pub account: ClosedAccountV2,
1101 #[serde(
1102 rename = "optionalTokenData",
1103 default,
1104 skip_serializing_if = "::std::option::Option::is_none"
1105 )]
1106 pub optional_token_data: ::std::option::Option<TokenData>,
1107 }
1108 impl ClosedAccountWithOptionalTokenDataV2 {
1109 pub fn builder() -> builder::ClosedAccountWithOptionalTokenDataV2 {
1110 Default::default()
1111 }
1112 }
1113 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1149 pub struct CompressedProof {
1150 pub a: ::std::vec::Vec<i64>,
1151 pub b: ::std::vec::Vec<i64>,
1152 pub c: ::std::vec::Vec<i64>,
1153 }
1154 impl CompressedProof {
1155 pub fn builder() -> builder::CompressedProof {
1156 Default::default()
1157 }
1158 }
1159 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1217 pub struct CompressedProofWithContext {
1218 #[serde(rename = "compressedProof")]
1219 pub compressed_proof: CompressedProof,
1220 #[serde(rename = "leafIndices")]
1221 pub leaf_indices: ::std::vec::Vec<u32>,
1222 pub leaves: ::std::vec::Vec<::std::string::String>,
1223 #[serde(rename = "merkleTrees")]
1224 pub merkle_trees: ::std::vec::Vec<::std::string::String>,
1225 #[serde(rename = "rootIndices")]
1226 pub root_indices: ::std::vec::Vec<u64>,
1227 pub roots: ::std::vec::Vec<::std::string::String>,
1228 }
1229 impl CompressedProofWithContext {
1230 pub fn builder() -> builder::CompressedProofWithContext {
1231 Default::default()
1232 }
1233 }
1234 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1266 pub struct CompressedProofWithContextV2 {
1267 pub accounts: ::std::vec::Vec<AccountProofInputs>,
1268 pub addresses: ::std::vec::Vec<AddressProofInputs>,
1269 #[serde(
1270 rename = "compressedProof",
1271 default,
1272 skip_serializing_if = "::std::option::Option::is_none"
1273 )]
1274 pub compressed_proof: ::std::option::Option<CompressedProof>,
1275 }
1276 impl CompressedProofWithContextV2 {
1277 pub fn builder() -> builder::CompressedProofWithContextV2 {
1278 Default::default()
1279 }
1280 }
1281 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1311 #[serde(deny_unknown_fields)]
1312 pub struct CompressionInfoV2 {
1313 #[serde(rename = "closedAccounts")]
1314 pub closed_accounts: ::std::vec::Vec<ClosedAccountWithOptionalTokenDataV2>,
1315 #[serde(rename = "openedAccounts")]
1316 pub opened_accounts: ::std::vec::Vec<AccountWithOptionalTokenDataV2>,
1317 }
1318 impl CompressionInfoV2 {
1319 pub fn builder() -> builder::CompressionInfoV2 {
1320 Default::default()
1321 }
1322 }
1323 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1347 pub struct Context {
1348 pub slot: u64,
1349 }
1350 impl Context {
1351 pub fn builder() -> builder::Context {
1352 Default::default()
1353 }
1354 }
1355 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1380 pub struct DataSlice {
1381 pub length: u64,
1382 pub offset: u64,
1383 }
1384 impl DataSlice {
1385 pub fn builder() -> builder::DataSlice {
1386 Default::default()
1387 }
1388 }
1389 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1405 pub struct FilterSelector {
1406 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1407 pub memcmp: ::std::option::Option<Memcmp>,
1408 }
1409 impl ::std::default::Default for FilterSelector {
1410 fn default() -> Self {
1411 Self { memcmp: Default::default() }
1412 }
1413 }
1414 impl FilterSelector {
1415 pub fn builder() -> builder::FilterSelector {
1416 Default::default()
1417 }
1418 }
1419 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1466 #[serde(deny_unknown_fields)]
1467 pub struct GetCompressedAccountProofResponseValue {
1468 pub hash: Hash,
1469 #[serde(rename = "leafIndex")]
1470 pub leaf_index: u32,
1471 #[serde(rename = "merkleTree")]
1472 pub merkle_tree: SerializablePubkey,
1473 pub proof: ::std::vec::Vec<Hash>,
1474 pub root: Hash,
1475 #[serde(rename = "rootSeq")]
1476 pub root_seq: u64,
1477 }
1478 impl GetCompressedAccountProofResponseValue {
1479 pub fn builder() -> builder::GetCompressedAccountProofResponseValue {
1480 Default::default()
1481 }
1482 }
1483 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1534 #[serde(deny_unknown_fields)]
1535 pub struct GetCompressedAccountProofResponseValueV2 {
1536 pub hash: Hash,
1537 #[serde(rename = "leafIndex")]
1538 pub leaf_index: u32,
1539 pub proof: ::std::vec::Vec<Hash>,
1540 #[serde(rename = "proveByIndex")]
1541 pub prove_by_index: bool,
1542 pub root: Hash,
1543 #[serde(rename = "rootSeq")]
1544 pub root_seq: u64,
1545 #[serde(rename = "treeContext")]
1546 pub tree_context: TreeContextInfo,
1547 }
1548 impl GetCompressedAccountProofResponseValueV2 {
1549 pub fn builder() -> builder::GetCompressedAccountProofResponseValueV2 {
1550 Default::default()
1551 }
1552 }
1553 #[derive(
1568 ::serde::Deserialize,
1569 ::serde::Serialize,
1570 Clone,
1571 Debug,
1572 Eq,
1573 Hash,
1574 Ord,
1575 PartialEq,
1576 PartialOrd
1577 )]
1578 #[serde(transparent)]
1579 pub struct Hash(pub ::std::string::String);
1580 impl ::std::ops::Deref for Hash {
1581 type Target = ::std::string::String;
1582 fn deref(&self) -> &::std::string::String {
1583 &self.0
1584 }
1585 }
1586 impl ::std::convert::From<Hash> for ::std::string::String {
1587 fn from(value: Hash) -> Self {
1588 value.0
1589 }
1590 }
1591 impl ::std::convert::From<::std::string::String> for Hash {
1592 fn from(value: ::std::string::String) -> Self {
1593 Self(value)
1594 }
1595 }
1596 impl ::std::str::FromStr for Hash {
1597 type Err = ::std::convert::Infallible;
1598 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
1599 Ok(Self(value.to_string()))
1600 }
1601 }
1602 impl ::std::fmt::Display for Hash {
1603 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1604 self.0.fmt(f)
1605 }
1606 }
1607 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1673 #[serde(deny_unknown_fields)]
1674 pub struct InputQueueData {
1675 #[serde(rename = "accountHashes")]
1676 pub account_hashes: ::std::vec::Vec<Hash>,
1677 #[serde(rename = "firstQueueIndex")]
1678 pub first_queue_index: u64,
1679 #[serde(rename = "leafIndices")]
1680 pub leaf_indices: ::std::vec::Vec<u64>,
1681 pub leaves: ::std::vec::Vec<Hash>,
1682 #[serde(rename = "leavesHashChains")]
1683 pub leaves_hash_chains: ::std::vec::Vec<Hash>,
1684 pub nullifiers: ::std::vec::Vec<Hash>,
1685 #[serde(rename = "txHashes")]
1686 pub tx_hashes: ::std::vec::Vec<Hash>,
1687 }
1688 impl InputQueueData {
1689 pub fn builder() -> builder::InputQueueData {
1690 Default::default()
1691 }
1692 }
1693 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1706 #[serde(transparent)]
1707 pub struct Limit(pub u64);
1708 impl ::std::ops::Deref for Limit {
1709 type Target = u64;
1710 fn deref(&self) -> &u64 {
1711 &self.0
1712 }
1713 }
1714 impl ::std::convert::From<Limit> for u64 {
1715 fn from(value: Limit) -> Self {
1716 value.0
1717 }
1718 }
1719 impl ::std::convert::From<u64> for Limit {
1720 fn from(value: u64) -> Self {
1721 Self(value)
1722 }
1723 }
1724 impl ::std::str::FromStr for Limit {
1725 type Err = <u64 as ::std::str::FromStr>::Err;
1726 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
1727 Ok(Self(value.parse()?))
1728 }
1729 }
1730 impl ::std::convert::TryFrom<&str> for Limit {
1731 type Error = <u64 as ::std::str::FromStr>::Err;
1732 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
1733 value.parse()
1734 }
1735 }
1736 impl ::std::convert::TryFrom<String> for Limit {
1737 type Error = <u64 as ::std::str::FromStr>::Err;
1738 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
1739 value.parse()
1740 }
1741 }
1742 impl ::std::fmt::Display for Limit {
1743 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1744 self.0.fmt(f)
1745 }
1746 }
1747 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1771 pub struct Memcmp {
1772 pub bytes: Base58String,
1773 pub offset: u64,
1774 }
1775 impl Memcmp {
1776 pub fn builder() -> builder::Memcmp {
1777 Default::default()
1778 }
1779 }
1780 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1815 pub struct MerkleContextV2 {
1816 #[serde(
1817 rename = "cpiContext",
1818 default,
1819 skip_serializing_if = "::std::option::Option::is_none"
1820 )]
1821 pub cpi_context: ::std::option::Option<SerializablePubkey>,
1822 #[serde(
1823 rename = "nextTreeContext",
1824 default,
1825 skip_serializing_if = "::std::option::Option::is_none"
1826 )]
1827 pub next_tree_context: ::std::option::Option<TreeContextInfo>,
1828 pub queue: SerializablePubkey,
1829 pub tree: SerializablePubkey,
1830 #[serde(rename = "treeType")]
1831 pub tree_type: u16,
1832 }
1833 impl MerkleContextV2 {
1834 pub fn builder() -> builder::MerkleContextV2 {
1835 Default::default()
1836 }
1837 }
1838 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1899 #[serde(deny_unknown_fields)]
1900 pub struct MerkleContextWithNewAddressProof {
1901 pub address: SerializablePubkey,
1902 #[serde(rename = "higherRangeAddress")]
1903 pub higher_range_address: SerializablePubkey,
1904 #[serde(rename = "lowElementLeafIndex")]
1905 pub low_element_leaf_index: u32,
1906 #[serde(rename = "lowerRangeAddress")]
1907 pub lower_range_address: SerializablePubkey,
1908 #[serde(rename = "merkleTree")]
1909 pub merkle_tree: SerializablePubkey,
1910 #[serde(rename = "nextIndex")]
1911 pub next_index: u32,
1912 pub proof: ::std::vec::Vec<Hash>,
1913 pub root: Hash,
1914 #[serde(rename = "rootSeq")]
1915 pub root_seq: u64,
1916 }
1917 impl MerkleContextWithNewAddressProof {
1918 pub fn builder() -> builder::MerkleContextWithNewAddressProof {
1919 Default::default()
1920 }
1921 }
1922 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1950 #[serde(deny_unknown_fields)]
1951 pub struct Node {
1952 pub hash: Hash,
1953 pub index: u64,
1955 }
1956 impl Node {
1957 pub fn builder() -> builder::Node {
1958 Default::default()
1959 }
1960 }
1961 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2019 #[serde(deny_unknown_fields)]
2020 pub struct OutputQueueData {
2021 #[serde(rename = "accountHashes")]
2022 pub account_hashes: ::std::vec::Vec<Hash>,
2023 #[serde(rename = "firstQueueIndex")]
2024 pub first_queue_index: u64,
2025 #[serde(rename = "leafIndices")]
2026 pub leaf_indices: ::std::vec::Vec<u64>,
2027 pub leaves: ::std::vec::Vec<Hash>,
2028 #[serde(rename = "leavesHashChains")]
2029 pub leaves_hash_chains: ::std::vec::Vec<Hash>,
2030 #[serde(rename = "nextIndex")]
2031 pub next_index: u64,
2032 }
2033 impl OutputQueueData {
2034 pub fn builder() -> builder::OutputQueueData {
2035 Default::default()
2036 }
2037 }
2038 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2061 pub struct OwnerBalance {
2062 pub balance: UnsignedInteger,
2063 pub owner: SerializablePubkey,
2064 }
2065 impl OwnerBalance {
2066 pub fn builder() -> builder::OwnerBalance {
2067 Default::default()
2068 }
2069 }
2070 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2095 pub struct OwnerBalanceList {
2096 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2097 pub cursor: ::std::option::Option<Base58String>,
2098 pub items: ::std::vec::Vec<OwnerBalance>,
2099 }
2100 impl OwnerBalanceList {
2101 pub fn builder() -> builder::OwnerBalanceList {
2102 Default::default()
2103 }
2104 }
2105 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2129 #[serde(deny_unknown_fields)]
2130 pub struct OwnerBalancesResponse {
2131 pub context: Context,
2132 pub value: OwnerBalanceList,
2133 }
2134 impl OwnerBalancesResponse {
2135 pub fn builder() -> builder::OwnerBalancesResponse {
2136 Default::default()
2137 }
2138 }
2139 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2165 #[serde(deny_unknown_fields)]
2166 pub struct PaginatedAccountList {
2167 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2168 pub cursor: ::std::option::Option<Hash>,
2169 pub items: ::std::vec::Vec<Account>,
2170 }
2171 impl PaginatedAccountList {
2172 pub fn builder() -> builder::PaginatedAccountList {
2173 Default::default()
2174 }
2175 }
2176 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2202 #[serde(deny_unknown_fields)]
2203 pub struct PaginatedAccountListV2 {
2204 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2205 pub cursor: ::std::option::Option<Hash>,
2206 pub items: ::std::vec::Vec<AccountV2>,
2207 }
2208 impl PaginatedAccountListV2 {
2209 pub fn builder() -> builder::PaginatedAccountListV2 {
2210 Default::default()
2211 }
2212 }
2213 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2241 pub struct PaginatedSignatureInfoList {
2242 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2243 pub cursor: ::std::option::Option<::std::string::String>,
2244 pub items: ::std::vec::Vec<SignatureInfo>,
2245 }
2246 impl PaginatedSignatureInfoList {
2247 pub fn builder() -> builder::PaginatedSignatureInfoList {
2248 Default::default()
2249 }
2250 }
2251 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2304 pub struct PostGetAccountInterfaceBody {
2305 pub id: PostGetAccountInterfaceBodyId,
2307 pub jsonrpc: PostGetAccountInterfaceBodyJsonrpc,
2309 pub method: PostGetAccountInterfaceBodyMethod,
2311 pub params: PostGetAccountInterfaceBodyParams,
2312 }
2313 impl PostGetAccountInterfaceBody {
2314 pub fn builder() -> builder::PostGetAccountInterfaceBody {
2315 Default::default()
2316 }
2317 }
2318 #[derive(
2333 ::serde::Deserialize,
2334 ::serde::Serialize,
2335 Clone,
2336 Copy,
2337 Debug,
2338 Eq,
2339 Hash,
2340 Ord,
2341 PartialEq,
2342 PartialOrd
2343 )]
2344 pub enum PostGetAccountInterfaceBodyId {
2345 #[serde(rename = "test-account")]
2346 TestAccount,
2347 }
2348 impl ::std::fmt::Display for PostGetAccountInterfaceBodyId {
2349 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2350 match *self {
2351 Self::TestAccount => f.write_str("test-account"),
2352 }
2353 }
2354 }
2355 impl ::std::str::FromStr for PostGetAccountInterfaceBodyId {
2356 type Err = self::error::ConversionError;
2357 fn from_str(
2358 value: &str,
2359 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2360 match value {
2361 "test-account" => Ok(Self::TestAccount),
2362 _ => Err("invalid value".into()),
2363 }
2364 }
2365 }
2366 impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceBodyId {
2367 type Error = self::error::ConversionError;
2368 fn try_from(
2369 value: &str,
2370 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2371 value.parse()
2372 }
2373 }
2374 impl ::std::convert::TryFrom<&::std::string::String>
2375 for PostGetAccountInterfaceBodyId {
2376 type Error = self::error::ConversionError;
2377 fn try_from(
2378 value: &::std::string::String,
2379 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2380 value.parse()
2381 }
2382 }
2383 impl ::std::convert::TryFrom<::std::string::String>
2384 for PostGetAccountInterfaceBodyId {
2385 type Error = self::error::ConversionError;
2386 fn try_from(
2387 value: ::std::string::String,
2388 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2389 value.parse()
2390 }
2391 }
2392 #[derive(
2407 ::serde::Deserialize,
2408 ::serde::Serialize,
2409 Clone,
2410 Copy,
2411 Debug,
2412 Eq,
2413 Hash,
2414 Ord,
2415 PartialEq,
2416 PartialOrd
2417 )]
2418 pub enum PostGetAccountInterfaceBodyJsonrpc {
2419 #[serde(rename = "2.0")]
2420 X20,
2421 }
2422 impl ::std::fmt::Display for PostGetAccountInterfaceBodyJsonrpc {
2423 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2424 match *self {
2425 Self::X20 => f.write_str("2.0"),
2426 }
2427 }
2428 }
2429 impl ::std::str::FromStr for PostGetAccountInterfaceBodyJsonrpc {
2430 type Err = self::error::ConversionError;
2431 fn from_str(
2432 value: &str,
2433 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2434 match value {
2435 "2.0" => Ok(Self::X20),
2436 _ => Err("invalid value".into()),
2437 }
2438 }
2439 }
2440 impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceBodyJsonrpc {
2441 type Error = self::error::ConversionError;
2442 fn try_from(
2443 value: &str,
2444 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2445 value.parse()
2446 }
2447 }
2448 impl ::std::convert::TryFrom<&::std::string::String>
2449 for PostGetAccountInterfaceBodyJsonrpc {
2450 type Error = self::error::ConversionError;
2451 fn try_from(
2452 value: &::std::string::String,
2453 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2454 value.parse()
2455 }
2456 }
2457 impl ::std::convert::TryFrom<::std::string::String>
2458 for PostGetAccountInterfaceBodyJsonrpc {
2459 type Error = self::error::ConversionError;
2460 fn try_from(
2461 value: ::std::string::String,
2462 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2463 value.parse()
2464 }
2465 }
2466 #[derive(
2481 ::serde::Deserialize,
2482 ::serde::Serialize,
2483 Clone,
2484 Copy,
2485 Debug,
2486 Eq,
2487 Hash,
2488 Ord,
2489 PartialEq,
2490 PartialOrd
2491 )]
2492 pub enum PostGetAccountInterfaceBodyMethod {
2493 #[serde(rename = "getAccountInterface")]
2494 GetAccountInterface,
2495 }
2496 impl ::std::fmt::Display for PostGetAccountInterfaceBodyMethod {
2497 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2498 match *self {
2499 Self::GetAccountInterface => f.write_str("getAccountInterface"),
2500 }
2501 }
2502 }
2503 impl ::std::str::FromStr for PostGetAccountInterfaceBodyMethod {
2504 type Err = self::error::ConversionError;
2505 fn from_str(
2506 value: &str,
2507 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2508 match value {
2509 "getAccountInterface" => Ok(Self::GetAccountInterface),
2510 _ => Err("invalid value".into()),
2511 }
2512 }
2513 }
2514 impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceBodyMethod {
2515 type Error = self::error::ConversionError;
2516 fn try_from(
2517 value: &str,
2518 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2519 value.parse()
2520 }
2521 }
2522 impl ::std::convert::TryFrom<&::std::string::String>
2523 for PostGetAccountInterfaceBodyMethod {
2524 type Error = self::error::ConversionError;
2525 fn try_from(
2526 value: &::std::string::String,
2527 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2528 value.parse()
2529 }
2530 }
2531 impl ::std::convert::TryFrom<::std::string::String>
2532 for PostGetAccountInterfaceBodyMethod {
2533 type Error = self::error::ConversionError;
2534 fn try_from(
2535 value: ::std::string::String,
2536 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2537 value.parse()
2538 }
2539 }
2540 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2561 #[serde(deny_unknown_fields)]
2562 pub struct PostGetAccountInterfaceBodyParams {
2563 pub address: SerializablePubkey,
2564 }
2565 impl PostGetAccountInterfaceBodyParams {
2566 pub fn builder() -> builder::PostGetAccountInterfaceBodyParams {
2567 Default::default()
2568 }
2569 }
2570 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2627 pub struct PostGetAccountInterfaceResponse {
2628 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2629 pub error: ::std::option::Option<PostGetAccountInterfaceResponseError>,
2630 pub id: PostGetAccountInterfaceResponseId,
2632 pub jsonrpc: PostGetAccountInterfaceResponseJsonrpc,
2634 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2635 pub result: ::std::option::Option<PostGetAccountInterfaceResponseResult>,
2636 }
2637 impl PostGetAccountInterfaceResponse {
2638 pub fn builder() -> builder::PostGetAccountInterfaceResponse {
2639 Default::default()
2640 }
2641 }
2642 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2661 pub struct PostGetAccountInterfaceResponseError {
2662 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2663 pub code: ::std::option::Option<i64>,
2664 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2665 pub message: ::std::option::Option<::std::string::String>,
2666 }
2667 impl ::std::default::Default for PostGetAccountInterfaceResponseError {
2668 fn default() -> Self {
2669 Self {
2670 code: Default::default(),
2671 message: Default::default(),
2672 }
2673 }
2674 }
2675 impl PostGetAccountInterfaceResponseError {
2676 pub fn builder() -> builder::PostGetAccountInterfaceResponseError {
2677 Default::default()
2678 }
2679 }
2680 #[derive(
2695 ::serde::Deserialize,
2696 ::serde::Serialize,
2697 Clone,
2698 Copy,
2699 Debug,
2700 Eq,
2701 Hash,
2702 Ord,
2703 PartialEq,
2704 PartialOrd
2705 )]
2706 pub enum PostGetAccountInterfaceResponseId {
2707 #[serde(rename = "test-account")]
2708 TestAccount,
2709 }
2710 impl ::std::fmt::Display for PostGetAccountInterfaceResponseId {
2711 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2712 match *self {
2713 Self::TestAccount => f.write_str("test-account"),
2714 }
2715 }
2716 }
2717 impl ::std::str::FromStr for PostGetAccountInterfaceResponseId {
2718 type Err = self::error::ConversionError;
2719 fn from_str(
2720 value: &str,
2721 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2722 match value {
2723 "test-account" => Ok(Self::TestAccount),
2724 _ => Err("invalid value".into()),
2725 }
2726 }
2727 }
2728 impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceResponseId {
2729 type Error = self::error::ConversionError;
2730 fn try_from(
2731 value: &str,
2732 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2733 value.parse()
2734 }
2735 }
2736 impl ::std::convert::TryFrom<&::std::string::String>
2737 for PostGetAccountInterfaceResponseId {
2738 type Error = self::error::ConversionError;
2739 fn try_from(
2740 value: &::std::string::String,
2741 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2742 value.parse()
2743 }
2744 }
2745 impl ::std::convert::TryFrom<::std::string::String>
2746 for PostGetAccountInterfaceResponseId {
2747 type Error = self::error::ConversionError;
2748 fn try_from(
2749 value: ::std::string::String,
2750 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2751 value.parse()
2752 }
2753 }
2754 #[derive(
2769 ::serde::Deserialize,
2770 ::serde::Serialize,
2771 Clone,
2772 Copy,
2773 Debug,
2774 Eq,
2775 Hash,
2776 Ord,
2777 PartialEq,
2778 PartialOrd
2779 )]
2780 pub enum PostGetAccountInterfaceResponseJsonrpc {
2781 #[serde(rename = "2.0")]
2782 X20,
2783 }
2784 impl ::std::fmt::Display for PostGetAccountInterfaceResponseJsonrpc {
2785 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2786 match *self {
2787 Self::X20 => f.write_str("2.0"),
2788 }
2789 }
2790 }
2791 impl ::std::str::FromStr for PostGetAccountInterfaceResponseJsonrpc {
2792 type Err = self::error::ConversionError;
2793 fn from_str(
2794 value: &str,
2795 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2796 match value {
2797 "2.0" => Ok(Self::X20),
2798 _ => Err("invalid value".into()),
2799 }
2800 }
2801 }
2802 impl ::std::convert::TryFrom<&str> for PostGetAccountInterfaceResponseJsonrpc {
2803 type Error = self::error::ConversionError;
2804 fn try_from(
2805 value: &str,
2806 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2807 value.parse()
2808 }
2809 }
2810 impl ::std::convert::TryFrom<&::std::string::String>
2811 for PostGetAccountInterfaceResponseJsonrpc {
2812 type Error = self::error::ConversionError;
2813 fn try_from(
2814 value: &::std::string::String,
2815 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2816 value.parse()
2817 }
2818 }
2819 impl ::std::convert::TryFrom<::std::string::String>
2820 for PostGetAccountInterfaceResponseJsonrpc {
2821 type Error = self::error::ConversionError;
2822 fn try_from(
2823 value: ::std::string::String,
2824 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2825 value.parse()
2826 }
2827 }
2828 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2851 pub struct PostGetAccountInterfaceResponseResult {
2852 pub context: Context,
2853 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2854 pub value: ::std::option::Option<AccountInterface>,
2855 }
2856 impl PostGetAccountInterfaceResponseResult {
2857 pub fn builder() -> builder::PostGetAccountInterfaceResponseResult {
2858 Default::default()
2859 }
2860 }
2861 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2946 pub struct PostGetCompressedAccountBalanceBody {
2947 pub id: PostGetCompressedAccountBalanceBodyId,
2949 pub jsonrpc: PostGetCompressedAccountBalanceBodyJsonrpc,
2951 pub method: PostGetCompressedAccountBalanceBodyMethod,
2953 pub params: PostGetCompressedAccountBalanceBodyParams,
2954 }
2955 impl PostGetCompressedAccountBalanceBody {
2956 pub fn builder() -> builder::PostGetCompressedAccountBalanceBody {
2957 Default::default()
2958 }
2959 }
2960 #[derive(
2975 ::serde::Deserialize,
2976 ::serde::Serialize,
2977 Clone,
2978 Copy,
2979 Debug,
2980 Eq,
2981 Hash,
2982 Ord,
2983 PartialEq,
2984 PartialOrd
2985 )]
2986 pub enum PostGetCompressedAccountBalanceBodyId {
2987 #[serde(rename = "test-account")]
2988 TestAccount,
2989 }
2990 impl ::std::fmt::Display for PostGetCompressedAccountBalanceBodyId {
2991 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2992 match *self {
2993 Self::TestAccount => f.write_str("test-account"),
2994 }
2995 }
2996 }
2997 impl ::std::str::FromStr for PostGetCompressedAccountBalanceBodyId {
2998 type Err = self::error::ConversionError;
2999 fn from_str(
3000 value: &str,
3001 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3002 match value {
3003 "test-account" => Ok(Self::TestAccount),
3004 _ => Err("invalid value".into()),
3005 }
3006 }
3007 }
3008 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBalanceBodyId {
3009 type Error = self::error::ConversionError;
3010 fn try_from(
3011 value: &str,
3012 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3013 value.parse()
3014 }
3015 }
3016 impl ::std::convert::TryFrom<&::std::string::String>
3017 for PostGetCompressedAccountBalanceBodyId {
3018 type Error = self::error::ConversionError;
3019 fn try_from(
3020 value: &::std::string::String,
3021 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3022 value.parse()
3023 }
3024 }
3025 impl ::std::convert::TryFrom<::std::string::String>
3026 for PostGetCompressedAccountBalanceBodyId {
3027 type Error = self::error::ConversionError;
3028 fn try_from(
3029 value: ::std::string::String,
3030 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3031 value.parse()
3032 }
3033 }
3034 #[derive(
3049 ::serde::Deserialize,
3050 ::serde::Serialize,
3051 Clone,
3052 Copy,
3053 Debug,
3054 Eq,
3055 Hash,
3056 Ord,
3057 PartialEq,
3058 PartialOrd
3059 )]
3060 pub enum PostGetCompressedAccountBalanceBodyJsonrpc {
3061 #[serde(rename = "2.0")]
3062 X20,
3063 }
3064 impl ::std::fmt::Display for PostGetCompressedAccountBalanceBodyJsonrpc {
3065 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3066 match *self {
3067 Self::X20 => f.write_str("2.0"),
3068 }
3069 }
3070 }
3071 impl ::std::str::FromStr for PostGetCompressedAccountBalanceBodyJsonrpc {
3072 type Err = self::error::ConversionError;
3073 fn from_str(
3074 value: &str,
3075 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3076 match value {
3077 "2.0" => Ok(Self::X20),
3078 _ => Err("invalid value".into()),
3079 }
3080 }
3081 }
3082 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBalanceBodyJsonrpc {
3083 type Error = self::error::ConversionError;
3084 fn try_from(
3085 value: &str,
3086 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3087 value.parse()
3088 }
3089 }
3090 impl ::std::convert::TryFrom<&::std::string::String>
3091 for PostGetCompressedAccountBalanceBodyJsonrpc {
3092 type Error = self::error::ConversionError;
3093 fn try_from(
3094 value: &::std::string::String,
3095 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3096 value.parse()
3097 }
3098 }
3099 impl ::std::convert::TryFrom<::std::string::String>
3100 for PostGetCompressedAccountBalanceBodyJsonrpc {
3101 type Error = self::error::ConversionError;
3102 fn try_from(
3103 value: ::std::string::String,
3104 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3105 value.parse()
3106 }
3107 }
3108 #[derive(
3123 ::serde::Deserialize,
3124 ::serde::Serialize,
3125 Clone,
3126 Copy,
3127 Debug,
3128 Eq,
3129 Hash,
3130 Ord,
3131 PartialEq,
3132 PartialOrd
3133 )]
3134 pub enum PostGetCompressedAccountBalanceBodyMethod {
3135 #[serde(rename = "getCompressedAccountBalance")]
3136 GetCompressedAccountBalance,
3137 }
3138 impl ::std::fmt::Display for PostGetCompressedAccountBalanceBodyMethod {
3139 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3140 match *self {
3141 Self::GetCompressedAccountBalance => {
3142 f.write_str("getCompressedAccountBalance")
3143 }
3144 }
3145 }
3146 }
3147 impl ::std::str::FromStr for PostGetCompressedAccountBalanceBodyMethod {
3148 type Err = self::error::ConversionError;
3149 fn from_str(
3150 value: &str,
3151 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3152 match value {
3153 "getCompressedAccountBalance" => Ok(Self::GetCompressedAccountBalance),
3154 _ => Err("invalid value".into()),
3155 }
3156 }
3157 }
3158 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBalanceBodyMethod {
3159 type Error = self::error::ConversionError;
3160 fn try_from(
3161 value: &str,
3162 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3163 value.parse()
3164 }
3165 }
3166 impl ::std::convert::TryFrom<&::std::string::String>
3167 for PostGetCompressedAccountBalanceBodyMethod {
3168 type Error = self::error::ConversionError;
3169 fn try_from(
3170 value: &::std::string::String,
3171 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3172 value.parse()
3173 }
3174 }
3175 impl ::std::convert::TryFrom<::std::string::String>
3176 for PostGetCompressedAccountBalanceBodyMethod {
3177 type Error = self::error::ConversionError;
3178 fn try_from(
3179 value: ::std::string::String,
3180 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3181 value.parse()
3182 }
3183 }
3184 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3237 #[serde(deny_unknown_fields)]
3238 pub struct PostGetCompressedAccountBalanceBodyParams {
3239 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3240 pub address: ::std::option::Option<SerializablePubkey>,
3241 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3242 pub hash: ::std::option::Option<Hash>,
3243 }
3244 impl ::std::default::Default for PostGetCompressedAccountBalanceBodyParams {
3245 fn default() -> Self {
3246 PostGetCompressedAccountBalanceBodyParams {
3247 address: ::std::option::Option::None,
3248 hash: ::std::option::Option::Some(
3249 Hash("11111111111111111111111111111111".to_string()),
3250 ),
3251 }
3252 }
3253 }
3254 impl PostGetCompressedAccountBalanceBodyParams {
3255 pub fn builder() -> builder::PostGetCompressedAccountBalanceBodyParams {
3256 Default::default()
3257 }
3258 }
3259 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3317 pub struct PostGetCompressedAccountBalanceResponse {
3318 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3319 pub error: ::std::option::Option<PostGetCompressedAccountBalanceResponseError>,
3320 pub id: PostGetCompressedAccountBalanceResponseId,
3322 pub jsonrpc: PostGetCompressedAccountBalanceResponseJsonrpc,
3324 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3325 pub result: ::std::option::Option<PostGetCompressedAccountBalanceResponseResult>,
3326 }
3327 impl PostGetCompressedAccountBalanceResponse {
3328 pub fn builder() -> builder::PostGetCompressedAccountBalanceResponse {
3329 Default::default()
3330 }
3331 }
3332 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3351 pub struct PostGetCompressedAccountBalanceResponseError {
3352 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3353 pub code: ::std::option::Option<i64>,
3354 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3355 pub message: ::std::option::Option<::std::string::String>,
3356 }
3357 impl ::std::default::Default for PostGetCompressedAccountBalanceResponseError {
3358 fn default() -> Self {
3359 Self {
3360 code: Default::default(),
3361 message: Default::default(),
3362 }
3363 }
3364 }
3365 impl PostGetCompressedAccountBalanceResponseError {
3366 pub fn builder() -> builder::PostGetCompressedAccountBalanceResponseError {
3367 Default::default()
3368 }
3369 }
3370 #[derive(
3385 ::serde::Deserialize,
3386 ::serde::Serialize,
3387 Clone,
3388 Copy,
3389 Debug,
3390 Eq,
3391 Hash,
3392 Ord,
3393 PartialEq,
3394 PartialOrd
3395 )]
3396 pub enum PostGetCompressedAccountBalanceResponseId {
3397 #[serde(rename = "test-account")]
3398 TestAccount,
3399 }
3400 impl ::std::fmt::Display for PostGetCompressedAccountBalanceResponseId {
3401 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3402 match *self {
3403 Self::TestAccount => f.write_str("test-account"),
3404 }
3405 }
3406 }
3407 impl ::std::str::FromStr for PostGetCompressedAccountBalanceResponseId {
3408 type Err = self::error::ConversionError;
3409 fn from_str(
3410 value: &str,
3411 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3412 match value {
3413 "test-account" => Ok(Self::TestAccount),
3414 _ => Err("invalid value".into()),
3415 }
3416 }
3417 }
3418 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBalanceResponseId {
3419 type Error = self::error::ConversionError;
3420 fn try_from(
3421 value: &str,
3422 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3423 value.parse()
3424 }
3425 }
3426 impl ::std::convert::TryFrom<&::std::string::String>
3427 for PostGetCompressedAccountBalanceResponseId {
3428 type Error = self::error::ConversionError;
3429 fn try_from(
3430 value: &::std::string::String,
3431 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3432 value.parse()
3433 }
3434 }
3435 impl ::std::convert::TryFrom<::std::string::String>
3436 for PostGetCompressedAccountBalanceResponseId {
3437 type Error = self::error::ConversionError;
3438 fn try_from(
3439 value: ::std::string::String,
3440 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3441 value.parse()
3442 }
3443 }
3444 #[derive(
3459 ::serde::Deserialize,
3460 ::serde::Serialize,
3461 Clone,
3462 Copy,
3463 Debug,
3464 Eq,
3465 Hash,
3466 Ord,
3467 PartialEq,
3468 PartialOrd
3469 )]
3470 pub enum PostGetCompressedAccountBalanceResponseJsonrpc {
3471 #[serde(rename = "2.0")]
3472 X20,
3473 }
3474 impl ::std::fmt::Display for PostGetCompressedAccountBalanceResponseJsonrpc {
3475 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3476 match *self {
3477 Self::X20 => f.write_str("2.0"),
3478 }
3479 }
3480 }
3481 impl ::std::str::FromStr for PostGetCompressedAccountBalanceResponseJsonrpc {
3482 type Err = self::error::ConversionError;
3483 fn from_str(
3484 value: &str,
3485 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3486 match value {
3487 "2.0" => Ok(Self::X20),
3488 _ => Err("invalid value".into()),
3489 }
3490 }
3491 }
3492 impl ::std::convert::TryFrom<&str>
3493 for PostGetCompressedAccountBalanceResponseJsonrpc {
3494 type Error = self::error::ConversionError;
3495 fn try_from(
3496 value: &str,
3497 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3498 value.parse()
3499 }
3500 }
3501 impl ::std::convert::TryFrom<&::std::string::String>
3502 for PostGetCompressedAccountBalanceResponseJsonrpc {
3503 type Error = self::error::ConversionError;
3504 fn try_from(
3505 value: &::std::string::String,
3506 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3507 value.parse()
3508 }
3509 }
3510 impl ::std::convert::TryFrom<::std::string::String>
3511 for PostGetCompressedAccountBalanceResponseJsonrpc {
3512 type Error = self::error::ConversionError;
3513 fn try_from(
3514 value: ::std::string::String,
3515 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3516 value.parse()
3517 }
3518 }
3519 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3543 #[serde(deny_unknown_fields)]
3544 pub struct PostGetCompressedAccountBalanceResponseResult {
3545 pub context: Context,
3546 pub value: UnsignedInteger,
3547 }
3548 impl PostGetCompressedAccountBalanceResponseResult {
3549 pub fn builder() -> builder::PostGetCompressedAccountBalanceResponseResult {
3550 Default::default()
3551 }
3552 }
3553 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3638 pub struct PostGetCompressedAccountBody {
3639 pub id: PostGetCompressedAccountBodyId,
3641 pub jsonrpc: PostGetCompressedAccountBodyJsonrpc,
3643 pub method: PostGetCompressedAccountBodyMethod,
3645 pub params: PostGetCompressedAccountBodyParams,
3646 }
3647 impl PostGetCompressedAccountBody {
3648 pub fn builder() -> builder::PostGetCompressedAccountBody {
3649 Default::default()
3650 }
3651 }
3652 #[derive(
3667 ::serde::Deserialize,
3668 ::serde::Serialize,
3669 Clone,
3670 Copy,
3671 Debug,
3672 Eq,
3673 Hash,
3674 Ord,
3675 PartialEq,
3676 PartialOrd
3677 )]
3678 pub enum PostGetCompressedAccountBodyId {
3679 #[serde(rename = "test-account")]
3680 TestAccount,
3681 }
3682 impl ::std::fmt::Display for PostGetCompressedAccountBodyId {
3683 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3684 match *self {
3685 Self::TestAccount => f.write_str("test-account"),
3686 }
3687 }
3688 }
3689 impl ::std::str::FromStr for PostGetCompressedAccountBodyId {
3690 type Err = self::error::ConversionError;
3691 fn from_str(
3692 value: &str,
3693 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3694 match value {
3695 "test-account" => Ok(Self::TestAccount),
3696 _ => Err("invalid value".into()),
3697 }
3698 }
3699 }
3700 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBodyId {
3701 type Error = self::error::ConversionError;
3702 fn try_from(
3703 value: &str,
3704 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3705 value.parse()
3706 }
3707 }
3708 impl ::std::convert::TryFrom<&::std::string::String>
3709 for PostGetCompressedAccountBodyId {
3710 type Error = self::error::ConversionError;
3711 fn try_from(
3712 value: &::std::string::String,
3713 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3714 value.parse()
3715 }
3716 }
3717 impl ::std::convert::TryFrom<::std::string::String>
3718 for PostGetCompressedAccountBodyId {
3719 type Error = self::error::ConversionError;
3720 fn try_from(
3721 value: ::std::string::String,
3722 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3723 value.parse()
3724 }
3725 }
3726 #[derive(
3741 ::serde::Deserialize,
3742 ::serde::Serialize,
3743 Clone,
3744 Copy,
3745 Debug,
3746 Eq,
3747 Hash,
3748 Ord,
3749 PartialEq,
3750 PartialOrd
3751 )]
3752 pub enum PostGetCompressedAccountBodyJsonrpc {
3753 #[serde(rename = "2.0")]
3754 X20,
3755 }
3756 impl ::std::fmt::Display for PostGetCompressedAccountBodyJsonrpc {
3757 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3758 match *self {
3759 Self::X20 => f.write_str("2.0"),
3760 }
3761 }
3762 }
3763 impl ::std::str::FromStr for PostGetCompressedAccountBodyJsonrpc {
3764 type Err = self::error::ConversionError;
3765 fn from_str(
3766 value: &str,
3767 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3768 match value {
3769 "2.0" => Ok(Self::X20),
3770 _ => Err("invalid value".into()),
3771 }
3772 }
3773 }
3774 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBodyJsonrpc {
3775 type Error = self::error::ConversionError;
3776 fn try_from(
3777 value: &str,
3778 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3779 value.parse()
3780 }
3781 }
3782 impl ::std::convert::TryFrom<&::std::string::String>
3783 for PostGetCompressedAccountBodyJsonrpc {
3784 type Error = self::error::ConversionError;
3785 fn try_from(
3786 value: &::std::string::String,
3787 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3788 value.parse()
3789 }
3790 }
3791 impl ::std::convert::TryFrom<::std::string::String>
3792 for PostGetCompressedAccountBodyJsonrpc {
3793 type Error = self::error::ConversionError;
3794 fn try_from(
3795 value: ::std::string::String,
3796 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3797 value.parse()
3798 }
3799 }
3800 #[derive(
3815 ::serde::Deserialize,
3816 ::serde::Serialize,
3817 Clone,
3818 Copy,
3819 Debug,
3820 Eq,
3821 Hash,
3822 Ord,
3823 PartialEq,
3824 PartialOrd
3825 )]
3826 pub enum PostGetCompressedAccountBodyMethod {
3827 #[serde(rename = "getCompressedAccount")]
3828 GetCompressedAccount,
3829 }
3830 impl ::std::fmt::Display for PostGetCompressedAccountBodyMethod {
3831 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3832 match *self {
3833 Self::GetCompressedAccount => f.write_str("getCompressedAccount"),
3834 }
3835 }
3836 }
3837 impl ::std::str::FromStr for PostGetCompressedAccountBodyMethod {
3838 type Err = self::error::ConversionError;
3839 fn from_str(
3840 value: &str,
3841 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3842 match value {
3843 "getCompressedAccount" => Ok(Self::GetCompressedAccount),
3844 _ => Err("invalid value".into()),
3845 }
3846 }
3847 }
3848 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountBodyMethod {
3849 type Error = self::error::ConversionError;
3850 fn try_from(
3851 value: &str,
3852 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3853 value.parse()
3854 }
3855 }
3856 impl ::std::convert::TryFrom<&::std::string::String>
3857 for PostGetCompressedAccountBodyMethod {
3858 type Error = self::error::ConversionError;
3859 fn try_from(
3860 value: &::std::string::String,
3861 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3862 value.parse()
3863 }
3864 }
3865 impl ::std::convert::TryFrom<::std::string::String>
3866 for PostGetCompressedAccountBodyMethod {
3867 type Error = self::error::ConversionError;
3868 fn try_from(
3869 value: ::std::string::String,
3870 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3871 value.parse()
3872 }
3873 }
3874 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3927 #[serde(deny_unknown_fields)]
3928 pub struct PostGetCompressedAccountBodyParams {
3929 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3930 pub address: ::std::option::Option<SerializablePubkey>,
3931 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3932 pub hash: ::std::option::Option<Hash>,
3933 }
3934 impl ::std::default::Default for PostGetCompressedAccountBodyParams {
3935 fn default() -> Self {
3936 PostGetCompressedAccountBodyParams {
3937 address: ::std::option::Option::None,
3938 hash: ::std::option::Option::Some(
3939 Hash("11111111111111111111111111111111".to_string()),
3940 ),
3941 }
3942 }
3943 }
3944 impl PostGetCompressedAccountBodyParams {
3945 pub fn builder() -> builder::PostGetCompressedAccountBodyParams {
3946 Default::default()
3947 }
3948 }
3949 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4000 pub struct PostGetCompressedAccountProofBody {
4001 pub id: PostGetCompressedAccountProofBodyId,
4003 pub jsonrpc: PostGetCompressedAccountProofBodyJsonrpc,
4005 pub method: PostGetCompressedAccountProofBodyMethod,
4007 pub params: PostGetCompressedAccountProofBodyParams,
4008 }
4009 impl PostGetCompressedAccountProofBody {
4010 pub fn builder() -> builder::PostGetCompressedAccountProofBody {
4011 Default::default()
4012 }
4013 }
4014 #[derive(
4029 ::serde::Deserialize,
4030 ::serde::Serialize,
4031 Clone,
4032 Copy,
4033 Debug,
4034 Eq,
4035 Hash,
4036 Ord,
4037 PartialEq,
4038 PartialOrd
4039 )]
4040 pub enum PostGetCompressedAccountProofBodyId {
4041 #[serde(rename = "test-account")]
4042 TestAccount,
4043 }
4044 impl ::std::fmt::Display for PostGetCompressedAccountProofBodyId {
4045 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4046 match *self {
4047 Self::TestAccount => f.write_str("test-account"),
4048 }
4049 }
4050 }
4051 impl ::std::str::FromStr for PostGetCompressedAccountProofBodyId {
4052 type Err = self::error::ConversionError;
4053 fn from_str(
4054 value: &str,
4055 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4056 match value {
4057 "test-account" => Ok(Self::TestAccount),
4058 _ => Err("invalid value".into()),
4059 }
4060 }
4061 }
4062 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofBodyId {
4063 type Error = self::error::ConversionError;
4064 fn try_from(
4065 value: &str,
4066 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4067 value.parse()
4068 }
4069 }
4070 impl ::std::convert::TryFrom<&::std::string::String>
4071 for PostGetCompressedAccountProofBodyId {
4072 type Error = self::error::ConversionError;
4073 fn try_from(
4074 value: &::std::string::String,
4075 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4076 value.parse()
4077 }
4078 }
4079 impl ::std::convert::TryFrom<::std::string::String>
4080 for PostGetCompressedAccountProofBodyId {
4081 type Error = self::error::ConversionError;
4082 fn try_from(
4083 value: ::std::string::String,
4084 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4085 value.parse()
4086 }
4087 }
4088 #[derive(
4103 ::serde::Deserialize,
4104 ::serde::Serialize,
4105 Clone,
4106 Copy,
4107 Debug,
4108 Eq,
4109 Hash,
4110 Ord,
4111 PartialEq,
4112 PartialOrd
4113 )]
4114 pub enum PostGetCompressedAccountProofBodyJsonrpc {
4115 #[serde(rename = "2.0")]
4116 X20,
4117 }
4118 impl ::std::fmt::Display for PostGetCompressedAccountProofBodyJsonrpc {
4119 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4120 match *self {
4121 Self::X20 => f.write_str("2.0"),
4122 }
4123 }
4124 }
4125 impl ::std::str::FromStr for PostGetCompressedAccountProofBodyJsonrpc {
4126 type Err = self::error::ConversionError;
4127 fn from_str(
4128 value: &str,
4129 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4130 match value {
4131 "2.0" => Ok(Self::X20),
4132 _ => Err("invalid value".into()),
4133 }
4134 }
4135 }
4136 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofBodyJsonrpc {
4137 type Error = self::error::ConversionError;
4138 fn try_from(
4139 value: &str,
4140 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4141 value.parse()
4142 }
4143 }
4144 impl ::std::convert::TryFrom<&::std::string::String>
4145 for PostGetCompressedAccountProofBodyJsonrpc {
4146 type Error = self::error::ConversionError;
4147 fn try_from(
4148 value: &::std::string::String,
4149 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4150 value.parse()
4151 }
4152 }
4153 impl ::std::convert::TryFrom<::std::string::String>
4154 for PostGetCompressedAccountProofBodyJsonrpc {
4155 type Error = self::error::ConversionError;
4156 fn try_from(
4157 value: ::std::string::String,
4158 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4159 value.parse()
4160 }
4161 }
4162 #[derive(
4177 ::serde::Deserialize,
4178 ::serde::Serialize,
4179 Clone,
4180 Copy,
4181 Debug,
4182 Eq,
4183 Hash,
4184 Ord,
4185 PartialEq,
4186 PartialOrd
4187 )]
4188 pub enum PostGetCompressedAccountProofBodyMethod {
4189 #[serde(rename = "getCompressedAccountProof")]
4190 GetCompressedAccountProof,
4191 }
4192 impl ::std::fmt::Display for PostGetCompressedAccountProofBodyMethod {
4193 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4194 match *self {
4195 Self::GetCompressedAccountProof => {
4196 f.write_str("getCompressedAccountProof")
4197 }
4198 }
4199 }
4200 }
4201 impl ::std::str::FromStr for PostGetCompressedAccountProofBodyMethod {
4202 type Err = self::error::ConversionError;
4203 fn from_str(
4204 value: &str,
4205 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4206 match value {
4207 "getCompressedAccountProof" => Ok(Self::GetCompressedAccountProof),
4208 _ => Err("invalid value".into()),
4209 }
4210 }
4211 }
4212 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofBodyMethod {
4213 type Error = self::error::ConversionError;
4214 fn try_from(
4215 value: &str,
4216 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4217 value.parse()
4218 }
4219 }
4220 impl ::std::convert::TryFrom<&::std::string::String>
4221 for PostGetCompressedAccountProofBodyMethod {
4222 type Error = self::error::ConversionError;
4223 fn try_from(
4224 value: &::std::string::String,
4225 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4226 value.parse()
4227 }
4228 }
4229 impl ::std::convert::TryFrom<::std::string::String>
4230 for PostGetCompressedAccountProofBodyMethod {
4231 type Error = self::error::ConversionError;
4232 fn try_from(
4233 value: ::std::string::String,
4234 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4235 value.parse()
4236 }
4237 }
4238 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4257 pub struct PostGetCompressedAccountProofBodyParams {
4258 pub hash: Hash,
4259 }
4260 impl PostGetCompressedAccountProofBodyParams {
4261 pub fn builder() -> builder::PostGetCompressedAccountProofBodyParams {
4262 Default::default()
4263 }
4264 }
4265 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4323 pub struct PostGetCompressedAccountProofResponse {
4324 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4325 pub error: ::std::option::Option<PostGetCompressedAccountProofResponseError>,
4326 pub id: PostGetCompressedAccountProofResponseId,
4328 pub jsonrpc: PostGetCompressedAccountProofResponseJsonrpc,
4330 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4331 pub result: ::std::option::Option<PostGetCompressedAccountProofResponseResult>,
4332 }
4333 impl PostGetCompressedAccountProofResponse {
4334 pub fn builder() -> builder::PostGetCompressedAccountProofResponse {
4335 Default::default()
4336 }
4337 }
4338 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4357 pub struct PostGetCompressedAccountProofResponseError {
4358 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4359 pub code: ::std::option::Option<i64>,
4360 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4361 pub message: ::std::option::Option<::std::string::String>,
4362 }
4363 impl ::std::default::Default for PostGetCompressedAccountProofResponseError {
4364 fn default() -> Self {
4365 Self {
4366 code: Default::default(),
4367 message: Default::default(),
4368 }
4369 }
4370 }
4371 impl PostGetCompressedAccountProofResponseError {
4372 pub fn builder() -> builder::PostGetCompressedAccountProofResponseError {
4373 Default::default()
4374 }
4375 }
4376 #[derive(
4391 ::serde::Deserialize,
4392 ::serde::Serialize,
4393 Clone,
4394 Copy,
4395 Debug,
4396 Eq,
4397 Hash,
4398 Ord,
4399 PartialEq,
4400 PartialOrd
4401 )]
4402 pub enum PostGetCompressedAccountProofResponseId {
4403 #[serde(rename = "test-account")]
4404 TestAccount,
4405 }
4406 impl ::std::fmt::Display for PostGetCompressedAccountProofResponseId {
4407 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4408 match *self {
4409 Self::TestAccount => f.write_str("test-account"),
4410 }
4411 }
4412 }
4413 impl ::std::str::FromStr for PostGetCompressedAccountProofResponseId {
4414 type Err = self::error::ConversionError;
4415 fn from_str(
4416 value: &str,
4417 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4418 match value {
4419 "test-account" => Ok(Self::TestAccount),
4420 _ => Err("invalid value".into()),
4421 }
4422 }
4423 }
4424 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofResponseId {
4425 type Error = self::error::ConversionError;
4426 fn try_from(
4427 value: &str,
4428 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4429 value.parse()
4430 }
4431 }
4432 impl ::std::convert::TryFrom<&::std::string::String>
4433 for PostGetCompressedAccountProofResponseId {
4434 type Error = self::error::ConversionError;
4435 fn try_from(
4436 value: &::std::string::String,
4437 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4438 value.parse()
4439 }
4440 }
4441 impl ::std::convert::TryFrom<::std::string::String>
4442 for PostGetCompressedAccountProofResponseId {
4443 type Error = self::error::ConversionError;
4444 fn try_from(
4445 value: ::std::string::String,
4446 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4447 value.parse()
4448 }
4449 }
4450 #[derive(
4465 ::serde::Deserialize,
4466 ::serde::Serialize,
4467 Clone,
4468 Copy,
4469 Debug,
4470 Eq,
4471 Hash,
4472 Ord,
4473 PartialEq,
4474 PartialOrd
4475 )]
4476 pub enum PostGetCompressedAccountProofResponseJsonrpc {
4477 #[serde(rename = "2.0")]
4478 X20,
4479 }
4480 impl ::std::fmt::Display for PostGetCompressedAccountProofResponseJsonrpc {
4481 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4482 match *self {
4483 Self::X20 => f.write_str("2.0"),
4484 }
4485 }
4486 }
4487 impl ::std::str::FromStr for PostGetCompressedAccountProofResponseJsonrpc {
4488 type Err = self::error::ConversionError;
4489 fn from_str(
4490 value: &str,
4491 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4492 match value {
4493 "2.0" => Ok(Self::X20),
4494 _ => Err("invalid value".into()),
4495 }
4496 }
4497 }
4498 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofResponseJsonrpc {
4499 type Error = self::error::ConversionError;
4500 fn try_from(
4501 value: &str,
4502 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4503 value.parse()
4504 }
4505 }
4506 impl ::std::convert::TryFrom<&::std::string::String>
4507 for PostGetCompressedAccountProofResponseJsonrpc {
4508 type Error = self::error::ConversionError;
4509 fn try_from(
4510 value: &::std::string::String,
4511 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4512 value.parse()
4513 }
4514 }
4515 impl ::std::convert::TryFrom<::std::string::String>
4516 for PostGetCompressedAccountProofResponseJsonrpc {
4517 type Error = self::error::ConversionError;
4518 fn try_from(
4519 value: ::std::string::String,
4520 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4521 value.parse()
4522 }
4523 }
4524 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4548 #[serde(deny_unknown_fields)]
4549 pub struct PostGetCompressedAccountProofResponseResult {
4550 pub context: Context,
4551 pub value: GetCompressedAccountProofResponseValue,
4552 }
4553 impl PostGetCompressedAccountProofResponseResult {
4554 pub fn builder() -> builder::PostGetCompressedAccountProofResponseResult {
4555 Default::default()
4556 }
4557 }
4558 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4609 pub struct PostGetCompressedAccountProofV2Body {
4610 pub id: PostGetCompressedAccountProofV2BodyId,
4612 pub jsonrpc: PostGetCompressedAccountProofV2BodyJsonrpc,
4614 pub method: PostGetCompressedAccountProofV2BodyMethod,
4616 pub params: PostGetCompressedAccountProofV2BodyParams,
4617 }
4618 impl PostGetCompressedAccountProofV2Body {
4619 pub fn builder() -> builder::PostGetCompressedAccountProofV2Body {
4620 Default::default()
4621 }
4622 }
4623 #[derive(
4638 ::serde::Deserialize,
4639 ::serde::Serialize,
4640 Clone,
4641 Copy,
4642 Debug,
4643 Eq,
4644 Hash,
4645 Ord,
4646 PartialEq,
4647 PartialOrd
4648 )]
4649 pub enum PostGetCompressedAccountProofV2BodyId {
4650 #[serde(rename = "test-account")]
4651 TestAccount,
4652 }
4653 impl ::std::fmt::Display for PostGetCompressedAccountProofV2BodyId {
4654 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4655 match *self {
4656 Self::TestAccount => f.write_str("test-account"),
4657 }
4658 }
4659 }
4660 impl ::std::str::FromStr for PostGetCompressedAccountProofV2BodyId {
4661 type Err = self::error::ConversionError;
4662 fn from_str(
4663 value: &str,
4664 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4665 match value {
4666 "test-account" => Ok(Self::TestAccount),
4667 _ => Err("invalid value".into()),
4668 }
4669 }
4670 }
4671 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofV2BodyId {
4672 type Error = self::error::ConversionError;
4673 fn try_from(
4674 value: &str,
4675 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4676 value.parse()
4677 }
4678 }
4679 impl ::std::convert::TryFrom<&::std::string::String>
4680 for PostGetCompressedAccountProofV2BodyId {
4681 type Error = self::error::ConversionError;
4682 fn try_from(
4683 value: &::std::string::String,
4684 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4685 value.parse()
4686 }
4687 }
4688 impl ::std::convert::TryFrom<::std::string::String>
4689 for PostGetCompressedAccountProofV2BodyId {
4690 type Error = self::error::ConversionError;
4691 fn try_from(
4692 value: ::std::string::String,
4693 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4694 value.parse()
4695 }
4696 }
4697 #[derive(
4712 ::serde::Deserialize,
4713 ::serde::Serialize,
4714 Clone,
4715 Copy,
4716 Debug,
4717 Eq,
4718 Hash,
4719 Ord,
4720 PartialEq,
4721 PartialOrd
4722 )]
4723 pub enum PostGetCompressedAccountProofV2BodyJsonrpc {
4724 #[serde(rename = "2.0")]
4725 X20,
4726 }
4727 impl ::std::fmt::Display for PostGetCompressedAccountProofV2BodyJsonrpc {
4728 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4729 match *self {
4730 Self::X20 => f.write_str("2.0"),
4731 }
4732 }
4733 }
4734 impl ::std::str::FromStr for PostGetCompressedAccountProofV2BodyJsonrpc {
4735 type Err = self::error::ConversionError;
4736 fn from_str(
4737 value: &str,
4738 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4739 match value {
4740 "2.0" => Ok(Self::X20),
4741 _ => Err("invalid value".into()),
4742 }
4743 }
4744 }
4745 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofV2BodyJsonrpc {
4746 type Error = self::error::ConversionError;
4747 fn try_from(
4748 value: &str,
4749 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4750 value.parse()
4751 }
4752 }
4753 impl ::std::convert::TryFrom<&::std::string::String>
4754 for PostGetCompressedAccountProofV2BodyJsonrpc {
4755 type Error = self::error::ConversionError;
4756 fn try_from(
4757 value: &::std::string::String,
4758 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4759 value.parse()
4760 }
4761 }
4762 impl ::std::convert::TryFrom<::std::string::String>
4763 for PostGetCompressedAccountProofV2BodyJsonrpc {
4764 type Error = self::error::ConversionError;
4765 fn try_from(
4766 value: ::std::string::String,
4767 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4768 value.parse()
4769 }
4770 }
4771 #[derive(
4786 ::serde::Deserialize,
4787 ::serde::Serialize,
4788 Clone,
4789 Copy,
4790 Debug,
4791 Eq,
4792 Hash,
4793 Ord,
4794 PartialEq,
4795 PartialOrd
4796 )]
4797 pub enum PostGetCompressedAccountProofV2BodyMethod {
4798 #[serde(rename = "getCompressedAccountProofV2")]
4799 GetCompressedAccountProofV2,
4800 }
4801 impl ::std::fmt::Display for PostGetCompressedAccountProofV2BodyMethod {
4802 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4803 match *self {
4804 Self::GetCompressedAccountProofV2 => {
4805 f.write_str("getCompressedAccountProofV2")
4806 }
4807 }
4808 }
4809 }
4810 impl ::std::str::FromStr for PostGetCompressedAccountProofV2BodyMethod {
4811 type Err = self::error::ConversionError;
4812 fn from_str(
4813 value: &str,
4814 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4815 match value {
4816 "getCompressedAccountProofV2" => Ok(Self::GetCompressedAccountProofV2),
4817 _ => Err("invalid value".into()),
4818 }
4819 }
4820 }
4821 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofV2BodyMethod {
4822 type Error = self::error::ConversionError;
4823 fn try_from(
4824 value: &str,
4825 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4826 value.parse()
4827 }
4828 }
4829 impl ::std::convert::TryFrom<&::std::string::String>
4830 for PostGetCompressedAccountProofV2BodyMethod {
4831 type Error = self::error::ConversionError;
4832 fn try_from(
4833 value: &::std::string::String,
4834 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4835 value.parse()
4836 }
4837 }
4838 impl ::std::convert::TryFrom<::std::string::String>
4839 for PostGetCompressedAccountProofV2BodyMethod {
4840 type Error = self::error::ConversionError;
4841 fn try_from(
4842 value: ::std::string::String,
4843 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4844 value.parse()
4845 }
4846 }
4847 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4866 pub struct PostGetCompressedAccountProofV2BodyParams {
4867 pub hash: Hash,
4868 }
4869 impl PostGetCompressedAccountProofV2BodyParams {
4870 pub fn builder() -> builder::PostGetCompressedAccountProofV2BodyParams {
4871 Default::default()
4872 }
4873 }
4874 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4932 pub struct PostGetCompressedAccountProofV2Response {
4933 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4934 pub error: ::std::option::Option<PostGetCompressedAccountProofV2ResponseError>,
4935 pub id: PostGetCompressedAccountProofV2ResponseId,
4937 pub jsonrpc: PostGetCompressedAccountProofV2ResponseJsonrpc,
4939 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4940 pub result: ::std::option::Option<PostGetCompressedAccountProofV2ResponseResult>,
4941 }
4942 impl PostGetCompressedAccountProofV2Response {
4943 pub fn builder() -> builder::PostGetCompressedAccountProofV2Response {
4944 Default::default()
4945 }
4946 }
4947 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4966 pub struct PostGetCompressedAccountProofV2ResponseError {
4967 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4968 pub code: ::std::option::Option<i64>,
4969 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4970 pub message: ::std::option::Option<::std::string::String>,
4971 }
4972 impl ::std::default::Default for PostGetCompressedAccountProofV2ResponseError {
4973 fn default() -> Self {
4974 Self {
4975 code: Default::default(),
4976 message: Default::default(),
4977 }
4978 }
4979 }
4980 impl PostGetCompressedAccountProofV2ResponseError {
4981 pub fn builder() -> builder::PostGetCompressedAccountProofV2ResponseError {
4982 Default::default()
4983 }
4984 }
4985 #[derive(
5000 ::serde::Deserialize,
5001 ::serde::Serialize,
5002 Clone,
5003 Copy,
5004 Debug,
5005 Eq,
5006 Hash,
5007 Ord,
5008 PartialEq,
5009 PartialOrd
5010 )]
5011 pub enum PostGetCompressedAccountProofV2ResponseId {
5012 #[serde(rename = "test-account")]
5013 TestAccount,
5014 }
5015 impl ::std::fmt::Display for PostGetCompressedAccountProofV2ResponseId {
5016 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5017 match *self {
5018 Self::TestAccount => f.write_str("test-account"),
5019 }
5020 }
5021 }
5022 impl ::std::str::FromStr for PostGetCompressedAccountProofV2ResponseId {
5023 type Err = self::error::ConversionError;
5024 fn from_str(
5025 value: &str,
5026 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5027 match value {
5028 "test-account" => Ok(Self::TestAccount),
5029 _ => Err("invalid value".into()),
5030 }
5031 }
5032 }
5033 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountProofV2ResponseId {
5034 type Error = self::error::ConversionError;
5035 fn try_from(
5036 value: &str,
5037 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5038 value.parse()
5039 }
5040 }
5041 impl ::std::convert::TryFrom<&::std::string::String>
5042 for PostGetCompressedAccountProofV2ResponseId {
5043 type Error = self::error::ConversionError;
5044 fn try_from(
5045 value: &::std::string::String,
5046 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5047 value.parse()
5048 }
5049 }
5050 impl ::std::convert::TryFrom<::std::string::String>
5051 for PostGetCompressedAccountProofV2ResponseId {
5052 type Error = self::error::ConversionError;
5053 fn try_from(
5054 value: ::std::string::String,
5055 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5056 value.parse()
5057 }
5058 }
5059 #[derive(
5074 ::serde::Deserialize,
5075 ::serde::Serialize,
5076 Clone,
5077 Copy,
5078 Debug,
5079 Eq,
5080 Hash,
5081 Ord,
5082 PartialEq,
5083 PartialOrd
5084 )]
5085 pub enum PostGetCompressedAccountProofV2ResponseJsonrpc {
5086 #[serde(rename = "2.0")]
5087 X20,
5088 }
5089 impl ::std::fmt::Display for PostGetCompressedAccountProofV2ResponseJsonrpc {
5090 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5091 match *self {
5092 Self::X20 => f.write_str("2.0"),
5093 }
5094 }
5095 }
5096 impl ::std::str::FromStr for PostGetCompressedAccountProofV2ResponseJsonrpc {
5097 type Err = self::error::ConversionError;
5098 fn from_str(
5099 value: &str,
5100 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5101 match value {
5102 "2.0" => Ok(Self::X20),
5103 _ => Err("invalid value".into()),
5104 }
5105 }
5106 }
5107 impl ::std::convert::TryFrom<&str>
5108 for PostGetCompressedAccountProofV2ResponseJsonrpc {
5109 type Error = self::error::ConversionError;
5110 fn try_from(
5111 value: &str,
5112 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5113 value.parse()
5114 }
5115 }
5116 impl ::std::convert::TryFrom<&::std::string::String>
5117 for PostGetCompressedAccountProofV2ResponseJsonrpc {
5118 type Error = self::error::ConversionError;
5119 fn try_from(
5120 value: &::std::string::String,
5121 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5122 value.parse()
5123 }
5124 }
5125 impl ::std::convert::TryFrom<::std::string::String>
5126 for PostGetCompressedAccountProofV2ResponseJsonrpc {
5127 type Error = self::error::ConversionError;
5128 fn try_from(
5129 value: ::std::string::String,
5130 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5131 value.parse()
5132 }
5133 }
5134 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5158 #[serde(deny_unknown_fields)]
5159 pub struct PostGetCompressedAccountProofV2ResponseResult {
5160 pub context: Context,
5161 pub value: GetCompressedAccountProofResponseValueV2,
5162 }
5163 impl PostGetCompressedAccountProofV2ResponseResult {
5164 pub fn builder() -> builder::PostGetCompressedAccountProofV2ResponseResult {
5165 Default::default()
5166 }
5167 }
5168 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5225 pub struct PostGetCompressedAccountResponse {
5226 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5227 pub error: ::std::option::Option<PostGetCompressedAccountResponseError>,
5228 pub id: PostGetCompressedAccountResponseId,
5230 pub jsonrpc: PostGetCompressedAccountResponseJsonrpc,
5232 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5233 pub result: ::std::option::Option<PostGetCompressedAccountResponseResult>,
5234 }
5235 impl PostGetCompressedAccountResponse {
5236 pub fn builder() -> builder::PostGetCompressedAccountResponse {
5237 Default::default()
5238 }
5239 }
5240 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5259 pub struct PostGetCompressedAccountResponseError {
5260 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5261 pub code: ::std::option::Option<i64>,
5262 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5263 pub message: ::std::option::Option<::std::string::String>,
5264 }
5265 impl ::std::default::Default for PostGetCompressedAccountResponseError {
5266 fn default() -> Self {
5267 Self {
5268 code: Default::default(),
5269 message: Default::default(),
5270 }
5271 }
5272 }
5273 impl PostGetCompressedAccountResponseError {
5274 pub fn builder() -> builder::PostGetCompressedAccountResponseError {
5275 Default::default()
5276 }
5277 }
5278 #[derive(
5293 ::serde::Deserialize,
5294 ::serde::Serialize,
5295 Clone,
5296 Copy,
5297 Debug,
5298 Eq,
5299 Hash,
5300 Ord,
5301 PartialEq,
5302 PartialOrd
5303 )]
5304 pub enum PostGetCompressedAccountResponseId {
5305 #[serde(rename = "test-account")]
5306 TestAccount,
5307 }
5308 impl ::std::fmt::Display for PostGetCompressedAccountResponseId {
5309 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5310 match *self {
5311 Self::TestAccount => f.write_str("test-account"),
5312 }
5313 }
5314 }
5315 impl ::std::str::FromStr for PostGetCompressedAccountResponseId {
5316 type Err = self::error::ConversionError;
5317 fn from_str(
5318 value: &str,
5319 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5320 match value {
5321 "test-account" => Ok(Self::TestAccount),
5322 _ => Err("invalid value".into()),
5323 }
5324 }
5325 }
5326 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountResponseId {
5327 type Error = self::error::ConversionError;
5328 fn try_from(
5329 value: &str,
5330 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5331 value.parse()
5332 }
5333 }
5334 impl ::std::convert::TryFrom<&::std::string::String>
5335 for PostGetCompressedAccountResponseId {
5336 type Error = self::error::ConversionError;
5337 fn try_from(
5338 value: &::std::string::String,
5339 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5340 value.parse()
5341 }
5342 }
5343 impl ::std::convert::TryFrom<::std::string::String>
5344 for PostGetCompressedAccountResponseId {
5345 type Error = self::error::ConversionError;
5346 fn try_from(
5347 value: ::std::string::String,
5348 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5349 value.parse()
5350 }
5351 }
5352 #[derive(
5367 ::serde::Deserialize,
5368 ::serde::Serialize,
5369 Clone,
5370 Copy,
5371 Debug,
5372 Eq,
5373 Hash,
5374 Ord,
5375 PartialEq,
5376 PartialOrd
5377 )]
5378 pub enum PostGetCompressedAccountResponseJsonrpc {
5379 #[serde(rename = "2.0")]
5380 X20,
5381 }
5382 impl ::std::fmt::Display for PostGetCompressedAccountResponseJsonrpc {
5383 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5384 match *self {
5385 Self::X20 => f.write_str("2.0"),
5386 }
5387 }
5388 }
5389 impl ::std::str::FromStr for PostGetCompressedAccountResponseJsonrpc {
5390 type Err = self::error::ConversionError;
5391 fn from_str(
5392 value: &str,
5393 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5394 match value {
5395 "2.0" => Ok(Self::X20),
5396 _ => Err("invalid value".into()),
5397 }
5398 }
5399 }
5400 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountResponseJsonrpc {
5401 type Error = self::error::ConversionError;
5402 fn try_from(
5403 value: &str,
5404 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5405 value.parse()
5406 }
5407 }
5408 impl ::std::convert::TryFrom<&::std::string::String>
5409 for PostGetCompressedAccountResponseJsonrpc {
5410 type Error = self::error::ConversionError;
5411 fn try_from(
5412 value: &::std::string::String,
5413 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5414 value.parse()
5415 }
5416 }
5417 impl ::std::convert::TryFrom<::std::string::String>
5418 for PostGetCompressedAccountResponseJsonrpc {
5419 type Error = self::error::ConversionError;
5420 fn try_from(
5421 value: ::std::string::String,
5422 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5423 value.parse()
5424 }
5425 }
5426 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5449 #[serde(deny_unknown_fields)]
5450 pub struct PostGetCompressedAccountResponseResult {
5451 pub context: Context,
5452 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5453 pub value: ::std::option::Option<Account>,
5454 }
5455 impl PostGetCompressedAccountResponseResult {
5456 pub fn builder() -> builder::PostGetCompressedAccountResponseResult {
5457 Default::default()
5458 }
5459 }
5460 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5545 pub struct PostGetCompressedAccountV2Body {
5546 pub id: PostGetCompressedAccountV2BodyId,
5548 pub jsonrpc: PostGetCompressedAccountV2BodyJsonrpc,
5550 pub method: PostGetCompressedAccountV2BodyMethod,
5552 pub params: PostGetCompressedAccountV2BodyParams,
5553 }
5554 impl PostGetCompressedAccountV2Body {
5555 pub fn builder() -> builder::PostGetCompressedAccountV2Body {
5556 Default::default()
5557 }
5558 }
5559 #[derive(
5574 ::serde::Deserialize,
5575 ::serde::Serialize,
5576 Clone,
5577 Copy,
5578 Debug,
5579 Eq,
5580 Hash,
5581 Ord,
5582 PartialEq,
5583 PartialOrd
5584 )]
5585 pub enum PostGetCompressedAccountV2BodyId {
5586 #[serde(rename = "test-account")]
5587 TestAccount,
5588 }
5589 impl ::std::fmt::Display for PostGetCompressedAccountV2BodyId {
5590 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5591 match *self {
5592 Self::TestAccount => f.write_str("test-account"),
5593 }
5594 }
5595 }
5596 impl ::std::str::FromStr for PostGetCompressedAccountV2BodyId {
5597 type Err = self::error::ConversionError;
5598 fn from_str(
5599 value: &str,
5600 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5601 match value {
5602 "test-account" => Ok(Self::TestAccount),
5603 _ => Err("invalid value".into()),
5604 }
5605 }
5606 }
5607 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2BodyId {
5608 type Error = self::error::ConversionError;
5609 fn try_from(
5610 value: &str,
5611 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5612 value.parse()
5613 }
5614 }
5615 impl ::std::convert::TryFrom<&::std::string::String>
5616 for PostGetCompressedAccountV2BodyId {
5617 type Error = self::error::ConversionError;
5618 fn try_from(
5619 value: &::std::string::String,
5620 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5621 value.parse()
5622 }
5623 }
5624 impl ::std::convert::TryFrom<::std::string::String>
5625 for PostGetCompressedAccountV2BodyId {
5626 type Error = self::error::ConversionError;
5627 fn try_from(
5628 value: ::std::string::String,
5629 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5630 value.parse()
5631 }
5632 }
5633 #[derive(
5648 ::serde::Deserialize,
5649 ::serde::Serialize,
5650 Clone,
5651 Copy,
5652 Debug,
5653 Eq,
5654 Hash,
5655 Ord,
5656 PartialEq,
5657 PartialOrd
5658 )]
5659 pub enum PostGetCompressedAccountV2BodyJsonrpc {
5660 #[serde(rename = "2.0")]
5661 X20,
5662 }
5663 impl ::std::fmt::Display for PostGetCompressedAccountV2BodyJsonrpc {
5664 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5665 match *self {
5666 Self::X20 => f.write_str("2.0"),
5667 }
5668 }
5669 }
5670 impl ::std::str::FromStr for PostGetCompressedAccountV2BodyJsonrpc {
5671 type Err = self::error::ConversionError;
5672 fn from_str(
5673 value: &str,
5674 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5675 match value {
5676 "2.0" => Ok(Self::X20),
5677 _ => Err("invalid value".into()),
5678 }
5679 }
5680 }
5681 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2BodyJsonrpc {
5682 type Error = self::error::ConversionError;
5683 fn try_from(
5684 value: &str,
5685 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5686 value.parse()
5687 }
5688 }
5689 impl ::std::convert::TryFrom<&::std::string::String>
5690 for PostGetCompressedAccountV2BodyJsonrpc {
5691 type Error = self::error::ConversionError;
5692 fn try_from(
5693 value: &::std::string::String,
5694 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5695 value.parse()
5696 }
5697 }
5698 impl ::std::convert::TryFrom<::std::string::String>
5699 for PostGetCompressedAccountV2BodyJsonrpc {
5700 type Error = self::error::ConversionError;
5701 fn try_from(
5702 value: ::std::string::String,
5703 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5704 value.parse()
5705 }
5706 }
5707 #[derive(
5722 ::serde::Deserialize,
5723 ::serde::Serialize,
5724 Clone,
5725 Copy,
5726 Debug,
5727 Eq,
5728 Hash,
5729 Ord,
5730 PartialEq,
5731 PartialOrd
5732 )]
5733 pub enum PostGetCompressedAccountV2BodyMethod {
5734 #[serde(rename = "getCompressedAccountV2")]
5735 GetCompressedAccountV2,
5736 }
5737 impl ::std::fmt::Display for PostGetCompressedAccountV2BodyMethod {
5738 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5739 match *self {
5740 Self::GetCompressedAccountV2 => f.write_str("getCompressedAccountV2"),
5741 }
5742 }
5743 }
5744 impl ::std::str::FromStr for PostGetCompressedAccountV2BodyMethod {
5745 type Err = self::error::ConversionError;
5746 fn from_str(
5747 value: &str,
5748 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5749 match value {
5750 "getCompressedAccountV2" => Ok(Self::GetCompressedAccountV2),
5751 _ => Err("invalid value".into()),
5752 }
5753 }
5754 }
5755 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2BodyMethod {
5756 type Error = self::error::ConversionError;
5757 fn try_from(
5758 value: &str,
5759 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5760 value.parse()
5761 }
5762 }
5763 impl ::std::convert::TryFrom<&::std::string::String>
5764 for PostGetCompressedAccountV2BodyMethod {
5765 type Error = self::error::ConversionError;
5766 fn try_from(
5767 value: &::std::string::String,
5768 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5769 value.parse()
5770 }
5771 }
5772 impl ::std::convert::TryFrom<::std::string::String>
5773 for PostGetCompressedAccountV2BodyMethod {
5774 type Error = self::error::ConversionError;
5775 fn try_from(
5776 value: ::std::string::String,
5777 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5778 value.parse()
5779 }
5780 }
5781 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5834 #[serde(deny_unknown_fields)]
5835 pub struct PostGetCompressedAccountV2BodyParams {
5836 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5837 pub address: ::std::option::Option<SerializablePubkey>,
5838 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5839 pub hash: ::std::option::Option<Hash>,
5840 }
5841 impl ::std::default::Default for PostGetCompressedAccountV2BodyParams {
5842 fn default() -> Self {
5843 PostGetCompressedAccountV2BodyParams {
5844 address: ::std::option::Option::None,
5845 hash: ::std::option::Option::Some(
5846 Hash("11111111111111111111111111111111".to_string()),
5847 ),
5848 }
5849 }
5850 }
5851 impl PostGetCompressedAccountV2BodyParams {
5852 pub fn builder() -> builder::PostGetCompressedAccountV2BodyParams {
5853 Default::default()
5854 }
5855 }
5856 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5913 pub struct PostGetCompressedAccountV2Response {
5914 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5915 pub error: ::std::option::Option<PostGetCompressedAccountV2ResponseError>,
5916 pub id: PostGetCompressedAccountV2ResponseId,
5918 pub jsonrpc: PostGetCompressedAccountV2ResponseJsonrpc,
5920 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5921 pub result: ::std::option::Option<PostGetCompressedAccountV2ResponseResult>,
5922 }
5923 impl PostGetCompressedAccountV2Response {
5924 pub fn builder() -> builder::PostGetCompressedAccountV2Response {
5925 Default::default()
5926 }
5927 }
5928 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5947 pub struct PostGetCompressedAccountV2ResponseError {
5948 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5949 pub code: ::std::option::Option<i64>,
5950 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5951 pub message: ::std::option::Option<::std::string::String>,
5952 }
5953 impl ::std::default::Default for PostGetCompressedAccountV2ResponseError {
5954 fn default() -> Self {
5955 Self {
5956 code: Default::default(),
5957 message: Default::default(),
5958 }
5959 }
5960 }
5961 impl PostGetCompressedAccountV2ResponseError {
5962 pub fn builder() -> builder::PostGetCompressedAccountV2ResponseError {
5963 Default::default()
5964 }
5965 }
5966 #[derive(
5981 ::serde::Deserialize,
5982 ::serde::Serialize,
5983 Clone,
5984 Copy,
5985 Debug,
5986 Eq,
5987 Hash,
5988 Ord,
5989 PartialEq,
5990 PartialOrd
5991 )]
5992 pub enum PostGetCompressedAccountV2ResponseId {
5993 #[serde(rename = "test-account")]
5994 TestAccount,
5995 }
5996 impl ::std::fmt::Display for PostGetCompressedAccountV2ResponseId {
5997 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5998 match *self {
5999 Self::TestAccount => f.write_str("test-account"),
6000 }
6001 }
6002 }
6003 impl ::std::str::FromStr for PostGetCompressedAccountV2ResponseId {
6004 type Err = self::error::ConversionError;
6005 fn from_str(
6006 value: &str,
6007 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6008 match value {
6009 "test-account" => Ok(Self::TestAccount),
6010 _ => Err("invalid value".into()),
6011 }
6012 }
6013 }
6014 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2ResponseId {
6015 type Error = self::error::ConversionError;
6016 fn try_from(
6017 value: &str,
6018 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6019 value.parse()
6020 }
6021 }
6022 impl ::std::convert::TryFrom<&::std::string::String>
6023 for PostGetCompressedAccountV2ResponseId {
6024 type Error = self::error::ConversionError;
6025 fn try_from(
6026 value: &::std::string::String,
6027 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6028 value.parse()
6029 }
6030 }
6031 impl ::std::convert::TryFrom<::std::string::String>
6032 for PostGetCompressedAccountV2ResponseId {
6033 type Error = self::error::ConversionError;
6034 fn try_from(
6035 value: ::std::string::String,
6036 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6037 value.parse()
6038 }
6039 }
6040 #[derive(
6055 ::serde::Deserialize,
6056 ::serde::Serialize,
6057 Clone,
6058 Copy,
6059 Debug,
6060 Eq,
6061 Hash,
6062 Ord,
6063 PartialEq,
6064 PartialOrd
6065 )]
6066 pub enum PostGetCompressedAccountV2ResponseJsonrpc {
6067 #[serde(rename = "2.0")]
6068 X20,
6069 }
6070 impl ::std::fmt::Display for PostGetCompressedAccountV2ResponseJsonrpc {
6071 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6072 match *self {
6073 Self::X20 => f.write_str("2.0"),
6074 }
6075 }
6076 }
6077 impl ::std::str::FromStr for PostGetCompressedAccountV2ResponseJsonrpc {
6078 type Err = self::error::ConversionError;
6079 fn from_str(
6080 value: &str,
6081 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6082 match value {
6083 "2.0" => Ok(Self::X20),
6084 _ => Err("invalid value".into()),
6085 }
6086 }
6087 }
6088 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountV2ResponseJsonrpc {
6089 type Error = self::error::ConversionError;
6090 fn try_from(
6091 value: &str,
6092 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6093 value.parse()
6094 }
6095 }
6096 impl ::std::convert::TryFrom<&::std::string::String>
6097 for PostGetCompressedAccountV2ResponseJsonrpc {
6098 type Error = self::error::ConversionError;
6099 fn try_from(
6100 value: &::std::string::String,
6101 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6102 value.parse()
6103 }
6104 }
6105 impl ::std::convert::TryFrom<::std::string::String>
6106 for PostGetCompressedAccountV2ResponseJsonrpc {
6107 type Error = self::error::ConversionError;
6108 fn try_from(
6109 value: ::std::string::String,
6110 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6111 value.parse()
6112 }
6113 }
6114 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6137 #[serde(deny_unknown_fields)]
6138 pub struct PostGetCompressedAccountV2ResponseResult {
6139 pub context: Context,
6140 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6141 pub value: ::std::option::Option<AccountV2>,
6142 }
6143 impl PostGetCompressedAccountV2ResponseResult {
6144 pub fn builder() -> builder::PostGetCompressedAccountV2ResponseResult {
6145 Default::default()
6146 }
6147 }
6148 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6248 pub struct PostGetCompressedAccountsByOwnerBody {
6249 pub id: PostGetCompressedAccountsByOwnerBodyId,
6251 pub jsonrpc: PostGetCompressedAccountsByOwnerBodyJsonrpc,
6253 pub method: PostGetCompressedAccountsByOwnerBodyMethod,
6255 pub params: PostGetCompressedAccountsByOwnerBodyParams,
6256 }
6257 impl PostGetCompressedAccountsByOwnerBody {
6258 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerBody {
6259 Default::default()
6260 }
6261 }
6262 #[derive(
6277 ::serde::Deserialize,
6278 ::serde::Serialize,
6279 Clone,
6280 Copy,
6281 Debug,
6282 Eq,
6283 Hash,
6284 Ord,
6285 PartialEq,
6286 PartialOrd
6287 )]
6288 pub enum PostGetCompressedAccountsByOwnerBodyId {
6289 #[serde(rename = "test-account")]
6290 TestAccount,
6291 }
6292 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerBodyId {
6293 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6294 match *self {
6295 Self::TestAccount => f.write_str("test-account"),
6296 }
6297 }
6298 }
6299 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerBodyId {
6300 type Err = self::error::ConversionError;
6301 fn from_str(
6302 value: &str,
6303 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6304 match value {
6305 "test-account" => Ok(Self::TestAccount),
6306 _ => Err("invalid value".into()),
6307 }
6308 }
6309 }
6310 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerBodyId {
6311 type Error = self::error::ConversionError;
6312 fn try_from(
6313 value: &str,
6314 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6315 value.parse()
6316 }
6317 }
6318 impl ::std::convert::TryFrom<&::std::string::String>
6319 for PostGetCompressedAccountsByOwnerBodyId {
6320 type Error = self::error::ConversionError;
6321 fn try_from(
6322 value: &::std::string::String,
6323 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6324 value.parse()
6325 }
6326 }
6327 impl ::std::convert::TryFrom<::std::string::String>
6328 for PostGetCompressedAccountsByOwnerBodyId {
6329 type Error = self::error::ConversionError;
6330 fn try_from(
6331 value: ::std::string::String,
6332 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6333 value.parse()
6334 }
6335 }
6336 #[derive(
6351 ::serde::Deserialize,
6352 ::serde::Serialize,
6353 Clone,
6354 Copy,
6355 Debug,
6356 Eq,
6357 Hash,
6358 Ord,
6359 PartialEq,
6360 PartialOrd
6361 )]
6362 pub enum PostGetCompressedAccountsByOwnerBodyJsonrpc {
6363 #[serde(rename = "2.0")]
6364 X20,
6365 }
6366 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerBodyJsonrpc {
6367 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6368 match *self {
6369 Self::X20 => f.write_str("2.0"),
6370 }
6371 }
6372 }
6373 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerBodyJsonrpc {
6374 type Err = self::error::ConversionError;
6375 fn from_str(
6376 value: &str,
6377 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6378 match value {
6379 "2.0" => Ok(Self::X20),
6380 _ => Err("invalid value".into()),
6381 }
6382 }
6383 }
6384 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerBodyJsonrpc {
6385 type Error = self::error::ConversionError;
6386 fn try_from(
6387 value: &str,
6388 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6389 value.parse()
6390 }
6391 }
6392 impl ::std::convert::TryFrom<&::std::string::String>
6393 for PostGetCompressedAccountsByOwnerBodyJsonrpc {
6394 type Error = self::error::ConversionError;
6395 fn try_from(
6396 value: &::std::string::String,
6397 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6398 value.parse()
6399 }
6400 }
6401 impl ::std::convert::TryFrom<::std::string::String>
6402 for PostGetCompressedAccountsByOwnerBodyJsonrpc {
6403 type Error = self::error::ConversionError;
6404 fn try_from(
6405 value: ::std::string::String,
6406 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6407 value.parse()
6408 }
6409 }
6410 #[derive(
6425 ::serde::Deserialize,
6426 ::serde::Serialize,
6427 Clone,
6428 Copy,
6429 Debug,
6430 Eq,
6431 Hash,
6432 Ord,
6433 PartialEq,
6434 PartialOrd
6435 )]
6436 pub enum PostGetCompressedAccountsByOwnerBodyMethod {
6437 #[serde(rename = "getCompressedAccountsByOwner")]
6438 GetCompressedAccountsByOwner,
6439 }
6440 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerBodyMethod {
6441 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6442 match *self {
6443 Self::GetCompressedAccountsByOwner => {
6444 f.write_str("getCompressedAccountsByOwner")
6445 }
6446 }
6447 }
6448 }
6449 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerBodyMethod {
6450 type Err = self::error::ConversionError;
6451 fn from_str(
6452 value: &str,
6453 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6454 match value {
6455 "getCompressedAccountsByOwner" => Ok(Self::GetCompressedAccountsByOwner),
6456 _ => Err("invalid value".into()),
6457 }
6458 }
6459 }
6460 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerBodyMethod {
6461 type Error = self::error::ConversionError;
6462 fn try_from(
6463 value: &str,
6464 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6465 value.parse()
6466 }
6467 }
6468 impl ::std::convert::TryFrom<&::std::string::String>
6469 for PostGetCompressedAccountsByOwnerBodyMethod {
6470 type Error = self::error::ConversionError;
6471 fn try_from(
6472 value: &::std::string::String,
6473 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6474 value.parse()
6475 }
6476 }
6477 impl ::std::convert::TryFrom<::std::string::String>
6478 for PostGetCompressedAccountsByOwnerBodyMethod {
6479 type Error = self::error::ConversionError;
6480 fn try_from(
6481 value: ::std::string::String,
6482 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6483 value.parse()
6484 }
6485 }
6486 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6554 #[serde(deny_unknown_fields)]
6555 pub struct PostGetCompressedAccountsByOwnerBodyParams {
6556 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6557 pub cursor: ::std::option::Option<Hash>,
6558 #[serde(
6559 rename = "dataSlice",
6560 default,
6561 skip_serializing_if = "::std::option::Option::is_none"
6562 )]
6563 pub data_slice: ::std::option::Option<DataSlice>,
6564 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6565 pub filters: ::std::vec::Vec<FilterSelector>,
6566 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6567 pub limit: ::std::option::Option<Limit>,
6568 pub owner: SerializablePubkey,
6569 }
6570 impl PostGetCompressedAccountsByOwnerBodyParams {
6571 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerBodyParams {
6572 Default::default()
6573 }
6574 }
6575 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6633 pub struct PostGetCompressedAccountsByOwnerResponse {
6634 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6635 pub error: ::std::option::Option<PostGetCompressedAccountsByOwnerResponseError>,
6636 pub id: PostGetCompressedAccountsByOwnerResponseId,
6638 pub jsonrpc: PostGetCompressedAccountsByOwnerResponseJsonrpc,
6640 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6641 pub result: ::std::option::Option<
6642 PostGetCompressedAccountsByOwnerResponseResult,
6643 >,
6644 }
6645 impl PostGetCompressedAccountsByOwnerResponse {
6646 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerResponse {
6647 Default::default()
6648 }
6649 }
6650 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6669 pub struct PostGetCompressedAccountsByOwnerResponseError {
6670 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6671 pub code: ::std::option::Option<i64>,
6672 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6673 pub message: ::std::option::Option<::std::string::String>,
6674 }
6675 impl ::std::default::Default for PostGetCompressedAccountsByOwnerResponseError {
6676 fn default() -> Self {
6677 Self {
6678 code: Default::default(),
6679 message: Default::default(),
6680 }
6681 }
6682 }
6683 impl PostGetCompressedAccountsByOwnerResponseError {
6684 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerResponseError {
6685 Default::default()
6686 }
6687 }
6688 #[derive(
6703 ::serde::Deserialize,
6704 ::serde::Serialize,
6705 Clone,
6706 Copy,
6707 Debug,
6708 Eq,
6709 Hash,
6710 Ord,
6711 PartialEq,
6712 PartialOrd
6713 )]
6714 pub enum PostGetCompressedAccountsByOwnerResponseId {
6715 #[serde(rename = "test-account")]
6716 TestAccount,
6717 }
6718 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerResponseId {
6719 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6720 match *self {
6721 Self::TestAccount => f.write_str("test-account"),
6722 }
6723 }
6724 }
6725 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerResponseId {
6726 type Err = self::error::ConversionError;
6727 fn from_str(
6728 value: &str,
6729 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6730 match value {
6731 "test-account" => Ok(Self::TestAccount),
6732 _ => Err("invalid value".into()),
6733 }
6734 }
6735 }
6736 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerResponseId {
6737 type Error = self::error::ConversionError;
6738 fn try_from(
6739 value: &str,
6740 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6741 value.parse()
6742 }
6743 }
6744 impl ::std::convert::TryFrom<&::std::string::String>
6745 for PostGetCompressedAccountsByOwnerResponseId {
6746 type Error = self::error::ConversionError;
6747 fn try_from(
6748 value: &::std::string::String,
6749 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6750 value.parse()
6751 }
6752 }
6753 impl ::std::convert::TryFrom<::std::string::String>
6754 for PostGetCompressedAccountsByOwnerResponseId {
6755 type Error = self::error::ConversionError;
6756 fn try_from(
6757 value: ::std::string::String,
6758 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6759 value.parse()
6760 }
6761 }
6762 #[derive(
6777 ::serde::Deserialize,
6778 ::serde::Serialize,
6779 Clone,
6780 Copy,
6781 Debug,
6782 Eq,
6783 Hash,
6784 Ord,
6785 PartialEq,
6786 PartialOrd
6787 )]
6788 pub enum PostGetCompressedAccountsByOwnerResponseJsonrpc {
6789 #[serde(rename = "2.0")]
6790 X20,
6791 }
6792 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerResponseJsonrpc {
6793 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6794 match *self {
6795 Self::X20 => f.write_str("2.0"),
6796 }
6797 }
6798 }
6799 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerResponseJsonrpc {
6800 type Err = self::error::ConversionError;
6801 fn from_str(
6802 value: &str,
6803 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6804 match value {
6805 "2.0" => Ok(Self::X20),
6806 _ => Err("invalid value".into()),
6807 }
6808 }
6809 }
6810 impl ::std::convert::TryFrom<&str>
6811 for PostGetCompressedAccountsByOwnerResponseJsonrpc {
6812 type Error = self::error::ConversionError;
6813 fn try_from(
6814 value: &str,
6815 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6816 value.parse()
6817 }
6818 }
6819 impl ::std::convert::TryFrom<&::std::string::String>
6820 for PostGetCompressedAccountsByOwnerResponseJsonrpc {
6821 type Error = self::error::ConversionError;
6822 fn try_from(
6823 value: &::std::string::String,
6824 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6825 value.parse()
6826 }
6827 }
6828 impl ::std::convert::TryFrom<::std::string::String>
6829 for PostGetCompressedAccountsByOwnerResponseJsonrpc {
6830 type Error = self::error::ConversionError;
6831 fn try_from(
6832 value: ::std::string::String,
6833 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6834 value.parse()
6835 }
6836 }
6837 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6861 #[serde(deny_unknown_fields)]
6862 pub struct PostGetCompressedAccountsByOwnerResponseResult {
6863 pub context: Context,
6864 pub value: PaginatedAccountList,
6865 }
6866 impl PostGetCompressedAccountsByOwnerResponseResult {
6867 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerResponseResult {
6868 Default::default()
6869 }
6870 }
6871 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6971 pub struct PostGetCompressedAccountsByOwnerV2Body {
6972 pub id: PostGetCompressedAccountsByOwnerV2BodyId,
6974 pub jsonrpc: PostGetCompressedAccountsByOwnerV2BodyJsonrpc,
6976 pub method: PostGetCompressedAccountsByOwnerV2BodyMethod,
6978 pub params: PostGetCompressedAccountsByOwnerV2BodyParams,
6979 }
6980 impl PostGetCompressedAccountsByOwnerV2Body {
6981 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2Body {
6982 Default::default()
6983 }
6984 }
6985 #[derive(
7000 ::serde::Deserialize,
7001 ::serde::Serialize,
7002 Clone,
7003 Copy,
7004 Debug,
7005 Eq,
7006 Hash,
7007 Ord,
7008 PartialEq,
7009 PartialOrd
7010 )]
7011 pub enum PostGetCompressedAccountsByOwnerV2BodyId {
7012 #[serde(rename = "test-account")]
7013 TestAccount,
7014 }
7015 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2BodyId {
7016 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7017 match *self {
7018 Self::TestAccount => f.write_str("test-account"),
7019 }
7020 }
7021 }
7022 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2BodyId {
7023 type Err = self::error::ConversionError;
7024 fn from_str(
7025 value: &str,
7026 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7027 match value {
7028 "test-account" => Ok(Self::TestAccount),
7029 _ => Err("invalid value".into()),
7030 }
7031 }
7032 }
7033 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerV2BodyId {
7034 type Error = self::error::ConversionError;
7035 fn try_from(
7036 value: &str,
7037 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7038 value.parse()
7039 }
7040 }
7041 impl ::std::convert::TryFrom<&::std::string::String>
7042 for PostGetCompressedAccountsByOwnerV2BodyId {
7043 type Error = self::error::ConversionError;
7044 fn try_from(
7045 value: &::std::string::String,
7046 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7047 value.parse()
7048 }
7049 }
7050 impl ::std::convert::TryFrom<::std::string::String>
7051 for PostGetCompressedAccountsByOwnerV2BodyId {
7052 type Error = self::error::ConversionError;
7053 fn try_from(
7054 value: ::std::string::String,
7055 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7056 value.parse()
7057 }
7058 }
7059 #[derive(
7074 ::serde::Deserialize,
7075 ::serde::Serialize,
7076 Clone,
7077 Copy,
7078 Debug,
7079 Eq,
7080 Hash,
7081 Ord,
7082 PartialEq,
7083 PartialOrd
7084 )]
7085 pub enum PostGetCompressedAccountsByOwnerV2BodyJsonrpc {
7086 #[serde(rename = "2.0")]
7087 X20,
7088 }
7089 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2BodyJsonrpc {
7090 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7091 match *self {
7092 Self::X20 => f.write_str("2.0"),
7093 }
7094 }
7095 }
7096 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2BodyJsonrpc {
7097 type Err = self::error::ConversionError;
7098 fn from_str(
7099 value: &str,
7100 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7101 match value {
7102 "2.0" => Ok(Self::X20),
7103 _ => Err("invalid value".into()),
7104 }
7105 }
7106 }
7107 impl ::std::convert::TryFrom<&str>
7108 for PostGetCompressedAccountsByOwnerV2BodyJsonrpc {
7109 type Error = self::error::ConversionError;
7110 fn try_from(
7111 value: &str,
7112 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7113 value.parse()
7114 }
7115 }
7116 impl ::std::convert::TryFrom<&::std::string::String>
7117 for PostGetCompressedAccountsByOwnerV2BodyJsonrpc {
7118 type Error = self::error::ConversionError;
7119 fn try_from(
7120 value: &::std::string::String,
7121 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7122 value.parse()
7123 }
7124 }
7125 impl ::std::convert::TryFrom<::std::string::String>
7126 for PostGetCompressedAccountsByOwnerV2BodyJsonrpc {
7127 type Error = self::error::ConversionError;
7128 fn try_from(
7129 value: ::std::string::String,
7130 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7131 value.parse()
7132 }
7133 }
7134 #[derive(
7149 ::serde::Deserialize,
7150 ::serde::Serialize,
7151 Clone,
7152 Copy,
7153 Debug,
7154 Eq,
7155 Hash,
7156 Ord,
7157 PartialEq,
7158 PartialOrd
7159 )]
7160 pub enum PostGetCompressedAccountsByOwnerV2BodyMethod {
7161 #[serde(rename = "getCompressedAccountsByOwnerV2")]
7162 GetCompressedAccountsByOwnerV2,
7163 }
7164 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2BodyMethod {
7165 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7166 match *self {
7167 Self::GetCompressedAccountsByOwnerV2 => {
7168 f.write_str("getCompressedAccountsByOwnerV2")
7169 }
7170 }
7171 }
7172 }
7173 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2BodyMethod {
7174 type Err = self::error::ConversionError;
7175 fn from_str(
7176 value: &str,
7177 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7178 match value {
7179 "getCompressedAccountsByOwnerV2" => {
7180 Ok(Self::GetCompressedAccountsByOwnerV2)
7181 }
7182 _ => Err("invalid value".into()),
7183 }
7184 }
7185 }
7186 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerV2BodyMethod {
7187 type Error = self::error::ConversionError;
7188 fn try_from(
7189 value: &str,
7190 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7191 value.parse()
7192 }
7193 }
7194 impl ::std::convert::TryFrom<&::std::string::String>
7195 for PostGetCompressedAccountsByOwnerV2BodyMethod {
7196 type Error = self::error::ConversionError;
7197 fn try_from(
7198 value: &::std::string::String,
7199 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7200 value.parse()
7201 }
7202 }
7203 impl ::std::convert::TryFrom<::std::string::String>
7204 for PostGetCompressedAccountsByOwnerV2BodyMethod {
7205 type Error = self::error::ConversionError;
7206 fn try_from(
7207 value: ::std::string::String,
7208 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7209 value.parse()
7210 }
7211 }
7212 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7280 #[serde(deny_unknown_fields)]
7281 pub struct PostGetCompressedAccountsByOwnerV2BodyParams {
7282 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7283 pub cursor: ::std::option::Option<Hash>,
7284 #[serde(
7285 rename = "dataSlice",
7286 default,
7287 skip_serializing_if = "::std::option::Option::is_none"
7288 )]
7289 pub data_slice: ::std::option::Option<DataSlice>,
7290 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7291 pub filters: ::std::vec::Vec<FilterSelector>,
7292 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7293 pub limit: ::std::option::Option<Limit>,
7294 pub owner: SerializablePubkey,
7295 }
7296 impl PostGetCompressedAccountsByOwnerV2BodyParams {
7297 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2BodyParams {
7298 Default::default()
7299 }
7300 }
7301 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7359 pub struct PostGetCompressedAccountsByOwnerV2Response {
7360 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7361 pub error: ::std::option::Option<
7362 PostGetCompressedAccountsByOwnerV2ResponseError,
7363 >,
7364 pub id: PostGetCompressedAccountsByOwnerV2ResponseId,
7366 pub jsonrpc: PostGetCompressedAccountsByOwnerV2ResponseJsonrpc,
7368 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7369 pub result: ::std::option::Option<
7370 PostGetCompressedAccountsByOwnerV2ResponseResult,
7371 >,
7372 }
7373 impl PostGetCompressedAccountsByOwnerV2Response {
7374 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2Response {
7375 Default::default()
7376 }
7377 }
7378 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7397 pub struct PostGetCompressedAccountsByOwnerV2ResponseError {
7398 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7399 pub code: ::std::option::Option<i64>,
7400 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7401 pub message: ::std::option::Option<::std::string::String>,
7402 }
7403 impl ::std::default::Default for PostGetCompressedAccountsByOwnerV2ResponseError {
7404 fn default() -> Self {
7405 Self {
7406 code: Default::default(),
7407 message: Default::default(),
7408 }
7409 }
7410 }
7411 impl PostGetCompressedAccountsByOwnerV2ResponseError {
7412 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2ResponseError {
7413 Default::default()
7414 }
7415 }
7416 #[derive(
7431 ::serde::Deserialize,
7432 ::serde::Serialize,
7433 Clone,
7434 Copy,
7435 Debug,
7436 Eq,
7437 Hash,
7438 Ord,
7439 PartialEq,
7440 PartialOrd
7441 )]
7442 pub enum PostGetCompressedAccountsByOwnerV2ResponseId {
7443 #[serde(rename = "test-account")]
7444 TestAccount,
7445 }
7446 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2ResponseId {
7447 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7448 match *self {
7449 Self::TestAccount => f.write_str("test-account"),
7450 }
7451 }
7452 }
7453 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2ResponseId {
7454 type Err = self::error::ConversionError;
7455 fn from_str(
7456 value: &str,
7457 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7458 match value {
7459 "test-account" => Ok(Self::TestAccount),
7460 _ => Err("invalid value".into()),
7461 }
7462 }
7463 }
7464 impl ::std::convert::TryFrom<&str> for PostGetCompressedAccountsByOwnerV2ResponseId {
7465 type Error = self::error::ConversionError;
7466 fn try_from(
7467 value: &str,
7468 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7469 value.parse()
7470 }
7471 }
7472 impl ::std::convert::TryFrom<&::std::string::String>
7473 for PostGetCompressedAccountsByOwnerV2ResponseId {
7474 type Error = self::error::ConversionError;
7475 fn try_from(
7476 value: &::std::string::String,
7477 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7478 value.parse()
7479 }
7480 }
7481 impl ::std::convert::TryFrom<::std::string::String>
7482 for PostGetCompressedAccountsByOwnerV2ResponseId {
7483 type Error = self::error::ConversionError;
7484 fn try_from(
7485 value: ::std::string::String,
7486 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7487 value.parse()
7488 }
7489 }
7490 #[derive(
7505 ::serde::Deserialize,
7506 ::serde::Serialize,
7507 Clone,
7508 Copy,
7509 Debug,
7510 Eq,
7511 Hash,
7512 Ord,
7513 PartialEq,
7514 PartialOrd
7515 )]
7516 pub enum PostGetCompressedAccountsByOwnerV2ResponseJsonrpc {
7517 #[serde(rename = "2.0")]
7518 X20,
7519 }
7520 impl ::std::fmt::Display for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc {
7521 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7522 match *self {
7523 Self::X20 => f.write_str("2.0"),
7524 }
7525 }
7526 }
7527 impl ::std::str::FromStr for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc {
7528 type Err = self::error::ConversionError;
7529 fn from_str(
7530 value: &str,
7531 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7532 match value {
7533 "2.0" => Ok(Self::X20),
7534 _ => Err("invalid value".into()),
7535 }
7536 }
7537 }
7538 impl ::std::convert::TryFrom<&str>
7539 for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc {
7540 type Error = self::error::ConversionError;
7541 fn try_from(
7542 value: &str,
7543 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7544 value.parse()
7545 }
7546 }
7547 impl ::std::convert::TryFrom<&::std::string::String>
7548 for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc {
7549 type Error = self::error::ConversionError;
7550 fn try_from(
7551 value: &::std::string::String,
7552 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7553 value.parse()
7554 }
7555 }
7556 impl ::std::convert::TryFrom<::std::string::String>
7557 for PostGetCompressedAccountsByOwnerV2ResponseJsonrpc {
7558 type Error = self::error::ConversionError;
7559 fn try_from(
7560 value: ::std::string::String,
7561 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7562 value.parse()
7563 }
7564 }
7565 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7589 #[serde(deny_unknown_fields)]
7590 pub struct PostGetCompressedAccountsByOwnerV2ResponseResult {
7591 pub context: Context,
7592 pub value: PaginatedAccountListV2,
7593 }
7594 impl PostGetCompressedAccountsByOwnerV2ResponseResult {
7595 pub fn builder() -> builder::PostGetCompressedAccountsByOwnerV2ResponseResult {
7596 Default::default()
7597 }
7598 }
7599 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7650 pub struct PostGetCompressedBalanceByOwnerBody {
7651 pub id: PostGetCompressedBalanceByOwnerBodyId,
7653 pub jsonrpc: PostGetCompressedBalanceByOwnerBodyJsonrpc,
7655 pub method: PostGetCompressedBalanceByOwnerBodyMethod,
7657 pub params: PostGetCompressedBalanceByOwnerBodyParams,
7658 }
7659 impl PostGetCompressedBalanceByOwnerBody {
7660 pub fn builder() -> builder::PostGetCompressedBalanceByOwnerBody {
7661 Default::default()
7662 }
7663 }
7664 #[derive(
7679 ::serde::Deserialize,
7680 ::serde::Serialize,
7681 Clone,
7682 Copy,
7683 Debug,
7684 Eq,
7685 Hash,
7686 Ord,
7687 PartialEq,
7688 PartialOrd
7689 )]
7690 pub enum PostGetCompressedBalanceByOwnerBodyId {
7691 #[serde(rename = "test-account")]
7692 TestAccount,
7693 }
7694 impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerBodyId {
7695 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7696 match *self {
7697 Self::TestAccount => f.write_str("test-account"),
7698 }
7699 }
7700 }
7701 impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerBodyId {
7702 type Err = self::error::ConversionError;
7703 fn from_str(
7704 value: &str,
7705 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7706 match value {
7707 "test-account" => Ok(Self::TestAccount),
7708 _ => Err("invalid value".into()),
7709 }
7710 }
7711 }
7712 impl ::std::convert::TryFrom<&str> for PostGetCompressedBalanceByOwnerBodyId {
7713 type Error = self::error::ConversionError;
7714 fn try_from(
7715 value: &str,
7716 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7717 value.parse()
7718 }
7719 }
7720 impl ::std::convert::TryFrom<&::std::string::String>
7721 for PostGetCompressedBalanceByOwnerBodyId {
7722 type Error = self::error::ConversionError;
7723 fn try_from(
7724 value: &::std::string::String,
7725 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7726 value.parse()
7727 }
7728 }
7729 impl ::std::convert::TryFrom<::std::string::String>
7730 for PostGetCompressedBalanceByOwnerBodyId {
7731 type Error = self::error::ConversionError;
7732 fn try_from(
7733 value: ::std::string::String,
7734 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7735 value.parse()
7736 }
7737 }
7738 #[derive(
7753 ::serde::Deserialize,
7754 ::serde::Serialize,
7755 Clone,
7756 Copy,
7757 Debug,
7758 Eq,
7759 Hash,
7760 Ord,
7761 PartialEq,
7762 PartialOrd
7763 )]
7764 pub enum PostGetCompressedBalanceByOwnerBodyJsonrpc {
7765 #[serde(rename = "2.0")]
7766 X20,
7767 }
7768 impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerBodyJsonrpc {
7769 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7770 match *self {
7771 Self::X20 => f.write_str("2.0"),
7772 }
7773 }
7774 }
7775 impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerBodyJsonrpc {
7776 type Err = self::error::ConversionError;
7777 fn from_str(
7778 value: &str,
7779 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7780 match value {
7781 "2.0" => Ok(Self::X20),
7782 _ => Err("invalid value".into()),
7783 }
7784 }
7785 }
7786 impl ::std::convert::TryFrom<&str> for PostGetCompressedBalanceByOwnerBodyJsonrpc {
7787 type Error = self::error::ConversionError;
7788 fn try_from(
7789 value: &str,
7790 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7791 value.parse()
7792 }
7793 }
7794 impl ::std::convert::TryFrom<&::std::string::String>
7795 for PostGetCompressedBalanceByOwnerBodyJsonrpc {
7796 type Error = self::error::ConversionError;
7797 fn try_from(
7798 value: &::std::string::String,
7799 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7800 value.parse()
7801 }
7802 }
7803 impl ::std::convert::TryFrom<::std::string::String>
7804 for PostGetCompressedBalanceByOwnerBodyJsonrpc {
7805 type Error = self::error::ConversionError;
7806 fn try_from(
7807 value: ::std::string::String,
7808 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7809 value.parse()
7810 }
7811 }
7812 #[derive(
7827 ::serde::Deserialize,
7828 ::serde::Serialize,
7829 Clone,
7830 Copy,
7831 Debug,
7832 Eq,
7833 Hash,
7834 Ord,
7835 PartialEq,
7836 PartialOrd
7837 )]
7838 pub enum PostGetCompressedBalanceByOwnerBodyMethod {
7839 #[serde(rename = "getCompressedBalanceByOwner")]
7840 GetCompressedBalanceByOwner,
7841 }
7842 impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerBodyMethod {
7843 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7844 match *self {
7845 Self::GetCompressedBalanceByOwner => {
7846 f.write_str("getCompressedBalanceByOwner")
7847 }
7848 }
7849 }
7850 }
7851 impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerBodyMethod {
7852 type Err = self::error::ConversionError;
7853 fn from_str(
7854 value: &str,
7855 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7856 match value {
7857 "getCompressedBalanceByOwner" => Ok(Self::GetCompressedBalanceByOwner),
7858 _ => Err("invalid value".into()),
7859 }
7860 }
7861 }
7862 impl ::std::convert::TryFrom<&str> for PostGetCompressedBalanceByOwnerBodyMethod {
7863 type Error = self::error::ConversionError;
7864 fn try_from(
7865 value: &str,
7866 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7867 value.parse()
7868 }
7869 }
7870 impl ::std::convert::TryFrom<&::std::string::String>
7871 for PostGetCompressedBalanceByOwnerBodyMethod {
7872 type Error = self::error::ConversionError;
7873 fn try_from(
7874 value: &::std::string::String,
7875 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7876 value.parse()
7877 }
7878 }
7879 impl ::std::convert::TryFrom<::std::string::String>
7880 for PostGetCompressedBalanceByOwnerBodyMethod {
7881 type Error = self::error::ConversionError;
7882 fn try_from(
7883 value: ::std::string::String,
7884 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7885 value.parse()
7886 }
7887 }
7888 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7907 pub struct PostGetCompressedBalanceByOwnerBodyParams {
7908 pub owner: SerializablePubkey,
7909 }
7910 impl PostGetCompressedBalanceByOwnerBodyParams {
7911 pub fn builder() -> builder::PostGetCompressedBalanceByOwnerBodyParams {
7912 Default::default()
7913 }
7914 }
7915 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7973 pub struct PostGetCompressedBalanceByOwnerResponse {
7974 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7975 pub error: ::std::option::Option<PostGetCompressedBalanceByOwnerResponseError>,
7976 pub id: PostGetCompressedBalanceByOwnerResponseId,
7978 pub jsonrpc: PostGetCompressedBalanceByOwnerResponseJsonrpc,
7980 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7981 pub result: ::std::option::Option<PostGetCompressedBalanceByOwnerResponseResult>,
7982 }
7983 impl PostGetCompressedBalanceByOwnerResponse {
7984 pub fn builder() -> builder::PostGetCompressedBalanceByOwnerResponse {
7985 Default::default()
7986 }
7987 }
7988 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8007 pub struct PostGetCompressedBalanceByOwnerResponseError {
8008 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8009 pub code: ::std::option::Option<i64>,
8010 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8011 pub message: ::std::option::Option<::std::string::String>,
8012 }
8013 impl ::std::default::Default for PostGetCompressedBalanceByOwnerResponseError {
8014 fn default() -> Self {
8015 Self {
8016 code: Default::default(),
8017 message: Default::default(),
8018 }
8019 }
8020 }
8021 impl PostGetCompressedBalanceByOwnerResponseError {
8022 pub fn builder() -> builder::PostGetCompressedBalanceByOwnerResponseError {
8023 Default::default()
8024 }
8025 }
8026 #[derive(
8041 ::serde::Deserialize,
8042 ::serde::Serialize,
8043 Clone,
8044 Copy,
8045 Debug,
8046 Eq,
8047 Hash,
8048 Ord,
8049 PartialEq,
8050 PartialOrd
8051 )]
8052 pub enum PostGetCompressedBalanceByOwnerResponseId {
8053 #[serde(rename = "test-account")]
8054 TestAccount,
8055 }
8056 impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerResponseId {
8057 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8058 match *self {
8059 Self::TestAccount => f.write_str("test-account"),
8060 }
8061 }
8062 }
8063 impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerResponseId {
8064 type Err = self::error::ConversionError;
8065 fn from_str(
8066 value: &str,
8067 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8068 match value {
8069 "test-account" => Ok(Self::TestAccount),
8070 _ => Err("invalid value".into()),
8071 }
8072 }
8073 }
8074 impl ::std::convert::TryFrom<&str> for PostGetCompressedBalanceByOwnerResponseId {
8075 type Error = self::error::ConversionError;
8076 fn try_from(
8077 value: &str,
8078 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8079 value.parse()
8080 }
8081 }
8082 impl ::std::convert::TryFrom<&::std::string::String>
8083 for PostGetCompressedBalanceByOwnerResponseId {
8084 type Error = self::error::ConversionError;
8085 fn try_from(
8086 value: &::std::string::String,
8087 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8088 value.parse()
8089 }
8090 }
8091 impl ::std::convert::TryFrom<::std::string::String>
8092 for PostGetCompressedBalanceByOwnerResponseId {
8093 type Error = self::error::ConversionError;
8094 fn try_from(
8095 value: ::std::string::String,
8096 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8097 value.parse()
8098 }
8099 }
8100 #[derive(
8115 ::serde::Deserialize,
8116 ::serde::Serialize,
8117 Clone,
8118 Copy,
8119 Debug,
8120 Eq,
8121 Hash,
8122 Ord,
8123 PartialEq,
8124 PartialOrd
8125 )]
8126 pub enum PostGetCompressedBalanceByOwnerResponseJsonrpc {
8127 #[serde(rename = "2.0")]
8128 X20,
8129 }
8130 impl ::std::fmt::Display for PostGetCompressedBalanceByOwnerResponseJsonrpc {
8131 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8132 match *self {
8133 Self::X20 => f.write_str("2.0"),
8134 }
8135 }
8136 }
8137 impl ::std::str::FromStr for PostGetCompressedBalanceByOwnerResponseJsonrpc {
8138 type Err = self::error::ConversionError;
8139 fn from_str(
8140 value: &str,
8141 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8142 match value {
8143 "2.0" => Ok(Self::X20),
8144 _ => Err("invalid value".into()),
8145 }
8146 }
8147 }
8148 impl ::std::convert::TryFrom<&str>
8149 for PostGetCompressedBalanceByOwnerResponseJsonrpc {
8150 type Error = self::error::ConversionError;
8151 fn try_from(
8152 value: &str,
8153 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8154 value.parse()
8155 }
8156 }
8157 impl ::std::convert::TryFrom<&::std::string::String>
8158 for PostGetCompressedBalanceByOwnerResponseJsonrpc {
8159 type Error = self::error::ConversionError;
8160 fn try_from(
8161 value: &::std::string::String,
8162 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8163 value.parse()
8164 }
8165 }
8166 impl ::std::convert::TryFrom<::std::string::String>
8167 for PostGetCompressedBalanceByOwnerResponseJsonrpc {
8168 type Error = self::error::ConversionError;
8169 fn try_from(
8170 value: ::std::string::String,
8171 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8172 value.parse()
8173 }
8174 }
8175 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8199 #[serde(deny_unknown_fields)]
8200 pub struct PostGetCompressedBalanceByOwnerResponseResult {
8201 pub context: Context,
8202 pub value: UnsignedInteger,
8203 }
8204 impl PostGetCompressedBalanceByOwnerResponseResult {
8205 pub fn builder() -> builder::PostGetCompressedBalanceByOwnerResponseResult {
8206 Default::default()
8207 }
8208 }
8209 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8289 pub struct PostGetCompressedMintTokenHoldersBody {
8290 pub id: PostGetCompressedMintTokenHoldersBodyId,
8292 pub jsonrpc: PostGetCompressedMintTokenHoldersBodyJsonrpc,
8294 pub method: PostGetCompressedMintTokenHoldersBodyMethod,
8296 pub params: PostGetCompressedMintTokenHoldersBodyParams,
8297 }
8298 impl PostGetCompressedMintTokenHoldersBody {
8299 pub fn builder() -> builder::PostGetCompressedMintTokenHoldersBody {
8300 Default::default()
8301 }
8302 }
8303 #[derive(
8318 ::serde::Deserialize,
8319 ::serde::Serialize,
8320 Clone,
8321 Copy,
8322 Debug,
8323 Eq,
8324 Hash,
8325 Ord,
8326 PartialEq,
8327 PartialOrd
8328 )]
8329 pub enum PostGetCompressedMintTokenHoldersBodyId {
8330 #[serde(rename = "test-account")]
8331 TestAccount,
8332 }
8333 impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersBodyId {
8334 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8335 match *self {
8336 Self::TestAccount => f.write_str("test-account"),
8337 }
8338 }
8339 }
8340 impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersBodyId {
8341 type Err = self::error::ConversionError;
8342 fn from_str(
8343 value: &str,
8344 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8345 match value {
8346 "test-account" => Ok(Self::TestAccount),
8347 _ => Err("invalid value".into()),
8348 }
8349 }
8350 }
8351 impl ::std::convert::TryFrom<&str> for PostGetCompressedMintTokenHoldersBodyId {
8352 type Error = self::error::ConversionError;
8353 fn try_from(
8354 value: &str,
8355 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8356 value.parse()
8357 }
8358 }
8359 impl ::std::convert::TryFrom<&::std::string::String>
8360 for PostGetCompressedMintTokenHoldersBodyId {
8361 type Error = self::error::ConversionError;
8362 fn try_from(
8363 value: &::std::string::String,
8364 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8365 value.parse()
8366 }
8367 }
8368 impl ::std::convert::TryFrom<::std::string::String>
8369 for PostGetCompressedMintTokenHoldersBodyId {
8370 type Error = self::error::ConversionError;
8371 fn try_from(
8372 value: ::std::string::String,
8373 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8374 value.parse()
8375 }
8376 }
8377 #[derive(
8392 ::serde::Deserialize,
8393 ::serde::Serialize,
8394 Clone,
8395 Copy,
8396 Debug,
8397 Eq,
8398 Hash,
8399 Ord,
8400 PartialEq,
8401 PartialOrd
8402 )]
8403 pub enum PostGetCompressedMintTokenHoldersBodyJsonrpc {
8404 #[serde(rename = "2.0")]
8405 X20,
8406 }
8407 impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersBodyJsonrpc {
8408 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8409 match *self {
8410 Self::X20 => f.write_str("2.0"),
8411 }
8412 }
8413 }
8414 impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersBodyJsonrpc {
8415 type Err = self::error::ConversionError;
8416 fn from_str(
8417 value: &str,
8418 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8419 match value {
8420 "2.0" => Ok(Self::X20),
8421 _ => Err("invalid value".into()),
8422 }
8423 }
8424 }
8425 impl ::std::convert::TryFrom<&str> for PostGetCompressedMintTokenHoldersBodyJsonrpc {
8426 type Error = self::error::ConversionError;
8427 fn try_from(
8428 value: &str,
8429 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8430 value.parse()
8431 }
8432 }
8433 impl ::std::convert::TryFrom<&::std::string::String>
8434 for PostGetCompressedMintTokenHoldersBodyJsonrpc {
8435 type Error = self::error::ConversionError;
8436 fn try_from(
8437 value: &::std::string::String,
8438 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8439 value.parse()
8440 }
8441 }
8442 impl ::std::convert::TryFrom<::std::string::String>
8443 for PostGetCompressedMintTokenHoldersBodyJsonrpc {
8444 type Error = self::error::ConversionError;
8445 fn try_from(
8446 value: ::std::string::String,
8447 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8448 value.parse()
8449 }
8450 }
8451 #[derive(
8466 ::serde::Deserialize,
8467 ::serde::Serialize,
8468 Clone,
8469 Copy,
8470 Debug,
8471 Eq,
8472 Hash,
8473 Ord,
8474 PartialEq,
8475 PartialOrd
8476 )]
8477 pub enum PostGetCompressedMintTokenHoldersBodyMethod {
8478 #[serde(rename = "getCompressedMintTokenHolders")]
8479 GetCompressedMintTokenHolders,
8480 }
8481 impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersBodyMethod {
8482 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8483 match *self {
8484 Self::GetCompressedMintTokenHolders => {
8485 f.write_str("getCompressedMintTokenHolders")
8486 }
8487 }
8488 }
8489 }
8490 impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersBodyMethod {
8491 type Err = self::error::ConversionError;
8492 fn from_str(
8493 value: &str,
8494 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8495 match value {
8496 "getCompressedMintTokenHolders" => {
8497 Ok(Self::GetCompressedMintTokenHolders)
8498 }
8499 _ => Err("invalid value".into()),
8500 }
8501 }
8502 }
8503 impl ::std::convert::TryFrom<&str> for PostGetCompressedMintTokenHoldersBodyMethod {
8504 type Error = self::error::ConversionError;
8505 fn try_from(
8506 value: &str,
8507 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8508 value.parse()
8509 }
8510 }
8511 impl ::std::convert::TryFrom<&::std::string::String>
8512 for PostGetCompressedMintTokenHoldersBodyMethod {
8513 type Error = self::error::ConversionError;
8514 fn try_from(
8515 value: &::std::string::String,
8516 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8517 value.parse()
8518 }
8519 }
8520 impl ::std::convert::TryFrom<::std::string::String>
8521 for PostGetCompressedMintTokenHoldersBodyMethod {
8522 type Error = self::error::ConversionError;
8523 fn try_from(
8524 value: ::std::string::String,
8525 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8526 value.parse()
8527 }
8528 }
8529 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8577 #[serde(deny_unknown_fields)]
8578 pub struct PostGetCompressedMintTokenHoldersBodyParams {
8579 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8580 pub cursor: ::std::option::Option<Base58String>,
8581 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8582 pub limit: ::std::option::Option<Limit>,
8583 pub mint: SerializablePubkey,
8584 }
8585 impl PostGetCompressedMintTokenHoldersBodyParams {
8586 pub fn builder() -> builder::PostGetCompressedMintTokenHoldersBodyParams {
8587 Default::default()
8588 }
8589 }
8590 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8648 pub struct PostGetCompressedMintTokenHoldersResponse {
8649 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8650 pub error: ::std::option::Option<PostGetCompressedMintTokenHoldersResponseError>,
8651 pub id: PostGetCompressedMintTokenHoldersResponseId,
8653 pub jsonrpc: PostGetCompressedMintTokenHoldersResponseJsonrpc,
8655 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8656 pub result: ::std::option::Option<
8657 PostGetCompressedMintTokenHoldersResponseResult,
8658 >,
8659 }
8660 impl PostGetCompressedMintTokenHoldersResponse {
8661 pub fn builder() -> builder::PostGetCompressedMintTokenHoldersResponse {
8662 Default::default()
8663 }
8664 }
8665 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8684 pub struct PostGetCompressedMintTokenHoldersResponseError {
8685 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8686 pub code: ::std::option::Option<i64>,
8687 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8688 pub message: ::std::option::Option<::std::string::String>,
8689 }
8690 impl ::std::default::Default for PostGetCompressedMintTokenHoldersResponseError {
8691 fn default() -> Self {
8692 Self {
8693 code: Default::default(),
8694 message: Default::default(),
8695 }
8696 }
8697 }
8698 impl PostGetCompressedMintTokenHoldersResponseError {
8699 pub fn builder() -> builder::PostGetCompressedMintTokenHoldersResponseError {
8700 Default::default()
8701 }
8702 }
8703 #[derive(
8718 ::serde::Deserialize,
8719 ::serde::Serialize,
8720 Clone,
8721 Copy,
8722 Debug,
8723 Eq,
8724 Hash,
8725 Ord,
8726 PartialEq,
8727 PartialOrd
8728 )]
8729 pub enum PostGetCompressedMintTokenHoldersResponseId {
8730 #[serde(rename = "test-account")]
8731 TestAccount,
8732 }
8733 impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersResponseId {
8734 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8735 match *self {
8736 Self::TestAccount => f.write_str("test-account"),
8737 }
8738 }
8739 }
8740 impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersResponseId {
8741 type Err = self::error::ConversionError;
8742 fn from_str(
8743 value: &str,
8744 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8745 match value {
8746 "test-account" => Ok(Self::TestAccount),
8747 _ => Err("invalid value".into()),
8748 }
8749 }
8750 }
8751 impl ::std::convert::TryFrom<&str> for PostGetCompressedMintTokenHoldersResponseId {
8752 type Error = self::error::ConversionError;
8753 fn try_from(
8754 value: &str,
8755 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8756 value.parse()
8757 }
8758 }
8759 impl ::std::convert::TryFrom<&::std::string::String>
8760 for PostGetCompressedMintTokenHoldersResponseId {
8761 type Error = self::error::ConversionError;
8762 fn try_from(
8763 value: &::std::string::String,
8764 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8765 value.parse()
8766 }
8767 }
8768 impl ::std::convert::TryFrom<::std::string::String>
8769 for PostGetCompressedMintTokenHoldersResponseId {
8770 type Error = self::error::ConversionError;
8771 fn try_from(
8772 value: ::std::string::String,
8773 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8774 value.parse()
8775 }
8776 }
8777 #[derive(
8792 ::serde::Deserialize,
8793 ::serde::Serialize,
8794 Clone,
8795 Copy,
8796 Debug,
8797 Eq,
8798 Hash,
8799 Ord,
8800 PartialEq,
8801 PartialOrd
8802 )]
8803 pub enum PostGetCompressedMintTokenHoldersResponseJsonrpc {
8804 #[serde(rename = "2.0")]
8805 X20,
8806 }
8807 impl ::std::fmt::Display for PostGetCompressedMintTokenHoldersResponseJsonrpc {
8808 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8809 match *self {
8810 Self::X20 => f.write_str("2.0"),
8811 }
8812 }
8813 }
8814 impl ::std::str::FromStr for PostGetCompressedMintTokenHoldersResponseJsonrpc {
8815 type Err = self::error::ConversionError;
8816 fn from_str(
8817 value: &str,
8818 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8819 match value {
8820 "2.0" => Ok(Self::X20),
8821 _ => Err("invalid value".into()),
8822 }
8823 }
8824 }
8825 impl ::std::convert::TryFrom<&str>
8826 for PostGetCompressedMintTokenHoldersResponseJsonrpc {
8827 type Error = self::error::ConversionError;
8828 fn try_from(
8829 value: &str,
8830 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8831 value.parse()
8832 }
8833 }
8834 impl ::std::convert::TryFrom<&::std::string::String>
8835 for PostGetCompressedMintTokenHoldersResponseJsonrpc {
8836 type Error = self::error::ConversionError;
8837 fn try_from(
8838 value: &::std::string::String,
8839 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8840 value.parse()
8841 }
8842 }
8843 impl ::std::convert::TryFrom<::std::string::String>
8844 for PostGetCompressedMintTokenHoldersResponseJsonrpc {
8845 type Error = self::error::ConversionError;
8846 fn try_from(
8847 value: ::std::string::String,
8848 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8849 value.parse()
8850 }
8851 }
8852 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8876 #[serde(deny_unknown_fields)]
8877 pub struct PostGetCompressedMintTokenHoldersResponseResult {
8878 pub context: Context,
8879 pub value: OwnerBalanceList,
8880 }
8881 impl PostGetCompressedMintTokenHoldersResponseResult {
8882 pub fn builder() -> builder::PostGetCompressedMintTokenHoldersResponseResult {
8883 Default::default()
8884 }
8885 }
8886 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8971 pub struct PostGetCompressedTokenAccountBalanceBody {
8972 pub id: PostGetCompressedTokenAccountBalanceBodyId,
8974 pub jsonrpc: PostGetCompressedTokenAccountBalanceBodyJsonrpc,
8976 pub method: PostGetCompressedTokenAccountBalanceBodyMethod,
8978 pub params: PostGetCompressedTokenAccountBalanceBodyParams,
8979 }
8980 impl PostGetCompressedTokenAccountBalanceBody {
8981 pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceBody {
8982 Default::default()
8983 }
8984 }
8985 #[derive(
9000 ::serde::Deserialize,
9001 ::serde::Serialize,
9002 Clone,
9003 Copy,
9004 Debug,
9005 Eq,
9006 Hash,
9007 Ord,
9008 PartialEq,
9009 PartialOrd
9010 )]
9011 pub enum PostGetCompressedTokenAccountBalanceBodyId {
9012 #[serde(rename = "test-account")]
9013 TestAccount,
9014 }
9015 impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceBodyId {
9016 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9017 match *self {
9018 Self::TestAccount => f.write_str("test-account"),
9019 }
9020 }
9021 }
9022 impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceBodyId {
9023 type Err = self::error::ConversionError;
9024 fn from_str(
9025 value: &str,
9026 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9027 match value {
9028 "test-account" => Ok(Self::TestAccount),
9029 _ => Err("invalid value".into()),
9030 }
9031 }
9032 }
9033 impl ::std::convert::TryFrom<&str> for PostGetCompressedTokenAccountBalanceBodyId {
9034 type Error = self::error::ConversionError;
9035 fn try_from(
9036 value: &str,
9037 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9038 value.parse()
9039 }
9040 }
9041 impl ::std::convert::TryFrom<&::std::string::String>
9042 for PostGetCompressedTokenAccountBalanceBodyId {
9043 type Error = self::error::ConversionError;
9044 fn try_from(
9045 value: &::std::string::String,
9046 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9047 value.parse()
9048 }
9049 }
9050 impl ::std::convert::TryFrom<::std::string::String>
9051 for PostGetCompressedTokenAccountBalanceBodyId {
9052 type Error = self::error::ConversionError;
9053 fn try_from(
9054 value: ::std::string::String,
9055 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9056 value.parse()
9057 }
9058 }
9059 #[derive(
9074 ::serde::Deserialize,
9075 ::serde::Serialize,
9076 Clone,
9077 Copy,
9078 Debug,
9079 Eq,
9080 Hash,
9081 Ord,
9082 PartialEq,
9083 PartialOrd
9084 )]
9085 pub enum PostGetCompressedTokenAccountBalanceBodyJsonrpc {
9086 #[serde(rename = "2.0")]
9087 X20,
9088 }
9089 impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceBodyJsonrpc {
9090 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9091 match *self {
9092 Self::X20 => f.write_str("2.0"),
9093 }
9094 }
9095 }
9096 impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceBodyJsonrpc {
9097 type Err = self::error::ConversionError;
9098 fn from_str(
9099 value: &str,
9100 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9101 match value {
9102 "2.0" => Ok(Self::X20),
9103 _ => Err("invalid value".into()),
9104 }
9105 }
9106 }
9107 impl ::std::convert::TryFrom<&str>
9108 for PostGetCompressedTokenAccountBalanceBodyJsonrpc {
9109 type Error = self::error::ConversionError;
9110 fn try_from(
9111 value: &str,
9112 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9113 value.parse()
9114 }
9115 }
9116 impl ::std::convert::TryFrom<&::std::string::String>
9117 for PostGetCompressedTokenAccountBalanceBodyJsonrpc {
9118 type Error = self::error::ConversionError;
9119 fn try_from(
9120 value: &::std::string::String,
9121 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9122 value.parse()
9123 }
9124 }
9125 impl ::std::convert::TryFrom<::std::string::String>
9126 for PostGetCompressedTokenAccountBalanceBodyJsonrpc {
9127 type Error = self::error::ConversionError;
9128 fn try_from(
9129 value: ::std::string::String,
9130 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9131 value.parse()
9132 }
9133 }
9134 #[derive(
9149 ::serde::Deserialize,
9150 ::serde::Serialize,
9151 Clone,
9152 Copy,
9153 Debug,
9154 Eq,
9155 Hash,
9156 Ord,
9157 PartialEq,
9158 PartialOrd
9159 )]
9160 pub enum PostGetCompressedTokenAccountBalanceBodyMethod {
9161 #[serde(rename = "getCompressedTokenAccountBalance")]
9162 GetCompressedTokenAccountBalance,
9163 }
9164 impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceBodyMethod {
9165 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9166 match *self {
9167 Self::GetCompressedTokenAccountBalance => {
9168 f.write_str("getCompressedTokenAccountBalance")
9169 }
9170 }
9171 }
9172 }
9173 impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceBodyMethod {
9174 type Err = self::error::ConversionError;
9175 fn from_str(
9176 value: &str,
9177 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9178 match value {
9179 "getCompressedTokenAccountBalance" => {
9180 Ok(Self::GetCompressedTokenAccountBalance)
9181 }
9182 _ => Err("invalid value".into()),
9183 }
9184 }
9185 }
9186 impl ::std::convert::TryFrom<&str>
9187 for PostGetCompressedTokenAccountBalanceBodyMethod {
9188 type Error = self::error::ConversionError;
9189 fn try_from(
9190 value: &str,
9191 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9192 value.parse()
9193 }
9194 }
9195 impl ::std::convert::TryFrom<&::std::string::String>
9196 for PostGetCompressedTokenAccountBalanceBodyMethod {
9197 type Error = self::error::ConversionError;
9198 fn try_from(
9199 value: &::std::string::String,
9200 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9201 value.parse()
9202 }
9203 }
9204 impl ::std::convert::TryFrom<::std::string::String>
9205 for PostGetCompressedTokenAccountBalanceBodyMethod {
9206 type Error = self::error::ConversionError;
9207 fn try_from(
9208 value: ::std::string::String,
9209 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9210 value.parse()
9211 }
9212 }
9213 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9266 #[serde(deny_unknown_fields)]
9267 pub struct PostGetCompressedTokenAccountBalanceBodyParams {
9268 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9269 pub address: ::std::option::Option<SerializablePubkey>,
9270 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9271 pub hash: ::std::option::Option<Hash>,
9272 }
9273 impl ::std::default::Default for PostGetCompressedTokenAccountBalanceBodyParams {
9274 fn default() -> Self {
9275 PostGetCompressedTokenAccountBalanceBodyParams {
9276 address: ::std::option::Option::None,
9277 hash: ::std::option::Option::Some(
9278 Hash("11111111111111111111111111111111".to_string()),
9279 ),
9280 }
9281 }
9282 }
9283 impl PostGetCompressedTokenAccountBalanceBodyParams {
9284 pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceBodyParams {
9285 Default::default()
9286 }
9287 }
9288 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9346 pub struct PostGetCompressedTokenAccountBalanceResponse {
9347 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9348 pub error: ::std::option::Option<
9349 PostGetCompressedTokenAccountBalanceResponseError,
9350 >,
9351 pub id: PostGetCompressedTokenAccountBalanceResponseId,
9353 pub jsonrpc: PostGetCompressedTokenAccountBalanceResponseJsonrpc,
9355 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9356 pub result: ::std::option::Option<
9357 PostGetCompressedTokenAccountBalanceResponseResult,
9358 >,
9359 }
9360 impl PostGetCompressedTokenAccountBalanceResponse {
9361 pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceResponse {
9362 Default::default()
9363 }
9364 }
9365 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9384 pub struct PostGetCompressedTokenAccountBalanceResponseError {
9385 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9386 pub code: ::std::option::Option<i64>,
9387 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9388 pub message: ::std::option::Option<::std::string::String>,
9389 }
9390 impl ::std::default::Default for PostGetCompressedTokenAccountBalanceResponseError {
9391 fn default() -> Self {
9392 Self {
9393 code: Default::default(),
9394 message: Default::default(),
9395 }
9396 }
9397 }
9398 impl PostGetCompressedTokenAccountBalanceResponseError {
9399 pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceResponseError {
9400 Default::default()
9401 }
9402 }
9403 #[derive(
9418 ::serde::Deserialize,
9419 ::serde::Serialize,
9420 Clone,
9421 Copy,
9422 Debug,
9423 Eq,
9424 Hash,
9425 Ord,
9426 PartialEq,
9427 PartialOrd
9428 )]
9429 pub enum PostGetCompressedTokenAccountBalanceResponseId {
9430 #[serde(rename = "test-account")]
9431 TestAccount,
9432 }
9433 impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceResponseId {
9434 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9435 match *self {
9436 Self::TestAccount => f.write_str("test-account"),
9437 }
9438 }
9439 }
9440 impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceResponseId {
9441 type Err = self::error::ConversionError;
9442 fn from_str(
9443 value: &str,
9444 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9445 match value {
9446 "test-account" => Ok(Self::TestAccount),
9447 _ => Err("invalid value".into()),
9448 }
9449 }
9450 }
9451 impl ::std::convert::TryFrom<&str>
9452 for PostGetCompressedTokenAccountBalanceResponseId {
9453 type Error = self::error::ConversionError;
9454 fn try_from(
9455 value: &str,
9456 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9457 value.parse()
9458 }
9459 }
9460 impl ::std::convert::TryFrom<&::std::string::String>
9461 for PostGetCompressedTokenAccountBalanceResponseId {
9462 type Error = self::error::ConversionError;
9463 fn try_from(
9464 value: &::std::string::String,
9465 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9466 value.parse()
9467 }
9468 }
9469 impl ::std::convert::TryFrom<::std::string::String>
9470 for PostGetCompressedTokenAccountBalanceResponseId {
9471 type Error = self::error::ConversionError;
9472 fn try_from(
9473 value: ::std::string::String,
9474 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9475 value.parse()
9476 }
9477 }
9478 #[derive(
9493 ::serde::Deserialize,
9494 ::serde::Serialize,
9495 Clone,
9496 Copy,
9497 Debug,
9498 Eq,
9499 Hash,
9500 Ord,
9501 PartialEq,
9502 PartialOrd
9503 )]
9504 pub enum PostGetCompressedTokenAccountBalanceResponseJsonrpc {
9505 #[serde(rename = "2.0")]
9506 X20,
9507 }
9508 impl ::std::fmt::Display for PostGetCompressedTokenAccountBalanceResponseJsonrpc {
9509 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9510 match *self {
9511 Self::X20 => f.write_str("2.0"),
9512 }
9513 }
9514 }
9515 impl ::std::str::FromStr for PostGetCompressedTokenAccountBalanceResponseJsonrpc {
9516 type Err = self::error::ConversionError;
9517 fn from_str(
9518 value: &str,
9519 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9520 match value {
9521 "2.0" => Ok(Self::X20),
9522 _ => Err("invalid value".into()),
9523 }
9524 }
9525 }
9526 impl ::std::convert::TryFrom<&str>
9527 for PostGetCompressedTokenAccountBalanceResponseJsonrpc {
9528 type Error = self::error::ConversionError;
9529 fn try_from(
9530 value: &str,
9531 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9532 value.parse()
9533 }
9534 }
9535 impl ::std::convert::TryFrom<&::std::string::String>
9536 for PostGetCompressedTokenAccountBalanceResponseJsonrpc {
9537 type Error = self::error::ConversionError;
9538 fn try_from(
9539 value: &::std::string::String,
9540 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9541 value.parse()
9542 }
9543 }
9544 impl ::std::convert::TryFrom<::std::string::String>
9545 for PostGetCompressedTokenAccountBalanceResponseJsonrpc {
9546 type Error = self::error::ConversionError;
9547 fn try_from(
9548 value: ::std::string::String,
9549 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9550 value.parse()
9551 }
9552 }
9553 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9577 #[serde(deny_unknown_fields)]
9578 pub struct PostGetCompressedTokenAccountBalanceResponseResult {
9579 pub context: Context,
9580 pub value: TokenAccountBalance,
9581 }
9582 impl PostGetCompressedTokenAccountBalanceResponseResult {
9583 pub fn builder() -> builder::PostGetCompressedTokenAccountBalanceResponseResult {
9584 Default::default()
9585 }
9586 }
9587 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9681 pub struct PostGetCompressedTokenAccountsByDelegateBody {
9682 pub id: PostGetCompressedTokenAccountsByDelegateBodyId,
9684 pub jsonrpc: PostGetCompressedTokenAccountsByDelegateBodyJsonrpc,
9686 pub method: PostGetCompressedTokenAccountsByDelegateBodyMethod,
9688 pub params: PostGetCompressedTokenAccountsByDelegateBodyParams,
9689 }
9690 impl PostGetCompressedTokenAccountsByDelegateBody {
9691 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateBody {
9692 Default::default()
9693 }
9694 }
9695 #[derive(
9710 ::serde::Deserialize,
9711 ::serde::Serialize,
9712 Clone,
9713 Copy,
9714 Debug,
9715 Eq,
9716 Hash,
9717 Ord,
9718 PartialEq,
9719 PartialOrd
9720 )]
9721 pub enum PostGetCompressedTokenAccountsByDelegateBodyId {
9722 #[serde(rename = "test-account")]
9723 TestAccount,
9724 }
9725 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateBodyId {
9726 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9727 match *self {
9728 Self::TestAccount => f.write_str("test-account"),
9729 }
9730 }
9731 }
9732 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateBodyId {
9733 type Err = self::error::ConversionError;
9734 fn from_str(
9735 value: &str,
9736 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9737 match value {
9738 "test-account" => Ok(Self::TestAccount),
9739 _ => Err("invalid value".into()),
9740 }
9741 }
9742 }
9743 impl ::std::convert::TryFrom<&str>
9744 for PostGetCompressedTokenAccountsByDelegateBodyId {
9745 type Error = self::error::ConversionError;
9746 fn try_from(
9747 value: &str,
9748 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9749 value.parse()
9750 }
9751 }
9752 impl ::std::convert::TryFrom<&::std::string::String>
9753 for PostGetCompressedTokenAccountsByDelegateBodyId {
9754 type Error = self::error::ConversionError;
9755 fn try_from(
9756 value: &::std::string::String,
9757 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9758 value.parse()
9759 }
9760 }
9761 impl ::std::convert::TryFrom<::std::string::String>
9762 for PostGetCompressedTokenAccountsByDelegateBodyId {
9763 type Error = self::error::ConversionError;
9764 fn try_from(
9765 value: ::std::string::String,
9766 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9767 value.parse()
9768 }
9769 }
9770 #[derive(
9785 ::serde::Deserialize,
9786 ::serde::Serialize,
9787 Clone,
9788 Copy,
9789 Debug,
9790 Eq,
9791 Hash,
9792 Ord,
9793 PartialEq,
9794 PartialOrd
9795 )]
9796 pub enum PostGetCompressedTokenAccountsByDelegateBodyJsonrpc {
9797 #[serde(rename = "2.0")]
9798 X20,
9799 }
9800 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc {
9801 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9802 match *self {
9803 Self::X20 => f.write_str("2.0"),
9804 }
9805 }
9806 }
9807 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc {
9808 type Err = self::error::ConversionError;
9809 fn from_str(
9810 value: &str,
9811 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9812 match value {
9813 "2.0" => Ok(Self::X20),
9814 _ => Err("invalid value".into()),
9815 }
9816 }
9817 }
9818 impl ::std::convert::TryFrom<&str>
9819 for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc {
9820 type Error = self::error::ConversionError;
9821 fn try_from(
9822 value: &str,
9823 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9824 value.parse()
9825 }
9826 }
9827 impl ::std::convert::TryFrom<&::std::string::String>
9828 for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc {
9829 type Error = self::error::ConversionError;
9830 fn try_from(
9831 value: &::std::string::String,
9832 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9833 value.parse()
9834 }
9835 }
9836 impl ::std::convert::TryFrom<::std::string::String>
9837 for PostGetCompressedTokenAccountsByDelegateBodyJsonrpc {
9838 type Error = self::error::ConversionError;
9839 fn try_from(
9840 value: ::std::string::String,
9841 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9842 value.parse()
9843 }
9844 }
9845 #[derive(
9860 ::serde::Deserialize,
9861 ::serde::Serialize,
9862 Clone,
9863 Copy,
9864 Debug,
9865 Eq,
9866 Hash,
9867 Ord,
9868 PartialEq,
9869 PartialOrd
9870 )]
9871 pub enum PostGetCompressedTokenAccountsByDelegateBodyMethod {
9872 #[serde(rename = "getCompressedTokenAccountsByDelegate")]
9873 GetCompressedTokenAccountsByDelegate,
9874 }
9875 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateBodyMethod {
9876 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9877 match *self {
9878 Self::GetCompressedTokenAccountsByDelegate => {
9879 f.write_str("getCompressedTokenAccountsByDelegate")
9880 }
9881 }
9882 }
9883 }
9884 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateBodyMethod {
9885 type Err = self::error::ConversionError;
9886 fn from_str(
9887 value: &str,
9888 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9889 match value {
9890 "getCompressedTokenAccountsByDelegate" => {
9891 Ok(Self::GetCompressedTokenAccountsByDelegate)
9892 }
9893 _ => Err("invalid value".into()),
9894 }
9895 }
9896 }
9897 impl ::std::convert::TryFrom<&str>
9898 for PostGetCompressedTokenAccountsByDelegateBodyMethod {
9899 type Error = self::error::ConversionError;
9900 fn try_from(
9901 value: &str,
9902 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9903 value.parse()
9904 }
9905 }
9906 impl ::std::convert::TryFrom<&::std::string::String>
9907 for PostGetCompressedTokenAccountsByDelegateBodyMethod {
9908 type Error = self::error::ConversionError;
9909 fn try_from(
9910 value: &::std::string::String,
9911 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9912 value.parse()
9913 }
9914 }
9915 impl ::std::convert::TryFrom<::std::string::String>
9916 for PostGetCompressedTokenAccountsByDelegateBodyMethod {
9917 type Error = self::error::ConversionError;
9918 fn try_from(
9919 value: ::std::string::String,
9920 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9921 value.parse()
9922 }
9923 }
9924 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9986 #[serde(deny_unknown_fields)]
9987 pub struct PostGetCompressedTokenAccountsByDelegateBodyParams {
9988 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9989 pub cursor: ::std::option::Option<Base58String>,
9990 pub delegate: SerializablePubkey,
9991 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9992 pub limit: ::std::option::Option<Limit>,
9993 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9994 pub mint: ::std::option::Option<SerializablePubkey>,
9995 }
9996 impl PostGetCompressedTokenAccountsByDelegateBodyParams {
9997 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateBodyParams {
9998 Default::default()
9999 }
10000 }
10001 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10059 pub struct PostGetCompressedTokenAccountsByDelegateResponse {
10060 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10061 pub error: ::std::option::Option<
10062 PostGetCompressedTokenAccountsByDelegateResponseError,
10063 >,
10064 pub id: PostGetCompressedTokenAccountsByDelegateResponseId,
10066 pub jsonrpc: PostGetCompressedTokenAccountsByDelegateResponseJsonrpc,
10068 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10069 pub result: ::std::option::Option<
10070 PostGetCompressedTokenAccountsByDelegateResponseResult,
10071 >,
10072 }
10073 impl PostGetCompressedTokenAccountsByDelegateResponse {
10074 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateResponse {
10075 Default::default()
10076 }
10077 }
10078 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10097 pub struct PostGetCompressedTokenAccountsByDelegateResponseError {
10098 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10099 pub code: ::std::option::Option<i64>,
10100 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10101 pub message: ::std::option::Option<::std::string::String>,
10102 }
10103 impl ::std::default::Default
10104 for PostGetCompressedTokenAccountsByDelegateResponseError {
10105 fn default() -> Self {
10106 Self {
10107 code: Default::default(),
10108 message: Default::default(),
10109 }
10110 }
10111 }
10112 impl PostGetCompressedTokenAccountsByDelegateResponseError {
10113 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateResponseError {
10114 Default::default()
10115 }
10116 }
10117 #[derive(
10132 ::serde::Deserialize,
10133 ::serde::Serialize,
10134 Clone,
10135 Copy,
10136 Debug,
10137 Eq,
10138 Hash,
10139 Ord,
10140 PartialEq,
10141 PartialOrd
10142 )]
10143 pub enum PostGetCompressedTokenAccountsByDelegateResponseId {
10144 #[serde(rename = "test-account")]
10145 TestAccount,
10146 }
10147 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateResponseId {
10148 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10149 match *self {
10150 Self::TestAccount => f.write_str("test-account"),
10151 }
10152 }
10153 }
10154 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateResponseId {
10155 type Err = self::error::ConversionError;
10156 fn from_str(
10157 value: &str,
10158 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10159 match value {
10160 "test-account" => Ok(Self::TestAccount),
10161 _ => Err("invalid value".into()),
10162 }
10163 }
10164 }
10165 impl ::std::convert::TryFrom<&str>
10166 for PostGetCompressedTokenAccountsByDelegateResponseId {
10167 type Error = self::error::ConversionError;
10168 fn try_from(
10169 value: &str,
10170 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10171 value.parse()
10172 }
10173 }
10174 impl ::std::convert::TryFrom<&::std::string::String>
10175 for PostGetCompressedTokenAccountsByDelegateResponseId {
10176 type Error = self::error::ConversionError;
10177 fn try_from(
10178 value: &::std::string::String,
10179 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10180 value.parse()
10181 }
10182 }
10183 impl ::std::convert::TryFrom<::std::string::String>
10184 for PostGetCompressedTokenAccountsByDelegateResponseId {
10185 type Error = self::error::ConversionError;
10186 fn try_from(
10187 value: ::std::string::String,
10188 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10189 value.parse()
10190 }
10191 }
10192 #[derive(
10207 ::serde::Deserialize,
10208 ::serde::Serialize,
10209 Clone,
10210 Copy,
10211 Debug,
10212 Eq,
10213 Hash,
10214 Ord,
10215 PartialEq,
10216 PartialOrd
10217 )]
10218 pub enum PostGetCompressedTokenAccountsByDelegateResponseJsonrpc {
10219 #[serde(rename = "2.0")]
10220 X20,
10221 }
10222 impl ::std::fmt::Display
10223 for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc {
10224 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10225 match *self {
10226 Self::X20 => f.write_str("2.0"),
10227 }
10228 }
10229 }
10230 impl ::std::str::FromStr
10231 for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc {
10232 type Err = self::error::ConversionError;
10233 fn from_str(
10234 value: &str,
10235 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10236 match value {
10237 "2.0" => Ok(Self::X20),
10238 _ => Err("invalid value".into()),
10239 }
10240 }
10241 }
10242 impl ::std::convert::TryFrom<&str>
10243 for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc {
10244 type Error = self::error::ConversionError;
10245 fn try_from(
10246 value: &str,
10247 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10248 value.parse()
10249 }
10250 }
10251 impl ::std::convert::TryFrom<&::std::string::String>
10252 for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc {
10253 type Error = self::error::ConversionError;
10254 fn try_from(
10255 value: &::std::string::String,
10256 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10257 value.parse()
10258 }
10259 }
10260 impl ::std::convert::TryFrom<::std::string::String>
10261 for PostGetCompressedTokenAccountsByDelegateResponseJsonrpc {
10262 type Error = self::error::ConversionError;
10263 fn try_from(
10264 value: ::std::string::String,
10265 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10266 value.parse()
10267 }
10268 }
10269 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10293 #[serde(deny_unknown_fields)]
10294 pub struct PostGetCompressedTokenAccountsByDelegateResponseResult {
10295 pub context: Context,
10296 pub value: TokenAccountList,
10297 }
10298 impl PostGetCompressedTokenAccountsByDelegateResponseResult {
10299 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateResponseResult {
10300 Default::default()
10301 }
10302 }
10303 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10397 pub struct PostGetCompressedTokenAccountsByDelegateV2Body {
10398 pub id: PostGetCompressedTokenAccountsByDelegateV2BodyId,
10400 pub jsonrpc: PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc,
10402 pub method: PostGetCompressedTokenAccountsByDelegateV2BodyMethod,
10404 pub params: PostGetCompressedTokenAccountsByDelegateV2BodyParams,
10405 }
10406 impl PostGetCompressedTokenAccountsByDelegateV2Body {
10407 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2Body {
10408 Default::default()
10409 }
10410 }
10411 #[derive(
10426 ::serde::Deserialize,
10427 ::serde::Serialize,
10428 Clone,
10429 Copy,
10430 Debug,
10431 Eq,
10432 Hash,
10433 Ord,
10434 PartialEq,
10435 PartialOrd
10436 )]
10437 pub enum PostGetCompressedTokenAccountsByDelegateV2BodyId {
10438 #[serde(rename = "test-account")]
10439 TestAccount,
10440 }
10441 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateV2BodyId {
10442 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10443 match *self {
10444 Self::TestAccount => f.write_str("test-account"),
10445 }
10446 }
10447 }
10448 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateV2BodyId {
10449 type Err = self::error::ConversionError;
10450 fn from_str(
10451 value: &str,
10452 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10453 match value {
10454 "test-account" => Ok(Self::TestAccount),
10455 _ => Err("invalid value".into()),
10456 }
10457 }
10458 }
10459 impl ::std::convert::TryFrom<&str>
10460 for PostGetCompressedTokenAccountsByDelegateV2BodyId {
10461 type Error = self::error::ConversionError;
10462 fn try_from(
10463 value: &str,
10464 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10465 value.parse()
10466 }
10467 }
10468 impl ::std::convert::TryFrom<&::std::string::String>
10469 for PostGetCompressedTokenAccountsByDelegateV2BodyId {
10470 type Error = self::error::ConversionError;
10471 fn try_from(
10472 value: &::std::string::String,
10473 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10474 value.parse()
10475 }
10476 }
10477 impl ::std::convert::TryFrom<::std::string::String>
10478 for PostGetCompressedTokenAccountsByDelegateV2BodyId {
10479 type Error = self::error::ConversionError;
10480 fn try_from(
10481 value: ::std::string::String,
10482 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10483 value.parse()
10484 }
10485 }
10486 #[derive(
10501 ::serde::Deserialize,
10502 ::serde::Serialize,
10503 Clone,
10504 Copy,
10505 Debug,
10506 Eq,
10507 Hash,
10508 Ord,
10509 PartialEq,
10510 PartialOrd
10511 )]
10512 pub enum PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc {
10513 #[serde(rename = "2.0")]
10514 X20,
10515 }
10516 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc {
10517 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10518 match *self {
10519 Self::X20 => f.write_str("2.0"),
10520 }
10521 }
10522 }
10523 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc {
10524 type Err = self::error::ConversionError;
10525 fn from_str(
10526 value: &str,
10527 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10528 match value {
10529 "2.0" => Ok(Self::X20),
10530 _ => Err("invalid value".into()),
10531 }
10532 }
10533 }
10534 impl ::std::convert::TryFrom<&str>
10535 for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc {
10536 type Error = self::error::ConversionError;
10537 fn try_from(
10538 value: &str,
10539 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10540 value.parse()
10541 }
10542 }
10543 impl ::std::convert::TryFrom<&::std::string::String>
10544 for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc {
10545 type Error = self::error::ConversionError;
10546 fn try_from(
10547 value: &::std::string::String,
10548 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10549 value.parse()
10550 }
10551 }
10552 impl ::std::convert::TryFrom<::std::string::String>
10553 for PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc {
10554 type Error = self::error::ConversionError;
10555 fn try_from(
10556 value: ::std::string::String,
10557 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10558 value.parse()
10559 }
10560 }
10561 #[derive(
10576 ::serde::Deserialize,
10577 ::serde::Serialize,
10578 Clone,
10579 Copy,
10580 Debug,
10581 Eq,
10582 Hash,
10583 Ord,
10584 PartialEq,
10585 PartialOrd
10586 )]
10587 pub enum PostGetCompressedTokenAccountsByDelegateV2BodyMethod {
10588 #[serde(rename = "getCompressedTokenAccountsByDelegateV2")]
10589 GetCompressedTokenAccountsByDelegateV2,
10590 }
10591 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateV2BodyMethod {
10592 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10593 match *self {
10594 Self::GetCompressedTokenAccountsByDelegateV2 => {
10595 f.write_str("getCompressedTokenAccountsByDelegateV2")
10596 }
10597 }
10598 }
10599 }
10600 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateV2BodyMethod {
10601 type Err = self::error::ConversionError;
10602 fn from_str(
10603 value: &str,
10604 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10605 match value {
10606 "getCompressedTokenAccountsByDelegateV2" => {
10607 Ok(Self::GetCompressedTokenAccountsByDelegateV2)
10608 }
10609 _ => Err("invalid value".into()),
10610 }
10611 }
10612 }
10613 impl ::std::convert::TryFrom<&str>
10614 for PostGetCompressedTokenAccountsByDelegateV2BodyMethod {
10615 type Error = self::error::ConversionError;
10616 fn try_from(
10617 value: &str,
10618 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10619 value.parse()
10620 }
10621 }
10622 impl ::std::convert::TryFrom<&::std::string::String>
10623 for PostGetCompressedTokenAccountsByDelegateV2BodyMethod {
10624 type Error = self::error::ConversionError;
10625 fn try_from(
10626 value: &::std::string::String,
10627 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10628 value.parse()
10629 }
10630 }
10631 impl ::std::convert::TryFrom<::std::string::String>
10632 for PostGetCompressedTokenAccountsByDelegateV2BodyMethod {
10633 type Error = self::error::ConversionError;
10634 fn try_from(
10635 value: ::std::string::String,
10636 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10637 value.parse()
10638 }
10639 }
10640 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10702 #[serde(deny_unknown_fields)]
10703 pub struct PostGetCompressedTokenAccountsByDelegateV2BodyParams {
10704 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10705 pub cursor: ::std::option::Option<Base58String>,
10706 pub delegate: SerializablePubkey,
10707 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10708 pub limit: ::std::option::Option<Limit>,
10709 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10710 pub mint: ::std::option::Option<SerializablePubkey>,
10711 }
10712 impl PostGetCompressedTokenAccountsByDelegateV2BodyParams {
10713 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2BodyParams {
10714 Default::default()
10715 }
10716 }
10717 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10775 pub struct PostGetCompressedTokenAccountsByDelegateV2Response {
10776 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10777 pub error: ::std::option::Option<
10778 PostGetCompressedTokenAccountsByDelegateV2ResponseError,
10779 >,
10780 pub id: PostGetCompressedTokenAccountsByDelegateV2ResponseId,
10782 pub jsonrpc: PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc,
10784 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10785 pub result: ::std::option::Option<
10786 PostGetCompressedTokenAccountsByDelegateV2ResponseResult,
10787 >,
10788 }
10789 impl PostGetCompressedTokenAccountsByDelegateV2Response {
10790 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2Response {
10791 Default::default()
10792 }
10793 }
10794 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10813 pub struct PostGetCompressedTokenAccountsByDelegateV2ResponseError {
10814 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10815 pub code: ::std::option::Option<i64>,
10816 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10817 pub message: ::std::option::Option<::std::string::String>,
10818 }
10819 impl ::std::default::Default
10820 for PostGetCompressedTokenAccountsByDelegateV2ResponseError {
10821 fn default() -> Self {
10822 Self {
10823 code: Default::default(),
10824 message: Default::default(),
10825 }
10826 }
10827 }
10828 impl PostGetCompressedTokenAccountsByDelegateV2ResponseError {
10829 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2ResponseError {
10830 Default::default()
10831 }
10832 }
10833 #[derive(
10848 ::serde::Deserialize,
10849 ::serde::Serialize,
10850 Clone,
10851 Copy,
10852 Debug,
10853 Eq,
10854 Hash,
10855 Ord,
10856 PartialEq,
10857 PartialOrd
10858 )]
10859 pub enum PostGetCompressedTokenAccountsByDelegateV2ResponseId {
10860 #[serde(rename = "test-account")]
10861 TestAccount,
10862 }
10863 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByDelegateV2ResponseId {
10864 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10865 match *self {
10866 Self::TestAccount => f.write_str("test-account"),
10867 }
10868 }
10869 }
10870 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByDelegateV2ResponseId {
10871 type Err = self::error::ConversionError;
10872 fn from_str(
10873 value: &str,
10874 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10875 match value {
10876 "test-account" => Ok(Self::TestAccount),
10877 _ => Err("invalid value".into()),
10878 }
10879 }
10880 }
10881 impl ::std::convert::TryFrom<&str>
10882 for PostGetCompressedTokenAccountsByDelegateV2ResponseId {
10883 type Error = self::error::ConversionError;
10884 fn try_from(
10885 value: &str,
10886 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10887 value.parse()
10888 }
10889 }
10890 impl ::std::convert::TryFrom<&::std::string::String>
10891 for PostGetCompressedTokenAccountsByDelegateV2ResponseId {
10892 type Error = self::error::ConversionError;
10893 fn try_from(
10894 value: &::std::string::String,
10895 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10896 value.parse()
10897 }
10898 }
10899 impl ::std::convert::TryFrom<::std::string::String>
10900 for PostGetCompressedTokenAccountsByDelegateV2ResponseId {
10901 type Error = self::error::ConversionError;
10902 fn try_from(
10903 value: ::std::string::String,
10904 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10905 value.parse()
10906 }
10907 }
10908 #[derive(
10923 ::serde::Deserialize,
10924 ::serde::Serialize,
10925 Clone,
10926 Copy,
10927 Debug,
10928 Eq,
10929 Hash,
10930 Ord,
10931 PartialEq,
10932 PartialOrd
10933 )]
10934 pub enum PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc {
10935 #[serde(rename = "2.0")]
10936 X20,
10937 }
10938 impl ::std::fmt::Display
10939 for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc {
10940 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10941 match *self {
10942 Self::X20 => f.write_str("2.0"),
10943 }
10944 }
10945 }
10946 impl ::std::str::FromStr
10947 for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc {
10948 type Err = self::error::ConversionError;
10949 fn from_str(
10950 value: &str,
10951 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10952 match value {
10953 "2.0" => Ok(Self::X20),
10954 _ => Err("invalid value".into()),
10955 }
10956 }
10957 }
10958 impl ::std::convert::TryFrom<&str>
10959 for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc {
10960 type Error = self::error::ConversionError;
10961 fn try_from(
10962 value: &str,
10963 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10964 value.parse()
10965 }
10966 }
10967 impl ::std::convert::TryFrom<&::std::string::String>
10968 for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc {
10969 type Error = self::error::ConversionError;
10970 fn try_from(
10971 value: &::std::string::String,
10972 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10973 value.parse()
10974 }
10975 }
10976 impl ::std::convert::TryFrom<::std::string::String>
10977 for PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc {
10978 type Error = self::error::ConversionError;
10979 fn try_from(
10980 value: ::std::string::String,
10981 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10982 value.parse()
10983 }
10984 }
10985 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11009 #[serde(deny_unknown_fields)]
11010 pub struct PostGetCompressedTokenAccountsByDelegateV2ResponseResult {
11011 pub context: Context,
11012 pub value: TokenAccountListV2,
11013 }
11014 impl PostGetCompressedTokenAccountsByDelegateV2ResponseResult {
11015 pub fn builder() -> builder::PostGetCompressedTokenAccountsByDelegateV2ResponseResult {
11016 Default::default()
11017 }
11018 }
11019 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11113 pub struct PostGetCompressedTokenAccountsByOwnerBody {
11114 pub id: PostGetCompressedTokenAccountsByOwnerBodyId,
11116 pub jsonrpc: PostGetCompressedTokenAccountsByOwnerBodyJsonrpc,
11118 pub method: PostGetCompressedTokenAccountsByOwnerBodyMethod,
11120 pub params: PostGetCompressedTokenAccountsByOwnerBodyParams,
11121 }
11122 impl PostGetCompressedTokenAccountsByOwnerBody {
11123 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerBody {
11124 Default::default()
11125 }
11126 }
11127 #[derive(
11142 ::serde::Deserialize,
11143 ::serde::Serialize,
11144 Clone,
11145 Copy,
11146 Debug,
11147 Eq,
11148 Hash,
11149 Ord,
11150 PartialEq,
11151 PartialOrd
11152 )]
11153 pub enum PostGetCompressedTokenAccountsByOwnerBodyId {
11154 #[serde(rename = "test-account")]
11155 TestAccount,
11156 }
11157 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerBodyId {
11158 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11159 match *self {
11160 Self::TestAccount => f.write_str("test-account"),
11161 }
11162 }
11163 }
11164 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerBodyId {
11165 type Err = self::error::ConversionError;
11166 fn from_str(
11167 value: &str,
11168 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11169 match value {
11170 "test-account" => Ok(Self::TestAccount),
11171 _ => Err("invalid value".into()),
11172 }
11173 }
11174 }
11175 impl ::std::convert::TryFrom<&str> for PostGetCompressedTokenAccountsByOwnerBodyId {
11176 type Error = self::error::ConversionError;
11177 fn try_from(
11178 value: &str,
11179 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11180 value.parse()
11181 }
11182 }
11183 impl ::std::convert::TryFrom<&::std::string::String>
11184 for PostGetCompressedTokenAccountsByOwnerBodyId {
11185 type Error = self::error::ConversionError;
11186 fn try_from(
11187 value: &::std::string::String,
11188 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11189 value.parse()
11190 }
11191 }
11192 impl ::std::convert::TryFrom<::std::string::String>
11193 for PostGetCompressedTokenAccountsByOwnerBodyId {
11194 type Error = self::error::ConversionError;
11195 fn try_from(
11196 value: ::std::string::String,
11197 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11198 value.parse()
11199 }
11200 }
11201 #[derive(
11216 ::serde::Deserialize,
11217 ::serde::Serialize,
11218 Clone,
11219 Copy,
11220 Debug,
11221 Eq,
11222 Hash,
11223 Ord,
11224 PartialEq,
11225 PartialOrd
11226 )]
11227 pub enum PostGetCompressedTokenAccountsByOwnerBodyJsonrpc {
11228 #[serde(rename = "2.0")]
11229 X20,
11230 }
11231 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc {
11232 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11233 match *self {
11234 Self::X20 => f.write_str("2.0"),
11235 }
11236 }
11237 }
11238 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc {
11239 type Err = self::error::ConversionError;
11240 fn from_str(
11241 value: &str,
11242 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11243 match value {
11244 "2.0" => Ok(Self::X20),
11245 _ => Err("invalid value".into()),
11246 }
11247 }
11248 }
11249 impl ::std::convert::TryFrom<&str>
11250 for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc {
11251 type Error = self::error::ConversionError;
11252 fn try_from(
11253 value: &str,
11254 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11255 value.parse()
11256 }
11257 }
11258 impl ::std::convert::TryFrom<&::std::string::String>
11259 for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc {
11260 type Error = self::error::ConversionError;
11261 fn try_from(
11262 value: &::std::string::String,
11263 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11264 value.parse()
11265 }
11266 }
11267 impl ::std::convert::TryFrom<::std::string::String>
11268 for PostGetCompressedTokenAccountsByOwnerBodyJsonrpc {
11269 type Error = self::error::ConversionError;
11270 fn try_from(
11271 value: ::std::string::String,
11272 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11273 value.parse()
11274 }
11275 }
11276 #[derive(
11291 ::serde::Deserialize,
11292 ::serde::Serialize,
11293 Clone,
11294 Copy,
11295 Debug,
11296 Eq,
11297 Hash,
11298 Ord,
11299 PartialEq,
11300 PartialOrd
11301 )]
11302 pub enum PostGetCompressedTokenAccountsByOwnerBodyMethod {
11303 #[serde(rename = "getCompressedTokenAccountsByOwner")]
11304 GetCompressedTokenAccountsByOwner,
11305 }
11306 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerBodyMethod {
11307 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11308 match *self {
11309 Self::GetCompressedTokenAccountsByOwner => {
11310 f.write_str("getCompressedTokenAccountsByOwner")
11311 }
11312 }
11313 }
11314 }
11315 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerBodyMethod {
11316 type Err = self::error::ConversionError;
11317 fn from_str(
11318 value: &str,
11319 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11320 match value {
11321 "getCompressedTokenAccountsByOwner" => {
11322 Ok(Self::GetCompressedTokenAccountsByOwner)
11323 }
11324 _ => Err("invalid value".into()),
11325 }
11326 }
11327 }
11328 impl ::std::convert::TryFrom<&str>
11329 for PostGetCompressedTokenAccountsByOwnerBodyMethod {
11330 type Error = self::error::ConversionError;
11331 fn try_from(
11332 value: &str,
11333 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11334 value.parse()
11335 }
11336 }
11337 impl ::std::convert::TryFrom<&::std::string::String>
11338 for PostGetCompressedTokenAccountsByOwnerBodyMethod {
11339 type Error = self::error::ConversionError;
11340 fn try_from(
11341 value: &::std::string::String,
11342 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11343 value.parse()
11344 }
11345 }
11346 impl ::std::convert::TryFrom<::std::string::String>
11347 for PostGetCompressedTokenAccountsByOwnerBodyMethod {
11348 type Error = self::error::ConversionError;
11349 fn try_from(
11350 value: ::std::string::String,
11351 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11352 value.parse()
11353 }
11354 }
11355 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11417 #[serde(deny_unknown_fields)]
11418 pub struct PostGetCompressedTokenAccountsByOwnerBodyParams {
11419 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11420 pub cursor: ::std::option::Option<Base58String>,
11421 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11422 pub limit: ::std::option::Option<Limit>,
11423 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11424 pub mint: ::std::option::Option<SerializablePubkey>,
11425 pub owner: SerializablePubkey,
11426 }
11427 impl PostGetCompressedTokenAccountsByOwnerBodyParams {
11428 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerBodyParams {
11429 Default::default()
11430 }
11431 }
11432 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11490 pub struct PostGetCompressedTokenAccountsByOwnerResponse {
11491 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11492 pub error: ::std::option::Option<
11493 PostGetCompressedTokenAccountsByOwnerResponseError,
11494 >,
11495 pub id: PostGetCompressedTokenAccountsByOwnerResponseId,
11497 pub jsonrpc: PostGetCompressedTokenAccountsByOwnerResponseJsonrpc,
11499 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11500 pub result: ::std::option::Option<
11501 PostGetCompressedTokenAccountsByOwnerResponseResult,
11502 >,
11503 }
11504 impl PostGetCompressedTokenAccountsByOwnerResponse {
11505 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerResponse {
11506 Default::default()
11507 }
11508 }
11509 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11528 pub struct PostGetCompressedTokenAccountsByOwnerResponseError {
11529 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11530 pub code: ::std::option::Option<i64>,
11531 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11532 pub message: ::std::option::Option<::std::string::String>,
11533 }
11534 impl ::std::default::Default for PostGetCompressedTokenAccountsByOwnerResponseError {
11535 fn default() -> Self {
11536 Self {
11537 code: Default::default(),
11538 message: Default::default(),
11539 }
11540 }
11541 }
11542 impl PostGetCompressedTokenAccountsByOwnerResponseError {
11543 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerResponseError {
11544 Default::default()
11545 }
11546 }
11547 #[derive(
11562 ::serde::Deserialize,
11563 ::serde::Serialize,
11564 Clone,
11565 Copy,
11566 Debug,
11567 Eq,
11568 Hash,
11569 Ord,
11570 PartialEq,
11571 PartialOrd
11572 )]
11573 pub enum PostGetCompressedTokenAccountsByOwnerResponseId {
11574 #[serde(rename = "test-account")]
11575 TestAccount,
11576 }
11577 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerResponseId {
11578 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11579 match *self {
11580 Self::TestAccount => f.write_str("test-account"),
11581 }
11582 }
11583 }
11584 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerResponseId {
11585 type Err = self::error::ConversionError;
11586 fn from_str(
11587 value: &str,
11588 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11589 match value {
11590 "test-account" => Ok(Self::TestAccount),
11591 _ => Err("invalid value".into()),
11592 }
11593 }
11594 }
11595 impl ::std::convert::TryFrom<&str>
11596 for PostGetCompressedTokenAccountsByOwnerResponseId {
11597 type Error = self::error::ConversionError;
11598 fn try_from(
11599 value: &str,
11600 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11601 value.parse()
11602 }
11603 }
11604 impl ::std::convert::TryFrom<&::std::string::String>
11605 for PostGetCompressedTokenAccountsByOwnerResponseId {
11606 type Error = self::error::ConversionError;
11607 fn try_from(
11608 value: &::std::string::String,
11609 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11610 value.parse()
11611 }
11612 }
11613 impl ::std::convert::TryFrom<::std::string::String>
11614 for PostGetCompressedTokenAccountsByOwnerResponseId {
11615 type Error = self::error::ConversionError;
11616 fn try_from(
11617 value: ::std::string::String,
11618 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11619 value.parse()
11620 }
11621 }
11622 #[derive(
11637 ::serde::Deserialize,
11638 ::serde::Serialize,
11639 Clone,
11640 Copy,
11641 Debug,
11642 Eq,
11643 Hash,
11644 Ord,
11645 PartialEq,
11646 PartialOrd
11647 )]
11648 pub enum PostGetCompressedTokenAccountsByOwnerResponseJsonrpc {
11649 #[serde(rename = "2.0")]
11650 X20,
11651 }
11652 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc {
11653 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11654 match *self {
11655 Self::X20 => f.write_str("2.0"),
11656 }
11657 }
11658 }
11659 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc {
11660 type Err = self::error::ConversionError;
11661 fn from_str(
11662 value: &str,
11663 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11664 match value {
11665 "2.0" => Ok(Self::X20),
11666 _ => Err("invalid value".into()),
11667 }
11668 }
11669 }
11670 impl ::std::convert::TryFrom<&str>
11671 for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc {
11672 type Error = self::error::ConversionError;
11673 fn try_from(
11674 value: &str,
11675 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11676 value.parse()
11677 }
11678 }
11679 impl ::std::convert::TryFrom<&::std::string::String>
11680 for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc {
11681 type Error = self::error::ConversionError;
11682 fn try_from(
11683 value: &::std::string::String,
11684 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11685 value.parse()
11686 }
11687 }
11688 impl ::std::convert::TryFrom<::std::string::String>
11689 for PostGetCompressedTokenAccountsByOwnerResponseJsonrpc {
11690 type Error = self::error::ConversionError;
11691 fn try_from(
11692 value: ::std::string::String,
11693 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11694 value.parse()
11695 }
11696 }
11697 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11721 #[serde(deny_unknown_fields)]
11722 pub struct PostGetCompressedTokenAccountsByOwnerResponseResult {
11723 pub context: Context,
11724 pub value: TokenAccountList,
11725 }
11726 impl PostGetCompressedTokenAccountsByOwnerResponseResult {
11727 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerResponseResult {
11728 Default::default()
11729 }
11730 }
11731 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11825 pub struct PostGetCompressedTokenAccountsByOwnerV2Body {
11826 pub id: PostGetCompressedTokenAccountsByOwnerV2BodyId,
11828 pub jsonrpc: PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc,
11830 pub method: PostGetCompressedTokenAccountsByOwnerV2BodyMethod,
11832 pub params: PostGetCompressedTokenAccountsByOwnerV2BodyParams,
11833 }
11834 impl PostGetCompressedTokenAccountsByOwnerV2Body {
11835 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2Body {
11836 Default::default()
11837 }
11838 }
11839 #[derive(
11854 ::serde::Deserialize,
11855 ::serde::Serialize,
11856 Clone,
11857 Copy,
11858 Debug,
11859 Eq,
11860 Hash,
11861 Ord,
11862 PartialEq,
11863 PartialOrd
11864 )]
11865 pub enum PostGetCompressedTokenAccountsByOwnerV2BodyId {
11866 #[serde(rename = "test-account")]
11867 TestAccount,
11868 }
11869 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2BodyId {
11870 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11871 match *self {
11872 Self::TestAccount => f.write_str("test-account"),
11873 }
11874 }
11875 }
11876 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2BodyId {
11877 type Err = self::error::ConversionError;
11878 fn from_str(
11879 value: &str,
11880 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11881 match value {
11882 "test-account" => Ok(Self::TestAccount),
11883 _ => Err("invalid value".into()),
11884 }
11885 }
11886 }
11887 impl ::std::convert::TryFrom<&str>
11888 for PostGetCompressedTokenAccountsByOwnerV2BodyId {
11889 type Error = self::error::ConversionError;
11890 fn try_from(
11891 value: &str,
11892 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11893 value.parse()
11894 }
11895 }
11896 impl ::std::convert::TryFrom<&::std::string::String>
11897 for PostGetCompressedTokenAccountsByOwnerV2BodyId {
11898 type Error = self::error::ConversionError;
11899 fn try_from(
11900 value: &::std::string::String,
11901 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11902 value.parse()
11903 }
11904 }
11905 impl ::std::convert::TryFrom<::std::string::String>
11906 for PostGetCompressedTokenAccountsByOwnerV2BodyId {
11907 type Error = self::error::ConversionError;
11908 fn try_from(
11909 value: ::std::string::String,
11910 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11911 value.parse()
11912 }
11913 }
11914 #[derive(
11929 ::serde::Deserialize,
11930 ::serde::Serialize,
11931 Clone,
11932 Copy,
11933 Debug,
11934 Eq,
11935 Hash,
11936 Ord,
11937 PartialEq,
11938 PartialOrd
11939 )]
11940 pub enum PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc {
11941 #[serde(rename = "2.0")]
11942 X20,
11943 }
11944 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc {
11945 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11946 match *self {
11947 Self::X20 => f.write_str("2.0"),
11948 }
11949 }
11950 }
11951 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc {
11952 type Err = self::error::ConversionError;
11953 fn from_str(
11954 value: &str,
11955 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11956 match value {
11957 "2.0" => Ok(Self::X20),
11958 _ => Err("invalid value".into()),
11959 }
11960 }
11961 }
11962 impl ::std::convert::TryFrom<&str>
11963 for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc {
11964 type Error = self::error::ConversionError;
11965 fn try_from(
11966 value: &str,
11967 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11968 value.parse()
11969 }
11970 }
11971 impl ::std::convert::TryFrom<&::std::string::String>
11972 for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc {
11973 type Error = self::error::ConversionError;
11974 fn try_from(
11975 value: &::std::string::String,
11976 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11977 value.parse()
11978 }
11979 }
11980 impl ::std::convert::TryFrom<::std::string::String>
11981 for PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc {
11982 type Error = self::error::ConversionError;
11983 fn try_from(
11984 value: ::std::string::String,
11985 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11986 value.parse()
11987 }
11988 }
11989 #[derive(
12004 ::serde::Deserialize,
12005 ::serde::Serialize,
12006 Clone,
12007 Copy,
12008 Debug,
12009 Eq,
12010 Hash,
12011 Ord,
12012 PartialEq,
12013 PartialOrd
12014 )]
12015 pub enum PostGetCompressedTokenAccountsByOwnerV2BodyMethod {
12016 #[serde(rename = "getCompressedTokenAccountsByOwnerV2")]
12017 GetCompressedTokenAccountsByOwnerV2,
12018 }
12019 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2BodyMethod {
12020 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12021 match *self {
12022 Self::GetCompressedTokenAccountsByOwnerV2 => {
12023 f.write_str("getCompressedTokenAccountsByOwnerV2")
12024 }
12025 }
12026 }
12027 }
12028 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2BodyMethod {
12029 type Err = self::error::ConversionError;
12030 fn from_str(
12031 value: &str,
12032 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12033 match value {
12034 "getCompressedTokenAccountsByOwnerV2" => {
12035 Ok(Self::GetCompressedTokenAccountsByOwnerV2)
12036 }
12037 _ => Err("invalid value".into()),
12038 }
12039 }
12040 }
12041 impl ::std::convert::TryFrom<&str>
12042 for PostGetCompressedTokenAccountsByOwnerV2BodyMethod {
12043 type Error = self::error::ConversionError;
12044 fn try_from(
12045 value: &str,
12046 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12047 value.parse()
12048 }
12049 }
12050 impl ::std::convert::TryFrom<&::std::string::String>
12051 for PostGetCompressedTokenAccountsByOwnerV2BodyMethod {
12052 type Error = self::error::ConversionError;
12053 fn try_from(
12054 value: &::std::string::String,
12055 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12056 value.parse()
12057 }
12058 }
12059 impl ::std::convert::TryFrom<::std::string::String>
12060 for PostGetCompressedTokenAccountsByOwnerV2BodyMethod {
12061 type Error = self::error::ConversionError;
12062 fn try_from(
12063 value: ::std::string::String,
12064 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12065 value.parse()
12066 }
12067 }
12068 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12130 #[serde(deny_unknown_fields)]
12131 pub struct PostGetCompressedTokenAccountsByOwnerV2BodyParams {
12132 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12133 pub cursor: ::std::option::Option<Base58String>,
12134 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12135 pub limit: ::std::option::Option<Limit>,
12136 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12137 pub mint: ::std::option::Option<SerializablePubkey>,
12138 pub owner: SerializablePubkey,
12139 }
12140 impl PostGetCompressedTokenAccountsByOwnerV2BodyParams {
12141 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2BodyParams {
12142 Default::default()
12143 }
12144 }
12145 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12203 pub struct PostGetCompressedTokenAccountsByOwnerV2Response {
12204 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12205 pub error: ::std::option::Option<
12206 PostGetCompressedTokenAccountsByOwnerV2ResponseError,
12207 >,
12208 pub id: PostGetCompressedTokenAccountsByOwnerV2ResponseId,
12210 pub jsonrpc: PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc,
12212 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12213 pub result: ::std::option::Option<
12214 PostGetCompressedTokenAccountsByOwnerV2ResponseResult,
12215 >,
12216 }
12217 impl PostGetCompressedTokenAccountsByOwnerV2Response {
12218 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2Response {
12219 Default::default()
12220 }
12221 }
12222 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12241 pub struct PostGetCompressedTokenAccountsByOwnerV2ResponseError {
12242 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12243 pub code: ::std::option::Option<i64>,
12244 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12245 pub message: ::std::option::Option<::std::string::String>,
12246 }
12247 impl ::std::default::Default
12248 for PostGetCompressedTokenAccountsByOwnerV2ResponseError {
12249 fn default() -> Self {
12250 Self {
12251 code: Default::default(),
12252 message: Default::default(),
12253 }
12254 }
12255 }
12256 impl PostGetCompressedTokenAccountsByOwnerV2ResponseError {
12257 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2ResponseError {
12258 Default::default()
12259 }
12260 }
12261 #[derive(
12276 ::serde::Deserialize,
12277 ::serde::Serialize,
12278 Clone,
12279 Copy,
12280 Debug,
12281 Eq,
12282 Hash,
12283 Ord,
12284 PartialEq,
12285 PartialOrd
12286 )]
12287 pub enum PostGetCompressedTokenAccountsByOwnerV2ResponseId {
12288 #[serde(rename = "test-account")]
12289 TestAccount,
12290 }
12291 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2ResponseId {
12292 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12293 match *self {
12294 Self::TestAccount => f.write_str("test-account"),
12295 }
12296 }
12297 }
12298 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2ResponseId {
12299 type Err = self::error::ConversionError;
12300 fn from_str(
12301 value: &str,
12302 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12303 match value {
12304 "test-account" => Ok(Self::TestAccount),
12305 _ => Err("invalid value".into()),
12306 }
12307 }
12308 }
12309 impl ::std::convert::TryFrom<&str>
12310 for PostGetCompressedTokenAccountsByOwnerV2ResponseId {
12311 type Error = self::error::ConversionError;
12312 fn try_from(
12313 value: &str,
12314 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12315 value.parse()
12316 }
12317 }
12318 impl ::std::convert::TryFrom<&::std::string::String>
12319 for PostGetCompressedTokenAccountsByOwnerV2ResponseId {
12320 type Error = self::error::ConversionError;
12321 fn try_from(
12322 value: &::std::string::String,
12323 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12324 value.parse()
12325 }
12326 }
12327 impl ::std::convert::TryFrom<::std::string::String>
12328 for PostGetCompressedTokenAccountsByOwnerV2ResponseId {
12329 type Error = self::error::ConversionError;
12330 fn try_from(
12331 value: ::std::string::String,
12332 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12333 value.parse()
12334 }
12335 }
12336 #[derive(
12351 ::serde::Deserialize,
12352 ::serde::Serialize,
12353 Clone,
12354 Copy,
12355 Debug,
12356 Eq,
12357 Hash,
12358 Ord,
12359 PartialEq,
12360 PartialOrd
12361 )]
12362 pub enum PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc {
12363 #[serde(rename = "2.0")]
12364 X20,
12365 }
12366 impl ::std::fmt::Display for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc {
12367 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12368 match *self {
12369 Self::X20 => f.write_str("2.0"),
12370 }
12371 }
12372 }
12373 impl ::std::str::FromStr for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc {
12374 type Err = self::error::ConversionError;
12375 fn from_str(
12376 value: &str,
12377 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12378 match value {
12379 "2.0" => Ok(Self::X20),
12380 _ => Err("invalid value".into()),
12381 }
12382 }
12383 }
12384 impl ::std::convert::TryFrom<&str>
12385 for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc {
12386 type Error = self::error::ConversionError;
12387 fn try_from(
12388 value: &str,
12389 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12390 value.parse()
12391 }
12392 }
12393 impl ::std::convert::TryFrom<&::std::string::String>
12394 for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc {
12395 type Error = self::error::ConversionError;
12396 fn try_from(
12397 value: &::std::string::String,
12398 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12399 value.parse()
12400 }
12401 }
12402 impl ::std::convert::TryFrom<::std::string::String>
12403 for PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc {
12404 type Error = self::error::ConversionError;
12405 fn try_from(
12406 value: ::std::string::String,
12407 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12408 value.parse()
12409 }
12410 }
12411 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12435 #[serde(deny_unknown_fields)]
12436 pub struct PostGetCompressedTokenAccountsByOwnerV2ResponseResult {
12437 pub context: Context,
12438 pub value: TokenAccountListV2,
12439 }
12440 impl PostGetCompressedTokenAccountsByOwnerV2ResponseResult {
12441 pub fn builder() -> builder::PostGetCompressedTokenAccountsByOwnerV2ResponseResult {
12442 Default::default()
12443 }
12444 }
12445 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12539 pub struct PostGetCompressedTokenBalancesByOwnerBody {
12540 pub id: PostGetCompressedTokenBalancesByOwnerBodyId,
12542 pub jsonrpc: PostGetCompressedTokenBalancesByOwnerBodyJsonrpc,
12544 pub method: PostGetCompressedTokenBalancesByOwnerBodyMethod,
12546 pub params: PostGetCompressedTokenBalancesByOwnerBodyParams,
12547 }
12548 impl PostGetCompressedTokenBalancesByOwnerBody {
12549 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerBody {
12550 Default::default()
12551 }
12552 }
12553 #[derive(
12568 ::serde::Deserialize,
12569 ::serde::Serialize,
12570 Clone,
12571 Copy,
12572 Debug,
12573 Eq,
12574 Hash,
12575 Ord,
12576 PartialEq,
12577 PartialOrd
12578 )]
12579 pub enum PostGetCompressedTokenBalancesByOwnerBodyId {
12580 #[serde(rename = "test-account")]
12581 TestAccount,
12582 }
12583 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerBodyId {
12584 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12585 match *self {
12586 Self::TestAccount => f.write_str("test-account"),
12587 }
12588 }
12589 }
12590 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerBodyId {
12591 type Err = self::error::ConversionError;
12592 fn from_str(
12593 value: &str,
12594 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12595 match value {
12596 "test-account" => Ok(Self::TestAccount),
12597 _ => Err("invalid value".into()),
12598 }
12599 }
12600 }
12601 impl ::std::convert::TryFrom<&str> for PostGetCompressedTokenBalancesByOwnerBodyId {
12602 type Error = self::error::ConversionError;
12603 fn try_from(
12604 value: &str,
12605 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12606 value.parse()
12607 }
12608 }
12609 impl ::std::convert::TryFrom<&::std::string::String>
12610 for PostGetCompressedTokenBalancesByOwnerBodyId {
12611 type Error = self::error::ConversionError;
12612 fn try_from(
12613 value: &::std::string::String,
12614 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12615 value.parse()
12616 }
12617 }
12618 impl ::std::convert::TryFrom<::std::string::String>
12619 for PostGetCompressedTokenBalancesByOwnerBodyId {
12620 type Error = self::error::ConversionError;
12621 fn try_from(
12622 value: ::std::string::String,
12623 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12624 value.parse()
12625 }
12626 }
12627 #[derive(
12642 ::serde::Deserialize,
12643 ::serde::Serialize,
12644 Clone,
12645 Copy,
12646 Debug,
12647 Eq,
12648 Hash,
12649 Ord,
12650 PartialEq,
12651 PartialOrd
12652 )]
12653 pub enum PostGetCompressedTokenBalancesByOwnerBodyJsonrpc {
12654 #[serde(rename = "2.0")]
12655 X20,
12656 }
12657 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc {
12658 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12659 match *self {
12660 Self::X20 => f.write_str("2.0"),
12661 }
12662 }
12663 }
12664 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc {
12665 type Err = self::error::ConversionError;
12666 fn from_str(
12667 value: &str,
12668 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12669 match value {
12670 "2.0" => Ok(Self::X20),
12671 _ => Err("invalid value".into()),
12672 }
12673 }
12674 }
12675 impl ::std::convert::TryFrom<&str>
12676 for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc {
12677 type Error = self::error::ConversionError;
12678 fn try_from(
12679 value: &str,
12680 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12681 value.parse()
12682 }
12683 }
12684 impl ::std::convert::TryFrom<&::std::string::String>
12685 for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc {
12686 type Error = self::error::ConversionError;
12687 fn try_from(
12688 value: &::std::string::String,
12689 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12690 value.parse()
12691 }
12692 }
12693 impl ::std::convert::TryFrom<::std::string::String>
12694 for PostGetCompressedTokenBalancesByOwnerBodyJsonrpc {
12695 type Error = self::error::ConversionError;
12696 fn try_from(
12697 value: ::std::string::String,
12698 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12699 value.parse()
12700 }
12701 }
12702 #[derive(
12717 ::serde::Deserialize,
12718 ::serde::Serialize,
12719 Clone,
12720 Copy,
12721 Debug,
12722 Eq,
12723 Hash,
12724 Ord,
12725 PartialEq,
12726 PartialOrd
12727 )]
12728 pub enum PostGetCompressedTokenBalancesByOwnerBodyMethod {
12729 #[serde(rename = "getCompressedTokenBalancesByOwner")]
12730 GetCompressedTokenBalancesByOwner,
12731 }
12732 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerBodyMethod {
12733 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12734 match *self {
12735 Self::GetCompressedTokenBalancesByOwner => {
12736 f.write_str("getCompressedTokenBalancesByOwner")
12737 }
12738 }
12739 }
12740 }
12741 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerBodyMethod {
12742 type Err = self::error::ConversionError;
12743 fn from_str(
12744 value: &str,
12745 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12746 match value {
12747 "getCompressedTokenBalancesByOwner" => {
12748 Ok(Self::GetCompressedTokenBalancesByOwner)
12749 }
12750 _ => Err("invalid value".into()),
12751 }
12752 }
12753 }
12754 impl ::std::convert::TryFrom<&str>
12755 for PostGetCompressedTokenBalancesByOwnerBodyMethod {
12756 type Error = self::error::ConversionError;
12757 fn try_from(
12758 value: &str,
12759 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12760 value.parse()
12761 }
12762 }
12763 impl ::std::convert::TryFrom<&::std::string::String>
12764 for PostGetCompressedTokenBalancesByOwnerBodyMethod {
12765 type Error = self::error::ConversionError;
12766 fn try_from(
12767 value: &::std::string::String,
12768 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12769 value.parse()
12770 }
12771 }
12772 impl ::std::convert::TryFrom<::std::string::String>
12773 for PostGetCompressedTokenBalancesByOwnerBodyMethod {
12774 type Error = self::error::ConversionError;
12775 fn try_from(
12776 value: ::std::string::String,
12777 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12778 value.parse()
12779 }
12780 }
12781 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12843 #[serde(deny_unknown_fields)]
12844 pub struct PostGetCompressedTokenBalancesByOwnerBodyParams {
12845 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12846 pub cursor: ::std::option::Option<Base58String>,
12847 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12848 pub limit: ::std::option::Option<Limit>,
12849 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12850 pub mint: ::std::option::Option<SerializablePubkey>,
12851 pub owner: SerializablePubkey,
12852 }
12853 impl PostGetCompressedTokenBalancesByOwnerBodyParams {
12854 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerBodyParams {
12855 Default::default()
12856 }
12857 }
12858 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12916 pub struct PostGetCompressedTokenBalancesByOwnerResponse {
12917 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12918 pub error: ::std::option::Option<
12919 PostGetCompressedTokenBalancesByOwnerResponseError,
12920 >,
12921 pub id: PostGetCompressedTokenBalancesByOwnerResponseId,
12923 pub jsonrpc: PostGetCompressedTokenBalancesByOwnerResponseJsonrpc,
12925 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12926 pub result: ::std::option::Option<
12927 PostGetCompressedTokenBalancesByOwnerResponseResult,
12928 >,
12929 }
12930 impl PostGetCompressedTokenBalancesByOwnerResponse {
12931 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerResponse {
12932 Default::default()
12933 }
12934 }
12935 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12954 pub struct PostGetCompressedTokenBalancesByOwnerResponseError {
12955 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12956 pub code: ::std::option::Option<i64>,
12957 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12958 pub message: ::std::option::Option<::std::string::String>,
12959 }
12960 impl ::std::default::Default for PostGetCompressedTokenBalancesByOwnerResponseError {
12961 fn default() -> Self {
12962 Self {
12963 code: Default::default(),
12964 message: Default::default(),
12965 }
12966 }
12967 }
12968 impl PostGetCompressedTokenBalancesByOwnerResponseError {
12969 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerResponseError {
12970 Default::default()
12971 }
12972 }
12973 #[derive(
12988 ::serde::Deserialize,
12989 ::serde::Serialize,
12990 Clone,
12991 Copy,
12992 Debug,
12993 Eq,
12994 Hash,
12995 Ord,
12996 PartialEq,
12997 PartialOrd
12998 )]
12999 pub enum PostGetCompressedTokenBalancesByOwnerResponseId {
13000 #[serde(rename = "test-account")]
13001 TestAccount,
13002 }
13003 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerResponseId {
13004 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13005 match *self {
13006 Self::TestAccount => f.write_str("test-account"),
13007 }
13008 }
13009 }
13010 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerResponseId {
13011 type Err = self::error::ConversionError;
13012 fn from_str(
13013 value: &str,
13014 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13015 match value {
13016 "test-account" => Ok(Self::TestAccount),
13017 _ => Err("invalid value".into()),
13018 }
13019 }
13020 }
13021 impl ::std::convert::TryFrom<&str>
13022 for PostGetCompressedTokenBalancesByOwnerResponseId {
13023 type Error = self::error::ConversionError;
13024 fn try_from(
13025 value: &str,
13026 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13027 value.parse()
13028 }
13029 }
13030 impl ::std::convert::TryFrom<&::std::string::String>
13031 for PostGetCompressedTokenBalancesByOwnerResponseId {
13032 type Error = self::error::ConversionError;
13033 fn try_from(
13034 value: &::std::string::String,
13035 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13036 value.parse()
13037 }
13038 }
13039 impl ::std::convert::TryFrom<::std::string::String>
13040 for PostGetCompressedTokenBalancesByOwnerResponseId {
13041 type Error = self::error::ConversionError;
13042 fn try_from(
13043 value: ::std::string::String,
13044 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13045 value.parse()
13046 }
13047 }
13048 #[derive(
13063 ::serde::Deserialize,
13064 ::serde::Serialize,
13065 Clone,
13066 Copy,
13067 Debug,
13068 Eq,
13069 Hash,
13070 Ord,
13071 PartialEq,
13072 PartialOrd
13073 )]
13074 pub enum PostGetCompressedTokenBalancesByOwnerResponseJsonrpc {
13075 #[serde(rename = "2.0")]
13076 X20,
13077 }
13078 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc {
13079 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13080 match *self {
13081 Self::X20 => f.write_str("2.0"),
13082 }
13083 }
13084 }
13085 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc {
13086 type Err = self::error::ConversionError;
13087 fn from_str(
13088 value: &str,
13089 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13090 match value {
13091 "2.0" => Ok(Self::X20),
13092 _ => Err("invalid value".into()),
13093 }
13094 }
13095 }
13096 impl ::std::convert::TryFrom<&str>
13097 for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc {
13098 type Error = self::error::ConversionError;
13099 fn try_from(
13100 value: &str,
13101 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13102 value.parse()
13103 }
13104 }
13105 impl ::std::convert::TryFrom<&::std::string::String>
13106 for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc {
13107 type Error = self::error::ConversionError;
13108 fn try_from(
13109 value: &::std::string::String,
13110 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13111 value.parse()
13112 }
13113 }
13114 impl ::std::convert::TryFrom<::std::string::String>
13115 for PostGetCompressedTokenBalancesByOwnerResponseJsonrpc {
13116 type Error = self::error::ConversionError;
13117 fn try_from(
13118 value: ::std::string::String,
13119 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13120 value.parse()
13121 }
13122 }
13123 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13147 #[serde(deny_unknown_fields)]
13148 pub struct PostGetCompressedTokenBalancesByOwnerResponseResult {
13149 pub context: Context,
13150 pub value: TokenBalanceList,
13151 }
13152 impl PostGetCompressedTokenBalancesByOwnerResponseResult {
13153 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerResponseResult {
13154 Default::default()
13155 }
13156 }
13157 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13251 pub struct PostGetCompressedTokenBalancesByOwnerV2Body {
13252 pub id: PostGetCompressedTokenBalancesByOwnerV2BodyId,
13254 pub jsonrpc: PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc,
13256 pub method: PostGetCompressedTokenBalancesByOwnerV2BodyMethod,
13258 pub params: PostGetCompressedTokenBalancesByOwnerV2BodyParams,
13259 }
13260 impl PostGetCompressedTokenBalancesByOwnerV2Body {
13261 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2Body {
13262 Default::default()
13263 }
13264 }
13265 #[derive(
13280 ::serde::Deserialize,
13281 ::serde::Serialize,
13282 Clone,
13283 Copy,
13284 Debug,
13285 Eq,
13286 Hash,
13287 Ord,
13288 PartialEq,
13289 PartialOrd
13290 )]
13291 pub enum PostGetCompressedTokenBalancesByOwnerV2BodyId {
13292 #[serde(rename = "test-account")]
13293 TestAccount,
13294 }
13295 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2BodyId {
13296 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13297 match *self {
13298 Self::TestAccount => f.write_str("test-account"),
13299 }
13300 }
13301 }
13302 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2BodyId {
13303 type Err = self::error::ConversionError;
13304 fn from_str(
13305 value: &str,
13306 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13307 match value {
13308 "test-account" => Ok(Self::TestAccount),
13309 _ => Err("invalid value".into()),
13310 }
13311 }
13312 }
13313 impl ::std::convert::TryFrom<&str>
13314 for PostGetCompressedTokenBalancesByOwnerV2BodyId {
13315 type Error = self::error::ConversionError;
13316 fn try_from(
13317 value: &str,
13318 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13319 value.parse()
13320 }
13321 }
13322 impl ::std::convert::TryFrom<&::std::string::String>
13323 for PostGetCompressedTokenBalancesByOwnerV2BodyId {
13324 type Error = self::error::ConversionError;
13325 fn try_from(
13326 value: &::std::string::String,
13327 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13328 value.parse()
13329 }
13330 }
13331 impl ::std::convert::TryFrom<::std::string::String>
13332 for PostGetCompressedTokenBalancesByOwnerV2BodyId {
13333 type Error = self::error::ConversionError;
13334 fn try_from(
13335 value: ::std::string::String,
13336 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13337 value.parse()
13338 }
13339 }
13340 #[derive(
13355 ::serde::Deserialize,
13356 ::serde::Serialize,
13357 Clone,
13358 Copy,
13359 Debug,
13360 Eq,
13361 Hash,
13362 Ord,
13363 PartialEq,
13364 PartialOrd
13365 )]
13366 pub enum PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc {
13367 #[serde(rename = "2.0")]
13368 X20,
13369 }
13370 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc {
13371 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13372 match *self {
13373 Self::X20 => f.write_str("2.0"),
13374 }
13375 }
13376 }
13377 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc {
13378 type Err = self::error::ConversionError;
13379 fn from_str(
13380 value: &str,
13381 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13382 match value {
13383 "2.0" => Ok(Self::X20),
13384 _ => Err("invalid value".into()),
13385 }
13386 }
13387 }
13388 impl ::std::convert::TryFrom<&str>
13389 for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc {
13390 type Error = self::error::ConversionError;
13391 fn try_from(
13392 value: &str,
13393 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13394 value.parse()
13395 }
13396 }
13397 impl ::std::convert::TryFrom<&::std::string::String>
13398 for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc {
13399 type Error = self::error::ConversionError;
13400 fn try_from(
13401 value: &::std::string::String,
13402 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13403 value.parse()
13404 }
13405 }
13406 impl ::std::convert::TryFrom<::std::string::String>
13407 for PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc {
13408 type Error = self::error::ConversionError;
13409 fn try_from(
13410 value: ::std::string::String,
13411 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13412 value.parse()
13413 }
13414 }
13415 #[derive(
13430 ::serde::Deserialize,
13431 ::serde::Serialize,
13432 Clone,
13433 Copy,
13434 Debug,
13435 Eq,
13436 Hash,
13437 Ord,
13438 PartialEq,
13439 PartialOrd
13440 )]
13441 pub enum PostGetCompressedTokenBalancesByOwnerV2BodyMethod {
13442 #[serde(rename = "getCompressedTokenBalancesByOwnerV2")]
13443 GetCompressedTokenBalancesByOwnerV2,
13444 }
13445 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2BodyMethod {
13446 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13447 match *self {
13448 Self::GetCompressedTokenBalancesByOwnerV2 => {
13449 f.write_str("getCompressedTokenBalancesByOwnerV2")
13450 }
13451 }
13452 }
13453 }
13454 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2BodyMethod {
13455 type Err = self::error::ConversionError;
13456 fn from_str(
13457 value: &str,
13458 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13459 match value {
13460 "getCompressedTokenBalancesByOwnerV2" => {
13461 Ok(Self::GetCompressedTokenBalancesByOwnerV2)
13462 }
13463 _ => Err("invalid value".into()),
13464 }
13465 }
13466 }
13467 impl ::std::convert::TryFrom<&str>
13468 for PostGetCompressedTokenBalancesByOwnerV2BodyMethod {
13469 type Error = self::error::ConversionError;
13470 fn try_from(
13471 value: &str,
13472 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13473 value.parse()
13474 }
13475 }
13476 impl ::std::convert::TryFrom<&::std::string::String>
13477 for PostGetCompressedTokenBalancesByOwnerV2BodyMethod {
13478 type Error = self::error::ConversionError;
13479 fn try_from(
13480 value: &::std::string::String,
13481 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13482 value.parse()
13483 }
13484 }
13485 impl ::std::convert::TryFrom<::std::string::String>
13486 for PostGetCompressedTokenBalancesByOwnerV2BodyMethod {
13487 type Error = self::error::ConversionError;
13488 fn try_from(
13489 value: ::std::string::String,
13490 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13491 value.parse()
13492 }
13493 }
13494 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13556 #[serde(deny_unknown_fields)]
13557 pub struct PostGetCompressedTokenBalancesByOwnerV2BodyParams {
13558 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13559 pub cursor: ::std::option::Option<Base58String>,
13560 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13561 pub limit: ::std::option::Option<Limit>,
13562 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13563 pub mint: ::std::option::Option<SerializablePubkey>,
13564 pub owner: SerializablePubkey,
13565 }
13566 impl PostGetCompressedTokenBalancesByOwnerV2BodyParams {
13567 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2BodyParams {
13568 Default::default()
13569 }
13570 }
13571 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13629 pub struct PostGetCompressedTokenBalancesByOwnerV2Response {
13630 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13631 pub error: ::std::option::Option<
13632 PostGetCompressedTokenBalancesByOwnerV2ResponseError,
13633 >,
13634 pub id: PostGetCompressedTokenBalancesByOwnerV2ResponseId,
13636 pub jsonrpc: PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc,
13638 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13639 pub result: ::std::option::Option<
13640 PostGetCompressedTokenBalancesByOwnerV2ResponseResult,
13641 >,
13642 }
13643 impl PostGetCompressedTokenBalancesByOwnerV2Response {
13644 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2Response {
13645 Default::default()
13646 }
13647 }
13648 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13667 pub struct PostGetCompressedTokenBalancesByOwnerV2ResponseError {
13668 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13669 pub code: ::std::option::Option<i64>,
13670 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13671 pub message: ::std::option::Option<::std::string::String>,
13672 }
13673 impl ::std::default::Default
13674 for PostGetCompressedTokenBalancesByOwnerV2ResponseError {
13675 fn default() -> Self {
13676 Self {
13677 code: Default::default(),
13678 message: Default::default(),
13679 }
13680 }
13681 }
13682 impl PostGetCompressedTokenBalancesByOwnerV2ResponseError {
13683 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2ResponseError {
13684 Default::default()
13685 }
13686 }
13687 #[derive(
13702 ::serde::Deserialize,
13703 ::serde::Serialize,
13704 Clone,
13705 Copy,
13706 Debug,
13707 Eq,
13708 Hash,
13709 Ord,
13710 PartialEq,
13711 PartialOrd
13712 )]
13713 pub enum PostGetCompressedTokenBalancesByOwnerV2ResponseId {
13714 #[serde(rename = "test-account")]
13715 TestAccount,
13716 }
13717 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2ResponseId {
13718 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13719 match *self {
13720 Self::TestAccount => f.write_str("test-account"),
13721 }
13722 }
13723 }
13724 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2ResponseId {
13725 type Err = self::error::ConversionError;
13726 fn from_str(
13727 value: &str,
13728 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13729 match value {
13730 "test-account" => Ok(Self::TestAccount),
13731 _ => Err("invalid value".into()),
13732 }
13733 }
13734 }
13735 impl ::std::convert::TryFrom<&str>
13736 for PostGetCompressedTokenBalancesByOwnerV2ResponseId {
13737 type Error = self::error::ConversionError;
13738 fn try_from(
13739 value: &str,
13740 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13741 value.parse()
13742 }
13743 }
13744 impl ::std::convert::TryFrom<&::std::string::String>
13745 for PostGetCompressedTokenBalancesByOwnerV2ResponseId {
13746 type Error = self::error::ConversionError;
13747 fn try_from(
13748 value: &::std::string::String,
13749 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13750 value.parse()
13751 }
13752 }
13753 impl ::std::convert::TryFrom<::std::string::String>
13754 for PostGetCompressedTokenBalancesByOwnerV2ResponseId {
13755 type Error = self::error::ConversionError;
13756 fn try_from(
13757 value: ::std::string::String,
13758 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13759 value.parse()
13760 }
13761 }
13762 #[derive(
13777 ::serde::Deserialize,
13778 ::serde::Serialize,
13779 Clone,
13780 Copy,
13781 Debug,
13782 Eq,
13783 Hash,
13784 Ord,
13785 PartialEq,
13786 PartialOrd
13787 )]
13788 pub enum PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc {
13789 #[serde(rename = "2.0")]
13790 X20,
13791 }
13792 impl ::std::fmt::Display for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc {
13793 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13794 match *self {
13795 Self::X20 => f.write_str("2.0"),
13796 }
13797 }
13798 }
13799 impl ::std::str::FromStr for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc {
13800 type Err = self::error::ConversionError;
13801 fn from_str(
13802 value: &str,
13803 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13804 match value {
13805 "2.0" => Ok(Self::X20),
13806 _ => Err("invalid value".into()),
13807 }
13808 }
13809 }
13810 impl ::std::convert::TryFrom<&str>
13811 for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc {
13812 type Error = self::error::ConversionError;
13813 fn try_from(
13814 value: &str,
13815 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13816 value.parse()
13817 }
13818 }
13819 impl ::std::convert::TryFrom<&::std::string::String>
13820 for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc {
13821 type Error = self::error::ConversionError;
13822 fn try_from(
13823 value: &::std::string::String,
13824 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13825 value.parse()
13826 }
13827 }
13828 impl ::std::convert::TryFrom<::std::string::String>
13829 for PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc {
13830 type Error = self::error::ConversionError;
13831 fn try_from(
13832 value: ::std::string::String,
13833 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13834 value.parse()
13835 }
13836 }
13837 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13861 #[serde(deny_unknown_fields)]
13862 pub struct PostGetCompressedTokenBalancesByOwnerV2ResponseResult {
13863 pub context: Context,
13864 pub value: TokenBalanceListV2,
13865 }
13866 impl PostGetCompressedTokenBalancesByOwnerV2ResponseResult {
13867 pub fn builder() -> builder::PostGetCompressedTokenBalancesByOwnerV2ResponseResult {
13868 Default::default()
13869 }
13870 }
13871 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13922 pub struct PostGetCompressionSignaturesForAccountBody {
13923 pub id: PostGetCompressionSignaturesForAccountBodyId,
13925 pub jsonrpc: PostGetCompressionSignaturesForAccountBodyJsonrpc,
13927 pub method: PostGetCompressionSignaturesForAccountBodyMethod,
13929 pub params: PostGetCompressionSignaturesForAccountBodyParams,
13930 }
13931 impl PostGetCompressionSignaturesForAccountBody {
13932 pub fn builder() -> builder::PostGetCompressionSignaturesForAccountBody {
13933 Default::default()
13934 }
13935 }
13936 #[derive(
13951 ::serde::Deserialize,
13952 ::serde::Serialize,
13953 Clone,
13954 Copy,
13955 Debug,
13956 Eq,
13957 Hash,
13958 Ord,
13959 PartialEq,
13960 PartialOrd
13961 )]
13962 pub enum PostGetCompressionSignaturesForAccountBodyId {
13963 #[serde(rename = "test-account")]
13964 TestAccount,
13965 }
13966 impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountBodyId {
13967 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13968 match *self {
13969 Self::TestAccount => f.write_str("test-account"),
13970 }
13971 }
13972 }
13973 impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountBodyId {
13974 type Err = self::error::ConversionError;
13975 fn from_str(
13976 value: &str,
13977 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13978 match value {
13979 "test-account" => Ok(Self::TestAccount),
13980 _ => Err("invalid value".into()),
13981 }
13982 }
13983 }
13984 impl ::std::convert::TryFrom<&str> for PostGetCompressionSignaturesForAccountBodyId {
13985 type Error = self::error::ConversionError;
13986 fn try_from(
13987 value: &str,
13988 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13989 value.parse()
13990 }
13991 }
13992 impl ::std::convert::TryFrom<&::std::string::String>
13993 for PostGetCompressionSignaturesForAccountBodyId {
13994 type Error = self::error::ConversionError;
13995 fn try_from(
13996 value: &::std::string::String,
13997 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13998 value.parse()
13999 }
14000 }
14001 impl ::std::convert::TryFrom<::std::string::String>
14002 for PostGetCompressionSignaturesForAccountBodyId {
14003 type Error = self::error::ConversionError;
14004 fn try_from(
14005 value: ::std::string::String,
14006 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14007 value.parse()
14008 }
14009 }
14010 #[derive(
14025 ::serde::Deserialize,
14026 ::serde::Serialize,
14027 Clone,
14028 Copy,
14029 Debug,
14030 Eq,
14031 Hash,
14032 Ord,
14033 PartialEq,
14034 PartialOrd
14035 )]
14036 pub enum PostGetCompressionSignaturesForAccountBodyJsonrpc {
14037 #[serde(rename = "2.0")]
14038 X20,
14039 }
14040 impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountBodyJsonrpc {
14041 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14042 match *self {
14043 Self::X20 => f.write_str("2.0"),
14044 }
14045 }
14046 }
14047 impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountBodyJsonrpc {
14048 type Err = self::error::ConversionError;
14049 fn from_str(
14050 value: &str,
14051 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14052 match value {
14053 "2.0" => Ok(Self::X20),
14054 _ => Err("invalid value".into()),
14055 }
14056 }
14057 }
14058 impl ::std::convert::TryFrom<&str>
14059 for PostGetCompressionSignaturesForAccountBodyJsonrpc {
14060 type Error = self::error::ConversionError;
14061 fn try_from(
14062 value: &str,
14063 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14064 value.parse()
14065 }
14066 }
14067 impl ::std::convert::TryFrom<&::std::string::String>
14068 for PostGetCompressionSignaturesForAccountBodyJsonrpc {
14069 type Error = self::error::ConversionError;
14070 fn try_from(
14071 value: &::std::string::String,
14072 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14073 value.parse()
14074 }
14075 }
14076 impl ::std::convert::TryFrom<::std::string::String>
14077 for PostGetCompressionSignaturesForAccountBodyJsonrpc {
14078 type Error = self::error::ConversionError;
14079 fn try_from(
14080 value: ::std::string::String,
14081 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14082 value.parse()
14083 }
14084 }
14085 #[derive(
14100 ::serde::Deserialize,
14101 ::serde::Serialize,
14102 Clone,
14103 Copy,
14104 Debug,
14105 Eq,
14106 Hash,
14107 Ord,
14108 PartialEq,
14109 PartialOrd
14110 )]
14111 pub enum PostGetCompressionSignaturesForAccountBodyMethod {
14112 #[serde(rename = "getCompressionSignaturesForAccount")]
14113 GetCompressionSignaturesForAccount,
14114 }
14115 impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountBodyMethod {
14116 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14117 match *self {
14118 Self::GetCompressionSignaturesForAccount => {
14119 f.write_str("getCompressionSignaturesForAccount")
14120 }
14121 }
14122 }
14123 }
14124 impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountBodyMethod {
14125 type Err = self::error::ConversionError;
14126 fn from_str(
14127 value: &str,
14128 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14129 match value {
14130 "getCompressionSignaturesForAccount" => {
14131 Ok(Self::GetCompressionSignaturesForAccount)
14132 }
14133 _ => Err("invalid value".into()),
14134 }
14135 }
14136 }
14137 impl ::std::convert::TryFrom<&str>
14138 for PostGetCompressionSignaturesForAccountBodyMethod {
14139 type Error = self::error::ConversionError;
14140 fn try_from(
14141 value: &str,
14142 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14143 value.parse()
14144 }
14145 }
14146 impl ::std::convert::TryFrom<&::std::string::String>
14147 for PostGetCompressionSignaturesForAccountBodyMethod {
14148 type Error = self::error::ConversionError;
14149 fn try_from(
14150 value: &::std::string::String,
14151 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14152 value.parse()
14153 }
14154 }
14155 impl ::std::convert::TryFrom<::std::string::String>
14156 for PostGetCompressionSignaturesForAccountBodyMethod {
14157 type Error = self::error::ConversionError;
14158 fn try_from(
14159 value: ::std::string::String,
14160 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14161 value.parse()
14162 }
14163 }
14164 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14183 pub struct PostGetCompressionSignaturesForAccountBodyParams {
14184 pub hash: Hash,
14185 }
14186 impl PostGetCompressionSignaturesForAccountBodyParams {
14187 pub fn builder() -> builder::PostGetCompressionSignaturesForAccountBodyParams {
14188 Default::default()
14189 }
14190 }
14191 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14249 pub struct PostGetCompressionSignaturesForAccountResponse {
14250 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14251 pub error: ::std::option::Option<
14252 PostGetCompressionSignaturesForAccountResponseError,
14253 >,
14254 pub id: PostGetCompressionSignaturesForAccountResponseId,
14256 pub jsonrpc: PostGetCompressionSignaturesForAccountResponseJsonrpc,
14258 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14259 pub result: ::std::option::Option<
14260 PostGetCompressionSignaturesForAccountResponseResult,
14261 >,
14262 }
14263 impl PostGetCompressionSignaturesForAccountResponse {
14264 pub fn builder() -> builder::PostGetCompressionSignaturesForAccountResponse {
14265 Default::default()
14266 }
14267 }
14268 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14287 pub struct PostGetCompressionSignaturesForAccountResponseError {
14288 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14289 pub code: ::std::option::Option<i64>,
14290 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14291 pub message: ::std::option::Option<::std::string::String>,
14292 }
14293 impl ::std::default::Default
14294 for PostGetCompressionSignaturesForAccountResponseError {
14295 fn default() -> Self {
14296 Self {
14297 code: Default::default(),
14298 message: Default::default(),
14299 }
14300 }
14301 }
14302 impl PostGetCompressionSignaturesForAccountResponseError {
14303 pub fn builder() -> builder::PostGetCompressionSignaturesForAccountResponseError {
14304 Default::default()
14305 }
14306 }
14307 #[derive(
14322 ::serde::Deserialize,
14323 ::serde::Serialize,
14324 Clone,
14325 Copy,
14326 Debug,
14327 Eq,
14328 Hash,
14329 Ord,
14330 PartialEq,
14331 PartialOrd
14332 )]
14333 pub enum PostGetCompressionSignaturesForAccountResponseId {
14334 #[serde(rename = "test-account")]
14335 TestAccount,
14336 }
14337 impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountResponseId {
14338 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14339 match *self {
14340 Self::TestAccount => f.write_str("test-account"),
14341 }
14342 }
14343 }
14344 impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountResponseId {
14345 type Err = self::error::ConversionError;
14346 fn from_str(
14347 value: &str,
14348 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14349 match value {
14350 "test-account" => Ok(Self::TestAccount),
14351 _ => Err("invalid value".into()),
14352 }
14353 }
14354 }
14355 impl ::std::convert::TryFrom<&str>
14356 for PostGetCompressionSignaturesForAccountResponseId {
14357 type Error = self::error::ConversionError;
14358 fn try_from(
14359 value: &str,
14360 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14361 value.parse()
14362 }
14363 }
14364 impl ::std::convert::TryFrom<&::std::string::String>
14365 for PostGetCompressionSignaturesForAccountResponseId {
14366 type Error = self::error::ConversionError;
14367 fn try_from(
14368 value: &::std::string::String,
14369 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14370 value.parse()
14371 }
14372 }
14373 impl ::std::convert::TryFrom<::std::string::String>
14374 for PostGetCompressionSignaturesForAccountResponseId {
14375 type Error = self::error::ConversionError;
14376 fn try_from(
14377 value: ::std::string::String,
14378 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14379 value.parse()
14380 }
14381 }
14382 #[derive(
14397 ::serde::Deserialize,
14398 ::serde::Serialize,
14399 Clone,
14400 Copy,
14401 Debug,
14402 Eq,
14403 Hash,
14404 Ord,
14405 PartialEq,
14406 PartialOrd
14407 )]
14408 pub enum PostGetCompressionSignaturesForAccountResponseJsonrpc {
14409 #[serde(rename = "2.0")]
14410 X20,
14411 }
14412 impl ::std::fmt::Display for PostGetCompressionSignaturesForAccountResponseJsonrpc {
14413 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14414 match *self {
14415 Self::X20 => f.write_str("2.0"),
14416 }
14417 }
14418 }
14419 impl ::std::str::FromStr for PostGetCompressionSignaturesForAccountResponseJsonrpc {
14420 type Err = self::error::ConversionError;
14421 fn from_str(
14422 value: &str,
14423 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14424 match value {
14425 "2.0" => Ok(Self::X20),
14426 _ => Err("invalid value".into()),
14427 }
14428 }
14429 }
14430 impl ::std::convert::TryFrom<&str>
14431 for PostGetCompressionSignaturesForAccountResponseJsonrpc {
14432 type Error = self::error::ConversionError;
14433 fn try_from(
14434 value: &str,
14435 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14436 value.parse()
14437 }
14438 }
14439 impl ::std::convert::TryFrom<&::std::string::String>
14440 for PostGetCompressionSignaturesForAccountResponseJsonrpc {
14441 type Error = self::error::ConversionError;
14442 fn try_from(
14443 value: &::std::string::String,
14444 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14445 value.parse()
14446 }
14447 }
14448 impl ::std::convert::TryFrom<::std::string::String>
14449 for PostGetCompressionSignaturesForAccountResponseJsonrpc {
14450 type Error = self::error::ConversionError;
14451 fn try_from(
14452 value: ::std::string::String,
14453 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14454 value.parse()
14455 }
14456 }
14457 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14481 #[serde(deny_unknown_fields)]
14482 pub struct PostGetCompressionSignaturesForAccountResponseResult {
14483 pub context: Context,
14484 pub value: SignatureInfoList,
14485 }
14486 impl PostGetCompressionSignaturesForAccountResponseResult {
14487 pub fn builder() -> builder::PostGetCompressionSignaturesForAccountResponseResult {
14488 Default::default()
14489 }
14490 }
14491 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14563 pub struct PostGetCompressionSignaturesForAddressBody {
14564 pub id: PostGetCompressionSignaturesForAddressBodyId,
14566 pub jsonrpc: PostGetCompressionSignaturesForAddressBodyJsonrpc,
14568 pub method: PostGetCompressionSignaturesForAddressBodyMethod,
14570 pub params: PostGetCompressionSignaturesForAddressBodyParams,
14571 }
14572 impl PostGetCompressionSignaturesForAddressBody {
14573 pub fn builder() -> builder::PostGetCompressionSignaturesForAddressBody {
14574 Default::default()
14575 }
14576 }
14577 #[derive(
14592 ::serde::Deserialize,
14593 ::serde::Serialize,
14594 Clone,
14595 Copy,
14596 Debug,
14597 Eq,
14598 Hash,
14599 Ord,
14600 PartialEq,
14601 PartialOrd
14602 )]
14603 pub enum PostGetCompressionSignaturesForAddressBodyId {
14604 #[serde(rename = "test-account")]
14605 TestAccount,
14606 }
14607 impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressBodyId {
14608 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14609 match *self {
14610 Self::TestAccount => f.write_str("test-account"),
14611 }
14612 }
14613 }
14614 impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressBodyId {
14615 type Err = self::error::ConversionError;
14616 fn from_str(
14617 value: &str,
14618 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14619 match value {
14620 "test-account" => Ok(Self::TestAccount),
14621 _ => Err("invalid value".into()),
14622 }
14623 }
14624 }
14625 impl ::std::convert::TryFrom<&str> for PostGetCompressionSignaturesForAddressBodyId {
14626 type Error = self::error::ConversionError;
14627 fn try_from(
14628 value: &str,
14629 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14630 value.parse()
14631 }
14632 }
14633 impl ::std::convert::TryFrom<&::std::string::String>
14634 for PostGetCompressionSignaturesForAddressBodyId {
14635 type Error = self::error::ConversionError;
14636 fn try_from(
14637 value: &::std::string::String,
14638 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14639 value.parse()
14640 }
14641 }
14642 impl ::std::convert::TryFrom<::std::string::String>
14643 for PostGetCompressionSignaturesForAddressBodyId {
14644 type Error = self::error::ConversionError;
14645 fn try_from(
14646 value: ::std::string::String,
14647 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14648 value.parse()
14649 }
14650 }
14651 #[derive(
14666 ::serde::Deserialize,
14667 ::serde::Serialize,
14668 Clone,
14669 Copy,
14670 Debug,
14671 Eq,
14672 Hash,
14673 Ord,
14674 PartialEq,
14675 PartialOrd
14676 )]
14677 pub enum PostGetCompressionSignaturesForAddressBodyJsonrpc {
14678 #[serde(rename = "2.0")]
14679 X20,
14680 }
14681 impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressBodyJsonrpc {
14682 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14683 match *self {
14684 Self::X20 => f.write_str("2.0"),
14685 }
14686 }
14687 }
14688 impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressBodyJsonrpc {
14689 type Err = self::error::ConversionError;
14690 fn from_str(
14691 value: &str,
14692 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14693 match value {
14694 "2.0" => Ok(Self::X20),
14695 _ => Err("invalid value".into()),
14696 }
14697 }
14698 }
14699 impl ::std::convert::TryFrom<&str>
14700 for PostGetCompressionSignaturesForAddressBodyJsonrpc {
14701 type Error = self::error::ConversionError;
14702 fn try_from(
14703 value: &str,
14704 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14705 value.parse()
14706 }
14707 }
14708 impl ::std::convert::TryFrom<&::std::string::String>
14709 for PostGetCompressionSignaturesForAddressBodyJsonrpc {
14710 type Error = self::error::ConversionError;
14711 fn try_from(
14712 value: &::std::string::String,
14713 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14714 value.parse()
14715 }
14716 }
14717 impl ::std::convert::TryFrom<::std::string::String>
14718 for PostGetCompressionSignaturesForAddressBodyJsonrpc {
14719 type Error = self::error::ConversionError;
14720 fn try_from(
14721 value: ::std::string::String,
14722 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14723 value.parse()
14724 }
14725 }
14726 #[derive(
14741 ::serde::Deserialize,
14742 ::serde::Serialize,
14743 Clone,
14744 Copy,
14745 Debug,
14746 Eq,
14747 Hash,
14748 Ord,
14749 PartialEq,
14750 PartialOrd
14751 )]
14752 pub enum PostGetCompressionSignaturesForAddressBodyMethod {
14753 #[serde(rename = "getCompressionSignaturesForAddress")]
14754 GetCompressionSignaturesForAddress,
14755 }
14756 impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressBodyMethod {
14757 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14758 match *self {
14759 Self::GetCompressionSignaturesForAddress => {
14760 f.write_str("getCompressionSignaturesForAddress")
14761 }
14762 }
14763 }
14764 }
14765 impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressBodyMethod {
14766 type Err = self::error::ConversionError;
14767 fn from_str(
14768 value: &str,
14769 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14770 match value {
14771 "getCompressionSignaturesForAddress" => {
14772 Ok(Self::GetCompressionSignaturesForAddress)
14773 }
14774 _ => Err("invalid value".into()),
14775 }
14776 }
14777 }
14778 impl ::std::convert::TryFrom<&str>
14779 for PostGetCompressionSignaturesForAddressBodyMethod {
14780 type Error = self::error::ConversionError;
14781 fn try_from(
14782 value: &str,
14783 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14784 value.parse()
14785 }
14786 }
14787 impl ::std::convert::TryFrom<&::std::string::String>
14788 for PostGetCompressionSignaturesForAddressBodyMethod {
14789 type Error = self::error::ConversionError;
14790 fn try_from(
14791 value: &::std::string::String,
14792 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14793 value.parse()
14794 }
14795 }
14796 impl ::std::convert::TryFrom<::std::string::String>
14797 for PostGetCompressionSignaturesForAddressBodyMethod {
14798 type Error = self::error::ConversionError;
14799 fn try_from(
14800 value: ::std::string::String,
14801 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14802 value.parse()
14803 }
14804 }
14805 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14845 #[serde(deny_unknown_fields)]
14846 pub struct PostGetCompressionSignaturesForAddressBodyParams {
14847 pub address: SerializablePubkey,
14848 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14849 pub cursor: ::std::option::Option<::std::string::String>,
14850 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14851 pub limit: ::std::option::Option<Limit>,
14852 }
14853 impl PostGetCompressionSignaturesForAddressBodyParams {
14854 pub fn builder() -> builder::PostGetCompressionSignaturesForAddressBodyParams {
14855 Default::default()
14856 }
14857 }
14858 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14916 pub struct PostGetCompressionSignaturesForAddressResponse {
14917 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14918 pub error: ::std::option::Option<
14919 PostGetCompressionSignaturesForAddressResponseError,
14920 >,
14921 pub id: PostGetCompressionSignaturesForAddressResponseId,
14923 pub jsonrpc: PostGetCompressionSignaturesForAddressResponseJsonrpc,
14925 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14926 pub result: ::std::option::Option<
14927 PostGetCompressionSignaturesForAddressResponseResult,
14928 >,
14929 }
14930 impl PostGetCompressionSignaturesForAddressResponse {
14931 pub fn builder() -> builder::PostGetCompressionSignaturesForAddressResponse {
14932 Default::default()
14933 }
14934 }
14935 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14954 pub struct PostGetCompressionSignaturesForAddressResponseError {
14955 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14956 pub code: ::std::option::Option<i64>,
14957 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14958 pub message: ::std::option::Option<::std::string::String>,
14959 }
14960 impl ::std::default::Default
14961 for PostGetCompressionSignaturesForAddressResponseError {
14962 fn default() -> Self {
14963 Self {
14964 code: Default::default(),
14965 message: Default::default(),
14966 }
14967 }
14968 }
14969 impl PostGetCompressionSignaturesForAddressResponseError {
14970 pub fn builder() -> builder::PostGetCompressionSignaturesForAddressResponseError {
14971 Default::default()
14972 }
14973 }
14974 #[derive(
14989 ::serde::Deserialize,
14990 ::serde::Serialize,
14991 Clone,
14992 Copy,
14993 Debug,
14994 Eq,
14995 Hash,
14996 Ord,
14997 PartialEq,
14998 PartialOrd
14999 )]
15000 pub enum PostGetCompressionSignaturesForAddressResponseId {
15001 #[serde(rename = "test-account")]
15002 TestAccount,
15003 }
15004 impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressResponseId {
15005 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15006 match *self {
15007 Self::TestAccount => f.write_str("test-account"),
15008 }
15009 }
15010 }
15011 impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressResponseId {
15012 type Err = self::error::ConversionError;
15013 fn from_str(
15014 value: &str,
15015 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15016 match value {
15017 "test-account" => Ok(Self::TestAccount),
15018 _ => Err("invalid value".into()),
15019 }
15020 }
15021 }
15022 impl ::std::convert::TryFrom<&str>
15023 for PostGetCompressionSignaturesForAddressResponseId {
15024 type Error = self::error::ConversionError;
15025 fn try_from(
15026 value: &str,
15027 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15028 value.parse()
15029 }
15030 }
15031 impl ::std::convert::TryFrom<&::std::string::String>
15032 for PostGetCompressionSignaturesForAddressResponseId {
15033 type Error = self::error::ConversionError;
15034 fn try_from(
15035 value: &::std::string::String,
15036 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15037 value.parse()
15038 }
15039 }
15040 impl ::std::convert::TryFrom<::std::string::String>
15041 for PostGetCompressionSignaturesForAddressResponseId {
15042 type Error = self::error::ConversionError;
15043 fn try_from(
15044 value: ::std::string::String,
15045 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15046 value.parse()
15047 }
15048 }
15049 #[derive(
15064 ::serde::Deserialize,
15065 ::serde::Serialize,
15066 Clone,
15067 Copy,
15068 Debug,
15069 Eq,
15070 Hash,
15071 Ord,
15072 PartialEq,
15073 PartialOrd
15074 )]
15075 pub enum PostGetCompressionSignaturesForAddressResponseJsonrpc {
15076 #[serde(rename = "2.0")]
15077 X20,
15078 }
15079 impl ::std::fmt::Display for PostGetCompressionSignaturesForAddressResponseJsonrpc {
15080 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15081 match *self {
15082 Self::X20 => f.write_str("2.0"),
15083 }
15084 }
15085 }
15086 impl ::std::str::FromStr for PostGetCompressionSignaturesForAddressResponseJsonrpc {
15087 type Err = self::error::ConversionError;
15088 fn from_str(
15089 value: &str,
15090 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15091 match value {
15092 "2.0" => Ok(Self::X20),
15093 _ => Err("invalid value".into()),
15094 }
15095 }
15096 }
15097 impl ::std::convert::TryFrom<&str>
15098 for PostGetCompressionSignaturesForAddressResponseJsonrpc {
15099 type Error = self::error::ConversionError;
15100 fn try_from(
15101 value: &str,
15102 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15103 value.parse()
15104 }
15105 }
15106 impl ::std::convert::TryFrom<&::std::string::String>
15107 for PostGetCompressionSignaturesForAddressResponseJsonrpc {
15108 type Error = self::error::ConversionError;
15109 fn try_from(
15110 value: &::std::string::String,
15111 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15112 value.parse()
15113 }
15114 }
15115 impl ::std::convert::TryFrom<::std::string::String>
15116 for PostGetCompressionSignaturesForAddressResponseJsonrpc {
15117 type Error = self::error::ConversionError;
15118 fn try_from(
15119 value: ::std::string::String,
15120 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15121 value.parse()
15122 }
15123 }
15124 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15148 #[serde(deny_unknown_fields)]
15149 pub struct PostGetCompressionSignaturesForAddressResponseResult {
15150 pub context: Context,
15151 pub value: PaginatedSignatureInfoList,
15152 }
15153 impl PostGetCompressionSignaturesForAddressResponseResult {
15154 pub fn builder() -> builder::PostGetCompressionSignaturesForAddressResponseResult {
15155 Default::default()
15156 }
15157 }
15158 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15230 pub struct PostGetCompressionSignaturesForOwnerBody {
15231 pub id: PostGetCompressionSignaturesForOwnerBodyId,
15233 pub jsonrpc: PostGetCompressionSignaturesForOwnerBodyJsonrpc,
15235 pub method: PostGetCompressionSignaturesForOwnerBodyMethod,
15237 pub params: PostGetCompressionSignaturesForOwnerBodyParams,
15238 }
15239 impl PostGetCompressionSignaturesForOwnerBody {
15240 pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerBody {
15241 Default::default()
15242 }
15243 }
15244 #[derive(
15259 ::serde::Deserialize,
15260 ::serde::Serialize,
15261 Clone,
15262 Copy,
15263 Debug,
15264 Eq,
15265 Hash,
15266 Ord,
15267 PartialEq,
15268 PartialOrd
15269 )]
15270 pub enum PostGetCompressionSignaturesForOwnerBodyId {
15271 #[serde(rename = "test-account")]
15272 TestAccount,
15273 }
15274 impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerBodyId {
15275 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15276 match *self {
15277 Self::TestAccount => f.write_str("test-account"),
15278 }
15279 }
15280 }
15281 impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerBodyId {
15282 type Err = self::error::ConversionError;
15283 fn from_str(
15284 value: &str,
15285 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15286 match value {
15287 "test-account" => Ok(Self::TestAccount),
15288 _ => Err("invalid value".into()),
15289 }
15290 }
15291 }
15292 impl ::std::convert::TryFrom<&str> for PostGetCompressionSignaturesForOwnerBodyId {
15293 type Error = self::error::ConversionError;
15294 fn try_from(
15295 value: &str,
15296 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15297 value.parse()
15298 }
15299 }
15300 impl ::std::convert::TryFrom<&::std::string::String>
15301 for PostGetCompressionSignaturesForOwnerBodyId {
15302 type Error = self::error::ConversionError;
15303 fn try_from(
15304 value: &::std::string::String,
15305 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15306 value.parse()
15307 }
15308 }
15309 impl ::std::convert::TryFrom<::std::string::String>
15310 for PostGetCompressionSignaturesForOwnerBodyId {
15311 type Error = self::error::ConversionError;
15312 fn try_from(
15313 value: ::std::string::String,
15314 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15315 value.parse()
15316 }
15317 }
15318 #[derive(
15333 ::serde::Deserialize,
15334 ::serde::Serialize,
15335 Clone,
15336 Copy,
15337 Debug,
15338 Eq,
15339 Hash,
15340 Ord,
15341 PartialEq,
15342 PartialOrd
15343 )]
15344 pub enum PostGetCompressionSignaturesForOwnerBodyJsonrpc {
15345 #[serde(rename = "2.0")]
15346 X20,
15347 }
15348 impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerBodyJsonrpc {
15349 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15350 match *self {
15351 Self::X20 => f.write_str("2.0"),
15352 }
15353 }
15354 }
15355 impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerBodyJsonrpc {
15356 type Err = self::error::ConversionError;
15357 fn from_str(
15358 value: &str,
15359 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15360 match value {
15361 "2.0" => Ok(Self::X20),
15362 _ => Err("invalid value".into()),
15363 }
15364 }
15365 }
15366 impl ::std::convert::TryFrom<&str>
15367 for PostGetCompressionSignaturesForOwnerBodyJsonrpc {
15368 type Error = self::error::ConversionError;
15369 fn try_from(
15370 value: &str,
15371 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15372 value.parse()
15373 }
15374 }
15375 impl ::std::convert::TryFrom<&::std::string::String>
15376 for PostGetCompressionSignaturesForOwnerBodyJsonrpc {
15377 type Error = self::error::ConversionError;
15378 fn try_from(
15379 value: &::std::string::String,
15380 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15381 value.parse()
15382 }
15383 }
15384 impl ::std::convert::TryFrom<::std::string::String>
15385 for PostGetCompressionSignaturesForOwnerBodyJsonrpc {
15386 type Error = self::error::ConversionError;
15387 fn try_from(
15388 value: ::std::string::String,
15389 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15390 value.parse()
15391 }
15392 }
15393 #[derive(
15408 ::serde::Deserialize,
15409 ::serde::Serialize,
15410 Clone,
15411 Copy,
15412 Debug,
15413 Eq,
15414 Hash,
15415 Ord,
15416 PartialEq,
15417 PartialOrd
15418 )]
15419 pub enum PostGetCompressionSignaturesForOwnerBodyMethod {
15420 #[serde(rename = "getCompressionSignaturesForOwner")]
15421 GetCompressionSignaturesForOwner,
15422 }
15423 impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerBodyMethod {
15424 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15425 match *self {
15426 Self::GetCompressionSignaturesForOwner => {
15427 f.write_str("getCompressionSignaturesForOwner")
15428 }
15429 }
15430 }
15431 }
15432 impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerBodyMethod {
15433 type Err = self::error::ConversionError;
15434 fn from_str(
15435 value: &str,
15436 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15437 match value {
15438 "getCompressionSignaturesForOwner" => {
15439 Ok(Self::GetCompressionSignaturesForOwner)
15440 }
15441 _ => Err("invalid value".into()),
15442 }
15443 }
15444 }
15445 impl ::std::convert::TryFrom<&str>
15446 for PostGetCompressionSignaturesForOwnerBodyMethod {
15447 type Error = self::error::ConversionError;
15448 fn try_from(
15449 value: &str,
15450 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15451 value.parse()
15452 }
15453 }
15454 impl ::std::convert::TryFrom<&::std::string::String>
15455 for PostGetCompressionSignaturesForOwnerBodyMethod {
15456 type Error = self::error::ConversionError;
15457 fn try_from(
15458 value: &::std::string::String,
15459 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15460 value.parse()
15461 }
15462 }
15463 impl ::std::convert::TryFrom<::std::string::String>
15464 for PostGetCompressionSignaturesForOwnerBodyMethod {
15465 type Error = self::error::ConversionError;
15466 fn try_from(
15467 value: ::std::string::String,
15468 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15469 value.parse()
15470 }
15471 }
15472 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15512 #[serde(deny_unknown_fields)]
15513 pub struct PostGetCompressionSignaturesForOwnerBodyParams {
15514 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15515 pub cursor: ::std::option::Option<::std::string::String>,
15516 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15517 pub limit: ::std::option::Option<Limit>,
15518 pub owner: SerializablePubkey,
15519 }
15520 impl PostGetCompressionSignaturesForOwnerBodyParams {
15521 pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerBodyParams {
15522 Default::default()
15523 }
15524 }
15525 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15583 pub struct PostGetCompressionSignaturesForOwnerResponse {
15584 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15585 pub error: ::std::option::Option<
15586 PostGetCompressionSignaturesForOwnerResponseError,
15587 >,
15588 pub id: PostGetCompressionSignaturesForOwnerResponseId,
15590 pub jsonrpc: PostGetCompressionSignaturesForOwnerResponseJsonrpc,
15592 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15593 pub result: ::std::option::Option<
15594 PostGetCompressionSignaturesForOwnerResponseResult,
15595 >,
15596 }
15597 impl PostGetCompressionSignaturesForOwnerResponse {
15598 pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerResponse {
15599 Default::default()
15600 }
15601 }
15602 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15621 pub struct PostGetCompressionSignaturesForOwnerResponseError {
15622 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15623 pub code: ::std::option::Option<i64>,
15624 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15625 pub message: ::std::option::Option<::std::string::String>,
15626 }
15627 impl ::std::default::Default for PostGetCompressionSignaturesForOwnerResponseError {
15628 fn default() -> Self {
15629 Self {
15630 code: Default::default(),
15631 message: Default::default(),
15632 }
15633 }
15634 }
15635 impl PostGetCompressionSignaturesForOwnerResponseError {
15636 pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerResponseError {
15637 Default::default()
15638 }
15639 }
15640 #[derive(
15655 ::serde::Deserialize,
15656 ::serde::Serialize,
15657 Clone,
15658 Copy,
15659 Debug,
15660 Eq,
15661 Hash,
15662 Ord,
15663 PartialEq,
15664 PartialOrd
15665 )]
15666 pub enum PostGetCompressionSignaturesForOwnerResponseId {
15667 #[serde(rename = "test-account")]
15668 TestAccount,
15669 }
15670 impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerResponseId {
15671 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15672 match *self {
15673 Self::TestAccount => f.write_str("test-account"),
15674 }
15675 }
15676 }
15677 impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerResponseId {
15678 type Err = self::error::ConversionError;
15679 fn from_str(
15680 value: &str,
15681 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15682 match value {
15683 "test-account" => Ok(Self::TestAccount),
15684 _ => Err("invalid value".into()),
15685 }
15686 }
15687 }
15688 impl ::std::convert::TryFrom<&str>
15689 for PostGetCompressionSignaturesForOwnerResponseId {
15690 type Error = self::error::ConversionError;
15691 fn try_from(
15692 value: &str,
15693 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15694 value.parse()
15695 }
15696 }
15697 impl ::std::convert::TryFrom<&::std::string::String>
15698 for PostGetCompressionSignaturesForOwnerResponseId {
15699 type Error = self::error::ConversionError;
15700 fn try_from(
15701 value: &::std::string::String,
15702 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15703 value.parse()
15704 }
15705 }
15706 impl ::std::convert::TryFrom<::std::string::String>
15707 for PostGetCompressionSignaturesForOwnerResponseId {
15708 type Error = self::error::ConversionError;
15709 fn try_from(
15710 value: ::std::string::String,
15711 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15712 value.parse()
15713 }
15714 }
15715 #[derive(
15730 ::serde::Deserialize,
15731 ::serde::Serialize,
15732 Clone,
15733 Copy,
15734 Debug,
15735 Eq,
15736 Hash,
15737 Ord,
15738 PartialEq,
15739 PartialOrd
15740 )]
15741 pub enum PostGetCompressionSignaturesForOwnerResponseJsonrpc {
15742 #[serde(rename = "2.0")]
15743 X20,
15744 }
15745 impl ::std::fmt::Display for PostGetCompressionSignaturesForOwnerResponseJsonrpc {
15746 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15747 match *self {
15748 Self::X20 => f.write_str("2.0"),
15749 }
15750 }
15751 }
15752 impl ::std::str::FromStr for PostGetCompressionSignaturesForOwnerResponseJsonrpc {
15753 type Err = self::error::ConversionError;
15754 fn from_str(
15755 value: &str,
15756 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15757 match value {
15758 "2.0" => Ok(Self::X20),
15759 _ => Err("invalid value".into()),
15760 }
15761 }
15762 }
15763 impl ::std::convert::TryFrom<&str>
15764 for PostGetCompressionSignaturesForOwnerResponseJsonrpc {
15765 type Error = self::error::ConversionError;
15766 fn try_from(
15767 value: &str,
15768 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15769 value.parse()
15770 }
15771 }
15772 impl ::std::convert::TryFrom<&::std::string::String>
15773 for PostGetCompressionSignaturesForOwnerResponseJsonrpc {
15774 type Error = self::error::ConversionError;
15775 fn try_from(
15776 value: &::std::string::String,
15777 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15778 value.parse()
15779 }
15780 }
15781 impl ::std::convert::TryFrom<::std::string::String>
15782 for PostGetCompressionSignaturesForOwnerResponseJsonrpc {
15783 type Error = self::error::ConversionError;
15784 fn try_from(
15785 value: ::std::string::String,
15786 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15787 value.parse()
15788 }
15789 }
15790 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15814 #[serde(deny_unknown_fields)]
15815 pub struct PostGetCompressionSignaturesForOwnerResponseResult {
15816 pub context: Context,
15817 pub value: PaginatedSignatureInfoList,
15818 }
15819 impl PostGetCompressionSignaturesForOwnerResponseResult {
15820 pub fn builder() -> builder::PostGetCompressionSignaturesForOwnerResponseResult {
15821 Default::default()
15822 }
15823 }
15824 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15896 pub struct PostGetCompressionSignaturesForTokenOwnerBody {
15897 pub id: PostGetCompressionSignaturesForTokenOwnerBodyId,
15899 pub jsonrpc: PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc,
15901 pub method: PostGetCompressionSignaturesForTokenOwnerBodyMethod,
15903 pub params: PostGetCompressionSignaturesForTokenOwnerBodyParams,
15904 }
15905 impl PostGetCompressionSignaturesForTokenOwnerBody {
15906 pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerBody {
15907 Default::default()
15908 }
15909 }
15910 #[derive(
15925 ::serde::Deserialize,
15926 ::serde::Serialize,
15927 Clone,
15928 Copy,
15929 Debug,
15930 Eq,
15931 Hash,
15932 Ord,
15933 PartialEq,
15934 PartialOrd
15935 )]
15936 pub enum PostGetCompressionSignaturesForTokenOwnerBodyId {
15937 #[serde(rename = "test-account")]
15938 TestAccount,
15939 }
15940 impl ::std::fmt::Display for PostGetCompressionSignaturesForTokenOwnerBodyId {
15941 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15942 match *self {
15943 Self::TestAccount => f.write_str("test-account"),
15944 }
15945 }
15946 }
15947 impl ::std::str::FromStr for PostGetCompressionSignaturesForTokenOwnerBodyId {
15948 type Err = self::error::ConversionError;
15949 fn from_str(
15950 value: &str,
15951 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15952 match value {
15953 "test-account" => Ok(Self::TestAccount),
15954 _ => Err("invalid value".into()),
15955 }
15956 }
15957 }
15958 impl ::std::convert::TryFrom<&str>
15959 for PostGetCompressionSignaturesForTokenOwnerBodyId {
15960 type Error = self::error::ConversionError;
15961 fn try_from(
15962 value: &str,
15963 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15964 value.parse()
15965 }
15966 }
15967 impl ::std::convert::TryFrom<&::std::string::String>
15968 for PostGetCompressionSignaturesForTokenOwnerBodyId {
15969 type Error = self::error::ConversionError;
15970 fn try_from(
15971 value: &::std::string::String,
15972 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15973 value.parse()
15974 }
15975 }
15976 impl ::std::convert::TryFrom<::std::string::String>
15977 for PostGetCompressionSignaturesForTokenOwnerBodyId {
15978 type Error = self::error::ConversionError;
15979 fn try_from(
15980 value: ::std::string::String,
15981 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15982 value.parse()
15983 }
15984 }
15985 #[derive(
16000 ::serde::Deserialize,
16001 ::serde::Serialize,
16002 Clone,
16003 Copy,
16004 Debug,
16005 Eq,
16006 Hash,
16007 Ord,
16008 PartialEq,
16009 PartialOrd
16010 )]
16011 pub enum PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc {
16012 #[serde(rename = "2.0")]
16013 X20,
16014 }
16015 impl ::std::fmt::Display for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc {
16016 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16017 match *self {
16018 Self::X20 => f.write_str("2.0"),
16019 }
16020 }
16021 }
16022 impl ::std::str::FromStr for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc {
16023 type Err = self::error::ConversionError;
16024 fn from_str(
16025 value: &str,
16026 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16027 match value {
16028 "2.0" => Ok(Self::X20),
16029 _ => Err("invalid value".into()),
16030 }
16031 }
16032 }
16033 impl ::std::convert::TryFrom<&str>
16034 for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc {
16035 type Error = self::error::ConversionError;
16036 fn try_from(
16037 value: &str,
16038 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16039 value.parse()
16040 }
16041 }
16042 impl ::std::convert::TryFrom<&::std::string::String>
16043 for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc {
16044 type Error = self::error::ConversionError;
16045 fn try_from(
16046 value: &::std::string::String,
16047 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16048 value.parse()
16049 }
16050 }
16051 impl ::std::convert::TryFrom<::std::string::String>
16052 for PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc {
16053 type Error = self::error::ConversionError;
16054 fn try_from(
16055 value: ::std::string::String,
16056 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16057 value.parse()
16058 }
16059 }
16060 #[derive(
16075 ::serde::Deserialize,
16076 ::serde::Serialize,
16077 Clone,
16078 Copy,
16079 Debug,
16080 Eq,
16081 Hash,
16082 Ord,
16083 PartialEq,
16084 PartialOrd
16085 )]
16086 pub enum PostGetCompressionSignaturesForTokenOwnerBodyMethod {
16087 #[serde(rename = "getCompressionSignaturesForTokenOwner")]
16088 GetCompressionSignaturesForTokenOwner,
16089 }
16090 impl ::std::fmt::Display for PostGetCompressionSignaturesForTokenOwnerBodyMethod {
16091 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16092 match *self {
16093 Self::GetCompressionSignaturesForTokenOwner => {
16094 f.write_str("getCompressionSignaturesForTokenOwner")
16095 }
16096 }
16097 }
16098 }
16099 impl ::std::str::FromStr for PostGetCompressionSignaturesForTokenOwnerBodyMethod {
16100 type Err = self::error::ConversionError;
16101 fn from_str(
16102 value: &str,
16103 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16104 match value {
16105 "getCompressionSignaturesForTokenOwner" => {
16106 Ok(Self::GetCompressionSignaturesForTokenOwner)
16107 }
16108 _ => Err("invalid value".into()),
16109 }
16110 }
16111 }
16112 impl ::std::convert::TryFrom<&str>
16113 for PostGetCompressionSignaturesForTokenOwnerBodyMethod {
16114 type Error = self::error::ConversionError;
16115 fn try_from(
16116 value: &str,
16117 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16118 value.parse()
16119 }
16120 }
16121 impl ::std::convert::TryFrom<&::std::string::String>
16122 for PostGetCompressionSignaturesForTokenOwnerBodyMethod {
16123 type Error = self::error::ConversionError;
16124 fn try_from(
16125 value: &::std::string::String,
16126 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16127 value.parse()
16128 }
16129 }
16130 impl ::std::convert::TryFrom<::std::string::String>
16131 for PostGetCompressionSignaturesForTokenOwnerBodyMethod {
16132 type Error = self::error::ConversionError;
16133 fn try_from(
16134 value: ::std::string::String,
16135 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16136 value.parse()
16137 }
16138 }
16139 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16179 #[serde(deny_unknown_fields)]
16180 pub struct PostGetCompressionSignaturesForTokenOwnerBodyParams {
16181 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16182 pub cursor: ::std::option::Option<::std::string::String>,
16183 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16184 pub limit: ::std::option::Option<Limit>,
16185 pub owner: SerializablePubkey,
16186 }
16187 impl PostGetCompressionSignaturesForTokenOwnerBodyParams {
16188 pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerBodyParams {
16189 Default::default()
16190 }
16191 }
16192 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16250 pub struct PostGetCompressionSignaturesForTokenOwnerResponse {
16251 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16252 pub error: ::std::option::Option<
16253 PostGetCompressionSignaturesForTokenOwnerResponseError,
16254 >,
16255 pub id: PostGetCompressionSignaturesForTokenOwnerResponseId,
16257 pub jsonrpc: PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc,
16259 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16260 pub result: ::std::option::Option<
16261 PostGetCompressionSignaturesForTokenOwnerResponseResult,
16262 >,
16263 }
16264 impl PostGetCompressionSignaturesForTokenOwnerResponse {
16265 pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerResponse {
16266 Default::default()
16267 }
16268 }
16269 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16288 pub struct PostGetCompressionSignaturesForTokenOwnerResponseError {
16289 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16290 pub code: ::std::option::Option<i64>,
16291 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16292 pub message: ::std::option::Option<::std::string::String>,
16293 }
16294 impl ::std::default::Default
16295 for PostGetCompressionSignaturesForTokenOwnerResponseError {
16296 fn default() -> Self {
16297 Self {
16298 code: Default::default(),
16299 message: Default::default(),
16300 }
16301 }
16302 }
16303 impl PostGetCompressionSignaturesForTokenOwnerResponseError {
16304 pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerResponseError {
16305 Default::default()
16306 }
16307 }
16308 #[derive(
16323 ::serde::Deserialize,
16324 ::serde::Serialize,
16325 Clone,
16326 Copy,
16327 Debug,
16328 Eq,
16329 Hash,
16330 Ord,
16331 PartialEq,
16332 PartialOrd
16333 )]
16334 pub enum PostGetCompressionSignaturesForTokenOwnerResponseId {
16335 #[serde(rename = "test-account")]
16336 TestAccount,
16337 }
16338 impl ::std::fmt::Display for PostGetCompressionSignaturesForTokenOwnerResponseId {
16339 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16340 match *self {
16341 Self::TestAccount => f.write_str("test-account"),
16342 }
16343 }
16344 }
16345 impl ::std::str::FromStr for PostGetCompressionSignaturesForTokenOwnerResponseId {
16346 type Err = self::error::ConversionError;
16347 fn from_str(
16348 value: &str,
16349 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16350 match value {
16351 "test-account" => Ok(Self::TestAccount),
16352 _ => Err("invalid value".into()),
16353 }
16354 }
16355 }
16356 impl ::std::convert::TryFrom<&str>
16357 for PostGetCompressionSignaturesForTokenOwnerResponseId {
16358 type Error = self::error::ConversionError;
16359 fn try_from(
16360 value: &str,
16361 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16362 value.parse()
16363 }
16364 }
16365 impl ::std::convert::TryFrom<&::std::string::String>
16366 for PostGetCompressionSignaturesForTokenOwnerResponseId {
16367 type Error = self::error::ConversionError;
16368 fn try_from(
16369 value: &::std::string::String,
16370 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16371 value.parse()
16372 }
16373 }
16374 impl ::std::convert::TryFrom<::std::string::String>
16375 for PostGetCompressionSignaturesForTokenOwnerResponseId {
16376 type Error = self::error::ConversionError;
16377 fn try_from(
16378 value: ::std::string::String,
16379 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16380 value.parse()
16381 }
16382 }
16383 #[derive(
16398 ::serde::Deserialize,
16399 ::serde::Serialize,
16400 Clone,
16401 Copy,
16402 Debug,
16403 Eq,
16404 Hash,
16405 Ord,
16406 PartialEq,
16407 PartialOrd
16408 )]
16409 pub enum PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc {
16410 #[serde(rename = "2.0")]
16411 X20,
16412 }
16413 impl ::std::fmt::Display
16414 for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc {
16415 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16416 match *self {
16417 Self::X20 => f.write_str("2.0"),
16418 }
16419 }
16420 }
16421 impl ::std::str::FromStr
16422 for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc {
16423 type Err = self::error::ConversionError;
16424 fn from_str(
16425 value: &str,
16426 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16427 match value {
16428 "2.0" => Ok(Self::X20),
16429 _ => Err("invalid value".into()),
16430 }
16431 }
16432 }
16433 impl ::std::convert::TryFrom<&str>
16434 for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc {
16435 type Error = self::error::ConversionError;
16436 fn try_from(
16437 value: &str,
16438 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16439 value.parse()
16440 }
16441 }
16442 impl ::std::convert::TryFrom<&::std::string::String>
16443 for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc {
16444 type Error = self::error::ConversionError;
16445 fn try_from(
16446 value: &::std::string::String,
16447 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16448 value.parse()
16449 }
16450 }
16451 impl ::std::convert::TryFrom<::std::string::String>
16452 for PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc {
16453 type Error = self::error::ConversionError;
16454 fn try_from(
16455 value: ::std::string::String,
16456 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16457 value.parse()
16458 }
16459 }
16460 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16484 #[serde(deny_unknown_fields)]
16485 pub struct PostGetCompressionSignaturesForTokenOwnerResponseResult {
16486 pub context: Context,
16487 pub value: PaginatedSignatureInfoList,
16488 }
16489 impl PostGetCompressionSignaturesForTokenOwnerResponseResult {
16490 pub fn builder() -> builder::PostGetCompressionSignaturesForTokenOwnerResponseResult {
16491 Default::default()
16492 }
16493 }
16494 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16533 pub struct PostGetIndexerHealthBody {
16534 pub id: PostGetIndexerHealthBodyId,
16536 pub jsonrpc: PostGetIndexerHealthBodyJsonrpc,
16538 pub method: PostGetIndexerHealthBodyMethod,
16540 }
16541 impl PostGetIndexerHealthBody {
16542 pub fn builder() -> builder::PostGetIndexerHealthBody {
16543 Default::default()
16544 }
16545 }
16546 #[derive(
16561 ::serde::Deserialize,
16562 ::serde::Serialize,
16563 Clone,
16564 Copy,
16565 Debug,
16566 Eq,
16567 Hash,
16568 Ord,
16569 PartialEq,
16570 PartialOrd
16571 )]
16572 pub enum PostGetIndexerHealthBodyId {
16573 #[serde(rename = "test-account")]
16574 TestAccount,
16575 }
16576 impl ::std::fmt::Display for PostGetIndexerHealthBodyId {
16577 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16578 match *self {
16579 Self::TestAccount => f.write_str("test-account"),
16580 }
16581 }
16582 }
16583 impl ::std::str::FromStr for PostGetIndexerHealthBodyId {
16584 type Err = self::error::ConversionError;
16585 fn from_str(
16586 value: &str,
16587 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16588 match value {
16589 "test-account" => Ok(Self::TestAccount),
16590 _ => Err("invalid value".into()),
16591 }
16592 }
16593 }
16594 impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthBodyId {
16595 type Error = self::error::ConversionError;
16596 fn try_from(
16597 value: &str,
16598 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16599 value.parse()
16600 }
16601 }
16602 impl ::std::convert::TryFrom<&::std::string::String> for PostGetIndexerHealthBodyId {
16603 type Error = self::error::ConversionError;
16604 fn try_from(
16605 value: &::std::string::String,
16606 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16607 value.parse()
16608 }
16609 }
16610 impl ::std::convert::TryFrom<::std::string::String> for PostGetIndexerHealthBodyId {
16611 type Error = self::error::ConversionError;
16612 fn try_from(
16613 value: ::std::string::String,
16614 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16615 value.parse()
16616 }
16617 }
16618 #[derive(
16633 ::serde::Deserialize,
16634 ::serde::Serialize,
16635 Clone,
16636 Copy,
16637 Debug,
16638 Eq,
16639 Hash,
16640 Ord,
16641 PartialEq,
16642 PartialOrd
16643 )]
16644 pub enum PostGetIndexerHealthBodyJsonrpc {
16645 #[serde(rename = "2.0")]
16646 X20,
16647 }
16648 impl ::std::fmt::Display for PostGetIndexerHealthBodyJsonrpc {
16649 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16650 match *self {
16651 Self::X20 => f.write_str("2.0"),
16652 }
16653 }
16654 }
16655 impl ::std::str::FromStr for PostGetIndexerHealthBodyJsonrpc {
16656 type Err = self::error::ConversionError;
16657 fn from_str(
16658 value: &str,
16659 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16660 match value {
16661 "2.0" => Ok(Self::X20),
16662 _ => Err("invalid value".into()),
16663 }
16664 }
16665 }
16666 impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthBodyJsonrpc {
16667 type Error = self::error::ConversionError;
16668 fn try_from(
16669 value: &str,
16670 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16671 value.parse()
16672 }
16673 }
16674 impl ::std::convert::TryFrom<&::std::string::String>
16675 for PostGetIndexerHealthBodyJsonrpc {
16676 type Error = self::error::ConversionError;
16677 fn try_from(
16678 value: &::std::string::String,
16679 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16680 value.parse()
16681 }
16682 }
16683 impl ::std::convert::TryFrom<::std::string::String>
16684 for PostGetIndexerHealthBodyJsonrpc {
16685 type Error = self::error::ConversionError;
16686 fn try_from(
16687 value: ::std::string::String,
16688 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16689 value.parse()
16690 }
16691 }
16692 #[derive(
16707 ::serde::Deserialize,
16708 ::serde::Serialize,
16709 Clone,
16710 Copy,
16711 Debug,
16712 Eq,
16713 Hash,
16714 Ord,
16715 PartialEq,
16716 PartialOrd
16717 )]
16718 pub enum PostGetIndexerHealthBodyMethod {
16719 #[serde(rename = "getIndexerHealth")]
16720 GetIndexerHealth,
16721 }
16722 impl ::std::fmt::Display for PostGetIndexerHealthBodyMethod {
16723 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16724 match *self {
16725 Self::GetIndexerHealth => f.write_str("getIndexerHealth"),
16726 }
16727 }
16728 }
16729 impl ::std::str::FromStr for PostGetIndexerHealthBodyMethod {
16730 type Err = self::error::ConversionError;
16731 fn from_str(
16732 value: &str,
16733 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16734 match value {
16735 "getIndexerHealth" => Ok(Self::GetIndexerHealth),
16736 _ => Err("invalid value".into()),
16737 }
16738 }
16739 }
16740 impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthBodyMethod {
16741 type Error = self::error::ConversionError;
16742 fn try_from(
16743 value: &str,
16744 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16745 value.parse()
16746 }
16747 }
16748 impl ::std::convert::TryFrom<&::std::string::String>
16749 for PostGetIndexerHealthBodyMethod {
16750 type Error = self::error::ConversionError;
16751 fn try_from(
16752 value: &::std::string::String,
16753 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16754 value.parse()
16755 }
16756 }
16757 impl ::std::convert::TryFrom<::std::string::String>
16758 for PostGetIndexerHealthBodyMethod {
16759 type Error = self::error::ConversionError;
16760 fn try_from(
16761 value: ::std::string::String,
16762 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16763 value.parse()
16764 }
16765 }
16766 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16816 pub struct PostGetIndexerHealthResponse {
16817 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16818 pub error: ::std::option::Option<PostGetIndexerHealthResponseError>,
16819 pub id: PostGetIndexerHealthResponseId,
16821 pub jsonrpc: PostGetIndexerHealthResponseJsonrpc,
16823 #[serde(default = "defaults::post_get_indexer_health_response_result")]
16825 pub result: PostGetIndexerHealthResponseResult,
16826 }
16827 impl PostGetIndexerHealthResponse {
16828 pub fn builder() -> builder::PostGetIndexerHealthResponse {
16829 Default::default()
16830 }
16831 }
16832 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16851 pub struct PostGetIndexerHealthResponseError {
16852 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16853 pub code: ::std::option::Option<i64>,
16854 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16855 pub message: ::std::option::Option<::std::string::String>,
16856 }
16857 impl ::std::default::Default for PostGetIndexerHealthResponseError {
16858 fn default() -> Self {
16859 Self {
16860 code: Default::default(),
16861 message: Default::default(),
16862 }
16863 }
16864 }
16865 impl PostGetIndexerHealthResponseError {
16866 pub fn builder() -> builder::PostGetIndexerHealthResponseError {
16867 Default::default()
16868 }
16869 }
16870 #[derive(
16885 ::serde::Deserialize,
16886 ::serde::Serialize,
16887 Clone,
16888 Copy,
16889 Debug,
16890 Eq,
16891 Hash,
16892 Ord,
16893 PartialEq,
16894 PartialOrd
16895 )]
16896 pub enum PostGetIndexerHealthResponseId {
16897 #[serde(rename = "test-account")]
16898 TestAccount,
16899 }
16900 impl ::std::fmt::Display for PostGetIndexerHealthResponseId {
16901 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16902 match *self {
16903 Self::TestAccount => f.write_str("test-account"),
16904 }
16905 }
16906 }
16907 impl ::std::str::FromStr for PostGetIndexerHealthResponseId {
16908 type Err = self::error::ConversionError;
16909 fn from_str(
16910 value: &str,
16911 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16912 match value {
16913 "test-account" => Ok(Self::TestAccount),
16914 _ => Err("invalid value".into()),
16915 }
16916 }
16917 }
16918 impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthResponseId {
16919 type Error = self::error::ConversionError;
16920 fn try_from(
16921 value: &str,
16922 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16923 value.parse()
16924 }
16925 }
16926 impl ::std::convert::TryFrom<&::std::string::String>
16927 for PostGetIndexerHealthResponseId {
16928 type Error = self::error::ConversionError;
16929 fn try_from(
16930 value: &::std::string::String,
16931 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16932 value.parse()
16933 }
16934 }
16935 impl ::std::convert::TryFrom<::std::string::String>
16936 for PostGetIndexerHealthResponseId {
16937 type Error = self::error::ConversionError;
16938 fn try_from(
16939 value: ::std::string::String,
16940 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16941 value.parse()
16942 }
16943 }
16944 #[derive(
16959 ::serde::Deserialize,
16960 ::serde::Serialize,
16961 Clone,
16962 Copy,
16963 Debug,
16964 Eq,
16965 Hash,
16966 Ord,
16967 PartialEq,
16968 PartialOrd
16969 )]
16970 pub enum PostGetIndexerHealthResponseJsonrpc {
16971 #[serde(rename = "2.0")]
16972 X20,
16973 }
16974 impl ::std::fmt::Display for PostGetIndexerHealthResponseJsonrpc {
16975 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16976 match *self {
16977 Self::X20 => f.write_str("2.0"),
16978 }
16979 }
16980 }
16981 impl ::std::str::FromStr for PostGetIndexerHealthResponseJsonrpc {
16982 type Err = self::error::ConversionError;
16983 fn from_str(
16984 value: &str,
16985 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16986 match value {
16987 "2.0" => Ok(Self::X20),
16988 _ => Err("invalid value".into()),
16989 }
16990 }
16991 }
16992 impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthResponseJsonrpc {
16993 type Error = self::error::ConversionError;
16994 fn try_from(
16995 value: &str,
16996 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16997 value.parse()
16998 }
16999 }
17000 impl ::std::convert::TryFrom<&::std::string::String>
17001 for PostGetIndexerHealthResponseJsonrpc {
17002 type Error = self::error::ConversionError;
17003 fn try_from(
17004 value: &::std::string::String,
17005 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17006 value.parse()
17007 }
17008 }
17009 impl ::std::convert::TryFrom<::std::string::String>
17010 for PostGetIndexerHealthResponseJsonrpc {
17011 type Error = self::error::ConversionError;
17012 fn try_from(
17013 value: ::std::string::String,
17014 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17015 value.parse()
17016 }
17017 }
17018 #[derive(
17034 ::serde::Deserialize,
17035 ::serde::Serialize,
17036 Clone,
17037 Copy,
17038 Debug,
17039 Eq,
17040 Hash,
17041 Ord,
17042 PartialEq,
17043 PartialOrd
17044 )]
17045 pub enum PostGetIndexerHealthResponseResult {
17046 #[serde(rename = "ok")]
17047 Ok,
17048 }
17049 impl ::std::fmt::Display for PostGetIndexerHealthResponseResult {
17050 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17051 match *self {
17052 Self::Ok => f.write_str("ok"),
17053 }
17054 }
17055 }
17056 impl ::std::str::FromStr for PostGetIndexerHealthResponseResult {
17057 type Err = self::error::ConversionError;
17058 fn from_str(
17059 value: &str,
17060 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17061 match value {
17062 "ok" => Ok(Self::Ok),
17063 _ => Err("invalid value".into()),
17064 }
17065 }
17066 }
17067 impl ::std::convert::TryFrom<&str> for PostGetIndexerHealthResponseResult {
17068 type Error = self::error::ConversionError;
17069 fn try_from(
17070 value: &str,
17071 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17072 value.parse()
17073 }
17074 }
17075 impl ::std::convert::TryFrom<&::std::string::String>
17076 for PostGetIndexerHealthResponseResult {
17077 type Error = self::error::ConversionError;
17078 fn try_from(
17079 value: &::std::string::String,
17080 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17081 value.parse()
17082 }
17083 }
17084 impl ::std::convert::TryFrom<::std::string::String>
17085 for PostGetIndexerHealthResponseResult {
17086 type Error = self::error::ConversionError;
17087 fn try_from(
17088 value: ::std::string::String,
17089 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17090 value.parse()
17091 }
17092 }
17093 impl ::std::default::Default for PostGetIndexerHealthResponseResult {
17094 fn default() -> Self {
17095 PostGetIndexerHealthResponseResult::Ok
17096 }
17097 }
17098 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17137 pub struct PostGetIndexerSlotBody {
17138 pub id: PostGetIndexerSlotBodyId,
17140 pub jsonrpc: PostGetIndexerSlotBodyJsonrpc,
17142 pub method: PostGetIndexerSlotBodyMethod,
17144 }
17145 impl PostGetIndexerSlotBody {
17146 pub fn builder() -> builder::PostGetIndexerSlotBody {
17147 Default::default()
17148 }
17149 }
17150 #[derive(
17165 ::serde::Deserialize,
17166 ::serde::Serialize,
17167 Clone,
17168 Copy,
17169 Debug,
17170 Eq,
17171 Hash,
17172 Ord,
17173 PartialEq,
17174 PartialOrd
17175 )]
17176 pub enum PostGetIndexerSlotBodyId {
17177 #[serde(rename = "test-account")]
17178 TestAccount,
17179 }
17180 impl ::std::fmt::Display for PostGetIndexerSlotBodyId {
17181 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17182 match *self {
17183 Self::TestAccount => f.write_str("test-account"),
17184 }
17185 }
17186 }
17187 impl ::std::str::FromStr for PostGetIndexerSlotBodyId {
17188 type Err = self::error::ConversionError;
17189 fn from_str(
17190 value: &str,
17191 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17192 match value {
17193 "test-account" => Ok(Self::TestAccount),
17194 _ => Err("invalid value".into()),
17195 }
17196 }
17197 }
17198 impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotBodyId {
17199 type Error = self::error::ConversionError;
17200 fn try_from(
17201 value: &str,
17202 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17203 value.parse()
17204 }
17205 }
17206 impl ::std::convert::TryFrom<&::std::string::String> for PostGetIndexerSlotBodyId {
17207 type Error = self::error::ConversionError;
17208 fn try_from(
17209 value: &::std::string::String,
17210 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17211 value.parse()
17212 }
17213 }
17214 impl ::std::convert::TryFrom<::std::string::String> for PostGetIndexerSlotBodyId {
17215 type Error = self::error::ConversionError;
17216 fn try_from(
17217 value: ::std::string::String,
17218 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17219 value.parse()
17220 }
17221 }
17222 #[derive(
17237 ::serde::Deserialize,
17238 ::serde::Serialize,
17239 Clone,
17240 Copy,
17241 Debug,
17242 Eq,
17243 Hash,
17244 Ord,
17245 PartialEq,
17246 PartialOrd
17247 )]
17248 pub enum PostGetIndexerSlotBodyJsonrpc {
17249 #[serde(rename = "2.0")]
17250 X20,
17251 }
17252 impl ::std::fmt::Display for PostGetIndexerSlotBodyJsonrpc {
17253 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17254 match *self {
17255 Self::X20 => f.write_str("2.0"),
17256 }
17257 }
17258 }
17259 impl ::std::str::FromStr for PostGetIndexerSlotBodyJsonrpc {
17260 type Err = self::error::ConversionError;
17261 fn from_str(
17262 value: &str,
17263 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17264 match value {
17265 "2.0" => Ok(Self::X20),
17266 _ => Err("invalid value".into()),
17267 }
17268 }
17269 }
17270 impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotBodyJsonrpc {
17271 type Error = self::error::ConversionError;
17272 fn try_from(
17273 value: &str,
17274 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17275 value.parse()
17276 }
17277 }
17278 impl ::std::convert::TryFrom<&::std::string::String>
17279 for PostGetIndexerSlotBodyJsonrpc {
17280 type Error = self::error::ConversionError;
17281 fn try_from(
17282 value: &::std::string::String,
17283 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17284 value.parse()
17285 }
17286 }
17287 impl ::std::convert::TryFrom<::std::string::String>
17288 for PostGetIndexerSlotBodyJsonrpc {
17289 type Error = self::error::ConversionError;
17290 fn try_from(
17291 value: ::std::string::String,
17292 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17293 value.parse()
17294 }
17295 }
17296 #[derive(
17311 ::serde::Deserialize,
17312 ::serde::Serialize,
17313 Clone,
17314 Copy,
17315 Debug,
17316 Eq,
17317 Hash,
17318 Ord,
17319 PartialEq,
17320 PartialOrd
17321 )]
17322 pub enum PostGetIndexerSlotBodyMethod {
17323 #[serde(rename = "getIndexerSlot")]
17324 GetIndexerSlot,
17325 }
17326 impl ::std::fmt::Display for PostGetIndexerSlotBodyMethod {
17327 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17328 match *self {
17329 Self::GetIndexerSlot => f.write_str("getIndexerSlot"),
17330 }
17331 }
17332 }
17333 impl ::std::str::FromStr for PostGetIndexerSlotBodyMethod {
17334 type Err = self::error::ConversionError;
17335 fn from_str(
17336 value: &str,
17337 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17338 match value {
17339 "getIndexerSlot" => Ok(Self::GetIndexerSlot),
17340 _ => Err("invalid value".into()),
17341 }
17342 }
17343 }
17344 impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotBodyMethod {
17345 type Error = self::error::ConversionError;
17346 fn try_from(
17347 value: &str,
17348 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17349 value.parse()
17350 }
17351 }
17352 impl ::std::convert::TryFrom<&::std::string::String>
17353 for PostGetIndexerSlotBodyMethod {
17354 type Error = self::error::ConversionError;
17355 fn try_from(
17356 value: &::std::string::String,
17357 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17358 value.parse()
17359 }
17360 }
17361 impl ::std::convert::TryFrom<::std::string::String>
17362 for PostGetIndexerSlotBodyMethod {
17363 type Error = self::error::ConversionError;
17364 fn try_from(
17365 value: ::std::string::String,
17366 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17367 value.parse()
17368 }
17369 }
17370 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17420 pub struct PostGetIndexerSlotResponse {
17421 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17422 pub error: ::std::option::Option<PostGetIndexerSlotResponseError>,
17423 pub id: PostGetIndexerSlotResponseId,
17425 pub jsonrpc: PostGetIndexerSlotResponseJsonrpc,
17427 #[serde(default = "defaults::default_u64::<u64, 100>")]
17428 pub result: u64,
17429 }
17430 impl PostGetIndexerSlotResponse {
17431 pub fn builder() -> builder::PostGetIndexerSlotResponse {
17432 Default::default()
17433 }
17434 }
17435 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17454 pub struct PostGetIndexerSlotResponseError {
17455 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17456 pub code: ::std::option::Option<i64>,
17457 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17458 pub message: ::std::option::Option<::std::string::String>,
17459 }
17460 impl ::std::default::Default for PostGetIndexerSlotResponseError {
17461 fn default() -> Self {
17462 Self {
17463 code: Default::default(),
17464 message: Default::default(),
17465 }
17466 }
17467 }
17468 impl PostGetIndexerSlotResponseError {
17469 pub fn builder() -> builder::PostGetIndexerSlotResponseError {
17470 Default::default()
17471 }
17472 }
17473 #[derive(
17488 ::serde::Deserialize,
17489 ::serde::Serialize,
17490 Clone,
17491 Copy,
17492 Debug,
17493 Eq,
17494 Hash,
17495 Ord,
17496 PartialEq,
17497 PartialOrd
17498 )]
17499 pub enum PostGetIndexerSlotResponseId {
17500 #[serde(rename = "test-account")]
17501 TestAccount,
17502 }
17503 impl ::std::fmt::Display for PostGetIndexerSlotResponseId {
17504 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17505 match *self {
17506 Self::TestAccount => f.write_str("test-account"),
17507 }
17508 }
17509 }
17510 impl ::std::str::FromStr for PostGetIndexerSlotResponseId {
17511 type Err = self::error::ConversionError;
17512 fn from_str(
17513 value: &str,
17514 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17515 match value {
17516 "test-account" => Ok(Self::TestAccount),
17517 _ => Err("invalid value".into()),
17518 }
17519 }
17520 }
17521 impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotResponseId {
17522 type Error = self::error::ConversionError;
17523 fn try_from(
17524 value: &str,
17525 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17526 value.parse()
17527 }
17528 }
17529 impl ::std::convert::TryFrom<&::std::string::String>
17530 for PostGetIndexerSlotResponseId {
17531 type Error = self::error::ConversionError;
17532 fn try_from(
17533 value: &::std::string::String,
17534 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17535 value.parse()
17536 }
17537 }
17538 impl ::std::convert::TryFrom<::std::string::String>
17539 for PostGetIndexerSlotResponseId {
17540 type Error = self::error::ConversionError;
17541 fn try_from(
17542 value: ::std::string::String,
17543 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17544 value.parse()
17545 }
17546 }
17547 #[derive(
17562 ::serde::Deserialize,
17563 ::serde::Serialize,
17564 Clone,
17565 Copy,
17566 Debug,
17567 Eq,
17568 Hash,
17569 Ord,
17570 PartialEq,
17571 PartialOrd
17572 )]
17573 pub enum PostGetIndexerSlotResponseJsonrpc {
17574 #[serde(rename = "2.0")]
17575 X20,
17576 }
17577 impl ::std::fmt::Display for PostGetIndexerSlotResponseJsonrpc {
17578 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17579 match *self {
17580 Self::X20 => f.write_str("2.0"),
17581 }
17582 }
17583 }
17584 impl ::std::str::FromStr for PostGetIndexerSlotResponseJsonrpc {
17585 type Err = self::error::ConversionError;
17586 fn from_str(
17587 value: &str,
17588 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17589 match value {
17590 "2.0" => Ok(Self::X20),
17591 _ => Err("invalid value".into()),
17592 }
17593 }
17594 }
17595 impl ::std::convert::TryFrom<&str> for PostGetIndexerSlotResponseJsonrpc {
17596 type Error = self::error::ConversionError;
17597 fn try_from(
17598 value: &str,
17599 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17600 value.parse()
17601 }
17602 }
17603 impl ::std::convert::TryFrom<&::std::string::String>
17604 for PostGetIndexerSlotResponseJsonrpc {
17605 type Error = self::error::ConversionError;
17606 fn try_from(
17607 value: &::std::string::String,
17608 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17609 value.parse()
17610 }
17611 }
17612 impl ::std::convert::TryFrom<::std::string::String>
17613 for PostGetIndexerSlotResponseJsonrpc {
17614 type Error = self::error::ConversionError;
17615 fn try_from(
17616 value: ::std::string::String,
17617 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17618 value.parse()
17619 }
17620 }
17621 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17687 pub struct PostGetLatestCompressionSignaturesBody {
17688 pub id: PostGetLatestCompressionSignaturesBodyId,
17690 pub jsonrpc: PostGetLatestCompressionSignaturesBodyJsonrpc,
17692 pub method: PostGetLatestCompressionSignaturesBodyMethod,
17694 pub params: PostGetLatestCompressionSignaturesBodyParams,
17695 }
17696 impl PostGetLatestCompressionSignaturesBody {
17697 pub fn builder() -> builder::PostGetLatestCompressionSignaturesBody {
17698 Default::default()
17699 }
17700 }
17701 #[derive(
17716 ::serde::Deserialize,
17717 ::serde::Serialize,
17718 Clone,
17719 Copy,
17720 Debug,
17721 Eq,
17722 Hash,
17723 Ord,
17724 PartialEq,
17725 PartialOrd
17726 )]
17727 pub enum PostGetLatestCompressionSignaturesBodyId {
17728 #[serde(rename = "test-account")]
17729 TestAccount,
17730 }
17731 impl ::std::fmt::Display for PostGetLatestCompressionSignaturesBodyId {
17732 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17733 match *self {
17734 Self::TestAccount => f.write_str("test-account"),
17735 }
17736 }
17737 }
17738 impl ::std::str::FromStr for PostGetLatestCompressionSignaturesBodyId {
17739 type Err = self::error::ConversionError;
17740 fn from_str(
17741 value: &str,
17742 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17743 match value {
17744 "test-account" => Ok(Self::TestAccount),
17745 _ => Err("invalid value".into()),
17746 }
17747 }
17748 }
17749 impl ::std::convert::TryFrom<&str> for PostGetLatestCompressionSignaturesBodyId {
17750 type Error = self::error::ConversionError;
17751 fn try_from(
17752 value: &str,
17753 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17754 value.parse()
17755 }
17756 }
17757 impl ::std::convert::TryFrom<&::std::string::String>
17758 for PostGetLatestCompressionSignaturesBodyId {
17759 type Error = self::error::ConversionError;
17760 fn try_from(
17761 value: &::std::string::String,
17762 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17763 value.parse()
17764 }
17765 }
17766 impl ::std::convert::TryFrom<::std::string::String>
17767 for PostGetLatestCompressionSignaturesBodyId {
17768 type Error = self::error::ConversionError;
17769 fn try_from(
17770 value: ::std::string::String,
17771 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17772 value.parse()
17773 }
17774 }
17775 #[derive(
17790 ::serde::Deserialize,
17791 ::serde::Serialize,
17792 Clone,
17793 Copy,
17794 Debug,
17795 Eq,
17796 Hash,
17797 Ord,
17798 PartialEq,
17799 PartialOrd
17800 )]
17801 pub enum PostGetLatestCompressionSignaturesBodyJsonrpc {
17802 #[serde(rename = "2.0")]
17803 X20,
17804 }
17805 impl ::std::fmt::Display for PostGetLatestCompressionSignaturesBodyJsonrpc {
17806 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17807 match *self {
17808 Self::X20 => f.write_str("2.0"),
17809 }
17810 }
17811 }
17812 impl ::std::str::FromStr for PostGetLatestCompressionSignaturesBodyJsonrpc {
17813 type Err = self::error::ConversionError;
17814 fn from_str(
17815 value: &str,
17816 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17817 match value {
17818 "2.0" => Ok(Self::X20),
17819 _ => Err("invalid value".into()),
17820 }
17821 }
17822 }
17823 impl ::std::convert::TryFrom<&str>
17824 for PostGetLatestCompressionSignaturesBodyJsonrpc {
17825 type Error = self::error::ConversionError;
17826 fn try_from(
17827 value: &str,
17828 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17829 value.parse()
17830 }
17831 }
17832 impl ::std::convert::TryFrom<&::std::string::String>
17833 for PostGetLatestCompressionSignaturesBodyJsonrpc {
17834 type Error = self::error::ConversionError;
17835 fn try_from(
17836 value: &::std::string::String,
17837 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17838 value.parse()
17839 }
17840 }
17841 impl ::std::convert::TryFrom<::std::string::String>
17842 for PostGetLatestCompressionSignaturesBodyJsonrpc {
17843 type Error = self::error::ConversionError;
17844 fn try_from(
17845 value: ::std::string::String,
17846 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17847 value.parse()
17848 }
17849 }
17850 #[derive(
17865 ::serde::Deserialize,
17866 ::serde::Serialize,
17867 Clone,
17868 Copy,
17869 Debug,
17870 Eq,
17871 Hash,
17872 Ord,
17873 PartialEq,
17874 PartialOrd
17875 )]
17876 pub enum PostGetLatestCompressionSignaturesBodyMethod {
17877 #[serde(rename = "getLatestCompressionSignatures")]
17878 GetLatestCompressionSignatures,
17879 }
17880 impl ::std::fmt::Display for PostGetLatestCompressionSignaturesBodyMethod {
17881 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17882 match *self {
17883 Self::GetLatestCompressionSignatures => {
17884 f.write_str("getLatestCompressionSignatures")
17885 }
17886 }
17887 }
17888 }
17889 impl ::std::str::FromStr for PostGetLatestCompressionSignaturesBodyMethod {
17890 type Err = self::error::ConversionError;
17891 fn from_str(
17892 value: &str,
17893 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17894 match value {
17895 "getLatestCompressionSignatures" => {
17896 Ok(Self::GetLatestCompressionSignatures)
17897 }
17898 _ => Err("invalid value".into()),
17899 }
17900 }
17901 }
17902 impl ::std::convert::TryFrom<&str> for PostGetLatestCompressionSignaturesBodyMethod {
17903 type Error = self::error::ConversionError;
17904 fn try_from(
17905 value: &str,
17906 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17907 value.parse()
17908 }
17909 }
17910 impl ::std::convert::TryFrom<&::std::string::String>
17911 for PostGetLatestCompressionSignaturesBodyMethod {
17912 type Error = self::error::ConversionError;
17913 fn try_from(
17914 value: &::std::string::String,
17915 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17916 value.parse()
17917 }
17918 }
17919 impl ::std::convert::TryFrom<::std::string::String>
17920 for PostGetLatestCompressionSignaturesBodyMethod {
17921 type Error = self::error::ConversionError;
17922 fn try_from(
17923 value: ::std::string::String,
17924 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17925 value.parse()
17926 }
17927 }
17928 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17962 #[serde(deny_unknown_fields)]
17963 pub struct PostGetLatestCompressionSignaturesBodyParams {
17964 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17965 pub cursor: ::std::option::Option<::std::string::String>,
17966 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17967 pub limit: ::std::option::Option<Limit>,
17968 }
17969 impl ::std::default::Default for PostGetLatestCompressionSignaturesBodyParams {
17970 fn default() -> Self {
17971 Self {
17972 cursor: Default::default(),
17973 limit: Default::default(),
17974 }
17975 }
17976 }
17977 impl PostGetLatestCompressionSignaturesBodyParams {
17978 pub fn builder() -> builder::PostGetLatestCompressionSignaturesBodyParams {
17979 Default::default()
17980 }
17981 }
17982 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18040 pub struct PostGetLatestCompressionSignaturesResponse {
18041 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18042 pub error: ::std::option::Option<
18043 PostGetLatestCompressionSignaturesResponseError,
18044 >,
18045 pub id: PostGetLatestCompressionSignaturesResponseId,
18047 pub jsonrpc: PostGetLatestCompressionSignaturesResponseJsonrpc,
18049 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18050 pub result: ::std::option::Option<
18051 PostGetLatestCompressionSignaturesResponseResult,
18052 >,
18053 }
18054 impl PostGetLatestCompressionSignaturesResponse {
18055 pub fn builder() -> builder::PostGetLatestCompressionSignaturesResponse {
18056 Default::default()
18057 }
18058 }
18059 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18078 pub struct PostGetLatestCompressionSignaturesResponseError {
18079 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18080 pub code: ::std::option::Option<i64>,
18081 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18082 pub message: ::std::option::Option<::std::string::String>,
18083 }
18084 impl ::std::default::Default for PostGetLatestCompressionSignaturesResponseError {
18085 fn default() -> Self {
18086 Self {
18087 code: Default::default(),
18088 message: Default::default(),
18089 }
18090 }
18091 }
18092 impl PostGetLatestCompressionSignaturesResponseError {
18093 pub fn builder() -> builder::PostGetLatestCompressionSignaturesResponseError {
18094 Default::default()
18095 }
18096 }
18097 #[derive(
18112 ::serde::Deserialize,
18113 ::serde::Serialize,
18114 Clone,
18115 Copy,
18116 Debug,
18117 Eq,
18118 Hash,
18119 Ord,
18120 PartialEq,
18121 PartialOrd
18122 )]
18123 pub enum PostGetLatestCompressionSignaturesResponseId {
18124 #[serde(rename = "test-account")]
18125 TestAccount,
18126 }
18127 impl ::std::fmt::Display for PostGetLatestCompressionSignaturesResponseId {
18128 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18129 match *self {
18130 Self::TestAccount => f.write_str("test-account"),
18131 }
18132 }
18133 }
18134 impl ::std::str::FromStr for PostGetLatestCompressionSignaturesResponseId {
18135 type Err = self::error::ConversionError;
18136 fn from_str(
18137 value: &str,
18138 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18139 match value {
18140 "test-account" => Ok(Self::TestAccount),
18141 _ => Err("invalid value".into()),
18142 }
18143 }
18144 }
18145 impl ::std::convert::TryFrom<&str> for PostGetLatestCompressionSignaturesResponseId {
18146 type Error = self::error::ConversionError;
18147 fn try_from(
18148 value: &str,
18149 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18150 value.parse()
18151 }
18152 }
18153 impl ::std::convert::TryFrom<&::std::string::String>
18154 for PostGetLatestCompressionSignaturesResponseId {
18155 type Error = self::error::ConversionError;
18156 fn try_from(
18157 value: &::std::string::String,
18158 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18159 value.parse()
18160 }
18161 }
18162 impl ::std::convert::TryFrom<::std::string::String>
18163 for PostGetLatestCompressionSignaturesResponseId {
18164 type Error = self::error::ConversionError;
18165 fn try_from(
18166 value: ::std::string::String,
18167 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18168 value.parse()
18169 }
18170 }
18171 #[derive(
18186 ::serde::Deserialize,
18187 ::serde::Serialize,
18188 Clone,
18189 Copy,
18190 Debug,
18191 Eq,
18192 Hash,
18193 Ord,
18194 PartialEq,
18195 PartialOrd
18196 )]
18197 pub enum PostGetLatestCompressionSignaturesResponseJsonrpc {
18198 #[serde(rename = "2.0")]
18199 X20,
18200 }
18201 impl ::std::fmt::Display for PostGetLatestCompressionSignaturesResponseJsonrpc {
18202 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18203 match *self {
18204 Self::X20 => f.write_str("2.0"),
18205 }
18206 }
18207 }
18208 impl ::std::str::FromStr for PostGetLatestCompressionSignaturesResponseJsonrpc {
18209 type Err = self::error::ConversionError;
18210 fn from_str(
18211 value: &str,
18212 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18213 match value {
18214 "2.0" => Ok(Self::X20),
18215 _ => Err("invalid value".into()),
18216 }
18217 }
18218 }
18219 impl ::std::convert::TryFrom<&str>
18220 for PostGetLatestCompressionSignaturesResponseJsonrpc {
18221 type Error = self::error::ConversionError;
18222 fn try_from(
18223 value: &str,
18224 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18225 value.parse()
18226 }
18227 }
18228 impl ::std::convert::TryFrom<&::std::string::String>
18229 for PostGetLatestCompressionSignaturesResponseJsonrpc {
18230 type Error = self::error::ConversionError;
18231 fn try_from(
18232 value: &::std::string::String,
18233 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18234 value.parse()
18235 }
18236 }
18237 impl ::std::convert::TryFrom<::std::string::String>
18238 for PostGetLatestCompressionSignaturesResponseJsonrpc {
18239 type Error = self::error::ConversionError;
18240 fn try_from(
18241 value: ::std::string::String,
18242 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18243 value.parse()
18244 }
18245 }
18246 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18270 #[serde(deny_unknown_fields)]
18271 pub struct PostGetLatestCompressionSignaturesResponseResult {
18272 pub context: Context,
18273 pub value: PaginatedSignatureInfoList,
18274 }
18275 impl PostGetLatestCompressionSignaturesResponseResult {
18276 pub fn builder() -> builder::PostGetLatestCompressionSignaturesResponseResult {
18277 Default::default()
18278 }
18279 }
18280 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18346 pub struct PostGetLatestNonVotingSignaturesBody {
18347 pub id: PostGetLatestNonVotingSignaturesBodyId,
18349 pub jsonrpc: PostGetLatestNonVotingSignaturesBodyJsonrpc,
18351 pub method: PostGetLatestNonVotingSignaturesBodyMethod,
18353 pub params: PostGetLatestNonVotingSignaturesBodyParams,
18354 }
18355 impl PostGetLatestNonVotingSignaturesBody {
18356 pub fn builder() -> builder::PostGetLatestNonVotingSignaturesBody {
18357 Default::default()
18358 }
18359 }
18360 #[derive(
18375 ::serde::Deserialize,
18376 ::serde::Serialize,
18377 Clone,
18378 Copy,
18379 Debug,
18380 Eq,
18381 Hash,
18382 Ord,
18383 PartialEq,
18384 PartialOrd
18385 )]
18386 pub enum PostGetLatestNonVotingSignaturesBodyId {
18387 #[serde(rename = "test-account")]
18388 TestAccount,
18389 }
18390 impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesBodyId {
18391 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18392 match *self {
18393 Self::TestAccount => f.write_str("test-account"),
18394 }
18395 }
18396 }
18397 impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesBodyId {
18398 type Err = self::error::ConversionError;
18399 fn from_str(
18400 value: &str,
18401 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18402 match value {
18403 "test-account" => Ok(Self::TestAccount),
18404 _ => Err("invalid value".into()),
18405 }
18406 }
18407 }
18408 impl ::std::convert::TryFrom<&str> for PostGetLatestNonVotingSignaturesBodyId {
18409 type Error = self::error::ConversionError;
18410 fn try_from(
18411 value: &str,
18412 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18413 value.parse()
18414 }
18415 }
18416 impl ::std::convert::TryFrom<&::std::string::String>
18417 for PostGetLatestNonVotingSignaturesBodyId {
18418 type Error = self::error::ConversionError;
18419 fn try_from(
18420 value: &::std::string::String,
18421 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18422 value.parse()
18423 }
18424 }
18425 impl ::std::convert::TryFrom<::std::string::String>
18426 for PostGetLatestNonVotingSignaturesBodyId {
18427 type Error = self::error::ConversionError;
18428 fn try_from(
18429 value: ::std::string::String,
18430 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18431 value.parse()
18432 }
18433 }
18434 #[derive(
18449 ::serde::Deserialize,
18450 ::serde::Serialize,
18451 Clone,
18452 Copy,
18453 Debug,
18454 Eq,
18455 Hash,
18456 Ord,
18457 PartialEq,
18458 PartialOrd
18459 )]
18460 pub enum PostGetLatestNonVotingSignaturesBodyJsonrpc {
18461 #[serde(rename = "2.0")]
18462 X20,
18463 }
18464 impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesBodyJsonrpc {
18465 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18466 match *self {
18467 Self::X20 => f.write_str("2.0"),
18468 }
18469 }
18470 }
18471 impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesBodyJsonrpc {
18472 type Err = self::error::ConversionError;
18473 fn from_str(
18474 value: &str,
18475 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18476 match value {
18477 "2.0" => Ok(Self::X20),
18478 _ => Err("invalid value".into()),
18479 }
18480 }
18481 }
18482 impl ::std::convert::TryFrom<&str> for PostGetLatestNonVotingSignaturesBodyJsonrpc {
18483 type Error = self::error::ConversionError;
18484 fn try_from(
18485 value: &str,
18486 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18487 value.parse()
18488 }
18489 }
18490 impl ::std::convert::TryFrom<&::std::string::String>
18491 for PostGetLatestNonVotingSignaturesBodyJsonrpc {
18492 type Error = self::error::ConversionError;
18493 fn try_from(
18494 value: &::std::string::String,
18495 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18496 value.parse()
18497 }
18498 }
18499 impl ::std::convert::TryFrom<::std::string::String>
18500 for PostGetLatestNonVotingSignaturesBodyJsonrpc {
18501 type Error = self::error::ConversionError;
18502 fn try_from(
18503 value: ::std::string::String,
18504 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18505 value.parse()
18506 }
18507 }
18508 #[derive(
18523 ::serde::Deserialize,
18524 ::serde::Serialize,
18525 Clone,
18526 Copy,
18527 Debug,
18528 Eq,
18529 Hash,
18530 Ord,
18531 PartialEq,
18532 PartialOrd
18533 )]
18534 pub enum PostGetLatestNonVotingSignaturesBodyMethod {
18535 #[serde(rename = "getLatestNonVotingSignatures")]
18536 GetLatestNonVotingSignatures,
18537 }
18538 impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesBodyMethod {
18539 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18540 match *self {
18541 Self::GetLatestNonVotingSignatures => {
18542 f.write_str("getLatestNonVotingSignatures")
18543 }
18544 }
18545 }
18546 }
18547 impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesBodyMethod {
18548 type Err = self::error::ConversionError;
18549 fn from_str(
18550 value: &str,
18551 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18552 match value {
18553 "getLatestNonVotingSignatures" => Ok(Self::GetLatestNonVotingSignatures),
18554 _ => Err("invalid value".into()),
18555 }
18556 }
18557 }
18558 impl ::std::convert::TryFrom<&str> for PostGetLatestNonVotingSignaturesBodyMethod {
18559 type Error = self::error::ConversionError;
18560 fn try_from(
18561 value: &str,
18562 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18563 value.parse()
18564 }
18565 }
18566 impl ::std::convert::TryFrom<&::std::string::String>
18567 for PostGetLatestNonVotingSignaturesBodyMethod {
18568 type Error = self::error::ConversionError;
18569 fn try_from(
18570 value: &::std::string::String,
18571 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18572 value.parse()
18573 }
18574 }
18575 impl ::std::convert::TryFrom<::std::string::String>
18576 for PostGetLatestNonVotingSignaturesBodyMethod {
18577 type Error = self::error::ConversionError;
18578 fn try_from(
18579 value: ::std::string::String,
18580 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18581 value.parse()
18582 }
18583 }
18584 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18618 #[serde(deny_unknown_fields)]
18619 pub struct PostGetLatestNonVotingSignaturesBodyParams {
18620 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18621 pub cursor: ::std::option::Option<::std::string::String>,
18622 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18623 pub limit: ::std::option::Option<Limit>,
18624 }
18625 impl ::std::default::Default for PostGetLatestNonVotingSignaturesBodyParams {
18626 fn default() -> Self {
18627 Self {
18628 cursor: Default::default(),
18629 limit: Default::default(),
18630 }
18631 }
18632 }
18633 impl PostGetLatestNonVotingSignaturesBodyParams {
18634 pub fn builder() -> builder::PostGetLatestNonVotingSignaturesBodyParams {
18635 Default::default()
18636 }
18637 }
18638 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18696 pub struct PostGetLatestNonVotingSignaturesResponse {
18697 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18698 pub error: ::std::option::Option<PostGetLatestNonVotingSignaturesResponseError>,
18699 pub id: PostGetLatestNonVotingSignaturesResponseId,
18701 pub jsonrpc: PostGetLatestNonVotingSignaturesResponseJsonrpc,
18703 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18704 pub result: ::std::option::Option<
18705 PostGetLatestNonVotingSignaturesResponseResult,
18706 >,
18707 }
18708 impl PostGetLatestNonVotingSignaturesResponse {
18709 pub fn builder() -> builder::PostGetLatestNonVotingSignaturesResponse {
18710 Default::default()
18711 }
18712 }
18713 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18732 pub struct PostGetLatestNonVotingSignaturesResponseError {
18733 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18734 pub code: ::std::option::Option<i64>,
18735 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18736 pub message: ::std::option::Option<::std::string::String>,
18737 }
18738 impl ::std::default::Default for PostGetLatestNonVotingSignaturesResponseError {
18739 fn default() -> Self {
18740 Self {
18741 code: Default::default(),
18742 message: Default::default(),
18743 }
18744 }
18745 }
18746 impl PostGetLatestNonVotingSignaturesResponseError {
18747 pub fn builder() -> builder::PostGetLatestNonVotingSignaturesResponseError {
18748 Default::default()
18749 }
18750 }
18751 #[derive(
18766 ::serde::Deserialize,
18767 ::serde::Serialize,
18768 Clone,
18769 Copy,
18770 Debug,
18771 Eq,
18772 Hash,
18773 Ord,
18774 PartialEq,
18775 PartialOrd
18776 )]
18777 pub enum PostGetLatestNonVotingSignaturesResponseId {
18778 #[serde(rename = "test-account")]
18779 TestAccount,
18780 }
18781 impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesResponseId {
18782 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18783 match *self {
18784 Self::TestAccount => f.write_str("test-account"),
18785 }
18786 }
18787 }
18788 impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesResponseId {
18789 type Err = self::error::ConversionError;
18790 fn from_str(
18791 value: &str,
18792 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18793 match value {
18794 "test-account" => Ok(Self::TestAccount),
18795 _ => Err("invalid value".into()),
18796 }
18797 }
18798 }
18799 impl ::std::convert::TryFrom<&str> for PostGetLatestNonVotingSignaturesResponseId {
18800 type Error = self::error::ConversionError;
18801 fn try_from(
18802 value: &str,
18803 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18804 value.parse()
18805 }
18806 }
18807 impl ::std::convert::TryFrom<&::std::string::String>
18808 for PostGetLatestNonVotingSignaturesResponseId {
18809 type Error = self::error::ConversionError;
18810 fn try_from(
18811 value: &::std::string::String,
18812 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18813 value.parse()
18814 }
18815 }
18816 impl ::std::convert::TryFrom<::std::string::String>
18817 for PostGetLatestNonVotingSignaturesResponseId {
18818 type Error = self::error::ConversionError;
18819 fn try_from(
18820 value: ::std::string::String,
18821 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18822 value.parse()
18823 }
18824 }
18825 #[derive(
18840 ::serde::Deserialize,
18841 ::serde::Serialize,
18842 Clone,
18843 Copy,
18844 Debug,
18845 Eq,
18846 Hash,
18847 Ord,
18848 PartialEq,
18849 PartialOrd
18850 )]
18851 pub enum PostGetLatestNonVotingSignaturesResponseJsonrpc {
18852 #[serde(rename = "2.0")]
18853 X20,
18854 }
18855 impl ::std::fmt::Display for PostGetLatestNonVotingSignaturesResponseJsonrpc {
18856 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18857 match *self {
18858 Self::X20 => f.write_str("2.0"),
18859 }
18860 }
18861 }
18862 impl ::std::str::FromStr for PostGetLatestNonVotingSignaturesResponseJsonrpc {
18863 type Err = self::error::ConversionError;
18864 fn from_str(
18865 value: &str,
18866 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18867 match value {
18868 "2.0" => Ok(Self::X20),
18869 _ => Err("invalid value".into()),
18870 }
18871 }
18872 }
18873 impl ::std::convert::TryFrom<&str>
18874 for PostGetLatestNonVotingSignaturesResponseJsonrpc {
18875 type Error = self::error::ConversionError;
18876 fn try_from(
18877 value: &str,
18878 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18879 value.parse()
18880 }
18881 }
18882 impl ::std::convert::TryFrom<&::std::string::String>
18883 for PostGetLatestNonVotingSignaturesResponseJsonrpc {
18884 type Error = self::error::ConversionError;
18885 fn try_from(
18886 value: &::std::string::String,
18887 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18888 value.parse()
18889 }
18890 }
18891 impl ::std::convert::TryFrom<::std::string::String>
18892 for PostGetLatestNonVotingSignaturesResponseJsonrpc {
18893 type Error = self::error::ConversionError;
18894 fn try_from(
18895 value: ::std::string::String,
18896 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18897 value.parse()
18898 }
18899 }
18900 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18924 #[serde(deny_unknown_fields)]
18925 pub struct PostGetLatestNonVotingSignaturesResponseResult {
18926 pub context: Context,
18927 pub value: SignatureInfoListWithError,
18928 }
18929 impl PostGetLatestNonVotingSignaturesResponseResult {
18930 pub fn builder() -> builder::PostGetLatestNonVotingSignaturesResponseResult {
18931 Default::default()
18932 }
18933 }
18934 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18991 pub struct PostGetMultipleAccountInterfacesBody {
18992 pub id: PostGetMultipleAccountInterfacesBodyId,
18994 pub jsonrpc: PostGetMultipleAccountInterfacesBodyJsonrpc,
18996 pub method: PostGetMultipleAccountInterfacesBodyMethod,
18998 pub params: PostGetMultipleAccountInterfacesBodyParams,
18999 }
19000 impl PostGetMultipleAccountInterfacesBody {
19001 pub fn builder() -> builder::PostGetMultipleAccountInterfacesBody {
19002 Default::default()
19003 }
19004 }
19005 #[derive(
19020 ::serde::Deserialize,
19021 ::serde::Serialize,
19022 Clone,
19023 Copy,
19024 Debug,
19025 Eq,
19026 Hash,
19027 Ord,
19028 PartialEq,
19029 PartialOrd
19030 )]
19031 pub enum PostGetMultipleAccountInterfacesBodyId {
19032 #[serde(rename = "test-account")]
19033 TestAccount,
19034 }
19035 impl ::std::fmt::Display for PostGetMultipleAccountInterfacesBodyId {
19036 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19037 match *self {
19038 Self::TestAccount => f.write_str("test-account"),
19039 }
19040 }
19041 }
19042 impl ::std::str::FromStr for PostGetMultipleAccountInterfacesBodyId {
19043 type Err = self::error::ConversionError;
19044 fn from_str(
19045 value: &str,
19046 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19047 match value {
19048 "test-account" => Ok(Self::TestAccount),
19049 _ => Err("invalid value".into()),
19050 }
19051 }
19052 }
19053 impl ::std::convert::TryFrom<&str> for PostGetMultipleAccountInterfacesBodyId {
19054 type Error = self::error::ConversionError;
19055 fn try_from(
19056 value: &str,
19057 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19058 value.parse()
19059 }
19060 }
19061 impl ::std::convert::TryFrom<&::std::string::String>
19062 for PostGetMultipleAccountInterfacesBodyId {
19063 type Error = self::error::ConversionError;
19064 fn try_from(
19065 value: &::std::string::String,
19066 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19067 value.parse()
19068 }
19069 }
19070 impl ::std::convert::TryFrom<::std::string::String>
19071 for PostGetMultipleAccountInterfacesBodyId {
19072 type Error = self::error::ConversionError;
19073 fn try_from(
19074 value: ::std::string::String,
19075 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19076 value.parse()
19077 }
19078 }
19079 #[derive(
19094 ::serde::Deserialize,
19095 ::serde::Serialize,
19096 Clone,
19097 Copy,
19098 Debug,
19099 Eq,
19100 Hash,
19101 Ord,
19102 PartialEq,
19103 PartialOrd
19104 )]
19105 pub enum PostGetMultipleAccountInterfacesBodyJsonrpc {
19106 #[serde(rename = "2.0")]
19107 X20,
19108 }
19109 impl ::std::fmt::Display for PostGetMultipleAccountInterfacesBodyJsonrpc {
19110 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19111 match *self {
19112 Self::X20 => f.write_str("2.0"),
19113 }
19114 }
19115 }
19116 impl ::std::str::FromStr for PostGetMultipleAccountInterfacesBodyJsonrpc {
19117 type Err = self::error::ConversionError;
19118 fn from_str(
19119 value: &str,
19120 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19121 match value {
19122 "2.0" => Ok(Self::X20),
19123 _ => Err("invalid value".into()),
19124 }
19125 }
19126 }
19127 impl ::std::convert::TryFrom<&str> for PostGetMultipleAccountInterfacesBodyJsonrpc {
19128 type Error = self::error::ConversionError;
19129 fn try_from(
19130 value: &str,
19131 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19132 value.parse()
19133 }
19134 }
19135 impl ::std::convert::TryFrom<&::std::string::String>
19136 for PostGetMultipleAccountInterfacesBodyJsonrpc {
19137 type Error = self::error::ConversionError;
19138 fn try_from(
19139 value: &::std::string::String,
19140 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19141 value.parse()
19142 }
19143 }
19144 impl ::std::convert::TryFrom<::std::string::String>
19145 for PostGetMultipleAccountInterfacesBodyJsonrpc {
19146 type Error = self::error::ConversionError;
19147 fn try_from(
19148 value: ::std::string::String,
19149 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19150 value.parse()
19151 }
19152 }
19153 #[derive(
19168 ::serde::Deserialize,
19169 ::serde::Serialize,
19170 Clone,
19171 Copy,
19172 Debug,
19173 Eq,
19174 Hash,
19175 Ord,
19176 PartialEq,
19177 PartialOrd
19178 )]
19179 pub enum PostGetMultipleAccountInterfacesBodyMethod {
19180 #[serde(rename = "getMultipleAccountInterfaces")]
19181 GetMultipleAccountInterfaces,
19182 }
19183 impl ::std::fmt::Display for PostGetMultipleAccountInterfacesBodyMethod {
19184 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19185 match *self {
19186 Self::GetMultipleAccountInterfaces => {
19187 f.write_str("getMultipleAccountInterfaces")
19188 }
19189 }
19190 }
19191 }
19192 impl ::std::str::FromStr for PostGetMultipleAccountInterfacesBodyMethod {
19193 type Err = self::error::ConversionError;
19194 fn from_str(
19195 value: &str,
19196 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19197 match value {
19198 "getMultipleAccountInterfaces" => Ok(Self::GetMultipleAccountInterfaces),
19199 _ => Err("invalid value".into()),
19200 }
19201 }
19202 }
19203 impl ::std::convert::TryFrom<&str> for PostGetMultipleAccountInterfacesBodyMethod {
19204 type Error = self::error::ConversionError;
19205 fn try_from(
19206 value: &str,
19207 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19208 value.parse()
19209 }
19210 }
19211 impl ::std::convert::TryFrom<&::std::string::String>
19212 for PostGetMultipleAccountInterfacesBodyMethod {
19213 type Error = self::error::ConversionError;
19214 fn try_from(
19215 value: &::std::string::String,
19216 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19217 value.parse()
19218 }
19219 }
19220 impl ::std::convert::TryFrom<::std::string::String>
19221 for PostGetMultipleAccountInterfacesBodyMethod {
19222 type Error = self::error::ConversionError;
19223 fn try_from(
19224 value: ::std::string::String,
19225 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19226 value.parse()
19227 }
19228 }
19229 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19254 #[serde(deny_unknown_fields)]
19255 pub struct PostGetMultipleAccountInterfacesBodyParams {
19256 pub addresses: ::std::vec::Vec<SerializablePubkey>,
19258 }
19259 impl PostGetMultipleAccountInterfacesBodyParams {
19260 pub fn builder() -> builder::PostGetMultipleAccountInterfacesBodyParams {
19261 Default::default()
19262 }
19263 }
19264 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19337 pub struct PostGetMultipleAccountInterfacesResponse {
19338 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19339 pub error: ::std::option::Option<PostGetMultipleAccountInterfacesResponseError>,
19340 pub id: PostGetMultipleAccountInterfacesResponseId,
19342 pub jsonrpc: PostGetMultipleAccountInterfacesResponseJsonrpc,
19344 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19345 pub result: ::std::option::Option<
19346 PostGetMultipleAccountInterfacesResponseResult,
19347 >,
19348 }
19349 impl PostGetMultipleAccountInterfacesResponse {
19350 pub fn builder() -> builder::PostGetMultipleAccountInterfacesResponse {
19351 Default::default()
19352 }
19353 }
19354 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19373 pub struct PostGetMultipleAccountInterfacesResponseError {
19374 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19375 pub code: ::std::option::Option<i64>,
19376 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19377 pub message: ::std::option::Option<::std::string::String>,
19378 }
19379 impl ::std::default::Default for PostGetMultipleAccountInterfacesResponseError {
19380 fn default() -> Self {
19381 Self {
19382 code: Default::default(),
19383 message: Default::default(),
19384 }
19385 }
19386 }
19387 impl PostGetMultipleAccountInterfacesResponseError {
19388 pub fn builder() -> builder::PostGetMultipleAccountInterfacesResponseError {
19389 Default::default()
19390 }
19391 }
19392 #[derive(
19407 ::serde::Deserialize,
19408 ::serde::Serialize,
19409 Clone,
19410 Copy,
19411 Debug,
19412 Eq,
19413 Hash,
19414 Ord,
19415 PartialEq,
19416 PartialOrd
19417 )]
19418 pub enum PostGetMultipleAccountInterfacesResponseId {
19419 #[serde(rename = "test-account")]
19420 TestAccount,
19421 }
19422 impl ::std::fmt::Display for PostGetMultipleAccountInterfacesResponseId {
19423 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19424 match *self {
19425 Self::TestAccount => f.write_str("test-account"),
19426 }
19427 }
19428 }
19429 impl ::std::str::FromStr for PostGetMultipleAccountInterfacesResponseId {
19430 type Err = self::error::ConversionError;
19431 fn from_str(
19432 value: &str,
19433 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19434 match value {
19435 "test-account" => Ok(Self::TestAccount),
19436 _ => Err("invalid value".into()),
19437 }
19438 }
19439 }
19440 impl ::std::convert::TryFrom<&str> for PostGetMultipleAccountInterfacesResponseId {
19441 type Error = self::error::ConversionError;
19442 fn try_from(
19443 value: &str,
19444 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19445 value.parse()
19446 }
19447 }
19448 impl ::std::convert::TryFrom<&::std::string::String>
19449 for PostGetMultipleAccountInterfacesResponseId {
19450 type Error = self::error::ConversionError;
19451 fn try_from(
19452 value: &::std::string::String,
19453 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19454 value.parse()
19455 }
19456 }
19457 impl ::std::convert::TryFrom<::std::string::String>
19458 for PostGetMultipleAccountInterfacesResponseId {
19459 type Error = self::error::ConversionError;
19460 fn try_from(
19461 value: ::std::string::String,
19462 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19463 value.parse()
19464 }
19465 }
19466 #[derive(
19481 ::serde::Deserialize,
19482 ::serde::Serialize,
19483 Clone,
19484 Copy,
19485 Debug,
19486 Eq,
19487 Hash,
19488 Ord,
19489 PartialEq,
19490 PartialOrd
19491 )]
19492 pub enum PostGetMultipleAccountInterfacesResponseJsonrpc {
19493 #[serde(rename = "2.0")]
19494 X20,
19495 }
19496 impl ::std::fmt::Display for PostGetMultipleAccountInterfacesResponseJsonrpc {
19497 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19498 match *self {
19499 Self::X20 => f.write_str("2.0"),
19500 }
19501 }
19502 }
19503 impl ::std::str::FromStr for PostGetMultipleAccountInterfacesResponseJsonrpc {
19504 type Err = self::error::ConversionError;
19505 fn from_str(
19506 value: &str,
19507 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19508 match value {
19509 "2.0" => Ok(Self::X20),
19510 _ => Err("invalid value".into()),
19511 }
19512 }
19513 }
19514 impl ::std::convert::TryFrom<&str>
19515 for PostGetMultipleAccountInterfacesResponseJsonrpc {
19516 type Error = self::error::ConversionError;
19517 fn try_from(
19518 value: &str,
19519 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19520 value.parse()
19521 }
19522 }
19523 impl ::std::convert::TryFrom<&::std::string::String>
19524 for PostGetMultipleAccountInterfacesResponseJsonrpc {
19525 type Error = self::error::ConversionError;
19526 fn try_from(
19527 value: &::std::string::String,
19528 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19529 value.parse()
19530 }
19531 }
19532 impl ::std::convert::TryFrom<::std::string::String>
19533 for PostGetMultipleAccountInterfacesResponseJsonrpc {
19534 type Error = self::error::ConversionError;
19535 fn try_from(
19536 value: ::std::string::String,
19537 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19538 value.parse()
19539 }
19540 }
19541 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19580 pub struct PostGetMultipleAccountInterfacesResponseResult {
19581 pub context: Context,
19582 pub value: ::std::vec::Vec<::std::option::Option<AccountInterface>>,
19584 }
19585 impl PostGetMultipleAccountInterfacesResponseResult {
19586 pub fn builder() -> builder::PostGetMultipleAccountInterfacesResponseResult {
19587 Default::default()
19588 }
19589 }
19590 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19636 pub struct PostGetMultipleCompressedAccountProofsBody {
19637 pub id: PostGetMultipleCompressedAccountProofsBodyId,
19639 pub jsonrpc: PostGetMultipleCompressedAccountProofsBodyJsonrpc,
19641 pub method: PostGetMultipleCompressedAccountProofsBodyMethod,
19643 pub params: ::std::vec::Vec<Hash>,
19644 }
19645 impl PostGetMultipleCompressedAccountProofsBody {
19646 pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsBody {
19647 Default::default()
19648 }
19649 }
19650 #[derive(
19665 ::serde::Deserialize,
19666 ::serde::Serialize,
19667 Clone,
19668 Copy,
19669 Debug,
19670 Eq,
19671 Hash,
19672 Ord,
19673 PartialEq,
19674 PartialOrd
19675 )]
19676 pub enum PostGetMultipleCompressedAccountProofsBodyId {
19677 #[serde(rename = "test-account")]
19678 TestAccount,
19679 }
19680 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsBodyId {
19681 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19682 match *self {
19683 Self::TestAccount => f.write_str("test-account"),
19684 }
19685 }
19686 }
19687 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsBodyId {
19688 type Err = self::error::ConversionError;
19689 fn from_str(
19690 value: &str,
19691 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19692 match value {
19693 "test-account" => Ok(Self::TestAccount),
19694 _ => Err("invalid value".into()),
19695 }
19696 }
19697 }
19698 impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountProofsBodyId {
19699 type Error = self::error::ConversionError;
19700 fn try_from(
19701 value: &str,
19702 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19703 value.parse()
19704 }
19705 }
19706 impl ::std::convert::TryFrom<&::std::string::String>
19707 for PostGetMultipleCompressedAccountProofsBodyId {
19708 type Error = self::error::ConversionError;
19709 fn try_from(
19710 value: &::std::string::String,
19711 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19712 value.parse()
19713 }
19714 }
19715 impl ::std::convert::TryFrom<::std::string::String>
19716 for PostGetMultipleCompressedAccountProofsBodyId {
19717 type Error = self::error::ConversionError;
19718 fn try_from(
19719 value: ::std::string::String,
19720 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19721 value.parse()
19722 }
19723 }
19724 #[derive(
19739 ::serde::Deserialize,
19740 ::serde::Serialize,
19741 Clone,
19742 Copy,
19743 Debug,
19744 Eq,
19745 Hash,
19746 Ord,
19747 PartialEq,
19748 PartialOrd
19749 )]
19750 pub enum PostGetMultipleCompressedAccountProofsBodyJsonrpc {
19751 #[serde(rename = "2.0")]
19752 X20,
19753 }
19754 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsBodyJsonrpc {
19755 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19756 match *self {
19757 Self::X20 => f.write_str("2.0"),
19758 }
19759 }
19760 }
19761 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsBodyJsonrpc {
19762 type Err = self::error::ConversionError;
19763 fn from_str(
19764 value: &str,
19765 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19766 match value {
19767 "2.0" => Ok(Self::X20),
19768 _ => Err("invalid value".into()),
19769 }
19770 }
19771 }
19772 impl ::std::convert::TryFrom<&str>
19773 for PostGetMultipleCompressedAccountProofsBodyJsonrpc {
19774 type Error = self::error::ConversionError;
19775 fn try_from(
19776 value: &str,
19777 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19778 value.parse()
19779 }
19780 }
19781 impl ::std::convert::TryFrom<&::std::string::String>
19782 for PostGetMultipleCompressedAccountProofsBodyJsonrpc {
19783 type Error = self::error::ConversionError;
19784 fn try_from(
19785 value: &::std::string::String,
19786 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19787 value.parse()
19788 }
19789 }
19790 impl ::std::convert::TryFrom<::std::string::String>
19791 for PostGetMultipleCompressedAccountProofsBodyJsonrpc {
19792 type Error = self::error::ConversionError;
19793 fn try_from(
19794 value: ::std::string::String,
19795 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19796 value.parse()
19797 }
19798 }
19799 #[derive(
19814 ::serde::Deserialize,
19815 ::serde::Serialize,
19816 Clone,
19817 Copy,
19818 Debug,
19819 Eq,
19820 Hash,
19821 Ord,
19822 PartialEq,
19823 PartialOrd
19824 )]
19825 pub enum PostGetMultipleCompressedAccountProofsBodyMethod {
19826 #[serde(rename = "getMultipleCompressedAccountProofs")]
19827 GetMultipleCompressedAccountProofs,
19828 }
19829 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsBodyMethod {
19830 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19831 match *self {
19832 Self::GetMultipleCompressedAccountProofs => {
19833 f.write_str("getMultipleCompressedAccountProofs")
19834 }
19835 }
19836 }
19837 }
19838 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsBodyMethod {
19839 type Err = self::error::ConversionError;
19840 fn from_str(
19841 value: &str,
19842 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19843 match value {
19844 "getMultipleCompressedAccountProofs" => {
19845 Ok(Self::GetMultipleCompressedAccountProofs)
19846 }
19847 _ => Err("invalid value".into()),
19848 }
19849 }
19850 }
19851 impl ::std::convert::TryFrom<&str>
19852 for PostGetMultipleCompressedAccountProofsBodyMethod {
19853 type Error = self::error::ConversionError;
19854 fn try_from(
19855 value: &str,
19856 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19857 value.parse()
19858 }
19859 }
19860 impl ::std::convert::TryFrom<&::std::string::String>
19861 for PostGetMultipleCompressedAccountProofsBodyMethod {
19862 type Error = self::error::ConversionError;
19863 fn try_from(
19864 value: &::std::string::String,
19865 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19866 value.parse()
19867 }
19868 }
19869 impl ::std::convert::TryFrom<::std::string::String>
19870 for PostGetMultipleCompressedAccountProofsBodyMethod {
19871 type Error = self::error::ConversionError;
19872 fn try_from(
19873 value: ::std::string::String,
19874 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19875 value.parse()
19876 }
19877 }
19878 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19939 pub struct PostGetMultipleCompressedAccountProofsResponse {
19940 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19941 pub error: ::std::option::Option<
19942 PostGetMultipleCompressedAccountProofsResponseError,
19943 >,
19944 pub id: PostGetMultipleCompressedAccountProofsResponseId,
19946 pub jsonrpc: PostGetMultipleCompressedAccountProofsResponseJsonrpc,
19948 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19949 pub result: ::std::option::Option<
19950 PostGetMultipleCompressedAccountProofsResponseResult,
19951 >,
19952 }
19953 impl PostGetMultipleCompressedAccountProofsResponse {
19954 pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsResponse {
19955 Default::default()
19956 }
19957 }
19958 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19977 pub struct PostGetMultipleCompressedAccountProofsResponseError {
19978 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19979 pub code: ::std::option::Option<i64>,
19980 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19981 pub message: ::std::option::Option<::std::string::String>,
19982 }
19983 impl ::std::default::Default
19984 for PostGetMultipleCompressedAccountProofsResponseError {
19985 fn default() -> Self {
19986 Self {
19987 code: Default::default(),
19988 message: Default::default(),
19989 }
19990 }
19991 }
19992 impl PostGetMultipleCompressedAccountProofsResponseError {
19993 pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsResponseError {
19994 Default::default()
19995 }
19996 }
19997 #[derive(
20012 ::serde::Deserialize,
20013 ::serde::Serialize,
20014 Clone,
20015 Copy,
20016 Debug,
20017 Eq,
20018 Hash,
20019 Ord,
20020 PartialEq,
20021 PartialOrd
20022 )]
20023 pub enum PostGetMultipleCompressedAccountProofsResponseId {
20024 #[serde(rename = "test-account")]
20025 TestAccount,
20026 }
20027 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsResponseId {
20028 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20029 match *self {
20030 Self::TestAccount => f.write_str("test-account"),
20031 }
20032 }
20033 }
20034 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsResponseId {
20035 type Err = self::error::ConversionError;
20036 fn from_str(
20037 value: &str,
20038 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20039 match value {
20040 "test-account" => Ok(Self::TestAccount),
20041 _ => Err("invalid value".into()),
20042 }
20043 }
20044 }
20045 impl ::std::convert::TryFrom<&str>
20046 for PostGetMultipleCompressedAccountProofsResponseId {
20047 type Error = self::error::ConversionError;
20048 fn try_from(
20049 value: &str,
20050 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20051 value.parse()
20052 }
20053 }
20054 impl ::std::convert::TryFrom<&::std::string::String>
20055 for PostGetMultipleCompressedAccountProofsResponseId {
20056 type Error = self::error::ConversionError;
20057 fn try_from(
20058 value: &::std::string::String,
20059 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20060 value.parse()
20061 }
20062 }
20063 impl ::std::convert::TryFrom<::std::string::String>
20064 for PostGetMultipleCompressedAccountProofsResponseId {
20065 type Error = self::error::ConversionError;
20066 fn try_from(
20067 value: ::std::string::String,
20068 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20069 value.parse()
20070 }
20071 }
20072 #[derive(
20087 ::serde::Deserialize,
20088 ::serde::Serialize,
20089 Clone,
20090 Copy,
20091 Debug,
20092 Eq,
20093 Hash,
20094 Ord,
20095 PartialEq,
20096 PartialOrd
20097 )]
20098 pub enum PostGetMultipleCompressedAccountProofsResponseJsonrpc {
20099 #[serde(rename = "2.0")]
20100 X20,
20101 }
20102 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsResponseJsonrpc {
20103 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20104 match *self {
20105 Self::X20 => f.write_str("2.0"),
20106 }
20107 }
20108 }
20109 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsResponseJsonrpc {
20110 type Err = self::error::ConversionError;
20111 fn from_str(
20112 value: &str,
20113 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20114 match value {
20115 "2.0" => Ok(Self::X20),
20116 _ => Err("invalid value".into()),
20117 }
20118 }
20119 }
20120 impl ::std::convert::TryFrom<&str>
20121 for PostGetMultipleCompressedAccountProofsResponseJsonrpc {
20122 type Error = self::error::ConversionError;
20123 fn try_from(
20124 value: &str,
20125 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20126 value.parse()
20127 }
20128 }
20129 impl ::std::convert::TryFrom<&::std::string::String>
20130 for PostGetMultipleCompressedAccountProofsResponseJsonrpc {
20131 type Error = self::error::ConversionError;
20132 fn try_from(
20133 value: &::std::string::String,
20134 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20135 value.parse()
20136 }
20137 }
20138 impl ::std::convert::TryFrom<::std::string::String>
20139 for PostGetMultipleCompressedAccountProofsResponseJsonrpc {
20140 type Error = self::error::ConversionError;
20141 fn try_from(
20142 value: ::std::string::String,
20143 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20144 value.parse()
20145 }
20146 }
20147 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20174 #[serde(deny_unknown_fields)]
20175 pub struct PostGetMultipleCompressedAccountProofsResponseResult {
20176 pub context: Context,
20177 pub value: ::std::vec::Vec<GetCompressedAccountProofResponseValue>,
20178 }
20179 impl PostGetMultipleCompressedAccountProofsResponseResult {
20180 pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsResponseResult {
20181 Default::default()
20182 }
20183 }
20184 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20230 pub struct PostGetMultipleCompressedAccountProofsV2Body {
20231 pub id: PostGetMultipleCompressedAccountProofsV2BodyId,
20233 pub jsonrpc: PostGetMultipleCompressedAccountProofsV2BodyJsonrpc,
20235 pub method: PostGetMultipleCompressedAccountProofsV2BodyMethod,
20237 pub params: ::std::vec::Vec<Hash>,
20238 }
20239 impl PostGetMultipleCompressedAccountProofsV2Body {
20240 pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsV2Body {
20241 Default::default()
20242 }
20243 }
20244 #[derive(
20259 ::serde::Deserialize,
20260 ::serde::Serialize,
20261 Clone,
20262 Copy,
20263 Debug,
20264 Eq,
20265 Hash,
20266 Ord,
20267 PartialEq,
20268 PartialOrd
20269 )]
20270 pub enum PostGetMultipleCompressedAccountProofsV2BodyId {
20271 #[serde(rename = "test-account")]
20272 TestAccount,
20273 }
20274 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsV2BodyId {
20275 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20276 match *self {
20277 Self::TestAccount => f.write_str("test-account"),
20278 }
20279 }
20280 }
20281 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsV2BodyId {
20282 type Err = self::error::ConversionError;
20283 fn from_str(
20284 value: &str,
20285 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20286 match value {
20287 "test-account" => Ok(Self::TestAccount),
20288 _ => Err("invalid value".into()),
20289 }
20290 }
20291 }
20292 impl ::std::convert::TryFrom<&str>
20293 for PostGetMultipleCompressedAccountProofsV2BodyId {
20294 type Error = self::error::ConversionError;
20295 fn try_from(
20296 value: &str,
20297 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20298 value.parse()
20299 }
20300 }
20301 impl ::std::convert::TryFrom<&::std::string::String>
20302 for PostGetMultipleCompressedAccountProofsV2BodyId {
20303 type Error = self::error::ConversionError;
20304 fn try_from(
20305 value: &::std::string::String,
20306 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20307 value.parse()
20308 }
20309 }
20310 impl ::std::convert::TryFrom<::std::string::String>
20311 for PostGetMultipleCompressedAccountProofsV2BodyId {
20312 type Error = self::error::ConversionError;
20313 fn try_from(
20314 value: ::std::string::String,
20315 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20316 value.parse()
20317 }
20318 }
20319 #[derive(
20334 ::serde::Deserialize,
20335 ::serde::Serialize,
20336 Clone,
20337 Copy,
20338 Debug,
20339 Eq,
20340 Hash,
20341 Ord,
20342 PartialEq,
20343 PartialOrd
20344 )]
20345 pub enum PostGetMultipleCompressedAccountProofsV2BodyJsonrpc {
20346 #[serde(rename = "2.0")]
20347 X20,
20348 }
20349 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc {
20350 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20351 match *self {
20352 Self::X20 => f.write_str("2.0"),
20353 }
20354 }
20355 }
20356 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc {
20357 type Err = self::error::ConversionError;
20358 fn from_str(
20359 value: &str,
20360 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20361 match value {
20362 "2.0" => Ok(Self::X20),
20363 _ => Err("invalid value".into()),
20364 }
20365 }
20366 }
20367 impl ::std::convert::TryFrom<&str>
20368 for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc {
20369 type Error = self::error::ConversionError;
20370 fn try_from(
20371 value: &str,
20372 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20373 value.parse()
20374 }
20375 }
20376 impl ::std::convert::TryFrom<&::std::string::String>
20377 for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc {
20378 type Error = self::error::ConversionError;
20379 fn try_from(
20380 value: &::std::string::String,
20381 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20382 value.parse()
20383 }
20384 }
20385 impl ::std::convert::TryFrom<::std::string::String>
20386 for PostGetMultipleCompressedAccountProofsV2BodyJsonrpc {
20387 type Error = self::error::ConversionError;
20388 fn try_from(
20389 value: ::std::string::String,
20390 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20391 value.parse()
20392 }
20393 }
20394 #[derive(
20409 ::serde::Deserialize,
20410 ::serde::Serialize,
20411 Clone,
20412 Copy,
20413 Debug,
20414 Eq,
20415 Hash,
20416 Ord,
20417 PartialEq,
20418 PartialOrd
20419 )]
20420 pub enum PostGetMultipleCompressedAccountProofsV2BodyMethod {
20421 #[serde(rename = "getMultipleCompressedAccountProofsV2")]
20422 GetMultipleCompressedAccountProofsV2,
20423 }
20424 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsV2BodyMethod {
20425 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20426 match *self {
20427 Self::GetMultipleCompressedAccountProofsV2 => {
20428 f.write_str("getMultipleCompressedAccountProofsV2")
20429 }
20430 }
20431 }
20432 }
20433 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsV2BodyMethod {
20434 type Err = self::error::ConversionError;
20435 fn from_str(
20436 value: &str,
20437 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20438 match value {
20439 "getMultipleCompressedAccountProofsV2" => {
20440 Ok(Self::GetMultipleCompressedAccountProofsV2)
20441 }
20442 _ => Err("invalid value".into()),
20443 }
20444 }
20445 }
20446 impl ::std::convert::TryFrom<&str>
20447 for PostGetMultipleCompressedAccountProofsV2BodyMethod {
20448 type Error = self::error::ConversionError;
20449 fn try_from(
20450 value: &str,
20451 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20452 value.parse()
20453 }
20454 }
20455 impl ::std::convert::TryFrom<&::std::string::String>
20456 for PostGetMultipleCompressedAccountProofsV2BodyMethod {
20457 type Error = self::error::ConversionError;
20458 fn try_from(
20459 value: &::std::string::String,
20460 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20461 value.parse()
20462 }
20463 }
20464 impl ::std::convert::TryFrom<::std::string::String>
20465 for PostGetMultipleCompressedAccountProofsV2BodyMethod {
20466 type Error = self::error::ConversionError;
20467 fn try_from(
20468 value: ::std::string::String,
20469 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20470 value.parse()
20471 }
20472 }
20473 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20534 pub struct PostGetMultipleCompressedAccountProofsV2Response {
20535 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20536 pub error: ::std::option::Option<
20537 PostGetMultipleCompressedAccountProofsV2ResponseError,
20538 >,
20539 pub id: PostGetMultipleCompressedAccountProofsV2ResponseId,
20541 pub jsonrpc: PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc,
20543 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20544 pub result: ::std::option::Option<
20545 PostGetMultipleCompressedAccountProofsV2ResponseResult,
20546 >,
20547 }
20548 impl PostGetMultipleCompressedAccountProofsV2Response {
20549 pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsV2Response {
20550 Default::default()
20551 }
20552 }
20553 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20572 pub struct PostGetMultipleCompressedAccountProofsV2ResponseError {
20573 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20574 pub code: ::std::option::Option<i64>,
20575 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20576 pub message: ::std::option::Option<::std::string::String>,
20577 }
20578 impl ::std::default::Default
20579 for PostGetMultipleCompressedAccountProofsV2ResponseError {
20580 fn default() -> Self {
20581 Self {
20582 code: Default::default(),
20583 message: Default::default(),
20584 }
20585 }
20586 }
20587 impl PostGetMultipleCompressedAccountProofsV2ResponseError {
20588 pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsV2ResponseError {
20589 Default::default()
20590 }
20591 }
20592 #[derive(
20607 ::serde::Deserialize,
20608 ::serde::Serialize,
20609 Clone,
20610 Copy,
20611 Debug,
20612 Eq,
20613 Hash,
20614 Ord,
20615 PartialEq,
20616 PartialOrd
20617 )]
20618 pub enum PostGetMultipleCompressedAccountProofsV2ResponseId {
20619 #[serde(rename = "test-account")]
20620 TestAccount,
20621 }
20622 impl ::std::fmt::Display for PostGetMultipleCompressedAccountProofsV2ResponseId {
20623 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20624 match *self {
20625 Self::TestAccount => f.write_str("test-account"),
20626 }
20627 }
20628 }
20629 impl ::std::str::FromStr for PostGetMultipleCompressedAccountProofsV2ResponseId {
20630 type Err = self::error::ConversionError;
20631 fn from_str(
20632 value: &str,
20633 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20634 match value {
20635 "test-account" => Ok(Self::TestAccount),
20636 _ => Err("invalid value".into()),
20637 }
20638 }
20639 }
20640 impl ::std::convert::TryFrom<&str>
20641 for PostGetMultipleCompressedAccountProofsV2ResponseId {
20642 type Error = self::error::ConversionError;
20643 fn try_from(
20644 value: &str,
20645 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20646 value.parse()
20647 }
20648 }
20649 impl ::std::convert::TryFrom<&::std::string::String>
20650 for PostGetMultipleCompressedAccountProofsV2ResponseId {
20651 type Error = self::error::ConversionError;
20652 fn try_from(
20653 value: &::std::string::String,
20654 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20655 value.parse()
20656 }
20657 }
20658 impl ::std::convert::TryFrom<::std::string::String>
20659 for PostGetMultipleCompressedAccountProofsV2ResponseId {
20660 type Error = self::error::ConversionError;
20661 fn try_from(
20662 value: ::std::string::String,
20663 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20664 value.parse()
20665 }
20666 }
20667 #[derive(
20682 ::serde::Deserialize,
20683 ::serde::Serialize,
20684 Clone,
20685 Copy,
20686 Debug,
20687 Eq,
20688 Hash,
20689 Ord,
20690 PartialEq,
20691 PartialOrd
20692 )]
20693 pub enum PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc {
20694 #[serde(rename = "2.0")]
20695 X20,
20696 }
20697 impl ::std::fmt::Display
20698 for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc {
20699 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20700 match *self {
20701 Self::X20 => f.write_str("2.0"),
20702 }
20703 }
20704 }
20705 impl ::std::str::FromStr
20706 for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc {
20707 type Err = self::error::ConversionError;
20708 fn from_str(
20709 value: &str,
20710 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20711 match value {
20712 "2.0" => Ok(Self::X20),
20713 _ => Err("invalid value".into()),
20714 }
20715 }
20716 }
20717 impl ::std::convert::TryFrom<&str>
20718 for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc {
20719 type Error = self::error::ConversionError;
20720 fn try_from(
20721 value: &str,
20722 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20723 value.parse()
20724 }
20725 }
20726 impl ::std::convert::TryFrom<&::std::string::String>
20727 for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc {
20728 type Error = self::error::ConversionError;
20729 fn try_from(
20730 value: &::std::string::String,
20731 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20732 value.parse()
20733 }
20734 }
20735 impl ::std::convert::TryFrom<::std::string::String>
20736 for PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc {
20737 type Error = self::error::ConversionError;
20738 fn try_from(
20739 value: ::std::string::String,
20740 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20741 value.parse()
20742 }
20743 }
20744 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20771 #[serde(deny_unknown_fields)]
20772 pub struct PostGetMultipleCompressedAccountProofsV2ResponseResult {
20773 pub context: Context,
20774 pub value: ::std::vec::Vec<GetCompressedAccountProofResponseValueV2>,
20775 }
20776 impl PostGetMultipleCompressedAccountProofsV2ResponseResult {
20777 pub fn builder() -> builder::PostGetMultipleCompressedAccountProofsV2ResponseResult {
20778 Default::default()
20779 }
20780 }
20781 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20862 pub struct PostGetMultipleCompressedAccountsBody {
20863 pub id: PostGetMultipleCompressedAccountsBodyId,
20865 pub jsonrpc: PostGetMultipleCompressedAccountsBodyJsonrpc,
20867 pub method: PostGetMultipleCompressedAccountsBodyMethod,
20869 pub params: PostGetMultipleCompressedAccountsBodyParams,
20870 }
20871 impl PostGetMultipleCompressedAccountsBody {
20872 pub fn builder() -> builder::PostGetMultipleCompressedAccountsBody {
20873 Default::default()
20874 }
20875 }
20876 #[derive(
20891 ::serde::Deserialize,
20892 ::serde::Serialize,
20893 Clone,
20894 Copy,
20895 Debug,
20896 Eq,
20897 Hash,
20898 Ord,
20899 PartialEq,
20900 PartialOrd
20901 )]
20902 pub enum PostGetMultipleCompressedAccountsBodyId {
20903 #[serde(rename = "test-account")]
20904 TestAccount,
20905 }
20906 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsBodyId {
20907 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20908 match *self {
20909 Self::TestAccount => f.write_str("test-account"),
20910 }
20911 }
20912 }
20913 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsBodyId {
20914 type Err = self::error::ConversionError;
20915 fn from_str(
20916 value: &str,
20917 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20918 match value {
20919 "test-account" => Ok(Self::TestAccount),
20920 _ => Err("invalid value".into()),
20921 }
20922 }
20923 }
20924 impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsBodyId {
20925 type Error = self::error::ConversionError;
20926 fn try_from(
20927 value: &str,
20928 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20929 value.parse()
20930 }
20931 }
20932 impl ::std::convert::TryFrom<&::std::string::String>
20933 for PostGetMultipleCompressedAccountsBodyId {
20934 type Error = self::error::ConversionError;
20935 fn try_from(
20936 value: &::std::string::String,
20937 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20938 value.parse()
20939 }
20940 }
20941 impl ::std::convert::TryFrom<::std::string::String>
20942 for PostGetMultipleCompressedAccountsBodyId {
20943 type Error = self::error::ConversionError;
20944 fn try_from(
20945 value: ::std::string::String,
20946 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20947 value.parse()
20948 }
20949 }
20950 #[derive(
20965 ::serde::Deserialize,
20966 ::serde::Serialize,
20967 Clone,
20968 Copy,
20969 Debug,
20970 Eq,
20971 Hash,
20972 Ord,
20973 PartialEq,
20974 PartialOrd
20975 )]
20976 pub enum PostGetMultipleCompressedAccountsBodyJsonrpc {
20977 #[serde(rename = "2.0")]
20978 X20,
20979 }
20980 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsBodyJsonrpc {
20981 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20982 match *self {
20983 Self::X20 => f.write_str("2.0"),
20984 }
20985 }
20986 }
20987 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsBodyJsonrpc {
20988 type Err = self::error::ConversionError;
20989 fn from_str(
20990 value: &str,
20991 ) -> ::std::result::Result<Self, self::error::ConversionError> {
20992 match value {
20993 "2.0" => Ok(Self::X20),
20994 _ => Err("invalid value".into()),
20995 }
20996 }
20997 }
20998 impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsBodyJsonrpc {
20999 type Error = self::error::ConversionError;
21000 fn try_from(
21001 value: &str,
21002 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21003 value.parse()
21004 }
21005 }
21006 impl ::std::convert::TryFrom<&::std::string::String>
21007 for PostGetMultipleCompressedAccountsBodyJsonrpc {
21008 type Error = self::error::ConversionError;
21009 fn try_from(
21010 value: &::std::string::String,
21011 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21012 value.parse()
21013 }
21014 }
21015 impl ::std::convert::TryFrom<::std::string::String>
21016 for PostGetMultipleCompressedAccountsBodyJsonrpc {
21017 type Error = self::error::ConversionError;
21018 fn try_from(
21019 value: ::std::string::String,
21020 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21021 value.parse()
21022 }
21023 }
21024 #[derive(
21039 ::serde::Deserialize,
21040 ::serde::Serialize,
21041 Clone,
21042 Copy,
21043 Debug,
21044 Eq,
21045 Hash,
21046 Ord,
21047 PartialEq,
21048 PartialOrd
21049 )]
21050 pub enum PostGetMultipleCompressedAccountsBodyMethod {
21051 #[serde(rename = "getMultipleCompressedAccounts")]
21052 GetMultipleCompressedAccounts,
21053 }
21054 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsBodyMethod {
21055 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21056 match *self {
21057 Self::GetMultipleCompressedAccounts => {
21058 f.write_str("getMultipleCompressedAccounts")
21059 }
21060 }
21061 }
21062 }
21063 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsBodyMethod {
21064 type Err = self::error::ConversionError;
21065 fn from_str(
21066 value: &str,
21067 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21068 match value {
21069 "getMultipleCompressedAccounts" => {
21070 Ok(Self::GetMultipleCompressedAccounts)
21071 }
21072 _ => Err("invalid value".into()),
21073 }
21074 }
21075 }
21076 impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsBodyMethod {
21077 type Error = self::error::ConversionError;
21078 fn try_from(
21079 value: &str,
21080 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21081 value.parse()
21082 }
21083 }
21084 impl ::std::convert::TryFrom<&::std::string::String>
21085 for PostGetMultipleCompressedAccountsBodyMethod {
21086 type Error = self::error::ConversionError;
21087 fn try_from(
21088 value: &::std::string::String,
21089 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21090 value.parse()
21091 }
21092 }
21093 impl ::std::convert::TryFrom<::std::string::String>
21094 for PostGetMultipleCompressedAccountsBodyMethod {
21095 type Error = self::error::ConversionError;
21096 fn try_from(
21097 value: ::std::string::String,
21098 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21099 value.parse()
21100 }
21101 }
21102 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21151 #[serde(deny_unknown_fields)]
21152 pub struct PostGetMultipleCompressedAccountsBodyParams {
21153 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21154 pub addresses: ::std::option::Option<::std::vec::Vec<SerializablePubkey>>,
21155 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21156 pub hashes: ::std::option::Option<::std::vec::Vec<Hash>>,
21157 }
21158 impl ::std::default::Default for PostGetMultipleCompressedAccountsBodyParams {
21159 fn default() -> Self {
21160 PostGetMultipleCompressedAccountsBodyParams {
21161 addresses: ::std::option::Option::None,
21162 hashes: ::std::option::Option::Some(
21163 vec![
21164 Hash("11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs".to_string()),
21165 Hash("1117mWrzzrZr312ebPDHu8tbfMwFNvCvMbr6WepCNG".to_string())
21166 ],
21167 ),
21168 }
21169 }
21170 }
21171 impl PostGetMultipleCompressedAccountsBodyParams {
21172 pub fn builder() -> builder::PostGetMultipleCompressedAccountsBodyParams {
21173 Default::default()
21174 }
21175 }
21176 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21234 pub struct PostGetMultipleCompressedAccountsResponse {
21235 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21236 pub error: ::std::option::Option<PostGetMultipleCompressedAccountsResponseError>,
21237 pub id: PostGetMultipleCompressedAccountsResponseId,
21239 pub jsonrpc: PostGetMultipleCompressedAccountsResponseJsonrpc,
21241 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21242 pub result: ::std::option::Option<
21243 PostGetMultipleCompressedAccountsResponseResult,
21244 >,
21245 }
21246 impl PostGetMultipleCompressedAccountsResponse {
21247 pub fn builder() -> builder::PostGetMultipleCompressedAccountsResponse {
21248 Default::default()
21249 }
21250 }
21251 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21270 pub struct PostGetMultipleCompressedAccountsResponseError {
21271 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21272 pub code: ::std::option::Option<i64>,
21273 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21274 pub message: ::std::option::Option<::std::string::String>,
21275 }
21276 impl ::std::default::Default for PostGetMultipleCompressedAccountsResponseError {
21277 fn default() -> Self {
21278 Self {
21279 code: Default::default(),
21280 message: Default::default(),
21281 }
21282 }
21283 }
21284 impl PostGetMultipleCompressedAccountsResponseError {
21285 pub fn builder() -> builder::PostGetMultipleCompressedAccountsResponseError {
21286 Default::default()
21287 }
21288 }
21289 #[derive(
21304 ::serde::Deserialize,
21305 ::serde::Serialize,
21306 Clone,
21307 Copy,
21308 Debug,
21309 Eq,
21310 Hash,
21311 Ord,
21312 PartialEq,
21313 PartialOrd
21314 )]
21315 pub enum PostGetMultipleCompressedAccountsResponseId {
21316 #[serde(rename = "test-account")]
21317 TestAccount,
21318 }
21319 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsResponseId {
21320 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21321 match *self {
21322 Self::TestAccount => f.write_str("test-account"),
21323 }
21324 }
21325 }
21326 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsResponseId {
21327 type Err = self::error::ConversionError;
21328 fn from_str(
21329 value: &str,
21330 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21331 match value {
21332 "test-account" => Ok(Self::TestAccount),
21333 _ => Err("invalid value".into()),
21334 }
21335 }
21336 }
21337 impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsResponseId {
21338 type Error = self::error::ConversionError;
21339 fn try_from(
21340 value: &str,
21341 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21342 value.parse()
21343 }
21344 }
21345 impl ::std::convert::TryFrom<&::std::string::String>
21346 for PostGetMultipleCompressedAccountsResponseId {
21347 type Error = self::error::ConversionError;
21348 fn try_from(
21349 value: &::std::string::String,
21350 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21351 value.parse()
21352 }
21353 }
21354 impl ::std::convert::TryFrom<::std::string::String>
21355 for PostGetMultipleCompressedAccountsResponseId {
21356 type Error = self::error::ConversionError;
21357 fn try_from(
21358 value: ::std::string::String,
21359 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21360 value.parse()
21361 }
21362 }
21363 #[derive(
21378 ::serde::Deserialize,
21379 ::serde::Serialize,
21380 Clone,
21381 Copy,
21382 Debug,
21383 Eq,
21384 Hash,
21385 Ord,
21386 PartialEq,
21387 PartialOrd
21388 )]
21389 pub enum PostGetMultipleCompressedAccountsResponseJsonrpc {
21390 #[serde(rename = "2.0")]
21391 X20,
21392 }
21393 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsResponseJsonrpc {
21394 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21395 match *self {
21396 Self::X20 => f.write_str("2.0"),
21397 }
21398 }
21399 }
21400 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsResponseJsonrpc {
21401 type Err = self::error::ConversionError;
21402 fn from_str(
21403 value: &str,
21404 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21405 match value {
21406 "2.0" => Ok(Self::X20),
21407 _ => Err("invalid value".into()),
21408 }
21409 }
21410 }
21411 impl ::std::convert::TryFrom<&str>
21412 for PostGetMultipleCompressedAccountsResponseJsonrpc {
21413 type Error = self::error::ConversionError;
21414 fn try_from(
21415 value: &str,
21416 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21417 value.parse()
21418 }
21419 }
21420 impl ::std::convert::TryFrom<&::std::string::String>
21421 for PostGetMultipleCompressedAccountsResponseJsonrpc {
21422 type Error = self::error::ConversionError;
21423 fn try_from(
21424 value: &::std::string::String,
21425 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21426 value.parse()
21427 }
21428 }
21429 impl ::std::convert::TryFrom<::std::string::String>
21430 for PostGetMultipleCompressedAccountsResponseJsonrpc {
21431 type Error = self::error::ConversionError;
21432 fn try_from(
21433 value: ::std::string::String,
21434 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21435 value.parse()
21436 }
21437 }
21438 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21462 #[serde(deny_unknown_fields)]
21463 pub struct PostGetMultipleCompressedAccountsResponseResult {
21464 pub context: Context,
21465 pub value: AccountList,
21466 }
21467 impl PostGetMultipleCompressedAccountsResponseResult {
21468 pub fn builder() -> builder::PostGetMultipleCompressedAccountsResponseResult {
21469 Default::default()
21470 }
21471 }
21472 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21553 pub struct PostGetMultipleCompressedAccountsV2Body {
21554 pub id: PostGetMultipleCompressedAccountsV2BodyId,
21556 pub jsonrpc: PostGetMultipleCompressedAccountsV2BodyJsonrpc,
21558 pub method: PostGetMultipleCompressedAccountsV2BodyMethod,
21560 pub params: PostGetMultipleCompressedAccountsV2BodyParams,
21561 }
21562 impl PostGetMultipleCompressedAccountsV2Body {
21563 pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2Body {
21564 Default::default()
21565 }
21566 }
21567 #[derive(
21582 ::serde::Deserialize,
21583 ::serde::Serialize,
21584 Clone,
21585 Copy,
21586 Debug,
21587 Eq,
21588 Hash,
21589 Ord,
21590 PartialEq,
21591 PartialOrd
21592 )]
21593 pub enum PostGetMultipleCompressedAccountsV2BodyId {
21594 #[serde(rename = "test-account")]
21595 TestAccount,
21596 }
21597 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2BodyId {
21598 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21599 match *self {
21600 Self::TestAccount => f.write_str("test-account"),
21601 }
21602 }
21603 }
21604 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2BodyId {
21605 type Err = self::error::ConversionError;
21606 fn from_str(
21607 value: &str,
21608 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21609 match value {
21610 "test-account" => Ok(Self::TestAccount),
21611 _ => Err("invalid value".into()),
21612 }
21613 }
21614 }
21615 impl ::std::convert::TryFrom<&str> for PostGetMultipleCompressedAccountsV2BodyId {
21616 type Error = self::error::ConversionError;
21617 fn try_from(
21618 value: &str,
21619 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21620 value.parse()
21621 }
21622 }
21623 impl ::std::convert::TryFrom<&::std::string::String>
21624 for PostGetMultipleCompressedAccountsV2BodyId {
21625 type Error = self::error::ConversionError;
21626 fn try_from(
21627 value: &::std::string::String,
21628 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21629 value.parse()
21630 }
21631 }
21632 impl ::std::convert::TryFrom<::std::string::String>
21633 for PostGetMultipleCompressedAccountsV2BodyId {
21634 type Error = self::error::ConversionError;
21635 fn try_from(
21636 value: ::std::string::String,
21637 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21638 value.parse()
21639 }
21640 }
21641 #[derive(
21656 ::serde::Deserialize,
21657 ::serde::Serialize,
21658 Clone,
21659 Copy,
21660 Debug,
21661 Eq,
21662 Hash,
21663 Ord,
21664 PartialEq,
21665 PartialOrd
21666 )]
21667 pub enum PostGetMultipleCompressedAccountsV2BodyJsonrpc {
21668 #[serde(rename = "2.0")]
21669 X20,
21670 }
21671 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2BodyJsonrpc {
21672 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21673 match *self {
21674 Self::X20 => f.write_str("2.0"),
21675 }
21676 }
21677 }
21678 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2BodyJsonrpc {
21679 type Err = self::error::ConversionError;
21680 fn from_str(
21681 value: &str,
21682 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21683 match value {
21684 "2.0" => Ok(Self::X20),
21685 _ => Err("invalid value".into()),
21686 }
21687 }
21688 }
21689 impl ::std::convert::TryFrom<&str>
21690 for PostGetMultipleCompressedAccountsV2BodyJsonrpc {
21691 type Error = self::error::ConversionError;
21692 fn try_from(
21693 value: &str,
21694 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21695 value.parse()
21696 }
21697 }
21698 impl ::std::convert::TryFrom<&::std::string::String>
21699 for PostGetMultipleCompressedAccountsV2BodyJsonrpc {
21700 type Error = self::error::ConversionError;
21701 fn try_from(
21702 value: &::std::string::String,
21703 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21704 value.parse()
21705 }
21706 }
21707 impl ::std::convert::TryFrom<::std::string::String>
21708 for PostGetMultipleCompressedAccountsV2BodyJsonrpc {
21709 type Error = self::error::ConversionError;
21710 fn try_from(
21711 value: ::std::string::String,
21712 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21713 value.parse()
21714 }
21715 }
21716 #[derive(
21731 ::serde::Deserialize,
21732 ::serde::Serialize,
21733 Clone,
21734 Copy,
21735 Debug,
21736 Eq,
21737 Hash,
21738 Ord,
21739 PartialEq,
21740 PartialOrd
21741 )]
21742 pub enum PostGetMultipleCompressedAccountsV2BodyMethod {
21743 #[serde(rename = "getMultipleCompressedAccountsV2")]
21744 GetMultipleCompressedAccountsV2,
21745 }
21746 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2BodyMethod {
21747 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21748 match *self {
21749 Self::GetMultipleCompressedAccountsV2 => {
21750 f.write_str("getMultipleCompressedAccountsV2")
21751 }
21752 }
21753 }
21754 }
21755 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2BodyMethod {
21756 type Err = self::error::ConversionError;
21757 fn from_str(
21758 value: &str,
21759 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21760 match value {
21761 "getMultipleCompressedAccountsV2" => {
21762 Ok(Self::GetMultipleCompressedAccountsV2)
21763 }
21764 _ => Err("invalid value".into()),
21765 }
21766 }
21767 }
21768 impl ::std::convert::TryFrom<&str>
21769 for PostGetMultipleCompressedAccountsV2BodyMethod {
21770 type Error = self::error::ConversionError;
21771 fn try_from(
21772 value: &str,
21773 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21774 value.parse()
21775 }
21776 }
21777 impl ::std::convert::TryFrom<&::std::string::String>
21778 for PostGetMultipleCompressedAccountsV2BodyMethod {
21779 type Error = self::error::ConversionError;
21780 fn try_from(
21781 value: &::std::string::String,
21782 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21783 value.parse()
21784 }
21785 }
21786 impl ::std::convert::TryFrom<::std::string::String>
21787 for PostGetMultipleCompressedAccountsV2BodyMethod {
21788 type Error = self::error::ConversionError;
21789 fn try_from(
21790 value: ::std::string::String,
21791 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21792 value.parse()
21793 }
21794 }
21795 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21844 #[serde(deny_unknown_fields)]
21845 pub struct PostGetMultipleCompressedAccountsV2BodyParams {
21846 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21847 pub addresses: ::std::option::Option<::std::vec::Vec<SerializablePubkey>>,
21848 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21849 pub hashes: ::std::option::Option<::std::vec::Vec<Hash>>,
21850 }
21851 impl ::std::default::Default for PostGetMultipleCompressedAccountsV2BodyParams {
21852 fn default() -> Self {
21853 PostGetMultipleCompressedAccountsV2BodyParams {
21854 addresses: ::std::option::Option::None,
21855 hashes: ::std::option::Option::Some(
21856 vec![
21857 Hash("1119DWteoLSdjvrT6g6L8C2PfDD2faiTQUpsjY2RiF".to_string()),
21858 Hash("111BuZ6b86gm7XhxjvTakhRvxSMjXp2GqgifkNUmDK".to_string())
21859 ],
21860 ),
21861 }
21862 }
21863 }
21864 impl PostGetMultipleCompressedAccountsV2BodyParams {
21865 pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2BodyParams {
21866 Default::default()
21867 }
21868 }
21869 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21927 pub struct PostGetMultipleCompressedAccountsV2Response {
21928 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21929 pub error: ::std::option::Option<
21930 PostGetMultipleCompressedAccountsV2ResponseError,
21931 >,
21932 pub id: PostGetMultipleCompressedAccountsV2ResponseId,
21934 pub jsonrpc: PostGetMultipleCompressedAccountsV2ResponseJsonrpc,
21936 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21937 pub result: ::std::option::Option<
21938 PostGetMultipleCompressedAccountsV2ResponseResult,
21939 >,
21940 }
21941 impl PostGetMultipleCompressedAccountsV2Response {
21942 pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2Response {
21943 Default::default()
21944 }
21945 }
21946 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21965 pub struct PostGetMultipleCompressedAccountsV2ResponseError {
21966 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21967 pub code: ::std::option::Option<i64>,
21968 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21969 pub message: ::std::option::Option<::std::string::String>,
21970 }
21971 impl ::std::default::Default for PostGetMultipleCompressedAccountsV2ResponseError {
21972 fn default() -> Self {
21973 Self {
21974 code: Default::default(),
21975 message: Default::default(),
21976 }
21977 }
21978 }
21979 impl PostGetMultipleCompressedAccountsV2ResponseError {
21980 pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2ResponseError {
21981 Default::default()
21982 }
21983 }
21984 #[derive(
21999 ::serde::Deserialize,
22000 ::serde::Serialize,
22001 Clone,
22002 Copy,
22003 Debug,
22004 Eq,
22005 Hash,
22006 Ord,
22007 PartialEq,
22008 PartialOrd
22009 )]
22010 pub enum PostGetMultipleCompressedAccountsV2ResponseId {
22011 #[serde(rename = "test-account")]
22012 TestAccount,
22013 }
22014 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2ResponseId {
22015 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22016 match *self {
22017 Self::TestAccount => f.write_str("test-account"),
22018 }
22019 }
22020 }
22021 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2ResponseId {
22022 type Err = self::error::ConversionError;
22023 fn from_str(
22024 value: &str,
22025 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22026 match value {
22027 "test-account" => Ok(Self::TestAccount),
22028 _ => Err("invalid value".into()),
22029 }
22030 }
22031 }
22032 impl ::std::convert::TryFrom<&str>
22033 for PostGetMultipleCompressedAccountsV2ResponseId {
22034 type Error = self::error::ConversionError;
22035 fn try_from(
22036 value: &str,
22037 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22038 value.parse()
22039 }
22040 }
22041 impl ::std::convert::TryFrom<&::std::string::String>
22042 for PostGetMultipleCompressedAccountsV2ResponseId {
22043 type Error = self::error::ConversionError;
22044 fn try_from(
22045 value: &::std::string::String,
22046 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22047 value.parse()
22048 }
22049 }
22050 impl ::std::convert::TryFrom<::std::string::String>
22051 for PostGetMultipleCompressedAccountsV2ResponseId {
22052 type Error = self::error::ConversionError;
22053 fn try_from(
22054 value: ::std::string::String,
22055 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22056 value.parse()
22057 }
22058 }
22059 #[derive(
22074 ::serde::Deserialize,
22075 ::serde::Serialize,
22076 Clone,
22077 Copy,
22078 Debug,
22079 Eq,
22080 Hash,
22081 Ord,
22082 PartialEq,
22083 PartialOrd
22084 )]
22085 pub enum PostGetMultipleCompressedAccountsV2ResponseJsonrpc {
22086 #[serde(rename = "2.0")]
22087 X20,
22088 }
22089 impl ::std::fmt::Display for PostGetMultipleCompressedAccountsV2ResponseJsonrpc {
22090 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22091 match *self {
22092 Self::X20 => f.write_str("2.0"),
22093 }
22094 }
22095 }
22096 impl ::std::str::FromStr for PostGetMultipleCompressedAccountsV2ResponseJsonrpc {
22097 type Err = self::error::ConversionError;
22098 fn from_str(
22099 value: &str,
22100 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22101 match value {
22102 "2.0" => Ok(Self::X20),
22103 _ => Err("invalid value".into()),
22104 }
22105 }
22106 }
22107 impl ::std::convert::TryFrom<&str>
22108 for PostGetMultipleCompressedAccountsV2ResponseJsonrpc {
22109 type Error = self::error::ConversionError;
22110 fn try_from(
22111 value: &str,
22112 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22113 value.parse()
22114 }
22115 }
22116 impl ::std::convert::TryFrom<&::std::string::String>
22117 for PostGetMultipleCompressedAccountsV2ResponseJsonrpc {
22118 type Error = self::error::ConversionError;
22119 fn try_from(
22120 value: &::std::string::String,
22121 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22122 value.parse()
22123 }
22124 }
22125 impl ::std::convert::TryFrom<::std::string::String>
22126 for PostGetMultipleCompressedAccountsV2ResponseJsonrpc {
22127 type Error = self::error::ConversionError;
22128 fn try_from(
22129 value: ::std::string::String,
22130 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22131 value.parse()
22132 }
22133 }
22134 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22158 #[serde(deny_unknown_fields)]
22159 pub struct PostGetMultipleCompressedAccountsV2ResponseResult {
22160 pub context: Context,
22161 pub value: AccountListV2,
22162 }
22163 impl PostGetMultipleCompressedAccountsV2ResponseResult {
22164 pub fn builder() -> builder::PostGetMultipleCompressedAccountsV2ResponseResult {
22165 Default::default()
22166 }
22167 }
22168 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22214 pub struct PostGetMultipleNewAddressProofsBody {
22215 pub id: PostGetMultipleNewAddressProofsBodyId,
22217 pub jsonrpc: PostGetMultipleNewAddressProofsBodyJsonrpc,
22219 pub method: PostGetMultipleNewAddressProofsBodyMethod,
22221 pub params: ::std::vec::Vec<SerializablePubkey>,
22222 }
22223 impl PostGetMultipleNewAddressProofsBody {
22224 pub fn builder() -> builder::PostGetMultipleNewAddressProofsBody {
22225 Default::default()
22226 }
22227 }
22228 #[derive(
22243 ::serde::Deserialize,
22244 ::serde::Serialize,
22245 Clone,
22246 Copy,
22247 Debug,
22248 Eq,
22249 Hash,
22250 Ord,
22251 PartialEq,
22252 PartialOrd
22253 )]
22254 pub enum PostGetMultipleNewAddressProofsBodyId {
22255 #[serde(rename = "test-account")]
22256 TestAccount,
22257 }
22258 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsBodyId {
22259 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22260 match *self {
22261 Self::TestAccount => f.write_str("test-account"),
22262 }
22263 }
22264 }
22265 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsBodyId {
22266 type Err = self::error::ConversionError;
22267 fn from_str(
22268 value: &str,
22269 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22270 match value {
22271 "test-account" => Ok(Self::TestAccount),
22272 _ => Err("invalid value".into()),
22273 }
22274 }
22275 }
22276 impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsBodyId {
22277 type Error = self::error::ConversionError;
22278 fn try_from(
22279 value: &str,
22280 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22281 value.parse()
22282 }
22283 }
22284 impl ::std::convert::TryFrom<&::std::string::String>
22285 for PostGetMultipleNewAddressProofsBodyId {
22286 type Error = self::error::ConversionError;
22287 fn try_from(
22288 value: &::std::string::String,
22289 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22290 value.parse()
22291 }
22292 }
22293 impl ::std::convert::TryFrom<::std::string::String>
22294 for PostGetMultipleNewAddressProofsBodyId {
22295 type Error = self::error::ConversionError;
22296 fn try_from(
22297 value: ::std::string::String,
22298 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22299 value.parse()
22300 }
22301 }
22302 #[derive(
22317 ::serde::Deserialize,
22318 ::serde::Serialize,
22319 Clone,
22320 Copy,
22321 Debug,
22322 Eq,
22323 Hash,
22324 Ord,
22325 PartialEq,
22326 PartialOrd
22327 )]
22328 pub enum PostGetMultipleNewAddressProofsBodyJsonrpc {
22329 #[serde(rename = "2.0")]
22330 X20,
22331 }
22332 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsBodyJsonrpc {
22333 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22334 match *self {
22335 Self::X20 => f.write_str("2.0"),
22336 }
22337 }
22338 }
22339 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsBodyJsonrpc {
22340 type Err = self::error::ConversionError;
22341 fn from_str(
22342 value: &str,
22343 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22344 match value {
22345 "2.0" => Ok(Self::X20),
22346 _ => Err("invalid value".into()),
22347 }
22348 }
22349 }
22350 impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsBodyJsonrpc {
22351 type Error = self::error::ConversionError;
22352 fn try_from(
22353 value: &str,
22354 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22355 value.parse()
22356 }
22357 }
22358 impl ::std::convert::TryFrom<&::std::string::String>
22359 for PostGetMultipleNewAddressProofsBodyJsonrpc {
22360 type Error = self::error::ConversionError;
22361 fn try_from(
22362 value: &::std::string::String,
22363 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22364 value.parse()
22365 }
22366 }
22367 impl ::std::convert::TryFrom<::std::string::String>
22368 for PostGetMultipleNewAddressProofsBodyJsonrpc {
22369 type Error = self::error::ConversionError;
22370 fn try_from(
22371 value: ::std::string::String,
22372 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22373 value.parse()
22374 }
22375 }
22376 #[derive(
22391 ::serde::Deserialize,
22392 ::serde::Serialize,
22393 Clone,
22394 Copy,
22395 Debug,
22396 Eq,
22397 Hash,
22398 Ord,
22399 PartialEq,
22400 PartialOrd
22401 )]
22402 pub enum PostGetMultipleNewAddressProofsBodyMethod {
22403 #[serde(rename = "getMultipleNewAddressProofs")]
22404 GetMultipleNewAddressProofs,
22405 }
22406 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsBodyMethod {
22407 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22408 match *self {
22409 Self::GetMultipleNewAddressProofs => {
22410 f.write_str("getMultipleNewAddressProofs")
22411 }
22412 }
22413 }
22414 }
22415 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsBodyMethod {
22416 type Err = self::error::ConversionError;
22417 fn from_str(
22418 value: &str,
22419 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22420 match value {
22421 "getMultipleNewAddressProofs" => Ok(Self::GetMultipleNewAddressProofs),
22422 _ => Err("invalid value".into()),
22423 }
22424 }
22425 }
22426 impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsBodyMethod {
22427 type Error = self::error::ConversionError;
22428 fn try_from(
22429 value: &str,
22430 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22431 value.parse()
22432 }
22433 }
22434 impl ::std::convert::TryFrom<&::std::string::String>
22435 for PostGetMultipleNewAddressProofsBodyMethod {
22436 type Error = self::error::ConversionError;
22437 fn try_from(
22438 value: &::std::string::String,
22439 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22440 value.parse()
22441 }
22442 }
22443 impl ::std::convert::TryFrom<::std::string::String>
22444 for PostGetMultipleNewAddressProofsBodyMethod {
22445 type Error = self::error::ConversionError;
22446 fn try_from(
22447 value: ::std::string::String,
22448 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22449 value.parse()
22450 }
22451 }
22452 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22512 pub struct PostGetMultipleNewAddressProofsResponse {
22513 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22514 pub error: ::std::option::Option<PostGetMultipleNewAddressProofsResponseError>,
22515 pub id: PostGetMultipleNewAddressProofsResponseId,
22517 pub jsonrpc: PostGetMultipleNewAddressProofsResponseJsonrpc,
22519 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22520 pub result: ::std::option::Option<PostGetMultipleNewAddressProofsResponseResult>,
22521 }
22522 impl PostGetMultipleNewAddressProofsResponse {
22523 pub fn builder() -> builder::PostGetMultipleNewAddressProofsResponse {
22524 Default::default()
22525 }
22526 }
22527 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22546 pub struct PostGetMultipleNewAddressProofsResponseError {
22547 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22548 pub code: ::std::option::Option<i64>,
22549 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22550 pub message: ::std::option::Option<::std::string::String>,
22551 }
22552 impl ::std::default::Default for PostGetMultipleNewAddressProofsResponseError {
22553 fn default() -> Self {
22554 Self {
22555 code: Default::default(),
22556 message: Default::default(),
22557 }
22558 }
22559 }
22560 impl PostGetMultipleNewAddressProofsResponseError {
22561 pub fn builder() -> builder::PostGetMultipleNewAddressProofsResponseError {
22562 Default::default()
22563 }
22564 }
22565 #[derive(
22580 ::serde::Deserialize,
22581 ::serde::Serialize,
22582 Clone,
22583 Copy,
22584 Debug,
22585 Eq,
22586 Hash,
22587 Ord,
22588 PartialEq,
22589 PartialOrd
22590 )]
22591 pub enum PostGetMultipleNewAddressProofsResponseId {
22592 #[serde(rename = "test-account")]
22593 TestAccount,
22594 }
22595 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsResponseId {
22596 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22597 match *self {
22598 Self::TestAccount => f.write_str("test-account"),
22599 }
22600 }
22601 }
22602 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsResponseId {
22603 type Err = self::error::ConversionError;
22604 fn from_str(
22605 value: &str,
22606 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22607 match value {
22608 "test-account" => Ok(Self::TestAccount),
22609 _ => Err("invalid value".into()),
22610 }
22611 }
22612 }
22613 impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsResponseId {
22614 type Error = self::error::ConversionError;
22615 fn try_from(
22616 value: &str,
22617 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22618 value.parse()
22619 }
22620 }
22621 impl ::std::convert::TryFrom<&::std::string::String>
22622 for PostGetMultipleNewAddressProofsResponseId {
22623 type Error = self::error::ConversionError;
22624 fn try_from(
22625 value: &::std::string::String,
22626 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22627 value.parse()
22628 }
22629 }
22630 impl ::std::convert::TryFrom<::std::string::String>
22631 for PostGetMultipleNewAddressProofsResponseId {
22632 type Error = self::error::ConversionError;
22633 fn try_from(
22634 value: ::std::string::String,
22635 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22636 value.parse()
22637 }
22638 }
22639 #[derive(
22654 ::serde::Deserialize,
22655 ::serde::Serialize,
22656 Clone,
22657 Copy,
22658 Debug,
22659 Eq,
22660 Hash,
22661 Ord,
22662 PartialEq,
22663 PartialOrd
22664 )]
22665 pub enum PostGetMultipleNewAddressProofsResponseJsonrpc {
22666 #[serde(rename = "2.0")]
22667 X20,
22668 }
22669 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsResponseJsonrpc {
22670 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22671 match *self {
22672 Self::X20 => f.write_str("2.0"),
22673 }
22674 }
22675 }
22676 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsResponseJsonrpc {
22677 type Err = self::error::ConversionError;
22678 fn from_str(
22679 value: &str,
22680 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22681 match value {
22682 "2.0" => Ok(Self::X20),
22683 _ => Err("invalid value".into()),
22684 }
22685 }
22686 }
22687 impl ::std::convert::TryFrom<&str>
22688 for PostGetMultipleNewAddressProofsResponseJsonrpc {
22689 type Error = self::error::ConversionError;
22690 fn try_from(
22691 value: &str,
22692 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22693 value.parse()
22694 }
22695 }
22696 impl ::std::convert::TryFrom<&::std::string::String>
22697 for PostGetMultipleNewAddressProofsResponseJsonrpc {
22698 type Error = self::error::ConversionError;
22699 fn try_from(
22700 value: &::std::string::String,
22701 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22702 value.parse()
22703 }
22704 }
22705 impl ::std::convert::TryFrom<::std::string::String>
22706 for PostGetMultipleNewAddressProofsResponseJsonrpc {
22707 type Error = self::error::ConversionError;
22708 fn try_from(
22709 value: ::std::string::String,
22710 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22711 value.parse()
22712 }
22713 }
22714 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22740 pub struct PostGetMultipleNewAddressProofsResponseResult {
22741 pub context: Context,
22742 pub value: ::std::vec::Vec<MerkleContextWithNewAddressProof>,
22743 }
22744 impl PostGetMultipleNewAddressProofsResponseResult {
22745 pub fn builder() -> builder::PostGetMultipleNewAddressProofsResponseResult {
22746 Default::default()
22747 }
22748 }
22749 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22795 pub struct PostGetMultipleNewAddressProofsV2Body {
22796 pub id: PostGetMultipleNewAddressProofsV2BodyId,
22798 pub jsonrpc: PostGetMultipleNewAddressProofsV2BodyJsonrpc,
22800 pub method: PostGetMultipleNewAddressProofsV2BodyMethod,
22802 pub params: ::std::vec::Vec<AddressWithTree>,
22803 }
22804 impl PostGetMultipleNewAddressProofsV2Body {
22805 pub fn builder() -> builder::PostGetMultipleNewAddressProofsV2Body {
22806 Default::default()
22807 }
22808 }
22809 #[derive(
22824 ::serde::Deserialize,
22825 ::serde::Serialize,
22826 Clone,
22827 Copy,
22828 Debug,
22829 Eq,
22830 Hash,
22831 Ord,
22832 PartialEq,
22833 PartialOrd
22834 )]
22835 pub enum PostGetMultipleNewAddressProofsV2BodyId {
22836 #[serde(rename = "test-account")]
22837 TestAccount,
22838 }
22839 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2BodyId {
22840 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22841 match *self {
22842 Self::TestAccount => f.write_str("test-account"),
22843 }
22844 }
22845 }
22846 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2BodyId {
22847 type Err = self::error::ConversionError;
22848 fn from_str(
22849 value: &str,
22850 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22851 match value {
22852 "test-account" => Ok(Self::TestAccount),
22853 _ => Err("invalid value".into()),
22854 }
22855 }
22856 }
22857 impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsV2BodyId {
22858 type Error = self::error::ConversionError;
22859 fn try_from(
22860 value: &str,
22861 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22862 value.parse()
22863 }
22864 }
22865 impl ::std::convert::TryFrom<&::std::string::String>
22866 for PostGetMultipleNewAddressProofsV2BodyId {
22867 type Error = self::error::ConversionError;
22868 fn try_from(
22869 value: &::std::string::String,
22870 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22871 value.parse()
22872 }
22873 }
22874 impl ::std::convert::TryFrom<::std::string::String>
22875 for PostGetMultipleNewAddressProofsV2BodyId {
22876 type Error = self::error::ConversionError;
22877 fn try_from(
22878 value: ::std::string::String,
22879 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22880 value.parse()
22881 }
22882 }
22883 #[derive(
22898 ::serde::Deserialize,
22899 ::serde::Serialize,
22900 Clone,
22901 Copy,
22902 Debug,
22903 Eq,
22904 Hash,
22905 Ord,
22906 PartialEq,
22907 PartialOrd
22908 )]
22909 pub enum PostGetMultipleNewAddressProofsV2BodyJsonrpc {
22910 #[serde(rename = "2.0")]
22911 X20,
22912 }
22913 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2BodyJsonrpc {
22914 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22915 match *self {
22916 Self::X20 => f.write_str("2.0"),
22917 }
22918 }
22919 }
22920 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2BodyJsonrpc {
22921 type Err = self::error::ConversionError;
22922 fn from_str(
22923 value: &str,
22924 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22925 match value {
22926 "2.0" => Ok(Self::X20),
22927 _ => Err("invalid value".into()),
22928 }
22929 }
22930 }
22931 impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsV2BodyJsonrpc {
22932 type Error = self::error::ConversionError;
22933 fn try_from(
22934 value: &str,
22935 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22936 value.parse()
22937 }
22938 }
22939 impl ::std::convert::TryFrom<&::std::string::String>
22940 for PostGetMultipleNewAddressProofsV2BodyJsonrpc {
22941 type Error = self::error::ConversionError;
22942 fn try_from(
22943 value: &::std::string::String,
22944 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22945 value.parse()
22946 }
22947 }
22948 impl ::std::convert::TryFrom<::std::string::String>
22949 for PostGetMultipleNewAddressProofsV2BodyJsonrpc {
22950 type Error = self::error::ConversionError;
22951 fn try_from(
22952 value: ::std::string::String,
22953 ) -> ::std::result::Result<Self, self::error::ConversionError> {
22954 value.parse()
22955 }
22956 }
22957 #[derive(
22972 ::serde::Deserialize,
22973 ::serde::Serialize,
22974 Clone,
22975 Copy,
22976 Debug,
22977 Eq,
22978 Hash,
22979 Ord,
22980 PartialEq,
22981 PartialOrd
22982 )]
22983 pub enum PostGetMultipleNewAddressProofsV2BodyMethod {
22984 #[serde(rename = "getMultipleNewAddressProofsV2")]
22985 GetMultipleNewAddressProofsV2,
22986 }
22987 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2BodyMethod {
22988 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22989 match *self {
22990 Self::GetMultipleNewAddressProofsV2 => {
22991 f.write_str("getMultipleNewAddressProofsV2")
22992 }
22993 }
22994 }
22995 }
22996 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2BodyMethod {
22997 type Err = self::error::ConversionError;
22998 fn from_str(
22999 value: &str,
23000 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23001 match value {
23002 "getMultipleNewAddressProofsV2" => {
23003 Ok(Self::GetMultipleNewAddressProofsV2)
23004 }
23005 _ => Err("invalid value".into()),
23006 }
23007 }
23008 }
23009 impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsV2BodyMethod {
23010 type Error = self::error::ConversionError;
23011 fn try_from(
23012 value: &str,
23013 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23014 value.parse()
23015 }
23016 }
23017 impl ::std::convert::TryFrom<&::std::string::String>
23018 for PostGetMultipleNewAddressProofsV2BodyMethod {
23019 type Error = self::error::ConversionError;
23020 fn try_from(
23021 value: &::std::string::String,
23022 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23023 value.parse()
23024 }
23025 }
23026 impl ::std::convert::TryFrom<::std::string::String>
23027 for PostGetMultipleNewAddressProofsV2BodyMethod {
23028 type Error = self::error::ConversionError;
23029 fn try_from(
23030 value: ::std::string::String,
23031 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23032 value.parse()
23033 }
23034 }
23035 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23095 pub struct PostGetMultipleNewAddressProofsV2Response {
23096 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23097 pub error: ::std::option::Option<PostGetMultipleNewAddressProofsV2ResponseError>,
23098 pub id: PostGetMultipleNewAddressProofsV2ResponseId,
23100 pub jsonrpc: PostGetMultipleNewAddressProofsV2ResponseJsonrpc,
23102 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23103 pub result: ::std::option::Option<
23104 PostGetMultipleNewAddressProofsV2ResponseResult,
23105 >,
23106 }
23107 impl PostGetMultipleNewAddressProofsV2Response {
23108 pub fn builder() -> builder::PostGetMultipleNewAddressProofsV2Response {
23109 Default::default()
23110 }
23111 }
23112 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23131 pub struct PostGetMultipleNewAddressProofsV2ResponseError {
23132 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23133 pub code: ::std::option::Option<i64>,
23134 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23135 pub message: ::std::option::Option<::std::string::String>,
23136 }
23137 impl ::std::default::Default for PostGetMultipleNewAddressProofsV2ResponseError {
23138 fn default() -> Self {
23139 Self {
23140 code: Default::default(),
23141 message: Default::default(),
23142 }
23143 }
23144 }
23145 impl PostGetMultipleNewAddressProofsV2ResponseError {
23146 pub fn builder() -> builder::PostGetMultipleNewAddressProofsV2ResponseError {
23147 Default::default()
23148 }
23149 }
23150 #[derive(
23165 ::serde::Deserialize,
23166 ::serde::Serialize,
23167 Clone,
23168 Copy,
23169 Debug,
23170 Eq,
23171 Hash,
23172 Ord,
23173 PartialEq,
23174 PartialOrd
23175 )]
23176 pub enum PostGetMultipleNewAddressProofsV2ResponseId {
23177 #[serde(rename = "test-account")]
23178 TestAccount,
23179 }
23180 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2ResponseId {
23181 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23182 match *self {
23183 Self::TestAccount => f.write_str("test-account"),
23184 }
23185 }
23186 }
23187 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2ResponseId {
23188 type Err = self::error::ConversionError;
23189 fn from_str(
23190 value: &str,
23191 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23192 match value {
23193 "test-account" => Ok(Self::TestAccount),
23194 _ => Err("invalid value".into()),
23195 }
23196 }
23197 }
23198 impl ::std::convert::TryFrom<&str> for PostGetMultipleNewAddressProofsV2ResponseId {
23199 type Error = self::error::ConversionError;
23200 fn try_from(
23201 value: &str,
23202 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23203 value.parse()
23204 }
23205 }
23206 impl ::std::convert::TryFrom<&::std::string::String>
23207 for PostGetMultipleNewAddressProofsV2ResponseId {
23208 type Error = self::error::ConversionError;
23209 fn try_from(
23210 value: &::std::string::String,
23211 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23212 value.parse()
23213 }
23214 }
23215 impl ::std::convert::TryFrom<::std::string::String>
23216 for PostGetMultipleNewAddressProofsV2ResponseId {
23217 type Error = self::error::ConversionError;
23218 fn try_from(
23219 value: ::std::string::String,
23220 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23221 value.parse()
23222 }
23223 }
23224 #[derive(
23239 ::serde::Deserialize,
23240 ::serde::Serialize,
23241 Clone,
23242 Copy,
23243 Debug,
23244 Eq,
23245 Hash,
23246 Ord,
23247 PartialEq,
23248 PartialOrd
23249 )]
23250 pub enum PostGetMultipleNewAddressProofsV2ResponseJsonrpc {
23251 #[serde(rename = "2.0")]
23252 X20,
23253 }
23254 impl ::std::fmt::Display for PostGetMultipleNewAddressProofsV2ResponseJsonrpc {
23255 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23256 match *self {
23257 Self::X20 => f.write_str("2.0"),
23258 }
23259 }
23260 }
23261 impl ::std::str::FromStr for PostGetMultipleNewAddressProofsV2ResponseJsonrpc {
23262 type Err = self::error::ConversionError;
23263 fn from_str(
23264 value: &str,
23265 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23266 match value {
23267 "2.0" => Ok(Self::X20),
23268 _ => Err("invalid value".into()),
23269 }
23270 }
23271 }
23272 impl ::std::convert::TryFrom<&str>
23273 for PostGetMultipleNewAddressProofsV2ResponseJsonrpc {
23274 type Error = self::error::ConversionError;
23275 fn try_from(
23276 value: &str,
23277 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23278 value.parse()
23279 }
23280 }
23281 impl ::std::convert::TryFrom<&::std::string::String>
23282 for PostGetMultipleNewAddressProofsV2ResponseJsonrpc {
23283 type Error = self::error::ConversionError;
23284 fn try_from(
23285 value: &::std::string::String,
23286 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23287 value.parse()
23288 }
23289 }
23290 impl ::std::convert::TryFrom<::std::string::String>
23291 for PostGetMultipleNewAddressProofsV2ResponseJsonrpc {
23292 type Error = self::error::ConversionError;
23293 fn try_from(
23294 value: ::std::string::String,
23295 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23296 value.parse()
23297 }
23298 }
23299 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23325 pub struct PostGetMultipleNewAddressProofsV2ResponseResult {
23326 pub context: Context,
23327 pub value: ::std::vec::Vec<MerkleContextWithNewAddressProof>,
23328 }
23329 impl PostGetMultipleNewAddressProofsV2ResponseResult {
23330 pub fn builder() -> builder::PostGetMultipleNewAddressProofsV2ResponseResult {
23331 Default::default()
23332 }
23333 }
23334 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23428 pub struct PostGetQueueElementsBody {
23429 pub id: PostGetQueueElementsBodyId,
23431 pub jsonrpc: PostGetQueueElementsBodyJsonrpc,
23433 pub method: PostGetQueueElementsBodyMethod,
23435 pub params: PostGetQueueElementsBodyParams,
23436 }
23437 impl PostGetQueueElementsBody {
23438 pub fn builder() -> builder::PostGetQueueElementsBody {
23439 Default::default()
23440 }
23441 }
23442 #[derive(
23457 ::serde::Deserialize,
23458 ::serde::Serialize,
23459 Clone,
23460 Copy,
23461 Debug,
23462 Eq,
23463 Hash,
23464 Ord,
23465 PartialEq,
23466 PartialOrd
23467 )]
23468 pub enum PostGetQueueElementsBodyId {
23469 #[serde(rename = "test-account")]
23470 TestAccount,
23471 }
23472 impl ::std::fmt::Display for PostGetQueueElementsBodyId {
23473 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23474 match *self {
23475 Self::TestAccount => f.write_str("test-account"),
23476 }
23477 }
23478 }
23479 impl ::std::str::FromStr for PostGetQueueElementsBodyId {
23480 type Err = self::error::ConversionError;
23481 fn from_str(
23482 value: &str,
23483 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23484 match value {
23485 "test-account" => Ok(Self::TestAccount),
23486 _ => Err("invalid value".into()),
23487 }
23488 }
23489 }
23490 impl ::std::convert::TryFrom<&str> for PostGetQueueElementsBodyId {
23491 type Error = self::error::ConversionError;
23492 fn try_from(
23493 value: &str,
23494 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23495 value.parse()
23496 }
23497 }
23498 impl ::std::convert::TryFrom<&::std::string::String> for PostGetQueueElementsBodyId {
23499 type Error = self::error::ConversionError;
23500 fn try_from(
23501 value: &::std::string::String,
23502 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23503 value.parse()
23504 }
23505 }
23506 impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueElementsBodyId {
23507 type Error = self::error::ConversionError;
23508 fn try_from(
23509 value: ::std::string::String,
23510 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23511 value.parse()
23512 }
23513 }
23514 #[derive(
23529 ::serde::Deserialize,
23530 ::serde::Serialize,
23531 Clone,
23532 Copy,
23533 Debug,
23534 Eq,
23535 Hash,
23536 Ord,
23537 PartialEq,
23538 PartialOrd
23539 )]
23540 pub enum PostGetQueueElementsBodyJsonrpc {
23541 #[serde(rename = "2.0")]
23542 X20,
23543 }
23544 impl ::std::fmt::Display for PostGetQueueElementsBodyJsonrpc {
23545 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23546 match *self {
23547 Self::X20 => f.write_str("2.0"),
23548 }
23549 }
23550 }
23551 impl ::std::str::FromStr for PostGetQueueElementsBodyJsonrpc {
23552 type Err = self::error::ConversionError;
23553 fn from_str(
23554 value: &str,
23555 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23556 match value {
23557 "2.0" => Ok(Self::X20),
23558 _ => Err("invalid value".into()),
23559 }
23560 }
23561 }
23562 impl ::std::convert::TryFrom<&str> for PostGetQueueElementsBodyJsonrpc {
23563 type Error = self::error::ConversionError;
23564 fn try_from(
23565 value: &str,
23566 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23567 value.parse()
23568 }
23569 }
23570 impl ::std::convert::TryFrom<&::std::string::String>
23571 for PostGetQueueElementsBodyJsonrpc {
23572 type Error = self::error::ConversionError;
23573 fn try_from(
23574 value: &::std::string::String,
23575 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23576 value.parse()
23577 }
23578 }
23579 impl ::std::convert::TryFrom<::std::string::String>
23580 for PostGetQueueElementsBodyJsonrpc {
23581 type Error = self::error::ConversionError;
23582 fn try_from(
23583 value: ::std::string::String,
23584 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23585 value.parse()
23586 }
23587 }
23588 #[derive(
23603 ::serde::Deserialize,
23604 ::serde::Serialize,
23605 Clone,
23606 Copy,
23607 Debug,
23608 Eq,
23609 Hash,
23610 Ord,
23611 PartialEq,
23612 PartialOrd
23613 )]
23614 pub enum PostGetQueueElementsBodyMethod {
23615 #[serde(rename = "getQueueElements")]
23616 GetQueueElements,
23617 }
23618 impl ::std::fmt::Display for PostGetQueueElementsBodyMethod {
23619 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23620 match *self {
23621 Self::GetQueueElements => f.write_str("getQueueElements"),
23622 }
23623 }
23624 }
23625 impl ::std::str::FromStr for PostGetQueueElementsBodyMethod {
23626 type Err = self::error::ConversionError;
23627 fn from_str(
23628 value: &str,
23629 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23630 match value {
23631 "getQueueElements" => Ok(Self::GetQueueElements),
23632 _ => Err("invalid value".into()),
23633 }
23634 }
23635 }
23636 impl ::std::convert::TryFrom<&str> for PostGetQueueElementsBodyMethod {
23637 type Error = self::error::ConversionError;
23638 fn try_from(
23639 value: &str,
23640 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23641 value.parse()
23642 }
23643 }
23644 impl ::std::convert::TryFrom<&::std::string::String>
23645 for PostGetQueueElementsBodyMethod {
23646 type Error = self::error::ConversionError;
23647 fn try_from(
23648 value: &::std::string::String,
23649 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23650 value.parse()
23651 }
23652 }
23653 impl ::std::convert::TryFrom<::std::string::String>
23654 for PostGetQueueElementsBodyMethod {
23655 type Error = self::error::ConversionError;
23656 fn try_from(
23657 value: ::std::string::String,
23658 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23659 value.parse()
23660 }
23661 }
23662 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23724 #[serde(deny_unknown_fields)]
23725 pub struct PostGetQueueElementsBodyParams {
23726 #[serde(
23727 rename = "addressQueue",
23728 default,
23729 skip_serializing_if = "::std::option::Option::is_none"
23730 )]
23731 pub address_queue: ::std::option::Option<QueueRequest>,
23732 #[serde(
23733 rename = "inputQueue",
23734 default,
23735 skip_serializing_if = "::std::option::Option::is_none"
23736 )]
23737 pub input_queue: ::std::option::Option<QueueRequest>,
23738 #[serde(
23739 rename = "outputQueue",
23740 default,
23741 skip_serializing_if = "::std::option::Option::is_none"
23742 )]
23743 pub output_queue: ::std::option::Option<QueueRequest>,
23744 pub tree: Hash,
23745 }
23746 impl PostGetQueueElementsBodyParams {
23747 pub fn builder() -> builder::PostGetQueueElementsBodyParams {
23748 Default::default()
23749 }
23750 }
23751 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23811 pub struct PostGetQueueElementsResponse {
23812 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23813 pub error: ::std::option::Option<PostGetQueueElementsResponseError>,
23814 pub id: PostGetQueueElementsResponseId,
23816 pub jsonrpc: PostGetQueueElementsResponseJsonrpc,
23818 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23819 pub result: ::std::option::Option<PostGetQueueElementsResponseResult>,
23820 }
23821 impl PostGetQueueElementsResponse {
23822 pub fn builder() -> builder::PostGetQueueElementsResponse {
23823 Default::default()
23824 }
23825 }
23826 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23845 pub struct PostGetQueueElementsResponseError {
23846 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23847 pub code: ::std::option::Option<i64>,
23848 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23849 pub message: ::std::option::Option<::std::string::String>,
23850 }
23851 impl ::std::default::Default for PostGetQueueElementsResponseError {
23852 fn default() -> Self {
23853 Self {
23854 code: Default::default(),
23855 message: Default::default(),
23856 }
23857 }
23858 }
23859 impl PostGetQueueElementsResponseError {
23860 pub fn builder() -> builder::PostGetQueueElementsResponseError {
23861 Default::default()
23862 }
23863 }
23864 #[derive(
23879 ::serde::Deserialize,
23880 ::serde::Serialize,
23881 Clone,
23882 Copy,
23883 Debug,
23884 Eq,
23885 Hash,
23886 Ord,
23887 PartialEq,
23888 PartialOrd
23889 )]
23890 pub enum PostGetQueueElementsResponseId {
23891 #[serde(rename = "test-account")]
23892 TestAccount,
23893 }
23894 impl ::std::fmt::Display for PostGetQueueElementsResponseId {
23895 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23896 match *self {
23897 Self::TestAccount => f.write_str("test-account"),
23898 }
23899 }
23900 }
23901 impl ::std::str::FromStr for PostGetQueueElementsResponseId {
23902 type Err = self::error::ConversionError;
23903 fn from_str(
23904 value: &str,
23905 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23906 match value {
23907 "test-account" => Ok(Self::TestAccount),
23908 _ => Err("invalid value".into()),
23909 }
23910 }
23911 }
23912 impl ::std::convert::TryFrom<&str> for PostGetQueueElementsResponseId {
23913 type Error = self::error::ConversionError;
23914 fn try_from(
23915 value: &str,
23916 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23917 value.parse()
23918 }
23919 }
23920 impl ::std::convert::TryFrom<&::std::string::String>
23921 for PostGetQueueElementsResponseId {
23922 type Error = self::error::ConversionError;
23923 fn try_from(
23924 value: &::std::string::String,
23925 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23926 value.parse()
23927 }
23928 }
23929 impl ::std::convert::TryFrom<::std::string::String>
23930 for PostGetQueueElementsResponseId {
23931 type Error = self::error::ConversionError;
23932 fn try_from(
23933 value: ::std::string::String,
23934 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23935 value.parse()
23936 }
23937 }
23938 #[derive(
23953 ::serde::Deserialize,
23954 ::serde::Serialize,
23955 Clone,
23956 Copy,
23957 Debug,
23958 Eq,
23959 Hash,
23960 Ord,
23961 PartialEq,
23962 PartialOrd
23963 )]
23964 pub enum PostGetQueueElementsResponseJsonrpc {
23965 #[serde(rename = "2.0")]
23966 X20,
23967 }
23968 impl ::std::fmt::Display for PostGetQueueElementsResponseJsonrpc {
23969 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23970 match *self {
23971 Self::X20 => f.write_str("2.0"),
23972 }
23973 }
23974 }
23975 impl ::std::str::FromStr for PostGetQueueElementsResponseJsonrpc {
23976 type Err = self::error::ConversionError;
23977 fn from_str(
23978 value: &str,
23979 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23980 match value {
23981 "2.0" => Ok(Self::X20),
23982 _ => Err("invalid value".into()),
23983 }
23984 }
23985 }
23986 impl ::std::convert::TryFrom<&str> for PostGetQueueElementsResponseJsonrpc {
23987 type Error = self::error::ConversionError;
23988 fn try_from(
23989 value: &str,
23990 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23991 value.parse()
23992 }
23993 }
23994 impl ::std::convert::TryFrom<&::std::string::String>
23995 for PostGetQueueElementsResponseJsonrpc {
23996 type Error = self::error::ConversionError;
23997 fn try_from(
23998 value: &::std::string::String,
23999 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24000 value.parse()
24001 }
24002 }
24003 impl ::std::convert::TryFrom<::std::string::String>
24004 for PostGetQueueElementsResponseJsonrpc {
24005 type Error = self::error::ConversionError;
24006 fn try_from(
24007 value: ::std::string::String,
24008 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24009 value.parse()
24010 }
24011 }
24012 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24038 #[serde(deny_unknown_fields)]
24039 pub struct PostGetQueueElementsResponseResult {
24040 #[serde(
24041 rename = "addressQueue",
24042 default,
24043 skip_serializing_if = "::std::option::Option::is_none"
24044 )]
24045 pub address_queue: ::std::option::Option<AddressQueueData>,
24046 pub context: Context,
24047 #[serde(
24048 rename = "stateQueue",
24049 default,
24050 skip_serializing_if = "::std::option::Option::is_none"
24051 )]
24052 pub state_queue: ::std::option::Option<StateQueueData>,
24053 }
24054 impl PostGetQueueElementsResponseResult {
24055 pub fn builder() -> builder::PostGetQueueElementsResponseResult {
24056 Default::default()
24057 }
24058 }
24059 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24114 pub struct PostGetQueueInfoBody {
24115 pub id: PostGetQueueInfoBodyId,
24117 pub jsonrpc: PostGetQueueInfoBodyJsonrpc,
24119 pub method: PostGetQueueInfoBodyMethod,
24121 pub params: PostGetQueueInfoBodyParams,
24122 }
24123 impl PostGetQueueInfoBody {
24124 pub fn builder() -> builder::PostGetQueueInfoBody {
24125 Default::default()
24126 }
24127 }
24128 #[derive(
24143 ::serde::Deserialize,
24144 ::serde::Serialize,
24145 Clone,
24146 Copy,
24147 Debug,
24148 Eq,
24149 Hash,
24150 Ord,
24151 PartialEq,
24152 PartialOrd
24153 )]
24154 pub enum PostGetQueueInfoBodyId {
24155 #[serde(rename = "test-account")]
24156 TestAccount,
24157 }
24158 impl ::std::fmt::Display for PostGetQueueInfoBodyId {
24159 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24160 match *self {
24161 Self::TestAccount => f.write_str("test-account"),
24162 }
24163 }
24164 }
24165 impl ::std::str::FromStr for PostGetQueueInfoBodyId {
24166 type Err = self::error::ConversionError;
24167 fn from_str(
24168 value: &str,
24169 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24170 match value {
24171 "test-account" => Ok(Self::TestAccount),
24172 _ => Err("invalid value".into()),
24173 }
24174 }
24175 }
24176 impl ::std::convert::TryFrom<&str> for PostGetQueueInfoBodyId {
24177 type Error = self::error::ConversionError;
24178 fn try_from(
24179 value: &str,
24180 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24181 value.parse()
24182 }
24183 }
24184 impl ::std::convert::TryFrom<&::std::string::String> for PostGetQueueInfoBodyId {
24185 type Error = self::error::ConversionError;
24186 fn try_from(
24187 value: &::std::string::String,
24188 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24189 value.parse()
24190 }
24191 }
24192 impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueInfoBodyId {
24193 type Error = self::error::ConversionError;
24194 fn try_from(
24195 value: ::std::string::String,
24196 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24197 value.parse()
24198 }
24199 }
24200 #[derive(
24215 ::serde::Deserialize,
24216 ::serde::Serialize,
24217 Clone,
24218 Copy,
24219 Debug,
24220 Eq,
24221 Hash,
24222 Ord,
24223 PartialEq,
24224 PartialOrd
24225 )]
24226 pub enum PostGetQueueInfoBodyJsonrpc {
24227 #[serde(rename = "2.0")]
24228 X20,
24229 }
24230 impl ::std::fmt::Display for PostGetQueueInfoBodyJsonrpc {
24231 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24232 match *self {
24233 Self::X20 => f.write_str("2.0"),
24234 }
24235 }
24236 }
24237 impl ::std::str::FromStr for PostGetQueueInfoBodyJsonrpc {
24238 type Err = self::error::ConversionError;
24239 fn from_str(
24240 value: &str,
24241 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24242 match value {
24243 "2.0" => Ok(Self::X20),
24244 _ => Err("invalid value".into()),
24245 }
24246 }
24247 }
24248 impl ::std::convert::TryFrom<&str> for PostGetQueueInfoBodyJsonrpc {
24249 type Error = self::error::ConversionError;
24250 fn try_from(
24251 value: &str,
24252 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24253 value.parse()
24254 }
24255 }
24256 impl ::std::convert::TryFrom<&::std::string::String>
24257 for PostGetQueueInfoBodyJsonrpc {
24258 type Error = self::error::ConversionError;
24259 fn try_from(
24260 value: &::std::string::String,
24261 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24262 value.parse()
24263 }
24264 }
24265 impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueInfoBodyJsonrpc {
24266 type Error = self::error::ConversionError;
24267 fn try_from(
24268 value: ::std::string::String,
24269 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24270 value.parse()
24271 }
24272 }
24273 #[derive(
24288 ::serde::Deserialize,
24289 ::serde::Serialize,
24290 Clone,
24291 Copy,
24292 Debug,
24293 Eq,
24294 Hash,
24295 Ord,
24296 PartialEq,
24297 PartialOrd
24298 )]
24299 pub enum PostGetQueueInfoBodyMethod {
24300 #[serde(rename = "getQueueInfo")]
24301 GetQueueInfo,
24302 }
24303 impl ::std::fmt::Display for PostGetQueueInfoBodyMethod {
24304 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24305 match *self {
24306 Self::GetQueueInfo => f.write_str("getQueueInfo"),
24307 }
24308 }
24309 }
24310 impl ::std::str::FromStr for PostGetQueueInfoBodyMethod {
24311 type Err = self::error::ConversionError;
24312 fn from_str(
24313 value: &str,
24314 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24315 match value {
24316 "getQueueInfo" => Ok(Self::GetQueueInfo),
24317 _ => Err("invalid value".into()),
24318 }
24319 }
24320 }
24321 impl ::std::convert::TryFrom<&str> for PostGetQueueInfoBodyMethod {
24322 type Error = self::error::ConversionError;
24323 fn try_from(
24324 value: &str,
24325 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24326 value.parse()
24327 }
24328 }
24329 impl ::std::convert::TryFrom<&::std::string::String> for PostGetQueueInfoBodyMethod {
24330 type Error = self::error::ConversionError;
24331 fn try_from(
24332 value: &::std::string::String,
24333 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24334 value.parse()
24335 }
24336 }
24337 impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueInfoBodyMethod {
24338 type Error = self::error::ConversionError;
24339 fn try_from(
24340 value: ::std::string::String,
24341 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24342 value.parse()
24343 }
24344 }
24345 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24368 #[serde(deny_unknown_fields)]
24369 pub struct PostGetQueueInfoBodyParams {
24370 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24371 pub trees: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
24372 }
24373 impl ::std::default::Default for PostGetQueueInfoBodyParams {
24374 fn default() -> Self {
24375 Self { trees: Default::default() }
24376 }
24377 }
24378 impl PostGetQueueInfoBodyParams {
24379 pub fn builder() -> builder::PostGetQueueInfoBodyParams {
24380 Default::default()
24381 }
24382 }
24383 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24445 pub struct PostGetQueueInfoResponse {
24446 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24447 pub error: ::std::option::Option<PostGetQueueInfoResponseError>,
24448 pub id: PostGetQueueInfoResponseId,
24450 pub jsonrpc: PostGetQueueInfoResponseJsonrpc,
24452 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24453 pub result: ::std::option::Option<PostGetQueueInfoResponseResult>,
24454 }
24455 impl PostGetQueueInfoResponse {
24456 pub fn builder() -> builder::PostGetQueueInfoResponse {
24457 Default::default()
24458 }
24459 }
24460 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24479 pub struct PostGetQueueInfoResponseError {
24480 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24481 pub code: ::std::option::Option<i64>,
24482 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24483 pub message: ::std::option::Option<::std::string::String>,
24484 }
24485 impl ::std::default::Default for PostGetQueueInfoResponseError {
24486 fn default() -> Self {
24487 Self {
24488 code: Default::default(),
24489 message: Default::default(),
24490 }
24491 }
24492 }
24493 impl PostGetQueueInfoResponseError {
24494 pub fn builder() -> builder::PostGetQueueInfoResponseError {
24495 Default::default()
24496 }
24497 }
24498 #[derive(
24513 ::serde::Deserialize,
24514 ::serde::Serialize,
24515 Clone,
24516 Copy,
24517 Debug,
24518 Eq,
24519 Hash,
24520 Ord,
24521 PartialEq,
24522 PartialOrd
24523 )]
24524 pub enum PostGetQueueInfoResponseId {
24525 #[serde(rename = "test-account")]
24526 TestAccount,
24527 }
24528 impl ::std::fmt::Display for PostGetQueueInfoResponseId {
24529 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24530 match *self {
24531 Self::TestAccount => f.write_str("test-account"),
24532 }
24533 }
24534 }
24535 impl ::std::str::FromStr for PostGetQueueInfoResponseId {
24536 type Err = self::error::ConversionError;
24537 fn from_str(
24538 value: &str,
24539 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24540 match value {
24541 "test-account" => Ok(Self::TestAccount),
24542 _ => Err("invalid value".into()),
24543 }
24544 }
24545 }
24546 impl ::std::convert::TryFrom<&str> for PostGetQueueInfoResponseId {
24547 type Error = self::error::ConversionError;
24548 fn try_from(
24549 value: &str,
24550 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24551 value.parse()
24552 }
24553 }
24554 impl ::std::convert::TryFrom<&::std::string::String> for PostGetQueueInfoResponseId {
24555 type Error = self::error::ConversionError;
24556 fn try_from(
24557 value: &::std::string::String,
24558 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24559 value.parse()
24560 }
24561 }
24562 impl ::std::convert::TryFrom<::std::string::String> for PostGetQueueInfoResponseId {
24563 type Error = self::error::ConversionError;
24564 fn try_from(
24565 value: ::std::string::String,
24566 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24567 value.parse()
24568 }
24569 }
24570 #[derive(
24585 ::serde::Deserialize,
24586 ::serde::Serialize,
24587 Clone,
24588 Copy,
24589 Debug,
24590 Eq,
24591 Hash,
24592 Ord,
24593 PartialEq,
24594 PartialOrd
24595 )]
24596 pub enum PostGetQueueInfoResponseJsonrpc {
24597 #[serde(rename = "2.0")]
24598 X20,
24599 }
24600 impl ::std::fmt::Display for PostGetQueueInfoResponseJsonrpc {
24601 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24602 match *self {
24603 Self::X20 => f.write_str("2.0"),
24604 }
24605 }
24606 }
24607 impl ::std::str::FromStr for PostGetQueueInfoResponseJsonrpc {
24608 type Err = self::error::ConversionError;
24609 fn from_str(
24610 value: &str,
24611 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24612 match value {
24613 "2.0" => Ok(Self::X20),
24614 _ => Err("invalid value".into()),
24615 }
24616 }
24617 }
24618 impl ::std::convert::TryFrom<&str> for PostGetQueueInfoResponseJsonrpc {
24619 type Error = self::error::ConversionError;
24620 fn try_from(
24621 value: &str,
24622 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24623 value.parse()
24624 }
24625 }
24626 impl ::std::convert::TryFrom<&::std::string::String>
24627 for PostGetQueueInfoResponseJsonrpc {
24628 type Error = self::error::ConversionError;
24629 fn try_from(
24630 value: &::std::string::String,
24631 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24632 value.parse()
24633 }
24634 }
24635 impl ::std::convert::TryFrom<::std::string::String>
24636 for PostGetQueueInfoResponseJsonrpc {
24637 type Error = self::error::ConversionError;
24638 fn try_from(
24639 value: ::std::string::String,
24640 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24641 value.parse()
24642 }
24643 }
24644 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24672 pub struct PostGetQueueInfoResponseResult {
24673 pub queues: ::std::vec::Vec<QueueInfo>,
24674 pub slot: u64,
24675 }
24676 impl PostGetQueueInfoResponseResult {
24677 pub fn builder() -> builder::PostGetQueueInfoResponseResult {
24678 Default::default()
24679 }
24680 }
24681 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24733 pub struct PostGetTransactionWithCompressionInfoBody {
24734 pub id: PostGetTransactionWithCompressionInfoBodyId,
24736 pub jsonrpc: PostGetTransactionWithCompressionInfoBodyJsonrpc,
24738 pub method: PostGetTransactionWithCompressionInfoBodyMethod,
24740 pub params: PostGetTransactionWithCompressionInfoBodyParams,
24741 }
24742 impl PostGetTransactionWithCompressionInfoBody {
24743 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoBody {
24744 Default::default()
24745 }
24746 }
24747 #[derive(
24762 ::serde::Deserialize,
24763 ::serde::Serialize,
24764 Clone,
24765 Copy,
24766 Debug,
24767 Eq,
24768 Hash,
24769 Ord,
24770 PartialEq,
24771 PartialOrd
24772 )]
24773 pub enum PostGetTransactionWithCompressionInfoBodyId {
24774 #[serde(rename = "test-account")]
24775 TestAccount,
24776 }
24777 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoBodyId {
24778 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24779 match *self {
24780 Self::TestAccount => f.write_str("test-account"),
24781 }
24782 }
24783 }
24784 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoBodyId {
24785 type Err = self::error::ConversionError;
24786 fn from_str(
24787 value: &str,
24788 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24789 match value {
24790 "test-account" => Ok(Self::TestAccount),
24791 _ => Err("invalid value".into()),
24792 }
24793 }
24794 }
24795 impl ::std::convert::TryFrom<&str> for PostGetTransactionWithCompressionInfoBodyId {
24796 type Error = self::error::ConversionError;
24797 fn try_from(
24798 value: &str,
24799 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24800 value.parse()
24801 }
24802 }
24803 impl ::std::convert::TryFrom<&::std::string::String>
24804 for PostGetTransactionWithCompressionInfoBodyId {
24805 type Error = self::error::ConversionError;
24806 fn try_from(
24807 value: &::std::string::String,
24808 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24809 value.parse()
24810 }
24811 }
24812 impl ::std::convert::TryFrom<::std::string::String>
24813 for PostGetTransactionWithCompressionInfoBodyId {
24814 type Error = self::error::ConversionError;
24815 fn try_from(
24816 value: ::std::string::String,
24817 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24818 value.parse()
24819 }
24820 }
24821 #[derive(
24836 ::serde::Deserialize,
24837 ::serde::Serialize,
24838 Clone,
24839 Copy,
24840 Debug,
24841 Eq,
24842 Hash,
24843 Ord,
24844 PartialEq,
24845 PartialOrd
24846 )]
24847 pub enum PostGetTransactionWithCompressionInfoBodyJsonrpc {
24848 #[serde(rename = "2.0")]
24849 X20,
24850 }
24851 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoBodyJsonrpc {
24852 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24853 match *self {
24854 Self::X20 => f.write_str("2.0"),
24855 }
24856 }
24857 }
24858 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoBodyJsonrpc {
24859 type Err = self::error::ConversionError;
24860 fn from_str(
24861 value: &str,
24862 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24863 match value {
24864 "2.0" => Ok(Self::X20),
24865 _ => Err("invalid value".into()),
24866 }
24867 }
24868 }
24869 impl ::std::convert::TryFrom<&str>
24870 for PostGetTransactionWithCompressionInfoBodyJsonrpc {
24871 type Error = self::error::ConversionError;
24872 fn try_from(
24873 value: &str,
24874 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24875 value.parse()
24876 }
24877 }
24878 impl ::std::convert::TryFrom<&::std::string::String>
24879 for PostGetTransactionWithCompressionInfoBodyJsonrpc {
24880 type Error = self::error::ConversionError;
24881 fn try_from(
24882 value: &::std::string::String,
24883 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24884 value.parse()
24885 }
24886 }
24887 impl ::std::convert::TryFrom<::std::string::String>
24888 for PostGetTransactionWithCompressionInfoBodyJsonrpc {
24889 type Error = self::error::ConversionError;
24890 fn try_from(
24891 value: ::std::string::String,
24892 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24893 value.parse()
24894 }
24895 }
24896 #[derive(
24911 ::serde::Deserialize,
24912 ::serde::Serialize,
24913 Clone,
24914 Copy,
24915 Debug,
24916 Eq,
24917 Hash,
24918 Ord,
24919 PartialEq,
24920 PartialOrd
24921 )]
24922 pub enum PostGetTransactionWithCompressionInfoBodyMethod {
24923 #[serde(rename = "getTransactionWithCompressionInfo")]
24924 GetTransactionWithCompressionInfo,
24925 }
24926 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoBodyMethod {
24927 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24928 match *self {
24929 Self::GetTransactionWithCompressionInfo => {
24930 f.write_str("getTransactionWithCompressionInfo")
24931 }
24932 }
24933 }
24934 }
24935 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoBodyMethod {
24936 type Err = self::error::ConversionError;
24937 fn from_str(
24938 value: &str,
24939 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24940 match value {
24941 "getTransactionWithCompressionInfo" => {
24942 Ok(Self::GetTransactionWithCompressionInfo)
24943 }
24944 _ => Err("invalid value".into()),
24945 }
24946 }
24947 }
24948 impl ::std::convert::TryFrom<&str>
24949 for PostGetTransactionWithCompressionInfoBodyMethod {
24950 type Error = self::error::ConversionError;
24951 fn try_from(
24952 value: &str,
24953 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24954 value.parse()
24955 }
24956 }
24957 impl ::std::convert::TryFrom<&::std::string::String>
24958 for PostGetTransactionWithCompressionInfoBodyMethod {
24959 type Error = self::error::ConversionError;
24960 fn try_from(
24961 value: &::std::string::String,
24962 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24963 value.parse()
24964 }
24965 }
24966 impl ::std::convert::TryFrom<::std::string::String>
24967 for PostGetTransactionWithCompressionInfoBodyMethod {
24968 type Error = self::error::ConversionError;
24969 fn try_from(
24970 value: ::std::string::String,
24971 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24972 value.parse()
24973 }
24974 }
24975 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24995 #[serde(deny_unknown_fields)]
24996 pub struct PostGetTransactionWithCompressionInfoBodyParams {
24997 pub signature: SerializableSignature,
24998 }
24999 impl PostGetTransactionWithCompressionInfoBodyParams {
25000 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoBodyParams {
25001 Default::default()
25002 }
25003 }
25004 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25078 pub struct PostGetTransactionWithCompressionInfoResponse {
25079 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25080 pub error: ::std::option::Option<
25081 PostGetTransactionWithCompressionInfoResponseError,
25082 >,
25083 pub id: PostGetTransactionWithCompressionInfoResponseId,
25085 pub jsonrpc: PostGetTransactionWithCompressionInfoResponseJsonrpc,
25087 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25088 pub result: ::std::option::Option<
25089 PostGetTransactionWithCompressionInfoResponseResult,
25090 >,
25091 }
25092 impl PostGetTransactionWithCompressionInfoResponse {
25093 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoResponse {
25094 Default::default()
25095 }
25096 }
25097 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25116 pub struct PostGetTransactionWithCompressionInfoResponseError {
25117 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25118 pub code: ::std::option::Option<i64>,
25119 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25120 pub message: ::std::option::Option<::std::string::String>,
25121 }
25122 impl ::std::default::Default for PostGetTransactionWithCompressionInfoResponseError {
25123 fn default() -> Self {
25124 Self {
25125 code: Default::default(),
25126 message: Default::default(),
25127 }
25128 }
25129 }
25130 impl PostGetTransactionWithCompressionInfoResponseError {
25131 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoResponseError {
25132 Default::default()
25133 }
25134 }
25135 #[derive(
25150 ::serde::Deserialize,
25151 ::serde::Serialize,
25152 Clone,
25153 Copy,
25154 Debug,
25155 Eq,
25156 Hash,
25157 Ord,
25158 PartialEq,
25159 PartialOrd
25160 )]
25161 pub enum PostGetTransactionWithCompressionInfoResponseId {
25162 #[serde(rename = "test-account")]
25163 TestAccount,
25164 }
25165 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoResponseId {
25166 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25167 match *self {
25168 Self::TestAccount => f.write_str("test-account"),
25169 }
25170 }
25171 }
25172 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoResponseId {
25173 type Err = self::error::ConversionError;
25174 fn from_str(
25175 value: &str,
25176 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25177 match value {
25178 "test-account" => Ok(Self::TestAccount),
25179 _ => Err("invalid value".into()),
25180 }
25181 }
25182 }
25183 impl ::std::convert::TryFrom<&str>
25184 for PostGetTransactionWithCompressionInfoResponseId {
25185 type Error = self::error::ConversionError;
25186 fn try_from(
25187 value: &str,
25188 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25189 value.parse()
25190 }
25191 }
25192 impl ::std::convert::TryFrom<&::std::string::String>
25193 for PostGetTransactionWithCompressionInfoResponseId {
25194 type Error = self::error::ConversionError;
25195 fn try_from(
25196 value: &::std::string::String,
25197 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25198 value.parse()
25199 }
25200 }
25201 impl ::std::convert::TryFrom<::std::string::String>
25202 for PostGetTransactionWithCompressionInfoResponseId {
25203 type Error = self::error::ConversionError;
25204 fn try_from(
25205 value: ::std::string::String,
25206 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25207 value.parse()
25208 }
25209 }
25210 #[derive(
25225 ::serde::Deserialize,
25226 ::serde::Serialize,
25227 Clone,
25228 Copy,
25229 Debug,
25230 Eq,
25231 Hash,
25232 Ord,
25233 PartialEq,
25234 PartialOrd
25235 )]
25236 pub enum PostGetTransactionWithCompressionInfoResponseJsonrpc {
25237 #[serde(rename = "2.0")]
25238 X20,
25239 }
25240 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoResponseJsonrpc {
25241 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25242 match *self {
25243 Self::X20 => f.write_str("2.0"),
25244 }
25245 }
25246 }
25247 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoResponseJsonrpc {
25248 type Err = self::error::ConversionError;
25249 fn from_str(
25250 value: &str,
25251 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25252 match value {
25253 "2.0" => Ok(Self::X20),
25254 _ => Err("invalid value".into()),
25255 }
25256 }
25257 }
25258 impl ::std::convert::TryFrom<&str>
25259 for PostGetTransactionWithCompressionInfoResponseJsonrpc {
25260 type Error = self::error::ConversionError;
25261 fn try_from(
25262 value: &str,
25263 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25264 value.parse()
25265 }
25266 }
25267 impl ::std::convert::TryFrom<&::std::string::String>
25268 for PostGetTransactionWithCompressionInfoResponseJsonrpc {
25269 type Error = self::error::ConversionError;
25270 fn try_from(
25271 value: &::std::string::String,
25272 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25273 value.parse()
25274 }
25275 }
25276 impl ::std::convert::TryFrom<::std::string::String>
25277 for PostGetTransactionWithCompressionInfoResponseJsonrpc {
25278 type Error = self::error::ConversionError;
25279 fn try_from(
25280 value: ::std::string::String,
25281 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25282 value.parse()
25283 }
25284 }
25285 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25325 pub struct PostGetTransactionWithCompressionInfoResponseResult {
25326 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25327 pub compression_info: ::std::option::Option<
25328 PostGetTransactionWithCompressionInfoResponseResultCompressionInfo,
25329 >,
25330 #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
25332 pub transaction: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
25333 }
25334 impl ::std::default::Default
25335 for PostGetTransactionWithCompressionInfoResponseResult {
25336 fn default() -> Self {
25337 Self {
25338 compression_info: Default::default(),
25339 transaction: Default::default(),
25340 }
25341 }
25342 }
25343 impl PostGetTransactionWithCompressionInfoResponseResult {
25344 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoResponseResult {
25345 Default::default()
25346 }
25347 }
25348 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25378 #[serde(deny_unknown_fields)]
25379 pub struct PostGetTransactionWithCompressionInfoResponseResultCompressionInfo {
25380 #[serde(rename = "closedAccounts")]
25381 pub closed_accounts: ::std::vec::Vec<AccountWithOptionalTokenData>,
25382 #[serde(rename = "openedAccounts")]
25383 pub opened_accounts: ::std::vec::Vec<AccountWithOptionalTokenData>,
25384 }
25385 impl PostGetTransactionWithCompressionInfoResponseResultCompressionInfo {
25386 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo {
25387 Default::default()
25388 }
25389 }
25390 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25442 pub struct PostGetTransactionWithCompressionInfoV2Body {
25443 pub id: PostGetTransactionWithCompressionInfoV2BodyId,
25445 pub jsonrpc: PostGetTransactionWithCompressionInfoV2BodyJsonrpc,
25447 pub method: PostGetTransactionWithCompressionInfoV2BodyMethod,
25449 pub params: PostGetTransactionWithCompressionInfoV2BodyParams,
25450 }
25451 impl PostGetTransactionWithCompressionInfoV2Body {
25452 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2Body {
25453 Default::default()
25454 }
25455 }
25456 #[derive(
25471 ::serde::Deserialize,
25472 ::serde::Serialize,
25473 Clone,
25474 Copy,
25475 Debug,
25476 Eq,
25477 Hash,
25478 Ord,
25479 PartialEq,
25480 PartialOrd
25481 )]
25482 pub enum PostGetTransactionWithCompressionInfoV2BodyId {
25483 #[serde(rename = "test-account")]
25484 TestAccount,
25485 }
25486 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2BodyId {
25487 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25488 match *self {
25489 Self::TestAccount => f.write_str("test-account"),
25490 }
25491 }
25492 }
25493 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2BodyId {
25494 type Err = self::error::ConversionError;
25495 fn from_str(
25496 value: &str,
25497 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25498 match value {
25499 "test-account" => Ok(Self::TestAccount),
25500 _ => Err("invalid value".into()),
25501 }
25502 }
25503 }
25504 impl ::std::convert::TryFrom<&str>
25505 for PostGetTransactionWithCompressionInfoV2BodyId {
25506 type Error = self::error::ConversionError;
25507 fn try_from(
25508 value: &str,
25509 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25510 value.parse()
25511 }
25512 }
25513 impl ::std::convert::TryFrom<&::std::string::String>
25514 for PostGetTransactionWithCompressionInfoV2BodyId {
25515 type Error = self::error::ConversionError;
25516 fn try_from(
25517 value: &::std::string::String,
25518 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25519 value.parse()
25520 }
25521 }
25522 impl ::std::convert::TryFrom<::std::string::String>
25523 for PostGetTransactionWithCompressionInfoV2BodyId {
25524 type Error = self::error::ConversionError;
25525 fn try_from(
25526 value: ::std::string::String,
25527 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25528 value.parse()
25529 }
25530 }
25531 #[derive(
25546 ::serde::Deserialize,
25547 ::serde::Serialize,
25548 Clone,
25549 Copy,
25550 Debug,
25551 Eq,
25552 Hash,
25553 Ord,
25554 PartialEq,
25555 PartialOrd
25556 )]
25557 pub enum PostGetTransactionWithCompressionInfoV2BodyJsonrpc {
25558 #[serde(rename = "2.0")]
25559 X20,
25560 }
25561 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2BodyJsonrpc {
25562 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25563 match *self {
25564 Self::X20 => f.write_str("2.0"),
25565 }
25566 }
25567 }
25568 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2BodyJsonrpc {
25569 type Err = self::error::ConversionError;
25570 fn from_str(
25571 value: &str,
25572 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25573 match value {
25574 "2.0" => Ok(Self::X20),
25575 _ => Err("invalid value".into()),
25576 }
25577 }
25578 }
25579 impl ::std::convert::TryFrom<&str>
25580 for PostGetTransactionWithCompressionInfoV2BodyJsonrpc {
25581 type Error = self::error::ConversionError;
25582 fn try_from(
25583 value: &str,
25584 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25585 value.parse()
25586 }
25587 }
25588 impl ::std::convert::TryFrom<&::std::string::String>
25589 for PostGetTransactionWithCompressionInfoV2BodyJsonrpc {
25590 type Error = self::error::ConversionError;
25591 fn try_from(
25592 value: &::std::string::String,
25593 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25594 value.parse()
25595 }
25596 }
25597 impl ::std::convert::TryFrom<::std::string::String>
25598 for PostGetTransactionWithCompressionInfoV2BodyJsonrpc {
25599 type Error = self::error::ConversionError;
25600 fn try_from(
25601 value: ::std::string::String,
25602 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25603 value.parse()
25604 }
25605 }
25606 #[derive(
25621 ::serde::Deserialize,
25622 ::serde::Serialize,
25623 Clone,
25624 Copy,
25625 Debug,
25626 Eq,
25627 Hash,
25628 Ord,
25629 PartialEq,
25630 PartialOrd
25631 )]
25632 pub enum PostGetTransactionWithCompressionInfoV2BodyMethod {
25633 #[serde(rename = "getTransactionWithCompressionInfoV2")]
25634 GetTransactionWithCompressionInfoV2,
25635 }
25636 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2BodyMethod {
25637 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25638 match *self {
25639 Self::GetTransactionWithCompressionInfoV2 => {
25640 f.write_str("getTransactionWithCompressionInfoV2")
25641 }
25642 }
25643 }
25644 }
25645 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2BodyMethod {
25646 type Err = self::error::ConversionError;
25647 fn from_str(
25648 value: &str,
25649 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25650 match value {
25651 "getTransactionWithCompressionInfoV2" => {
25652 Ok(Self::GetTransactionWithCompressionInfoV2)
25653 }
25654 _ => Err("invalid value".into()),
25655 }
25656 }
25657 }
25658 impl ::std::convert::TryFrom<&str>
25659 for PostGetTransactionWithCompressionInfoV2BodyMethod {
25660 type Error = self::error::ConversionError;
25661 fn try_from(
25662 value: &str,
25663 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25664 value.parse()
25665 }
25666 }
25667 impl ::std::convert::TryFrom<&::std::string::String>
25668 for PostGetTransactionWithCompressionInfoV2BodyMethod {
25669 type Error = self::error::ConversionError;
25670 fn try_from(
25671 value: &::std::string::String,
25672 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25673 value.parse()
25674 }
25675 }
25676 impl ::std::convert::TryFrom<::std::string::String>
25677 for PostGetTransactionWithCompressionInfoV2BodyMethod {
25678 type Error = self::error::ConversionError;
25679 fn try_from(
25680 value: ::std::string::String,
25681 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25682 value.parse()
25683 }
25684 }
25685 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25705 #[serde(deny_unknown_fields)]
25706 pub struct PostGetTransactionWithCompressionInfoV2BodyParams {
25707 pub signature: SerializableSignature,
25708 }
25709 impl PostGetTransactionWithCompressionInfoV2BodyParams {
25710 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2BodyParams {
25711 Default::default()
25712 }
25713 }
25714 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25788 pub struct PostGetTransactionWithCompressionInfoV2Response {
25789 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25790 pub error: ::std::option::Option<
25791 PostGetTransactionWithCompressionInfoV2ResponseError,
25792 >,
25793 pub id: PostGetTransactionWithCompressionInfoV2ResponseId,
25795 pub jsonrpc: PostGetTransactionWithCompressionInfoV2ResponseJsonrpc,
25797 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25798 pub result: ::std::option::Option<
25799 PostGetTransactionWithCompressionInfoV2ResponseResult,
25800 >,
25801 }
25802 impl PostGetTransactionWithCompressionInfoV2Response {
25803 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2Response {
25804 Default::default()
25805 }
25806 }
25807 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25826 pub struct PostGetTransactionWithCompressionInfoV2ResponseError {
25827 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25828 pub code: ::std::option::Option<i64>,
25829 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25830 pub message: ::std::option::Option<::std::string::String>,
25831 }
25832 impl ::std::default::Default
25833 for PostGetTransactionWithCompressionInfoV2ResponseError {
25834 fn default() -> Self {
25835 Self {
25836 code: Default::default(),
25837 message: Default::default(),
25838 }
25839 }
25840 }
25841 impl PostGetTransactionWithCompressionInfoV2ResponseError {
25842 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2ResponseError {
25843 Default::default()
25844 }
25845 }
25846 #[derive(
25861 ::serde::Deserialize,
25862 ::serde::Serialize,
25863 Clone,
25864 Copy,
25865 Debug,
25866 Eq,
25867 Hash,
25868 Ord,
25869 PartialEq,
25870 PartialOrd
25871 )]
25872 pub enum PostGetTransactionWithCompressionInfoV2ResponseId {
25873 #[serde(rename = "test-account")]
25874 TestAccount,
25875 }
25876 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2ResponseId {
25877 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25878 match *self {
25879 Self::TestAccount => f.write_str("test-account"),
25880 }
25881 }
25882 }
25883 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2ResponseId {
25884 type Err = self::error::ConversionError;
25885 fn from_str(
25886 value: &str,
25887 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25888 match value {
25889 "test-account" => Ok(Self::TestAccount),
25890 _ => Err("invalid value".into()),
25891 }
25892 }
25893 }
25894 impl ::std::convert::TryFrom<&str>
25895 for PostGetTransactionWithCompressionInfoV2ResponseId {
25896 type Error = self::error::ConversionError;
25897 fn try_from(
25898 value: &str,
25899 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25900 value.parse()
25901 }
25902 }
25903 impl ::std::convert::TryFrom<&::std::string::String>
25904 for PostGetTransactionWithCompressionInfoV2ResponseId {
25905 type Error = self::error::ConversionError;
25906 fn try_from(
25907 value: &::std::string::String,
25908 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25909 value.parse()
25910 }
25911 }
25912 impl ::std::convert::TryFrom<::std::string::String>
25913 for PostGetTransactionWithCompressionInfoV2ResponseId {
25914 type Error = self::error::ConversionError;
25915 fn try_from(
25916 value: ::std::string::String,
25917 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25918 value.parse()
25919 }
25920 }
25921 #[derive(
25936 ::serde::Deserialize,
25937 ::serde::Serialize,
25938 Clone,
25939 Copy,
25940 Debug,
25941 Eq,
25942 Hash,
25943 Ord,
25944 PartialEq,
25945 PartialOrd
25946 )]
25947 pub enum PostGetTransactionWithCompressionInfoV2ResponseJsonrpc {
25948 #[serde(rename = "2.0")]
25949 X20,
25950 }
25951 impl ::std::fmt::Display for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc {
25952 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25953 match *self {
25954 Self::X20 => f.write_str("2.0"),
25955 }
25956 }
25957 }
25958 impl ::std::str::FromStr for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc {
25959 type Err = self::error::ConversionError;
25960 fn from_str(
25961 value: &str,
25962 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25963 match value {
25964 "2.0" => Ok(Self::X20),
25965 _ => Err("invalid value".into()),
25966 }
25967 }
25968 }
25969 impl ::std::convert::TryFrom<&str>
25970 for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc {
25971 type Error = self::error::ConversionError;
25972 fn try_from(
25973 value: &str,
25974 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25975 value.parse()
25976 }
25977 }
25978 impl ::std::convert::TryFrom<&::std::string::String>
25979 for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc {
25980 type Error = self::error::ConversionError;
25981 fn try_from(
25982 value: &::std::string::String,
25983 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25984 value.parse()
25985 }
25986 }
25987 impl ::std::convert::TryFrom<::std::string::String>
25988 for PostGetTransactionWithCompressionInfoV2ResponseJsonrpc {
25989 type Error = self::error::ConversionError;
25990 fn try_from(
25991 value: ::std::string::String,
25992 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25993 value.parse()
25994 }
25995 }
25996 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26036 pub struct PostGetTransactionWithCompressionInfoV2ResponseResult {
26037 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26038 pub compression_info: ::std::option::Option<
26039 PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo,
26040 >,
26041 #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
26043 pub transaction: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
26044 }
26045 impl ::std::default::Default
26046 for PostGetTransactionWithCompressionInfoV2ResponseResult {
26047 fn default() -> Self {
26048 Self {
26049 compression_info: Default::default(),
26050 transaction: Default::default(),
26051 }
26052 }
26053 }
26054 impl PostGetTransactionWithCompressionInfoV2ResponseResult {
26055 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2ResponseResult {
26056 Default::default()
26057 }
26058 }
26059 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26089 #[serde(deny_unknown_fields)]
26090 pub struct PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo {
26091 #[serde(rename = "closedAccounts")]
26092 pub closed_accounts: ::std::vec::Vec<ClosedAccountWithOptionalTokenDataV2>,
26093 #[serde(rename = "openedAccounts")]
26094 pub opened_accounts: ::std::vec::Vec<AccountWithOptionalTokenDataV2>,
26095 }
26096 impl PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo {
26097 pub fn builder() -> builder::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo {
26098 Default::default()
26099 }
26100 }
26101 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26159 pub struct PostGetValidityProofBody {
26160 pub id: PostGetValidityProofBodyId,
26162 pub jsonrpc: PostGetValidityProofBodyJsonrpc,
26164 pub method: PostGetValidityProofBodyMethod,
26166 pub params: PostGetValidityProofBodyParams,
26167 }
26168 impl PostGetValidityProofBody {
26169 pub fn builder() -> builder::PostGetValidityProofBody {
26170 Default::default()
26171 }
26172 }
26173 #[derive(
26188 ::serde::Deserialize,
26189 ::serde::Serialize,
26190 Clone,
26191 Copy,
26192 Debug,
26193 Eq,
26194 Hash,
26195 Ord,
26196 PartialEq,
26197 PartialOrd
26198 )]
26199 pub enum PostGetValidityProofBodyId {
26200 #[serde(rename = "test-account")]
26201 TestAccount,
26202 }
26203 impl ::std::fmt::Display for PostGetValidityProofBodyId {
26204 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26205 match *self {
26206 Self::TestAccount => f.write_str("test-account"),
26207 }
26208 }
26209 }
26210 impl ::std::str::FromStr for PostGetValidityProofBodyId {
26211 type Err = self::error::ConversionError;
26212 fn from_str(
26213 value: &str,
26214 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26215 match value {
26216 "test-account" => Ok(Self::TestAccount),
26217 _ => Err("invalid value".into()),
26218 }
26219 }
26220 }
26221 impl ::std::convert::TryFrom<&str> for PostGetValidityProofBodyId {
26222 type Error = self::error::ConversionError;
26223 fn try_from(
26224 value: &str,
26225 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26226 value.parse()
26227 }
26228 }
26229 impl ::std::convert::TryFrom<&::std::string::String> for PostGetValidityProofBodyId {
26230 type Error = self::error::ConversionError;
26231 fn try_from(
26232 value: &::std::string::String,
26233 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26234 value.parse()
26235 }
26236 }
26237 impl ::std::convert::TryFrom<::std::string::String> for PostGetValidityProofBodyId {
26238 type Error = self::error::ConversionError;
26239 fn try_from(
26240 value: ::std::string::String,
26241 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26242 value.parse()
26243 }
26244 }
26245 #[derive(
26260 ::serde::Deserialize,
26261 ::serde::Serialize,
26262 Clone,
26263 Copy,
26264 Debug,
26265 Eq,
26266 Hash,
26267 Ord,
26268 PartialEq,
26269 PartialOrd
26270 )]
26271 pub enum PostGetValidityProofBodyJsonrpc {
26272 #[serde(rename = "2.0")]
26273 X20,
26274 }
26275 impl ::std::fmt::Display for PostGetValidityProofBodyJsonrpc {
26276 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26277 match *self {
26278 Self::X20 => f.write_str("2.0"),
26279 }
26280 }
26281 }
26282 impl ::std::str::FromStr for PostGetValidityProofBodyJsonrpc {
26283 type Err = self::error::ConversionError;
26284 fn from_str(
26285 value: &str,
26286 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26287 match value {
26288 "2.0" => Ok(Self::X20),
26289 _ => Err("invalid value".into()),
26290 }
26291 }
26292 }
26293 impl ::std::convert::TryFrom<&str> for PostGetValidityProofBodyJsonrpc {
26294 type Error = self::error::ConversionError;
26295 fn try_from(
26296 value: &str,
26297 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26298 value.parse()
26299 }
26300 }
26301 impl ::std::convert::TryFrom<&::std::string::String>
26302 for PostGetValidityProofBodyJsonrpc {
26303 type Error = self::error::ConversionError;
26304 fn try_from(
26305 value: &::std::string::String,
26306 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26307 value.parse()
26308 }
26309 }
26310 impl ::std::convert::TryFrom<::std::string::String>
26311 for PostGetValidityProofBodyJsonrpc {
26312 type Error = self::error::ConversionError;
26313 fn try_from(
26314 value: ::std::string::String,
26315 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26316 value.parse()
26317 }
26318 }
26319 #[derive(
26334 ::serde::Deserialize,
26335 ::serde::Serialize,
26336 Clone,
26337 Copy,
26338 Debug,
26339 Eq,
26340 Hash,
26341 Ord,
26342 PartialEq,
26343 PartialOrd
26344 )]
26345 pub enum PostGetValidityProofBodyMethod {
26346 #[serde(rename = "getValidityProof")]
26347 GetValidityProof,
26348 }
26349 impl ::std::fmt::Display for PostGetValidityProofBodyMethod {
26350 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26351 match *self {
26352 Self::GetValidityProof => f.write_str("getValidityProof"),
26353 }
26354 }
26355 }
26356 impl ::std::str::FromStr for PostGetValidityProofBodyMethod {
26357 type Err = self::error::ConversionError;
26358 fn from_str(
26359 value: &str,
26360 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26361 match value {
26362 "getValidityProof" => Ok(Self::GetValidityProof),
26363 _ => Err("invalid value".into()),
26364 }
26365 }
26366 }
26367 impl ::std::convert::TryFrom<&str> for PostGetValidityProofBodyMethod {
26368 type Error = self::error::ConversionError;
26369 fn try_from(
26370 value: &str,
26371 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26372 value.parse()
26373 }
26374 }
26375 impl ::std::convert::TryFrom<&::std::string::String>
26376 for PostGetValidityProofBodyMethod {
26377 type Error = self::error::ConversionError;
26378 fn try_from(
26379 value: &::std::string::String,
26380 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26381 value.parse()
26382 }
26383 }
26384 impl ::std::convert::TryFrom<::std::string::String>
26385 for PostGetValidityProofBodyMethod {
26386 type Error = self::error::ConversionError;
26387 fn try_from(
26388 value: ::std::string::String,
26389 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26390 value.parse()
26391 }
26392 }
26393 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26419 #[serde(deny_unknown_fields)]
26420 pub struct PostGetValidityProofBodyParams {
26421 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
26422 pub hashes: ::std::vec::Vec<Hash>,
26423 #[serde(
26424 rename = "newAddressesWithTrees",
26425 default,
26426 skip_serializing_if = "::std::vec::Vec::is_empty"
26427 )]
26428 pub new_addresses_with_trees: ::std::vec::Vec<AddressWithTree>,
26429 }
26430 impl ::std::default::Default for PostGetValidityProofBodyParams {
26431 fn default() -> Self {
26432 Self {
26433 hashes: Default::default(),
26434 new_addresses_with_trees: Default::default(),
26435 }
26436 }
26437 }
26438 impl PostGetValidityProofBodyParams {
26439 pub fn builder() -> builder::PostGetValidityProofBodyParams {
26440 Default::default()
26441 }
26442 }
26443 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26501 pub struct PostGetValidityProofResponse {
26502 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26503 pub error: ::std::option::Option<PostGetValidityProofResponseError>,
26504 pub id: PostGetValidityProofResponseId,
26506 pub jsonrpc: PostGetValidityProofResponseJsonrpc,
26508 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26509 pub result: ::std::option::Option<PostGetValidityProofResponseResult>,
26510 }
26511 impl PostGetValidityProofResponse {
26512 pub fn builder() -> builder::PostGetValidityProofResponse {
26513 Default::default()
26514 }
26515 }
26516 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26535 pub struct PostGetValidityProofResponseError {
26536 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26537 pub code: ::std::option::Option<i64>,
26538 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26539 pub message: ::std::option::Option<::std::string::String>,
26540 }
26541 impl ::std::default::Default for PostGetValidityProofResponseError {
26542 fn default() -> Self {
26543 Self {
26544 code: Default::default(),
26545 message: Default::default(),
26546 }
26547 }
26548 }
26549 impl PostGetValidityProofResponseError {
26550 pub fn builder() -> builder::PostGetValidityProofResponseError {
26551 Default::default()
26552 }
26553 }
26554 #[derive(
26569 ::serde::Deserialize,
26570 ::serde::Serialize,
26571 Clone,
26572 Copy,
26573 Debug,
26574 Eq,
26575 Hash,
26576 Ord,
26577 PartialEq,
26578 PartialOrd
26579 )]
26580 pub enum PostGetValidityProofResponseId {
26581 #[serde(rename = "test-account")]
26582 TestAccount,
26583 }
26584 impl ::std::fmt::Display for PostGetValidityProofResponseId {
26585 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26586 match *self {
26587 Self::TestAccount => f.write_str("test-account"),
26588 }
26589 }
26590 }
26591 impl ::std::str::FromStr for PostGetValidityProofResponseId {
26592 type Err = self::error::ConversionError;
26593 fn from_str(
26594 value: &str,
26595 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26596 match value {
26597 "test-account" => Ok(Self::TestAccount),
26598 _ => Err("invalid value".into()),
26599 }
26600 }
26601 }
26602 impl ::std::convert::TryFrom<&str> for PostGetValidityProofResponseId {
26603 type Error = self::error::ConversionError;
26604 fn try_from(
26605 value: &str,
26606 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26607 value.parse()
26608 }
26609 }
26610 impl ::std::convert::TryFrom<&::std::string::String>
26611 for PostGetValidityProofResponseId {
26612 type Error = self::error::ConversionError;
26613 fn try_from(
26614 value: &::std::string::String,
26615 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26616 value.parse()
26617 }
26618 }
26619 impl ::std::convert::TryFrom<::std::string::String>
26620 for PostGetValidityProofResponseId {
26621 type Error = self::error::ConversionError;
26622 fn try_from(
26623 value: ::std::string::String,
26624 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26625 value.parse()
26626 }
26627 }
26628 #[derive(
26643 ::serde::Deserialize,
26644 ::serde::Serialize,
26645 Clone,
26646 Copy,
26647 Debug,
26648 Eq,
26649 Hash,
26650 Ord,
26651 PartialEq,
26652 PartialOrd
26653 )]
26654 pub enum PostGetValidityProofResponseJsonrpc {
26655 #[serde(rename = "2.0")]
26656 X20,
26657 }
26658 impl ::std::fmt::Display for PostGetValidityProofResponseJsonrpc {
26659 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26660 match *self {
26661 Self::X20 => f.write_str("2.0"),
26662 }
26663 }
26664 }
26665 impl ::std::str::FromStr for PostGetValidityProofResponseJsonrpc {
26666 type Err = self::error::ConversionError;
26667 fn from_str(
26668 value: &str,
26669 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26670 match value {
26671 "2.0" => Ok(Self::X20),
26672 _ => Err("invalid value".into()),
26673 }
26674 }
26675 }
26676 impl ::std::convert::TryFrom<&str> for PostGetValidityProofResponseJsonrpc {
26677 type Error = self::error::ConversionError;
26678 fn try_from(
26679 value: &str,
26680 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26681 value.parse()
26682 }
26683 }
26684 impl ::std::convert::TryFrom<&::std::string::String>
26685 for PostGetValidityProofResponseJsonrpc {
26686 type Error = self::error::ConversionError;
26687 fn try_from(
26688 value: &::std::string::String,
26689 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26690 value.parse()
26691 }
26692 }
26693 impl ::std::convert::TryFrom<::std::string::String>
26694 for PostGetValidityProofResponseJsonrpc {
26695 type Error = self::error::ConversionError;
26696 fn try_from(
26697 value: ::std::string::String,
26698 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26699 value.parse()
26700 }
26701 }
26702 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26726 #[serde(deny_unknown_fields)]
26727 pub struct PostGetValidityProofResponseResult {
26728 pub context: Context,
26729 pub value: CompressedProofWithContext,
26730 }
26731 impl PostGetValidityProofResponseResult {
26732 pub fn builder() -> builder::PostGetValidityProofResponseResult {
26733 Default::default()
26734 }
26735 }
26736 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26794 pub struct PostGetValidityProofV2Body {
26795 pub id: PostGetValidityProofV2BodyId,
26797 pub jsonrpc: PostGetValidityProofV2BodyJsonrpc,
26799 pub method: PostGetValidityProofV2BodyMethod,
26801 pub params: PostGetValidityProofV2BodyParams,
26802 }
26803 impl PostGetValidityProofV2Body {
26804 pub fn builder() -> builder::PostGetValidityProofV2Body {
26805 Default::default()
26806 }
26807 }
26808 #[derive(
26823 ::serde::Deserialize,
26824 ::serde::Serialize,
26825 Clone,
26826 Copy,
26827 Debug,
26828 Eq,
26829 Hash,
26830 Ord,
26831 PartialEq,
26832 PartialOrd
26833 )]
26834 pub enum PostGetValidityProofV2BodyId {
26835 #[serde(rename = "test-account")]
26836 TestAccount,
26837 }
26838 impl ::std::fmt::Display for PostGetValidityProofV2BodyId {
26839 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26840 match *self {
26841 Self::TestAccount => f.write_str("test-account"),
26842 }
26843 }
26844 }
26845 impl ::std::str::FromStr for PostGetValidityProofV2BodyId {
26846 type Err = self::error::ConversionError;
26847 fn from_str(
26848 value: &str,
26849 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26850 match value {
26851 "test-account" => Ok(Self::TestAccount),
26852 _ => Err("invalid value".into()),
26853 }
26854 }
26855 }
26856 impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2BodyId {
26857 type Error = self::error::ConversionError;
26858 fn try_from(
26859 value: &str,
26860 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26861 value.parse()
26862 }
26863 }
26864 impl ::std::convert::TryFrom<&::std::string::String>
26865 for PostGetValidityProofV2BodyId {
26866 type Error = self::error::ConversionError;
26867 fn try_from(
26868 value: &::std::string::String,
26869 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26870 value.parse()
26871 }
26872 }
26873 impl ::std::convert::TryFrom<::std::string::String>
26874 for PostGetValidityProofV2BodyId {
26875 type Error = self::error::ConversionError;
26876 fn try_from(
26877 value: ::std::string::String,
26878 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26879 value.parse()
26880 }
26881 }
26882 #[derive(
26897 ::serde::Deserialize,
26898 ::serde::Serialize,
26899 Clone,
26900 Copy,
26901 Debug,
26902 Eq,
26903 Hash,
26904 Ord,
26905 PartialEq,
26906 PartialOrd
26907 )]
26908 pub enum PostGetValidityProofV2BodyJsonrpc {
26909 #[serde(rename = "2.0")]
26910 X20,
26911 }
26912 impl ::std::fmt::Display for PostGetValidityProofV2BodyJsonrpc {
26913 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26914 match *self {
26915 Self::X20 => f.write_str("2.0"),
26916 }
26917 }
26918 }
26919 impl ::std::str::FromStr for PostGetValidityProofV2BodyJsonrpc {
26920 type Err = self::error::ConversionError;
26921 fn from_str(
26922 value: &str,
26923 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26924 match value {
26925 "2.0" => Ok(Self::X20),
26926 _ => Err("invalid value".into()),
26927 }
26928 }
26929 }
26930 impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2BodyJsonrpc {
26931 type Error = self::error::ConversionError;
26932 fn try_from(
26933 value: &str,
26934 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26935 value.parse()
26936 }
26937 }
26938 impl ::std::convert::TryFrom<&::std::string::String>
26939 for PostGetValidityProofV2BodyJsonrpc {
26940 type Error = self::error::ConversionError;
26941 fn try_from(
26942 value: &::std::string::String,
26943 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26944 value.parse()
26945 }
26946 }
26947 impl ::std::convert::TryFrom<::std::string::String>
26948 for PostGetValidityProofV2BodyJsonrpc {
26949 type Error = self::error::ConversionError;
26950 fn try_from(
26951 value: ::std::string::String,
26952 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26953 value.parse()
26954 }
26955 }
26956 #[derive(
26971 ::serde::Deserialize,
26972 ::serde::Serialize,
26973 Clone,
26974 Copy,
26975 Debug,
26976 Eq,
26977 Hash,
26978 Ord,
26979 PartialEq,
26980 PartialOrd
26981 )]
26982 pub enum PostGetValidityProofV2BodyMethod {
26983 #[serde(rename = "getValidityProofV2")]
26984 GetValidityProofV2,
26985 }
26986 impl ::std::fmt::Display for PostGetValidityProofV2BodyMethod {
26987 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26988 match *self {
26989 Self::GetValidityProofV2 => f.write_str("getValidityProofV2"),
26990 }
26991 }
26992 }
26993 impl ::std::str::FromStr for PostGetValidityProofV2BodyMethod {
26994 type Err = self::error::ConversionError;
26995 fn from_str(
26996 value: &str,
26997 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26998 match value {
26999 "getValidityProofV2" => Ok(Self::GetValidityProofV2),
27000 _ => Err("invalid value".into()),
27001 }
27002 }
27003 }
27004 impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2BodyMethod {
27005 type Error = self::error::ConversionError;
27006 fn try_from(
27007 value: &str,
27008 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27009 value.parse()
27010 }
27011 }
27012 impl ::std::convert::TryFrom<&::std::string::String>
27013 for PostGetValidityProofV2BodyMethod {
27014 type Error = self::error::ConversionError;
27015 fn try_from(
27016 value: &::std::string::String,
27017 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27018 value.parse()
27019 }
27020 }
27021 impl ::std::convert::TryFrom<::std::string::String>
27022 for PostGetValidityProofV2BodyMethod {
27023 type Error = self::error::ConversionError;
27024 fn try_from(
27025 value: ::std::string::String,
27026 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27027 value.parse()
27028 }
27029 }
27030 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27056 #[serde(deny_unknown_fields)]
27057 pub struct PostGetValidityProofV2BodyParams {
27058 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
27059 pub hashes: ::std::vec::Vec<Hash>,
27060 #[serde(
27061 rename = "newAddressesWithTrees",
27062 default,
27063 skip_serializing_if = "::std::vec::Vec::is_empty"
27064 )]
27065 pub new_addresses_with_trees: ::std::vec::Vec<AddressWithTree>,
27066 }
27067 impl ::std::default::Default for PostGetValidityProofV2BodyParams {
27068 fn default() -> Self {
27069 Self {
27070 hashes: Default::default(),
27071 new_addresses_with_trees: Default::default(),
27072 }
27073 }
27074 }
27075 impl PostGetValidityProofV2BodyParams {
27076 pub fn builder() -> builder::PostGetValidityProofV2BodyParams {
27077 Default::default()
27078 }
27079 }
27080 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27138 pub struct PostGetValidityProofV2Response {
27139 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27140 pub error: ::std::option::Option<PostGetValidityProofV2ResponseError>,
27141 pub id: PostGetValidityProofV2ResponseId,
27143 pub jsonrpc: PostGetValidityProofV2ResponseJsonrpc,
27145 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27146 pub result: ::std::option::Option<PostGetValidityProofV2ResponseResult>,
27147 }
27148 impl PostGetValidityProofV2Response {
27149 pub fn builder() -> builder::PostGetValidityProofV2Response {
27150 Default::default()
27151 }
27152 }
27153 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27172 pub struct PostGetValidityProofV2ResponseError {
27173 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27174 pub code: ::std::option::Option<i64>,
27175 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27176 pub message: ::std::option::Option<::std::string::String>,
27177 }
27178 impl ::std::default::Default for PostGetValidityProofV2ResponseError {
27179 fn default() -> Self {
27180 Self {
27181 code: Default::default(),
27182 message: Default::default(),
27183 }
27184 }
27185 }
27186 impl PostGetValidityProofV2ResponseError {
27187 pub fn builder() -> builder::PostGetValidityProofV2ResponseError {
27188 Default::default()
27189 }
27190 }
27191 #[derive(
27206 ::serde::Deserialize,
27207 ::serde::Serialize,
27208 Clone,
27209 Copy,
27210 Debug,
27211 Eq,
27212 Hash,
27213 Ord,
27214 PartialEq,
27215 PartialOrd
27216 )]
27217 pub enum PostGetValidityProofV2ResponseId {
27218 #[serde(rename = "test-account")]
27219 TestAccount,
27220 }
27221 impl ::std::fmt::Display for PostGetValidityProofV2ResponseId {
27222 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27223 match *self {
27224 Self::TestAccount => f.write_str("test-account"),
27225 }
27226 }
27227 }
27228 impl ::std::str::FromStr for PostGetValidityProofV2ResponseId {
27229 type Err = self::error::ConversionError;
27230 fn from_str(
27231 value: &str,
27232 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27233 match value {
27234 "test-account" => Ok(Self::TestAccount),
27235 _ => Err("invalid value".into()),
27236 }
27237 }
27238 }
27239 impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2ResponseId {
27240 type Error = self::error::ConversionError;
27241 fn try_from(
27242 value: &str,
27243 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27244 value.parse()
27245 }
27246 }
27247 impl ::std::convert::TryFrom<&::std::string::String>
27248 for PostGetValidityProofV2ResponseId {
27249 type Error = self::error::ConversionError;
27250 fn try_from(
27251 value: &::std::string::String,
27252 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27253 value.parse()
27254 }
27255 }
27256 impl ::std::convert::TryFrom<::std::string::String>
27257 for PostGetValidityProofV2ResponseId {
27258 type Error = self::error::ConversionError;
27259 fn try_from(
27260 value: ::std::string::String,
27261 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27262 value.parse()
27263 }
27264 }
27265 #[derive(
27280 ::serde::Deserialize,
27281 ::serde::Serialize,
27282 Clone,
27283 Copy,
27284 Debug,
27285 Eq,
27286 Hash,
27287 Ord,
27288 PartialEq,
27289 PartialOrd
27290 )]
27291 pub enum PostGetValidityProofV2ResponseJsonrpc {
27292 #[serde(rename = "2.0")]
27293 X20,
27294 }
27295 impl ::std::fmt::Display for PostGetValidityProofV2ResponseJsonrpc {
27296 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27297 match *self {
27298 Self::X20 => f.write_str("2.0"),
27299 }
27300 }
27301 }
27302 impl ::std::str::FromStr for PostGetValidityProofV2ResponseJsonrpc {
27303 type Err = self::error::ConversionError;
27304 fn from_str(
27305 value: &str,
27306 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27307 match value {
27308 "2.0" => Ok(Self::X20),
27309 _ => Err("invalid value".into()),
27310 }
27311 }
27312 }
27313 impl ::std::convert::TryFrom<&str> for PostGetValidityProofV2ResponseJsonrpc {
27314 type Error = self::error::ConversionError;
27315 fn try_from(
27316 value: &str,
27317 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27318 value.parse()
27319 }
27320 }
27321 impl ::std::convert::TryFrom<&::std::string::String>
27322 for PostGetValidityProofV2ResponseJsonrpc {
27323 type Error = self::error::ConversionError;
27324 fn try_from(
27325 value: &::std::string::String,
27326 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27327 value.parse()
27328 }
27329 }
27330 impl ::std::convert::TryFrom<::std::string::String>
27331 for PostGetValidityProofV2ResponseJsonrpc {
27332 type Error = self::error::ConversionError;
27333 fn try_from(
27334 value: ::std::string::String,
27335 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27336 value.parse()
27337 }
27338 }
27339 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27363 #[serde(deny_unknown_fields)]
27364 pub struct PostGetValidityProofV2ResponseResult {
27365 pub context: Context,
27366 pub value: CompressedProofWithContextV2,
27367 }
27368 impl PostGetValidityProofV2ResponseResult {
27369 pub fn builder() -> builder::PostGetValidityProofV2ResponseResult {
27370 Default::default()
27371 }
27372 }
27373 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27408 pub struct QueueInfo {
27409 pub queue: ::std::string::String,
27410 #[serde(rename = "queueSize")]
27411 pub queue_size: u64,
27412 #[serde(rename = "queueType")]
27413 pub queue_type: u8,
27414 pub tree: ::std::string::String,
27415 }
27416 impl QueueInfo {
27417 pub fn builder() -> builder::QueueInfo {
27418 Default::default()
27419 }
27420 }
27421 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27460 #[serde(deny_unknown_fields)]
27461 pub struct QueueRequest {
27462 pub limit: u16,
27463 #[serde(
27464 rename = "startIndex",
27465 default,
27466 skip_serializing_if = "::std::option::Option::is_none"
27467 )]
27468 pub start_index: ::std::option::Option<u64>,
27469 #[serde(
27470 rename = "zkpBatchSize",
27471 default,
27472 skip_serializing_if = "::std::option::Option::is_none"
27473 )]
27474 pub zkp_batch_size: ::std::option::Option<u16>,
27475 }
27476 impl QueueRequest {
27477 pub fn builder() -> builder::QueueRequest {
27478 Default::default()
27479 }
27480 }
27481 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27506 pub struct RootIndex {
27507 #[serde(rename = "proveByIndex")]
27508 pub prove_by_index: bool,
27509 #[serde(rename = "rootIndex")]
27510 pub root_index: u64,
27511 }
27512 impl RootIndex {
27513 pub fn builder() -> builder::RootIndex {
27514 Default::default()
27515 }
27516 }
27517 #[derive(
27533 ::serde::Deserialize,
27534 ::serde::Serialize,
27535 Clone,
27536 Debug,
27537 Eq,
27538 Hash,
27539 Ord,
27540 PartialEq,
27541 PartialOrd
27542 )]
27543 #[serde(transparent)]
27544 pub struct SerializablePubkey(pub ::std::string::String);
27545 impl ::std::ops::Deref for SerializablePubkey {
27546 type Target = ::std::string::String;
27547 fn deref(&self) -> &::std::string::String {
27548 &self.0
27549 }
27550 }
27551 impl ::std::convert::From<SerializablePubkey> for ::std::string::String {
27552 fn from(value: SerializablePubkey) -> Self {
27553 value.0
27554 }
27555 }
27556 impl ::std::convert::From<::std::string::String> for SerializablePubkey {
27557 fn from(value: ::std::string::String) -> Self {
27558 Self(value)
27559 }
27560 }
27561 impl ::std::str::FromStr for SerializablePubkey {
27562 type Err = ::std::convert::Infallible;
27563 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
27564 Ok(Self(value.to_string()))
27565 }
27566 }
27567 impl ::std::fmt::Display for SerializablePubkey {
27568 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27569 self.0.fmt(f)
27570 }
27571 }
27572 #[derive(
27588 ::serde::Deserialize,
27589 ::serde::Serialize,
27590 Clone,
27591 Debug,
27592 Eq,
27593 Hash,
27594 Ord,
27595 PartialEq,
27596 PartialOrd
27597 )]
27598 #[serde(transparent)]
27599 pub struct SerializableSignature(pub ::std::string::String);
27600 impl ::std::ops::Deref for SerializableSignature {
27601 type Target = ::std::string::String;
27602 fn deref(&self) -> &::std::string::String {
27603 &self.0
27604 }
27605 }
27606 impl ::std::convert::From<SerializableSignature> for ::std::string::String {
27607 fn from(value: SerializableSignature) -> Self {
27608 value.0
27609 }
27610 }
27611 impl ::std::convert::From<::std::string::String> for SerializableSignature {
27612 fn from(value: ::std::string::String) -> Self {
27613 Self(value)
27614 }
27615 }
27616 impl ::std::str::FromStr for SerializableSignature {
27617 type Err = ::std::convert::Infallible;
27618 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
27619 Ok(Self(value.to_string()))
27620 }
27621 }
27622 impl ::std::fmt::Display for SerializableSignature {
27623 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27624 self.0.fmt(f)
27625 }
27626 }
27627 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27654 pub struct SignatureInfo {
27655 #[serde(rename = "blockTime")]
27656 pub block_time: UnixTimestamp,
27657 pub signature: SerializableSignature,
27658 pub slot: UnsignedInteger,
27659 }
27660 impl SignatureInfo {
27661 pub fn builder() -> builder::SignatureInfo {
27662 Default::default()
27663 }
27664 }
27665 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27687 pub struct SignatureInfoList {
27688 pub items: ::std::vec::Vec<SignatureInfo>,
27689 }
27690 impl SignatureInfoList {
27691 pub fn builder() -> builder::SignatureInfoList {
27692 Default::default()
27693 }
27694 }
27695 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27717 pub struct SignatureInfoListWithError {
27718 pub items: ::std::vec::Vec<SignatureInfoWithError>,
27719 }
27720 impl SignatureInfoListWithError {
27721 pub fn builder() -> builder::SignatureInfoListWithError {
27722 Default::default()
27723 }
27724 }
27725 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27758 pub struct SignatureInfoWithError {
27759 #[serde(rename = "blockTime")]
27760 pub block_time: UnixTimestamp,
27761 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27762 pub error: ::std::option::Option<::std::string::String>,
27763 pub signature: SerializableSignature,
27764 pub slot: UnsignedInteger,
27765 }
27766 impl SignatureInfoWithError {
27767 pub fn builder() -> builder::SignatureInfoWithError {
27768 Default::default()
27769 }
27770 }
27771 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27811 pub struct SolanaAccountData {
27812 pub data: Base64String,
27813 pub executable: bool,
27814 pub lamports: UnsignedInteger,
27815 pub owner: SerializablePubkey,
27816 #[serde(rename = "rentEpoch")]
27817 pub rent_epoch: UnsignedInteger,
27818 pub space: UnsignedInteger,
27819 }
27820 impl SolanaAccountData {
27821 pub fn builder() -> builder::SolanaAccountData {
27822 Default::default()
27823 }
27824 }
27825 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27866 #[serde(deny_unknown_fields)]
27867 pub struct StateQueueData {
27868 #[serde(rename = "initialRoot")]
27869 pub initial_root: Hash,
27870 #[serde(
27871 rename = "inputQueue",
27872 default,
27873 skip_serializing_if = "::std::option::Option::is_none"
27874 )]
27875 pub input_queue: ::std::option::Option<InputQueueData>,
27876 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
27878 pub nodes: ::std::vec::Vec<Node>,
27879 #[serde(
27880 rename = "outputQueue",
27881 default,
27882 skip_serializing_if = "::std::option::Option::is_none"
27883 )]
27884 pub output_queue: ::std::option::Option<OutputQueueData>,
27885 #[serde(rename = "rootSeq")]
27887 pub root_seq: u64,
27888 }
27889 impl StateQueueData {
27890 pub fn builder() -> builder::StateQueueData {
27891 Default::default()
27892 }
27893 }
27894 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27918 #[serde(deny_unknown_fields)]
27919 pub struct TokenAccount {
27920 pub account: Account,
27921 #[serde(rename = "tokenData")]
27922 pub token_data: TokenData,
27923 }
27924 impl TokenAccount {
27925 pub fn builder() -> builder::TokenAccount {
27926 Default::default()
27927 }
27928 }
27929 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27949 #[serde(deny_unknown_fields)]
27950 pub struct TokenAccountBalance {
27951 pub amount: UnsignedInteger,
27952 }
27953 impl TokenAccountBalance {
27954 pub fn builder() -> builder::TokenAccountBalance {
27955 Default::default()
27956 }
27957 }
27958 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27983 pub struct TokenAccountList {
27984 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27985 pub cursor: ::std::option::Option<Base58String>,
27986 pub items: ::std::vec::Vec<TokenAccount>,
27987 }
27988 impl TokenAccountList {
27989 pub fn builder() -> builder::TokenAccountList {
27990 Default::default()
27991 }
27992 }
27993 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28018 pub struct TokenAccountListV2 {
28019 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28020 pub cursor: ::std::option::Option<Base58String>,
28021 pub items: ::std::vec::Vec<TokenAccountV2>,
28022 }
28023 impl TokenAccountListV2 {
28024 pub fn builder() -> builder::TokenAccountListV2 {
28025 Default::default()
28026 }
28027 }
28028 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28052 #[serde(deny_unknown_fields)]
28053 pub struct TokenAccountV2 {
28054 pub account: AccountV2,
28055 #[serde(rename = "tokenData")]
28056 pub token_data: TokenData,
28057 }
28058 impl TokenAccountV2 {
28059 pub fn builder() -> builder::TokenAccountV2 {
28060 Default::default()
28061 }
28062 }
28063 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28086 pub struct TokenBalance {
28087 pub balance: UnsignedInteger,
28088 pub mint: SerializablePubkey,
28089 }
28090 impl TokenBalance {
28091 pub fn builder() -> builder::TokenBalance {
28092 Default::default()
28093 }
28094 }
28095 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28120 pub struct TokenBalanceList {
28121 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28122 pub cursor: ::std::option::Option<Base58String>,
28123 pub token_balances: ::std::vec::Vec<TokenBalance>,
28124 }
28125 impl TokenBalanceList {
28126 pub fn builder() -> builder::TokenBalanceList {
28127 Default::default()
28128 }
28129 }
28130 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28155 pub struct TokenBalanceListV2 {
28156 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28157 pub cursor: ::std::option::Option<Base58String>,
28158 pub items: ::std::vec::Vec<TokenBalance>,
28159 }
28160 impl TokenBalanceListV2 {
28161 pub fn builder() -> builder::TokenBalanceListV2 {
28162 Default::default()
28163 }
28164 }
28165 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28202 pub struct TokenData {
28203 pub amount: UnsignedInteger,
28204 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28205 pub delegate: ::std::option::Option<SerializablePubkey>,
28206 pub mint: SerializablePubkey,
28207 pub owner: SerializablePubkey,
28208 pub state: AccountState,
28209 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28210 pub tlv: ::std::option::Option<Base64String>,
28211 }
28212 impl TokenData {
28213 pub fn builder() -> builder::TokenData {
28214 Default::default()
28215 }
28216 }
28217 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28249 pub struct TreeContextInfo {
28250 #[serde(
28251 rename = "cpiContext",
28252 default,
28253 skip_serializing_if = "::std::option::Option::is_none"
28254 )]
28255 pub cpi_context: ::std::option::Option<SerializablePubkey>,
28256 pub queue: SerializablePubkey,
28257 pub tree: SerializablePubkey,
28258 #[serde(rename = "treeType")]
28259 pub tree_type: u16,
28260 }
28261 impl TreeContextInfo {
28262 pub fn builder() -> builder::TreeContextInfo {
28263 Default::default()
28264 }
28265 }
28266 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28282 #[serde(transparent)]
28283 pub struct UnixTimestamp(pub i64);
28284 impl ::std::ops::Deref for UnixTimestamp {
28285 type Target = i64;
28286 fn deref(&self) -> &i64 {
28287 &self.0
28288 }
28289 }
28290 impl ::std::convert::From<UnixTimestamp> for i64 {
28291 fn from(value: UnixTimestamp) -> Self {
28292 value.0
28293 }
28294 }
28295 impl ::std::convert::From<i64> for UnixTimestamp {
28296 fn from(value: i64) -> Self {
28297 Self(value)
28298 }
28299 }
28300 impl ::std::str::FromStr for UnixTimestamp {
28301 type Err = <i64 as ::std::str::FromStr>::Err;
28302 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
28303 Ok(Self(value.parse()?))
28304 }
28305 }
28306 impl ::std::convert::TryFrom<&str> for UnixTimestamp {
28307 type Error = <i64 as ::std::str::FromStr>::Err;
28308 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
28309 value.parse()
28310 }
28311 }
28312 impl ::std::convert::TryFrom<String> for UnixTimestamp {
28313 type Error = <i64 as ::std::str::FromStr>::Err;
28314 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
28315 value.parse()
28316 }
28317 }
28318 impl ::std::fmt::Display for UnixTimestamp {
28319 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28320 self.0.fmt(f)
28321 }
28322 }
28323 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28339 #[serde(transparent)]
28340 pub struct UnsignedInteger(pub u64);
28341 impl ::std::ops::Deref for UnsignedInteger {
28342 type Target = u64;
28343 fn deref(&self) -> &u64 {
28344 &self.0
28345 }
28346 }
28347 impl ::std::convert::From<UnsignedInteger> for u64 {
28348 fn from(value: UnsignedInteger) -> Self {
28349 value.0
28350 }
28351 }
28352 impl ::std::convert::From<u64> for UnsignedInteger {
28353 fn from(value: u64) -> Self {
28354 Self(value)
28355 }
28356 }
28357 impl ::std::str::FromStr for UnsignedInteger {
28358 type Err = <u64 as ::std::str::FromStr>::Err;
28359 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
28360 Ok(Self(value.parse()?))
28361 }
28362 }
28363 impl ::std::convert::TryFrom<&str> for UnsignedInteger {
28364 type Error = <u64 as ::std::str::FromStr>::Err;
28365 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
28366 value.parse()
28367 }
28368 }
28369 impl ::std::convert::TryFrom<String> for UnsignedInteger {
28370 type Error = <u64 as ::std::str::FromStr>::Err;
28371 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
28372 value.parse()
28373 }
28374 }
28375 impl ::std::fmt::Display for UnsignedInteger {
28376 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28377 self.0.fmt(f)
28378 }
28379 }
28380 pub mod builder {
28382 #[derive(Clone, Debug)]
28383 pub struct Account {
28384 address: ::std::result::Result<
28385 ::std::option::Option<super::SerializablePubkey>,
28386 ::std::string::String,
28387 >,
28388 data: ::std::result::Result<
28389 ::std::option::Option<super::AccountData>,
28390 ::std::string::String,
28391 >,
28392 hash: ::std::result::Result<super::Hash, ::std::string::String>,
28393 lamports: ::std::result::Result<
28394 super::UnsignedInteger,
28395 ::std::string::String,
28396 >,
28397 leaf_index: ::std::result::Result<
28398 super::UnsignedInteger,
28399 ::std::string::String,
28400 >,
28401 owner: ::std::result::Result<
28402 super::SerializablePubkey,
28403 ::std::string::String,
28404 >,
28405 seq: ::std::result::Result<
28406 ::std::option::Option<super::UnsignedInteger>,
28407 ::std::string::String,
28408 >,
28409 slot_created: ::std::result::Result<
28410 super::UnsignedInteger,
28411 ::std::string::String,
28412 >,
28413 tree: ::std::result::Result<
28414 super::SerializablePubkey,
28415 ::std::string::String,
28416 >,
28417 }
28418 impl ::std::default::Default for Account {
28419 fn default() -> Self {
28420 Self {
28421 address: Ok(Default::default()),
28422 data: Ok(Default::default()),
28423 hash: Err("no value supplied for hash".to_string()),
28424 lamports: Err("no value supplied for lamports".to_string()),
28425 leaf_index: Err("no value supplied for leaf_index".to_string()),
28426 owner: Err("no value supplied for owner".to_string()),
28427 seq: Ok(Default::default()),
28428 slot_created: Err("no value supplied for slot_created".to_string()),
28429 tree: Err("no value supplied for tree".to_string()),
28430 }
28431 }
28432 }
28433 impl Account {
28434 pub fn address<T>(mut self, value: T) -> Self
28435 where
28436 T: ::std::convert::TryInto<
28437 ::std::option::Option<super::SerializablePubkey>,
28438 >,
28439 T::Error: ::std::fmt::Display,
28440 {
28441 self.address = value
28442 .try_into()
28443 .map_err(|e| {
28444 format!("error converting supplied value for address: {e}")
28445 });
28446 self
28447 }
28448 pub fn data<T>(mut self, value: T) -> Self
28449 where
28450 T: ::std::convert::TryInto<::std::option::Option<super::AccountData>>,
28451 T::Error: ::std::fmt::Display,
28452 {
28453 self.data = value
28454 .try_into()
28455 .map_err(|e| {
28456 format!("error converting supplied value for data: {e}")
28457 });
28458 self
28459 }
28460 pub fn hash<T>(mut self, value: T) -> Self
28461 where
28462 T: ::std::convert::TryInto<super::Hash>,
28463 T::Error: ::std::fmt::Display,
28464 {
28465 self.hash = value
28466 .try_into()
28467 .map_err(|e| {
28468 format!("error converting supplied value for hash: {e}")
28469 });
28470 self
28471 }
28472 pub fn lamports<T>(mut self, value: T) -> Self
28473 where
28474 T: ::std::convert::TryInto<super::UnsignedInteger>,
28475 T::Error: ::std::fmt::Display,
28476 {
28477 self.lamports = value
28478 .try_into()
28479 .map_err(|e| {
28480 format!("error converting supplied value for lamports: {e}")
28481 });
28482 self
28483 }
28484 pub fn leaf_index<T>(mut self, value: T) -> Self
28485 where
28486 T: ::std::convert::TryInto<super::UnsignedInteger>,
28487 T::Error: ::std::fmt::Display,
28488 {
28489 self.leaf_index = value
28490 .try_into()
28491 .map_err(|e| {
28492 format!("error converting supplied value for leaf_index: {e}")
28493 });
28494 self
28495 }
28496 pub fn owner<T>(mut self, value: T) -> Self
28497 where
28498 T: ::std::convert::TryInto<super::SerializablePubkey>,
28499 T::Error: ::std::fmt::Display,
28500 {
28501 self.owner = value
28502 .try_into()
28503 .map_err(|e| {
28504 format!("error converting supplied value for owner: {e}")
28505 });
28506 self
28507 }
28508 pub fn seq<T>(mut self, value: T) -> Self
28509 where
28510 T: ::std::convert::TryInto<
28511 ::std::option::Option<super::UnsignedInteger>,
28512 >,
28513 T::Error: ::std::fmt::Display,
28514 {
28515 self.seq = value
28516 .try_into()
28517 .map_err(|e| {
28518 format!("error converting supplied value for seq: {e}")
28519 });
28520 self
28521 }
28522 pub fn slot_created<T>(mut self, value: T) -> Self
28523 where
28524 T: ::std::convert::TryInto<super::UnsignedInteger>,
28525 T::Error: ::std::fmt::Display,
28526 {
28527 self.slot_created = value
28528 .try_into()
28529 .map_err(|e| {
28530 format!("error converting supplied value for slot_created: {e}")
28531 });
28532 self
28533 }
28534 pub fn tree<T>(mut self, value: T) -> Self
28535 where
28536 T: ::std::convert::TryInto<super::SerializablePubkey>,
28537 T::Error: ::std::fmt::Display,
28538 {
28539 self.tree = value
28540 .try_into()
28541 .map_err(|e| {
28542 format!("error converting supplied value for tree: {e}")
28543 });
28544 self
28545 }
28546 }
28547 impl ::std::convert::TryFrom<Account> for super::Account {
28548 type Error = super::error::ConversionError;
28549 fn try_from(
28550 value: Account,
28551 ) -> ::std::result::Result<Self, super::error::ConversionError> {
28552 Ok(Self {
28553 address: value.address?,
28554 data: value.data?,
28555 hash: value.hash?,
28556 lamports: value.lamports?,
28557 leaf_index: value.leaf_index?,
28558 owner: value.owner?,
28559 seq: value.seq?,
28560 slot_created: value.slot_created?,
28561 tree: value.tree?,
28562 })
28563 }
28564 }
28565 impl ::std::convert::From<super::Account> for Account {
28566 fn from(value: super::Account) -> Self {
28567 Self {
28568 address: Ok(value.address),
28569 data: Ok(value.data),
28570 hash: Ok(value.hash),
28571 lamports: Ok(value.lamports),
28572 leaf_index: Ok(value.leaf_index),
28573 owner: Ok(value.owner),
28574 seq: Ok(value.seq),
28575 slot_created: Ok(value.slot_created),
28576 tree: Ok(value.tree),
28577 }
28578 }
28579 }
28580 #[derive(Clone, Debug)]
28581 pub struct AccountContext {
28582 in_output_queue: ::std::result::Result<bool, ::std::string::String>,
28583 nullified_in_tree: ::std::result::Result<bool, ::std::string::String>,
28584 nullifier: ::std::result::Result<
28585 ::std::option::Option<super::Hash>,
28586 ::std::string::String,
28587 >,
28588 nullifier_queue_index: ::std::result::Result<
28589 ::std::option::Option<super::UnsignedInteger>,
28590 ::std::string::String,
28591 >,
28592 queue: ::std::result::Result<
28593 super::SerializablePubkey,
28594 ::std::string::String,
28595 >,
28596 spent: ::std::result::Result<bool, ::std::string::String>,
28597 tree_type: ::std::result::Result<u16, ::std::string::String>,
28598 tx_hash: ::std::result::Result<
28599 ::std::option::Option<super::Hash>,
28600 ::std::string::String,
28601 >,
28602 }
28603 impl ::std::default::Default for AccountContext {
28604 fn default() -> Self {
28605 Self {
28606 in_output_queue: Err(
28607 "no value supplied for in_output_queue".to_string(),
28608 ),
28609 nullified_in_tree: Err(
28610 "no value supplied for nullified_in_tree".to_string(),
28611 ),
28612 nullifier: Ok(Default::default()),
28613 nullifier_queue_index: Ok(Default::default()),
28614 queue: Err("no value supplied for queue".to_string()),
28615 spent: Err("no value supplied for spent".to_string()),
28616 tree_type: Err("no value supplied for tree_type".to_string()),
28617 tx_hash: Ok(Default::default()),
28618 }
28619 }
28620 }
28621 impl AccountContext {
28622 pub fn in_output_queue<T>(mut self, value: T) -> Self
28623 where
28624 T: ::std::convert::TryInto<bool>,
28625 T::Error: ::std::fmt::Display,
28626 {
28627 self.in_output_queue = value
28628 .try_into()
28629 .map_err(|e| {
28630 format!(
28631 "error converting supplied value for in_output_queue: {e}"
28632 )
28633 });
28634 self
28635 }
28636 pub fn nullified_in_tree<T>(mut self, value: T) -> Self
28637 where
28638 T: ::std::convert::TryInto<bool>,
28639 T::Error: ::std::fmt::Display,
28640 {
28641 self.nullified_in_tree = value
28642 .try_into()
28643 .map_err(|e| {
28644 format!(
28645 "error converting supplied value for nullified_in_tree: {e}"
28646 )
28647 });
28648 self
28649 }
28650 pub fn nullifier<T>(mut self, value: T) -> Self
28651 where
28652 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
28653 T::Error: ::std::fmt::Display,
28654 {
28655 self.nullifier = value
28656 .try_into()
28657 .map_err(|e| {
28658 format!("error converting supplied value for nullifier: {e}")
28659 });
28660 self
28661 }
28662 pub fn nullifier_queue_index<T>(mut self, value: T) -> Self
28663 where
28664 T: ::std::convert::TryInto<
28665 ::std::option::Option<super::UnsignedInteger>,
28666 >,
28667 T::Error: ::std::fmt::Display,
28668 {
28669 self.nullifier_queue_index = value
28670 .try_into()
28671 .map_err(|e| {
28672 format!(
28673 "error converting supplied value for nullifier_queue_index: {e}"
28674 )
28675 });
28676 self
28677 }
28678 pub fn queue<T>(mut self, value: T) -> Self
28679 where
28680 T: ::std::convert::TryInto<super::SerializablePubkey>,
28681 T::Error: ::std::fmt::Display,
28682 {
28683 self.queue = value
28684 .try_into()
28685 .map_err(|e| {
28686 format!("error converting supplied value for queue: {e}")
28687 });
28688 self
28689 }
28690 pub fn spent<T>(mut self, value: T) -> Self
28691 where
28692 T: ::std::convert::TryInto<bool>,
28693 T::Error: ::std::fmt::Display,
28694 {
28695 self.spent = value
28696 .try_into()
28697 .map_err(|e| {
28698 format!("error converting supplied value for spent: {e}")
28699 });
28700 self
28701 }
28702 pub fn tree_type<T>(mut self, value: T) -> Self
28703 where
28704 T: ::std::convert::TryInto<u16>,
28705 T::Error: ::std::fmt::Display,
28706 {
28707 self.tree_type = value
28708 .try_into()
28709 .map_err(|e| {
28710 format!("error converting supplied value for tree_type: {e}")
28711 });
28712 self
28713 }
28714 pub fn tx_hash<T>(mut self, value: T) -> Self
28715 where
28716 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
28717 T::Error: ::std::fmt::Display,
28718 {
28719 self.tx_hash = value
28720 .try_into()
28721 .map_err(|e| {
28722 format!("error converting supplied value for tx_hash: {e}")
28723 });
28724 self
28725 }
28726 }
28727 impl ::std::convert::TryFrom<AccountContext> for super::AccountContext {
28728 type Error = super::error::ConversionError;
28729 fn try_from(
28730 value: AccountContext,
28731 ) -> ::std::result::Result<Self, super::error::ConversionError> {
28732 Ok(Self {
28733 in_output_queue: value.in_output_queue?,
28734 nullified_in_tree: value.nullified_in_tree?,
28735 nullifier: value.nullifier?,
28736 nullifier_queue_index: value.nullifier_queue_index?,
28737 queue: value.queue?,
28738 spent: value.spent?,
28739 tree_type: value.tree_type?,
28740 tx_hash: value.tx_hash?,
28741 })
28742 }
28743 }
28744 impl ::std::convert::From<super::AccountContext> for AccountContext {
28745 fn from(value: super::AccountContext) -> Self {
28746 Self {
28747 in_output_queue: Ok(value.in_output_queue),
28748 nullified_in_tree: Ok(value.nullified_in_tree),
28749 nullifier: Ok(value.nullifier),
28750 nullifier_queue_index: Ok(value.nullifier_queue_index),
28751 queue: Ok(value.queue),
28752 spent: Ok(value.spent),
28753 tree_type: Ok(value.tree_type),
28754 tx_hash: Ok(value.tx_hash),
28755 }
28756 }
28757 }
28758 #[derive(Clone, Debug)]
28759 pub struct AccountData {
28760 data: ::std::result::Result<super::Base64String, ::std::string::String>,
28761 data_hash: ::std::result::Result<super::Hash, ::std::string::String>,
28762 discriminator: ::std::result::Result<
28763 super::UnsignedInteger,
28764 ::std::string::String,
28765 >,
28766 }
28767 impl ::std::default::Default for AccountData {
28768 fn default() -> Self {
28769 Self {
28770 data: Err("no value supplied for data".to_string()),
28771 data_hash: Err("no value supplied for data_hash".to_string()),
28772 discriminator: Err("no value supplied for discriminator".to_string()),
28773 }
28774 }
28775 }
28776 impl AccountData {
28777 pub fn data<T>(mut self, value: T) -> Self
28778 where
28779 T: ::std::convert::TryInto<super::Base64String>,
28780 T::Error: ::std::fmt::Display,
28781 {
28782 self.data = value
28783 .try_into()
28784 .map_err(|e| {
28785 format!("error converting supplied value for data: {e}")
28786 });
28787 self
28788 }
28789 pub fn data_hash<T>(mut self, value: T) -> Self
28790 where
28791 T: ::std::convert::TryInto<super::Hash>,
28792 T::Error: ::std::fmt::Display,
28793 {
28794 self.data_hash = value
28795 .try_into()
28796 .map_err(|e| {
28797 format!("error converting supplied value for data_hash: {e}")
28798 });
28799 self
28800 }
28801 pub fn discriminator<T>(mut self, value: T) -> Self
28802 where
28803 T: ::std::convert::TryInto<super::UnsignedInteger>,
28804 T::Error: ::std::fmt::Display,
28805 {
28806 self.discriminator = value
28807 .try_into()
28808 .map_err(|e| {
28809 format!("error converting supplied value for discriminator: {e}")
28810 });
28811 self
28812 }
28813 }
28814 impl ::std::convert::TryFrom<AccountData> for super::AccountData {
28815 type Error = super::error::ConversionError;
28816 fn try_from(
28817 value: AccountData,
28818 ) -> ::std::result::Result<Self, super::error::ConversionError> {
28819 Ok(Self {
28820 data: value.data?,
28821 data_hash: value.data_hash?,
28822 discriminator: value.discriminator?,
28823 })
28824 }
28825 }
28826 impl ::std::convert::From<super::AccountData> for AccountData {
28827 fn from(value: super::AccountData) -> Self {
28828 Self {
28829 data: Ok(value.data),
28830 data_hash: Ok(value.data_hash),
28831 discriminator: Ok(value.discriminator),
28832 }
28833 }
28834 }
28835 #[derive(Clone, Debug)]
28836 pub struct AccountInterface {
28837 account: ::std::result::Result<
28838 super::SolanaAccountData,
28839 ::std::string::String,
28840 >,
28841 cold: ::std::result::Result<
28842 ::std::option::Option<::std::vec::Vec<super::AccountV2>>,
28843 ::std::string::String,
28844 >,
28845 key: ::std::result::Result<super::SerializablePubkey, ::std::string::String>,
28846 }
28847 impl ::std::default::Default for AccountInterface {
28848 fn default() -> Self {
28849 Self {
28850 account: Err("no value supplied for account".to_string()),
28851 cold: Ok(Default::default()),
28852 key: Err("no value supplied for key".to_string()),
28853 }
28854 }
28855 }
28856 impl AccountInterface {
28857 pub fn account<T>(mut self, value: T) -> Self
28858 where
28859 T: ::std::convert::TryInto<super::SolanaAccountData>,
28860 T::Error: ::std::fmt::Display,
28861 {
28862 self.account = value
28863 .try_into()
28864 .map_err(|e| {
28865 format!("error converting supplied value for account: {e}")
28866 });
28867 self
28868 }
28869 pub fn cold<T>(mut self, value: T) -> Self
28870 where
28871 T: ::std::convert::TryInto<
28872 ::std::option::Option<::std::vec::Vec<super::AccountV2>>,
28873 >,
28874 T::Error: ::std::fmt::Display,
28875 {
28876 self.cold = value
28877 .try_into()
28878 .map_err(|e| {
28879 format!("error converting supplied value for cold: {e}")
28880 });
28881 self
28882 }
28883 pub fn key<T>(mut self, value: T) -> Self
28884 where
28885 T: ::std::convert::TryInto<super::SerializablePubkey>,
28886 T::Error: ::std::fmt::Display,
28887 {
28888 self.key = value
28889 .try_into()
28890 .map_err(|e| {
28891 format!("error converting supplied value for key: {e}")
28892 });
28893 self
28894 }
28895 }
28896 impl ::std::convert::TryFrom<AccountInterface> for super::AccountInterface {
28897 type Error = super::error::ConversionError;
28898 fn try_from(
28899 value: AccountInterface,
28900 ) -> ::std::result::Result<Self, super::error::ConversionError> {
28901 Ok(Self {
28902 account: value.account?,
28903 cold: value.cold?,
28904 key: value.key?,
28905 })
28906 }
28907 }
28908 impl ::std::convert::From<super::AccountInterface> for AccountInterface {
28909 fn from(value: super::AccountInterface) -> Self {
28910 Self {
28911 account: Ok(value.account),
28912 cold: Ok(value.cold),
28913 key: Ok(value.key),
28914 }
28915 }
28916 }
28917 #[derive(Clone, Debug)]
28918 pub struct AccountList {
28919 items: ::std::result::Result<
28920 ::std::vec::Vec<::std::option::Option<super::Account>>,
28921 ::std::string::String,
28922 >,
28923 }
28924 impl ::std::default::Default for AccountList {
28925 fn default() -> Self {
28926 Self {
28927 items: Err("no value supplied for items".to_string()),
28928 }
28929 }
28930 }
28931 impl AccountList {
28932 pub fn items<T>(mut self, value: T) -> Self
28933 where
28934 T: ::std::convert::TryInto<
28935 ::std::vec::Vec<::std::option::Option<super::Account>>,
28936 >,
28937 T::Error: ::std::fmt::Display,
28938 {
28939 self.items = value
28940 .try_into()
28941 .map_err(|e| {
28942 format!("error converting supplied value for items: {e}")
28943 });
28944 self
28945 }
28946 }
28947 impl ::std::convert::TryFrom<AccountList> for super::AccountList {
28948 type Error = super::error::ConversionError;
28949 fn try_from(
28950 value: AccountList,
28951 ) -> ::std::result::Result<Self, super::error::ConversionError> {
28952 Ok(Self { items: value.items? })
28953 }
28954 }
28955 impl ::std::convert::From<super::AccountList> for AccountList {
28956 fn from(value: super::AccountList) -> Self {
28957 Self { items: Ok(value.items) }
28958 }
28959 }
28960 #[derive(Clone, Debug)]
28961 pub struct AccountListV2 {
28962 items: ::std::result::Result<
28963 ::std::vec::Vec<::std::option::Option<super::AccountV2>>,
28964 ::std::string::String,
28965 >,
28966 }
28967 impl ::std::default::Default for AccountListV2 {
28968 fn default() -> Self {
28969 Self {
28970 items: Err("no value supplied for items".to_string()),
28971 }
28972 }
28973 }
28974 impl AccountListV2 {
28975 pub fn items<T>(mut self, value: T) -> Self
28976 where
28977 T: ::std::convert::TryInto<
28978 ::std::vec::Vec<::std::option::Option<super::AccountV2>>,
28979 >,
28980 T::Error: ::std::fmt::Display,
28981 {
28982 self.items = value
28983 .try_into()
28984 .map_err(|e| {
28985 format!("error converting supplied value for items: {e}")
28986 });
28987 self
28988 }
28989 }
28990 impl ::std::convert::TryFrom<AccountListV2> for super::AccountListV2 {
28991 type Error = super::error::ConversionError;
28992 fn try_from(
28993 value: AccountListV2,
28994 ) -> ::std::result::Result<Self, super::error::ConversionError> {
28995 Ok(Self { items: value.items? })
28996 }
28997 }
28998 impl ::std::convert::From<super::AccountListV2> for AccountListV2 {
28999 fn from(value: super::AccountListV2) -> Self {
29000 Self { items: Ok(value.items) }
29001 }
29002 }
29003 #[derive(Clone, Debug)]
29004 pub struct AccountProofInputs {
29005 hash: ::std::result::Result<::std::string::String, ::std::string::String>,
29006 leaf_index: ::std::result::Result<u64, ::std::string::String>,
29007 merkle_context: ::std::result::Result<
29008 super::MerkleContextV2,
29009 ::std::string::String,
29010 >,
29011 root: ::std::result::Result<::std::string::String, ::std::string::String>,
29012 root_index: ::std::result::Result<super::RootIndex, ::std::string::String>,
29013 }
29014 impl ::std::default::Default for AccountProofInputs {
29015 fn default() -> Self {
29016 Self {
29017 hash: Err("no value supplied for hash".to_string()),
29018 leaf_index: Err("no value supplied for leaf_index".to_string()),
29019 merkle_context: Err(
29020 "no value supplied for merkle_context".to_string(),
29021 ),
29022 root: Err("no value supplied for root".to_string()),
29023 root_index: Err("no value supplied for root_index".to_string()),
29024 }
29025 }
29026 }
29027 impl AccountProofInputs {
29028 pub fn hash<T>(mut self, value: T) -> Self
29029 where
29030 T: ::std::convert::TryInto<::std::string::String>,
29031 T::Error: ::std::fmt::Display,
29032 {
29033 self.hash = value
29034 .try_into()
29035 .map_err(|e| {
29036 format!("error converting supplied value for hash: {e}")
29037 });
29038 self
29039 }
29040 pub fn leaf_index<T>(mut self, value: T) -> Self
29041 where
29042 T: ::std::convert::TryInto<u64>,
29043 T::Error: ::std::fmt::Display,
29044 {
29045 self.leaf_index = value
29046 .try_into()
29047 .map_err(|e| {
29048 format!("error converting supplied value for leaf_index: {e}")
29049 });
29050 self
29051 }
29052 pub fn merkle_context<T>(mut self, value: T) -> Self
29053 where
29054 T: ::std::convert::TryInto<super::MerkleContextV2>,
29055 T::Error: ::std::fmt::Display,
29056 {
29057 self.merkle_context = value
29058 .try_into()
29059 .map_err(|e| {
29060 format!(
29061 "error converting supplied value for merkle_context: {e}"
29062 )
29063 });
29064 self
29065 }
29066 pub fn root<T>(mut self, value: T) -> Self
29067 where
29068 T: ::std::convert::TryInto<::std::string::String>,
29069 T::Error: ::std::fmt::Display,
29070 {
29071 self.root = value
29072 .try_into()
29073 .map_err(|e| {
29074 format!("error converting supplied value for root: {e}")
29075 });
29076 self
29077 }
29078 pub fn root_index<T>(mut self, value: T) -> Self
29079 where
29080 T: ::std::convert::TryInto<super::RootIndex>,
29081 T::Error: ::std::fmt::Display,
29082 {
29083 self.root_index = value
29084 .try_into()
29085 .map_err(|e| {
29086 format!("error converting supplied value for root_index: {e}")
29087 });
29088 self
29089 }
29090 }
29091 impl ::std::convert::TryFrom<AccountProofInputs> for super::AccountProofInputs {
29092 type Error = super::error::ConversionError;
29093 fn try_from(
29094 value: AccountProofInputs,
29095 ) -> ::std::result::Result<Self, super::error::ConversionError> {
29096 Ok(Self {
29097 hash: value.hash?,
29098 leaf_index: value.leaf_index?,
29099 merkle_context: value.merkle_context?,
29100 root: value.root?,
29101 root_index: value.root_index?,
29102 })
29103 }
29104 }
29105 impl ::std::convert::From<super::AccountProofInputs> for AccountProofInputs {
29106 fn from(value: super::AccountProofInputs) -> Self {
29107 Self {
29108 hash: Ok(value.hash),
29109 leaf_index: Ok(value.leaf_index),
29110 merkle_context: Ok(value.merkle_context),
29111 root: Ok(value.root),
29112 root_index: Ok(value.root_index),
29113 }
29114 }
29115 }
29116 #[derive(Clone, Debug)]
29117 pub struct AccountV2 {
29118 address: ::std::result::Result<
29119 ::std::option::Option<super::SerializablePubkey>,
29120 ::std::string::String,
29121 >,
29122 data: ::std::result::Result<
29123 ::std::option::Option<super::AccountData>,
29124 ::std::string::String,
29125 >,
29126 hash: ::std::result::Result<super::Hash, ::std::string::String>,
29127 lamports: ::std::result::Result<
29128 super::UnsignedInteger,
29129 ::std::string::String,
29130 >,
29131 leaf_index: ::std::result::Result<
29132 super::UnsignedInteger,
29133 ::std::string::String,
29134 >,
29135 merkle_context: ::std::result::Result<
29136 super::MerkleContextV2,
29137 ::std::string::String,
29138 >,
29139 owner: ::std::result::Result<
29140 super::SerializablePubkey,
29141 ::std::string::String,
29142 >,
29143 prove_by_index: ::std::result::Result<bool, ::std::string::String>,
29144 seq: ::std::result::Result<
29145 ::std::option::Option<super::UnsignedInteger>,
29146 ::std::string::String,
29147 >,
29148 slot_created: ::std::result::Result<
29149 super::UnsignedInteger,
29150 ::std::string::String,
29151 >,
29152 }
29153 impl ::std::default::Default for AccountV2 {
29154 fn default() -> Self {
29155 Self {
29156 address: Ok(Default::default()),
29157 data: Ok(Default::default()),
29158 hash: Err("no value supplied for hash".to_string()),
29159 lamports: Err("no value supplied for lamports".to_string()),
29160 leaf_index: Err("no value supplied for leaf_index".to_string()),
29161 merkle_context: Err(
29162 "no value supplied for merkle_context".to_string(),
29163 ),
29164 owner: Err("no value supplied for owner".to_string()),
29165 prove_by_index: Err(
29166 "no value supplied for prove_by_index".to_string(),
29167 ),
29168 seq: Ok(Default::default()),
29169 slot_created: Err("no value supplied for slot_created".to_string()),
29170 }
29171 }
29172 }
29173 impl AccountV2 {
29174 pub fn address<T>(mut self, value: T) -> Self
29175 where
29176 T: ::std::convert::TryInto<
29177 ::std::option::Option<super::SerializablePubkey>,
29178 >,
29179 T::Error: ::std::fmt::Display,
29180 {
29181 self.address = value
29182 .try_into()
29183 .map_err(|e| {
29184 format!("error converting supplied value for address: {e}")
29185 });
29186 self
29187 }
29188 pub fn data<T>(mut self, value: T) -> Self
29189 where
29190 T: ::std::convert::TryInto<::std::option::Option<super::AccountData>>,
29191 T::Error: ::std::fmt::Display,
29192 {
29193 self.data = value
29194 .try_into()
29195 .map_err(|e| {
29196 format!("error converting supplied value for data: {e}")
29197 });
29198 self
29199 }
29200 pub fn hash<T>(mut self, value: T) -> Self
29201 where
29202 T: ::std::convert::TryInto<super::Hash>,
29203 T::Error: ::std::fmt::Display,
29204 {
29205 self.hash = value
29206 .try_into()
29207 .map_err(|e| {
29208 format!("error converting supplied value for hash: {e}")
29209 });
29210 self
29211 }
29212 pub fn lamports<T>(mut self, value: T) -> Self
29213 where
29214 T: ::std::convert::TryInto<super::UnsignedInteger>,
29215 T::Error: ::std::fmt::Display,
29216 {
29217 self.lamports = value
29218 .try_into()
29219 .map_err(|e| {
29220 format!("error converting supplied value for lamports: {e}")
29221 });
29222 self
29223 }
29224 pub fn leaf_index<T>(mut self, value: T) -> Self
29225 where
29226 T: ::std::convert::TryInto<super::UnsignedInteger>,
29227 T::Error: ::std::fmt::Display,
29228 {
29229 self.leaf_index = value
29230 .try_into()
29231 .map_err(|e| {
29232 format!("error converting supplied value for leaf_index: {e}")
29233 });
29234 self
29235 }
29236 pub fn merkle_context<T>(mut self, value: T) -> Self
29237 where
29238 T: ::std::convert::TryInto<super::MerkleContextV2>,
29239 T::Error: ::std::fmt::Display,
29240 {
29241 self.merkle_context = value
29242 .try_into()
29243 .map_err(|e| {
29244 format!(
29245 "error converting supplied value for merkle_context: {e}"
29246 )
29247 });
29248 self
29249 }
29250 pub fn owner<T>(mut self, value: T) -> Self
29251 where
29252 T: ::std::convert::TryInto<super::SerializablePubkey>,
29253 T::Error: ::std::fmt::Display,
29254 {
29255 self.owner = value
29256 .try_into()
29257 .map_err(|e| {
29258 format!("error converting supplied value for owner: {e}")
29259 });
29260 self
29261 }
29262 pub fn prove_by_index<T>(mut self, value: T) -> Self
29263 where
29264 T: ::std::convert::TryInto<bool>,
29265 T::Error: ::std::fmt::Display,
29266 {
29267 self.prove_by_index = value
29268 .try_into()
29269 .map_err(|e| {
29270 format!(
29271 "error converting supplied value for prove_by_index: {e}"
29272 )
29273 });
29274 self
29275 }
29276 pub fn seq<T>(mut self, value: T) -> Self
29277 where
29278 T: ::std::convert::TryInto<
29279 ::std::option::Option<super::UnsignedInteger>,
29280 >,
29281 T::Error: ::std::fmt::Display,
29282 {
29283 self.seq = value
29284 .try_into()
29285 .map_err(|e| {
29286 format!("error converting supplied value for seq: {e}")
29287 });
29288 self
29289 }
29290 pub fn slot_created<T>(mut self, value: T) -> Self
29291 where
29292 T: ::std::convert::TryInto<super::UnsignedInteger>,
29293 T::Error: ::std::fmt::Display,
29294 {
29295 self.slot_created = value
29296 .try_into()
29297 .map_err(|e| {
29298 format!("error converting supplied value for slot_created: {e}")
29299 });
29300 self
29301 }
29302 }
29303 impl ::std::convert::TryFrom<AccountV2> for super::AccountV2 {
29304 type Error = super::error::ConversionError;
29305 fn try_from(
29306 value: AccountV2,
29307 ) -> ::std::result::Result<Self, super::error::ConversionError> {
29308 Ok(Self {
29309 address: value.address?,
29310 data: value.data?,
29311 hash: value.hash?,
29312 lamports: value.lamports?,
29313 leaf_index: value.leaf_index?,
29314 merkle_context: value.merkle_context?,
29315 owner: value.owner?,
29316 prove_by_index: value.prove_by_index?,
29317 seq: value.seq?,
29318 slot_created: value.slot_created?,
29319 })
29320 }
29321 }
29322 impl ::std::convert::From<super::AccountV2> for AccountV2 {
29323 fn from(value: super::AccountV2) -> Self {
29324 Self {
29325 address: Ok(value.address),
29326 data: Ok(value.data),
29327 hash: Ok(value.hash),
29328 lamports: Ok(value.lamports),
29329 leaf_index: Ok(value.leaf_index),
29330 merkle_context: Ok(value.merkle_context),
29331 owner: Ok(value.owner),
29332 prove_by_index: Ok(value.prove_by_index),
29333 seq: Ok(value.seq),
29334 slot_created: Ok(value.slot_created),
29335 }
29336 }
29337 }
29338 #[derive(Clone, Debug)]
29339 pub struct AccountWithContext {
29340 account: ::std::result::Result<super::Account, ::std::string::String>,
29341 context: ::std::result::Result<super::AccountContext, ::std::string::String>,
29342 }
29343 impl ::std::default::Default for AccountWithContext {
29344 fn default() -> Self {
29345 Self {
29346 account: Err("no value supplied for account".to_string()),
29347 context: Err("no value supplied for context".to_string()),
29348 }
29349 }
29350 }
29351 impl AccountWithContext {
29352 pub fn account<T>(mut self, value: T) -> Self
29353 where
29354 T: ::std::convert::TryInto<super::Account>,
29355 T::Error: ::std::fmt::Display,
29356 {
29357 self.account = value
29358 .try_into()
29359 .map_err(|e| {
29360 format!("error converting supplied value for account: {e}")
29361 });
29362 self
29363 }
29364 pub fn context<T>(mut self, value: T) -> Self
29365 where
29366 T: ::std::convert::TryInto<super::AccountContext>,
29367 T::Error: ::std::fmt::Display,
29368 {
29369 self.context = value
29370 .try_into()
29371 .map_err(|e| {
29372 format!("error converting supplied value for context: {e}")
29373 });
29374 self
29375 }
29376 }
29377 impl ::std::convert::TryFrom<AccountWithContext> for super::AccountWithContext {
29378 type Error = super::error::ConversionError;
29379 fn try_from(
29380 value: AccountWithContext,
29381 ) -> ::std::result::Result<Self, super::error::ConversionError> {
29382 Ok(Self {
29383 account: value.account?,
29384 context: value.context?,
29385 })
29386 }
29387 }
29388 impl ::std::convert::From<super::AccountWithContext> for AccountWithContext {
29389 fn from(value: super::AccountWithContext) -> Self {
29390 Self {
29391 account: Ok(value.account),
29392 context: Ok(value.context),
29393 }
29394 }
29395 }
29396 #[derive(Clone, Debug)]
29397 pub struct AccountWithOptionalTokenData {
29398 account: ::std::result::Result<super::Account, ::std::string::String>,
29399 optional_token_data: ::std::result::Result<
29400 ::std::option::Option<super::TokenData>,
29401 ::std::string::String,
29402 >,
29403 }
29404 impl ::std::default::Default for AccountWithOptionalTokenData {
29405 fn default() -> Self {
29406 Self {
29407 account: Err("no value supplied for account".to_string()),
29408 optional_token_data: Ok(Default::default()),
29409 }
29410 }
29411 }
29412 impl AccountWithOptionalTokenData {
29413 pub fn account<T>(mut self, value: T) -> Self
29414 where
29415 T: ::std::convert::TryInto<super::Account>,
29416 T::Error: ::std::fmt::Display,
29417 {
29418 self.account = value
29419 .try_into()
29420 .map_err(|e| {
29421 format!("error converting supplied value for account: {e}")
29422 });
29423 self
29424 }
29425 pub fn optional_token_data<T>(mut self, value: T) -> Self
29426 where
29427 T: ::std::convert::TryInto<::std::option::Option<super::TokenData>>,
29428 T::Error: ::std::fmt::Display,
29429 {
29430 self.optional_token_data = value
29431 .try_into()
29432 .map_err(|e| {
29433 format!(
29434 "error converting supplied value for optional_token_data: {e}"
29435 )
29436 });
29437 self
29438 }
29439 }
29440 impl ::std::convert::TryFrom<AccountWithOptionalTokenData>
29441 for super::AccountWithOptionalTokenData {
29442 type Error = super::error::ConversionError;
29443 fn try_from(
29444 value: AccountWithOptionalTokenData,
29445 ) -> ::std::result::Result<Self, super::error::ConversionError> {
29446 Ok(Self {
29447 account: value.account?,
29448 optional_token_data: value.optional_token_data?,
29449 })
29450 }
29451 }
29452 impl ::std::convert::From<super::AccountWithOptionalTokenData>
29453 for AccountWithOptionalTokenData {
29454 fn from(value: super::AccountWithOptionalTokenData) -> Self {
29455 Self {
29456 account: Ok(value.account),
29457 optional_token_data: Ok(value.optional_token_data),
29458 }
29459 }
29460 }
29461 #[derive(Clone, Debug)]
29462 pub struct AccountWithOptionalTokenDataV2 {
29463 account: ::std::result::Result<super::AccountV2, ::std::string::String>,
29464 optional_token_data: ::std::result::Result<
29465 ::std::option::Option<super::TokenData>,
29466 ::std::string::String,
29467 >,
29468 }
29469 impl ::std::default::Default for AccountWithOptionalTokenDataV2 {
29470 fn default() -> Self {
29471 Self {
29472 account: Err("no value supplied for account".to_string()),
29473 optional_token_data: Ok(Default::default()),
29474 }
29475 }
29476 }
29477 impl AccountWithOptionalTokenDataV2 {
29478 pub fn account<T>(mut self, value: T) -> Self
29479 where
29480 T: ::std::convert::TryInto<super::AccountV2>,
29481 T::Error: ::std::fmt::Display,
29482 {
29483 self.account = value
29484 .try_into()
29485 .map_err(|e| {
29486 format!("error converting supplied value for account: {e}")
29487 });
29488 self
29489 }
29490 pub fn optional_token_data<T>(mut self, value: T) -> Self
29491 where
29492 T: ::std::convert::TryInto<::std::option::Option<super::TokenData>>,
29493 T::Error: ::std::fmt::Display,
29494 {
29495 self.optional_token_data = value
29496 .try_into()
29497 .map_err(|e| {
29498 format!(
29499 "error converting supplied value for optional_token_data: {e}"
29500 )
29501 });
29502 self
29503 }
29504 }
29505 impl ::std::convert::TryFrom<AccountWithOptionalTokenDataV2>
29506 for super::AccountWithOptionalTokenDataV2 {
29507 type Error = super::error::ConversionError;
29508 fn try_from(
29509 value: AccountWithOptionalTokenDataV2,
29510 ) -> ::std::result::Result<Self, super::error::ConversionError> {
29511 Ok(Self {
29512 account: value.account?,
29513 optional_token_data: value.optional_token_data?,
29514 })
29515 }
29516 }
29517 impl ::std::convert::From<super::AccountWithOptionalTokenDataV2>
29518 for AccountWithOptionalTokenDataV2 {
29519 fn from(value: super::AccountWithOptionalTokenDataV2) -> Self {
29520 Self {
29521 account: Ok(value.account),
29522 optional_token_data: Ok(value.optional_token_data),
29523 }
29524 }
29525 }
29526 #[derive(Clone, Debug)]
29527 pub struct AddressProofInputs {
29528 address: ::std::result::Result<::std::string::String, ::std::string::String>,
29529 merkle_context: ::std::result::Result<
29530 super::MerkleContextV2,
29531 ::std::string::String,
29532 >,
29533 root: ::std::result::Result<::std::string::String, ::std::string::String>,
29534 root_index: ::std::result::Result<u16, ::std::string::String>,
29535 }
29536 impl ::std::default::Default for AddressProofInputs {
29537 fn default() -> Self {
29538 Self {
29539 address: Err("no value supplied for address".to_string()),
29540 merkle_context: Err(
29541 "no value supplied for merkle_context".to_string(),
29542 ),
29543 root: Err("no value supplied for root".to_string()),
29544 root_index: Err("no value supplied for root_index".to_string()),
29545 }
29546 }
29547 }
29548 impl AddressProofInputs {
29549 pub fn address<T>(mut self, value: T) -> Self
29550 where
29551 T: ::std::convert::TryInto<::std::string::String>,
29552 T::Error: ::std::fmt::Display,
29553 {
29554 self.address = value
29555 .try_into()
29556 .map_err(|e| {
29557 format!("error converting supplied value for address: {e}")
29558 });
29559 self
29560 }
29561 pub fn merkle_context<T>(mut self, value: T) -> Self
29562 where
29563 T: ::std::convert::TryInto<super::MerkleContextV2>,
29564 T::Error: ::std::fmt::Display,
29565 {
29566 self.merkle_context = value
29567 .try_into()
29568 .map_err(|e| {
29569 format!(
29570 "error converting supplied value for merkle_context: {e}"
29571 )
29572 });
29573 self
29574 }
29575 pub fn root<T>(mut self, value: T) -> Self
29576 where
29577 T: ::std::convert::TryInto<::std::string::String>,
29578 T::Error: ::std::fmt::Display,
29579 {
29580 self.root = value
29581 .try_into()
29582 .map_err(|e| {
29583 format!("error converting supplied value for root: {e}")
29584 });
29585 self
29586 }
29587 pub fn root_index<T>(mut self, value: T) -> Self
29588 where
29589 T: ::std::convert::TryInto<u16>,
29590 T::Error: ::std::fmt::Display,
29591 {
29592 self.root_index = value
29593 .try_into()
29594 .map_err(|e| {
29595 format!("error converting supplied value for root_index: {e}")
29596 });
29597 self
29598 }
29599 }
29600 impl ::std::convert::TryFrom<AddressProofInputs> for super::AddressProofInputs {
29601 type Error = super::error::ConversionError;
29602 fn try_from(
29603 value: AddressProofInputs,
29604 ) -> ::std::result::Result<Self, super::error::ConversionError> {
29605 Ok(Self {
29606 address: value.address?,
29607 merkle_context: value.merkle_context?,
29608 root: value.root?,
29609 root_index: value.root_index?,
29610 })
29611 }
29612 }
29613 impl ::std::convert::From<super::AddressProofInputs> for AddressProofInputs {
29614 fn from(value: super::AddressProofInputs) -> Self {
29615 Self {
29616 address: Ok(value.address),
29617 merkle_context: Ok(value.merkle_context),
29618 root: Ok(value.root),
29619 root_index: Ok(value.root_index),
29620 }
29621 }
29622 }
29623 #[derive(Clone, Debug)]
29624 pub struct AddressQueueData {
29625 addresses: ::std::result::Result<
29626 ::std::vec::Vec<super::SerializablePubkey>,
29627 ::std::string::String,
29628 >,
29629 initial_root: ::std::result::Result<super::Hash, ::std::string::String>,
29630 leaves_hash_chains: ::std::result::Result<
29631 ::std::vec::Vec<super::Hash>,
29632 ::std::string::String,
29633 >,
29634 low_element_indices: ::std::result::Result<
29635 ::std::vec::Vec<u64>,
29636 ::std::string::String,
29637 >,
29638 low_element_next_indices: ::std::result::Result<
29639 ::std::vec::Vec<u64>,
29640 ::std::string::String,
29641 >,
29642 low_element_next_values: ::std::result::Result<
29643 ::std::vec::Vec<super::Hash>,
29644 ::std::string::String,
29645 >,
29646 low_element_values: ::std::result::Result<
29647 ::std::vec::Vec<super::Hash>,
29648 ::std::string::String,
29649 >,
29650 nodes: ::std::result::Result<
29651 ::std::vec::Vec<super::Node>,
29652 ::std::string::String,
29653 >,
29654 queue_indices: ::std::result::Result<
29655 ::std::vec::Vec<u64>,
29656 ::std::string::String,
29657 >,
29658 root_seq: ::std::result::Result<u64, ::std::string::String>,
29659 start_index: ::std::result::Result<u64, ::std::string::String>,
29660 subtrees: ::std::result::Result<
29661 ::std::vec::Vec<super::Hash>,
29662 ::std::string::String,
29663 >,
29664 }
29665 impl ::std::default::Default for AddressQueueData {
29666 fn default() -> Self {
29667 Self {
29668 addresses: Err("no value supplied for addresses".to_string()),
29669 initial_root: Err("no value supplied for initial_root".to_string()),
29670 leaves_hash_chains: Err(
29671 "no value supplied for leaves_hash_chains".to_string(),
29672 ),
29673 low_element_indices: Err(
29674 "no value supplied for low_element_indices".to_string(),
29675 ),
29676 low_element_next_indices: Err(
29677 "no value supplied for low_element_next_indices".to_string(),
29678 ),
29679 low_element_next_values: Err(
29680 "no value supplied for low_element_next_values".to_string(),
29681 ),
29682 low_element_values: Err(
29683 "no value supplied for low_element_values".to_string(),
29684 ),
29685 nodes: Err("no value supplied for nodes".to_string()),
29686 queue_indices: Err(
29687 "no value supplied for queue_indices".to_string(),
29688 ),
29689 root_seq: Err("no value supplied for root_seq".to_string()),
29690 start_index: Err("no value supplied for start_index".to_string()),
29691 subtrees: Err("no value supplied for subtrees".to_string()),
29692 }
29693 }
29694 }
29695 impl AddressQueueData {
29696 pub fn addresses<T>(mut self, value: T) -> Self
29697 where
29698 T: ::std::convert::TryInto<::std::vec::Vec<super::SerializablePubkey>>,
29699 T::Error: ::std::fmt::Display,
29700 {
29701 self.addresses = value
29702 .try_into()
29703 .map_err(|e| {
29704 format!("error converting supplied value for addresses: {e}")
29705 });
29706 self
29707 }
29708 pub fn initial_root<T>(mut self, value: T) -> Self
29709 where
29710 T: ::std::convert::TryInto<super::Hash>,
29711 T::Error: ::std::fmt::Display,
29712 {
29713 self.initial_root = value
29714 .try_into()
29715 .map_err(|e| {
29716 format!("error converting supplied value for initial_root: {e}")
29717 });
29718 self
29719 }
29720 pub fn leaves_hash_chains<T>(mut self, value: T) -> Self
29721 where
29722 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
29723 T::Error: ::std::fmt::Display,
29724 {
29725 self.leaves_hash_chains = value
29726 .try_into()
29727 .map_err(|e| {
29728 format!(
29729 "error converting supplied value for leaves_hash_chains: {e}"
29730 )
29731 });
29732 self
29733 }
29734 pub fn low_element_indices<T>(mut self, value: T) -> Self
29735 where
29736 T: ::std::convert::TryInto<::std::vec::Vec<u64>>,
29737 T::Error: ::std::fmt::Display,
29738 {
29739 self.low_element_indices = value
29740 .try_into()
29741 .map_err(|e| {
29742 format!(
29743 "error converting supplied value for low_element_indices: {e}"
29744 )
29745 });
29746 self
29747 }
29748 pub fn low_element_next_indices<T>(mut self, value: T) -> Self
29749 where
29750 T: ::std::convert::TryInto<::std::vec::Vec<u64>>,
29751 T::Error: ::std::fmt::Display,
29752 {
29753 self.low_element_next_indices = value
29754 .try_into()
29755 .map_err(|e| {
29756 format!(
29757 "error converting supplied value for low_element_next_indices: {e}"
29758 )
29759 });
29760 self
29761 }
29762 pub fn low_element_next_values<T>(mut self, value: T) -> Self
29763 where
29764 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
29765 T::Error: ::std::fmt::Display,
29766 {
29767 self.low_element_next_values = value
29768 .try_into()
29769 .map_err(|e| {
29770 format!(
29771 "error converting supplied value for low_element_next_values: {e}"
29772 )
29773 });
29774 self
29775 }
29776 pub fn low_element_values<T>(mut self, value: T) -> Self
29777 where
29778 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
29779 T::Error: ::std::fmt::Display,
29780 {
29781 self.low_element_values = value
29782 .try_into()
29783 .map_err(|e| {
29784 format!(
29785 "error converting supplied value for low_element_values: {e}"
29786 )
29787 });
29788 self
29789 }
29790 pub fn nodes<T>(mut self, value: T) -> Self
29791 where
29792 T: ::std::convert::TryInto<::std::vec::Vec<super::Node>>,
29793 T::Error: ::std::fmt::Display,
29794 {
29795 self.nodes = value
29796 .try_into()
29797 .map_err(|e| {
29798 format!("error converting supplied value for nodes: {e}")
29799 });
29800 self
29801 }
29802 pub fn queue_indices<T>(mut self, value: T) -> Self
29803 where
29804 T: ::std::convert::TryInto<::std::vec::Vec<u64>>,
29805 T::Error: ::std::fmt::Display,
29806 {
29807 self.queue_indices = value
29808 .try_into()
29809 .map_err(|e| {
29810 format!("error converting supplied value for queue_indices: {e}")
29811 });
29812 self
29813 }
29814 pub fn root_seq<T>(mut self, value: T) -> Self
29815 where
29816 T: ::std::convert::TryInto<u64>,
29817 T::Error: ::std::fmt::Display,
29818 {
29819 self.root_seq = value
29820 .try_into()
29821 .map_err(|e| {
29822 format!("error converting supplied value for root_seq: {e}")
29823 });
29824 self
29825 }
29826 pub fn start_index<T>(mut self, value: T) -> Self
29827 where
29828 T: ::std::convert::TryInto<u64>,
29829 T::Error: ::std::fmt::Display,
29830 {
29831 self.start_index = value
29832 .try_into()
29833 .map_err(|e| {
29834 format!("error converting supplied value for start_index: {e}")
29835 });
29836 self
29837 }
29838 pub fn subtrees<T>(mut self, value: T) -> Self
29839 where
29840 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
29841 T::Error: ::std::fmt::Display,
29842 {
29843 self.subtrees = value
29844 .try_into()
29845 .map_err(|e| {
29846 format!("error converting supplied value for subtrees: {e}")
29847 });
29848 self
29849 }
29850 }
29851 impl ::std::convert::TryFrom<AddressQueueData> for super::AddressQueueData {
29852 type Error = super::error::ConversionError;
29853 fn try_from(
29854 value: AddressQueueData,
29855 ) -> ::std::result::Result<Self, super::error::ConversionError> {
29856 Ok(Self {
29857 addresses: value.addresses?,
29858 initial_root: value.initial_root?,
29859 leaves_hash_chains: value.leaves_hash_chains?,
29860 low_element_indices: value.low_element_indices?,
29861 low_element_next_indices: value.low_element_next_indices?,
29862 low_element_next_values: value.low_element_next_values?,
29863 low_element_values: value.low_element_values?,
29864 nodes: value.nodes?,
29865 queue_indices: value.queue_indices?,
29866 root_seq: value.root_seq?,
29867 start_index: value.start_index?,
29868 subtrees: value.subtrees?,
29869 })
29870 }
29871 }
29872 impl ::std::convert::From<super::AddressQueueData> for AddressQueueData {
29873 fn from(value: super::AddressQueueData) -> Self {
29874 Self {
29875 addresses: Ok(value.addresses),
29876 initial_root: Ok(value.initial_root),
29877 leaves_hash_chains: Ok(value.leaves_hash_chains),
29878 low_element_indices: Ok(value.low_element_indices),
29879 low_element_next_indices: Ok(value.low_element_next_indices),
29880 low_element_next_values: Ok(value.low_element_next_values),
29881 low_element_values: Ok(value.low_element_values),
29882 nodes: Ok(value.nodes),
29883 queue_indices: Ok(value.queue_indices),
29884 root_seq: Ok(value.root_seq),
29885 start_index: Ok(value.start_index),
29886 subtrees: Ok(value.subtrees),
29887 }
29888 }
29889 }
29890 #[derive(Clone, Debug)]
29891 pub struct AddressWithTree {
29892 address: ::std::result::Result<
29893 super::SerializablePubkey,
29894 ::std::string::String,
29895 >,
29896 tree: ::std::result::Result<
29897 super::SerializablePubkey,
29898 ::std::string::String,
29899 >,
29900 }
29901 impl ::std::default::Default for AddressWithTree {
29902 fn default() -> Self {
29903 Self {
29904 address: Err("no value supplied for address".to_string()),
29905 tree: Err("no value supplied for tree".to_string()),
29906 }
29907 }
29908 }
29909 impl AddressWithTree {
29910 pub fn address<T>(mut self, value: T) -> Self
29911 where
29912 T: ::std::convert::TryInto<super::SerializablePubkey>,
29913 T::Error: ::std::fmt::Display,
29914 {
29915 self.address = value
29916 .try_into()
29917 .map_err(|e| {
29918 format!("error converting supplied value for address: {e}")
29919 });
29920 self
29921 }
29922 pub fn tree<T>(mut self, value: T) -> Self
29923 where
29924 T: ::std::convert::TryInto<super::SerializablePubkey>,
29925 T::Error: ::std::fmt::Display,
29926 {
29927 self.tree = value
29928 .try_into()
29929 .map_err(|e| {
29930 format!("error converting supplied value for tree: {e}")
29931 });
29932 self
29933 }
29934 }
29935 impl ::std::convert::TryFrom<AddressWithTree> for super::AddressWithTree {
29936 type Error = super::error::ConversionError;
29937 fn try_from(
29938 value: AddressWithTree,
29939 ) -> ::std::result::Result<Self, super::error::ConversionError> {
29940 Ok(Self {
29941 address: value.address?,
29942 tree: value.tree?,
29943 })
29944 }
29945 }
29946 impl ::std::convert::From<super::AddressWithTree> for AddressWithTree {
29947 fn from(value: super::AddressWithTree) -> Self {
29948 Self {
29949 address: Ok(value.address),
29950 tree: Ok(value.tree),
29951 }
29952 }
29953 }
29954 #[derive(Clone, Debug)]
29955 pub struct ClosedAccountV2 {
29956 account: ::std::result::Result<super::AccountV2, ::std::string::String>,
29957 nullifier: ::std::result::Result<super::Hash, ::std::string::String>,
29958 tx_hash: ::std::result::Result<super::Hash, ::std::string::String>,
29959 }
29960 impl ::std::default::Default for ClosedAccountV2 {
29961 fn default() -> Self {
29962 Self {
29963 account: Err("no value supplied for account".to_string()),
29964 nullifier: Err("no value supplied for nullifier".to_string()),
29965 tx_hash: Err("no value supplied for tx_hash".to_string()),
29966 }
29967 }
29968 }
29969 impl ClosedAccountV2 {
29970 pub fn account<T>(mut self, value: T) -> Self
29971 where
29972 T: ::std::convert::TryInto<super::AccountV2>,
29973 T::Error: ::std::fmt::Display,
29974 {
29975 self.account = value
29976 .try_into()
29977 .map_err(|e| {
29978 format!("error converting supplied value for account: {e}")
29979 });
29980 self
29981 }
29982 pub fn nullifier<T>(mut self, value: T) -> Self
29983 where
29984 T: ::std::convert::TryInto<super::Hash>,
29985 T::Error: ::std::fmt::Display,
29986 {
29987 self.nullifier = value
29988 .try_into()
29989 .map_err(|e| {
29990 format!("error converting supplied value for nullifier: {e}")
29991 });
29992 self
29993 }
29994 pub fn tx_hash<T>(mut self, value: T) -> Self
29995 where
29996 T: ::std::convert::TryInto<super::Hash>,
29997 T::Error: ::std::fmt::Display,
29998 {
29999 self.tx_hash = value
30000 .try_into()
30001 .map_err(|e| {
30002 format!("error converting supplied value for tx_hash: {e}")
30003 });
30004 self
30005 }
30006 }
30007 impl ::std::convert::TryFrom<ClosedAccountV2> for super::ClosedAccountV2 {
30008 type Error = super::error::ConversionError;
30009 fn try_from(
30010 value: ClosedAccountV2,
30011 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30012 Ok(Self {
30013 account: value.account?,
30014 nullifier: value.nullifier?,
30015 tx_hash: value.tx_hash?,
30016 })
30017 }
30018 }
30019 impl ::std::convert::From<super::ClosedAccountV2> for ClosedAccountV2 {
30020 fn from(value: super::ClosedAccountV2) -> Self {
30021 Self {
30022 account: Ok(value.account),
30023 nullifier: Ok(value.nullifier),
30024 tx_hash: Ok(value.tx_hash),
30025 }
30026 }
30027 }
30028 #[derive(Clone, Debug)]
30029 pub struct ClosedAccountWithOptionalTokenDataV2 {
30030 account: ::std::result::Result<
30031 super::ClosedAccountV2,
30032 ::std::string::String,
30033 >,
30034 optional_token_data: ::std::result::Result<
30035 ::std::option::Option<super::TokenData>,
30036 ::std::string::String,
30037 >,
30038 }
30039 impl ::std::default::Default for ClosedAccountWithOptionalTokenDataV2 {
30040 fn default() -> Self {
30041 Self {
30042 account: Err("no value supplied for account".to_string()),
30043 optional_token_data: Ok(Default::default()),
30044 }
30045 }
30046 }
30047 impl ClosedAccountWithOptionalTokenDataV2 {
30048 pub fn account<T>(mut self, value: T) -> Self
30049 where
30050 T: ::std::convert::TryInto<super::ClosedAccountV2>,
30051 T::Error: ::std::fmt::Display,
30052 {
30053 self.account = value
30054 .try_into()
30055 .map_err(|e| {
30056 format!("error converting supplied value for account: {e}")
30057 });
30058 self
30059 }
30060 pub fn optional_token_data<T>(mut self, value: T) -> Self
30061 where
30062 T: ::std::convert::TryInto<::std::option::Option<super::TokenData>>,
30063 T::Error: ::std::fmt::Display,
30064 {
30065 self.optional_token_data = value
30066 .try_into()
30067 .map_err(|e| {
30068 format!(
30069 "error converting supplied value for optional_token_data: {e}"
30070 )
30071 });
30072 self
30073 }
30074 }
30075 impl ::std::convert::TryFrom<ClosedAccountWithOptionalTokenDataV2>
30076 for super::ClosedAccountWithOptionalTokenDataV2 {
30077 type Error = super::error::ConversionError;
30078 fn try_from(
30079 value: ClosedAccountWithOptionalTokenDataV2,
30080 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30081 Ok(Self {
30082 account: value.account?,
30083 optional_token_data: value.optional_token_data?,
30084 })
30085 }
30086 }
30087 impl ::std::convert::From<super::ClosedAccountWithOptionalTokenDataV2>
30088 for ClosedAccountWithOptionalTokenDataV2 {
30089 fn from(value: super::ClosedAccountWithOptionalTokenDataV2) -> Self {
30090 Self {
30091 account: Ok(value.account),
30092 optional_token_data: Ok(value.optional_token_data),
30093 }
30094 }
30095 }
30096 #[derive(Clone, Debug)]
30097 pub struct CompressedProof {
30098 a: ::std::result::Result<::std::vec::Vec<i64>, ::std::string::String>,
30099 b: ::std::result::Result<::std::vec::Vec<i64>, ::std::string::String>,
30100 c: ::std::result::Result<::std::vec::Vec<i64>, ::std::string::String>,
30101 }
30102 impl ::std::default::Default for CompressedProof {
30103 fn default() -> Self {
30104 Self {
30105 a: Err("no value supplied for a".to_string()),
30106 b: Err("no value supplied for b".to_string()),
30107 c: Err("no value supplied for c".to_string()),
30108 }
30109 }
30110 }
30111 impl CompressedProof {
30112 pub fn a<T>(mut self, value: T) -> Self
30113 where
30114 T: ::std::convert::TryInto<::std::vec::Vec<i64>>,
30115 T::Error: ::std::fmt::Display,
30116 {
30117 self.a = value
30118 .try_into()
30119 .map_err(|e| format!("error converting supplied value for a: {e}"));
30120 self
30121 }
30122 pub fn b<T>(mut self, value: T) -> Self
30123 where
30124 T: ::std::convert::TryInto<::std::vec::Vec<i64>>,
30125 T::Error: ::std::fmt::Display,
30126 {
30127 self.b = value
30128 .try_into()
30129 .map_err(|e| format!("error converting supplied value for b: {e}"));
30130 self
30131 }
30132 pub fn c<T>(mut self, value: T) -> Self
30133 where
30134 T: ::std::convert::TryInto<::std::vec::Vec<i64>>,
30135 T::Error: ::std::fmt::Display,
30136 {
30137 self.c = value
30138 .try_into()
30139 .map_err(|e| format!("error converting supplied value for c: {e}"));
30140 self
30141 }
30142 }
30143 impl ::std::convert::TryFrom<CompressedProof> for super::CompressedProof {
30144 type Error = super::error::ConversionError;
30145 fn try_from(
30146 value: CompressedProof,
30147 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30148 Ok(Self {
30149 a: value.a?,
30150 b: value.b?,
30151 c: value.c?,
30152 })
30153 }
30154 }
30155 impl ::std::convert::From<super::CompressedProof> for CompressedProof {
30156 fn from(value: super::CompressedProof) -> Self {
30157 Self {
30158 a: Ok(value.a),
30159 b: Ok(value.b),
30160 c: Ok(value.c),
30161 }
30162 }
30163 }
30164 #[derive(Clone, Debug)]
30165 pub struct CompressedProofWithContext {
30166 compressed_proof: ::std::result::Result<
30167 super::CompressedProof,
30168 ::std::string::String,
30169 >,
30170 leaf_indices: ::std::result::Result<
30171 ::std::vec::Vec<u32>,
30172 ::std::string::String,
30173 >,
30174 leaves: ::std::result::Result<
30175 ::std::vec::Vec<::std::string::String>,
30176 ::std::string::String,
30177 >,
30178 merkle_trees: ::std::result::Result<
30179 ::std::vec::Vec<::std::string::String>,
30180 ::std::string::String,
30181 >,
30182 root_indices: ::std::result::Result<
30183 ::std::vec::Vec<u64>,
30184 ::std::string::String,
30185 >,
30186 roots: ::std::result::Result<
30187 ::std::vec::Vec<::std::string::String>,
30188 ::std::string::String,
30189 >,
30190 }
30191 impl ::std::default::Default for CompressedProofWithContext {
30192 fn default() -> Self {
30193 Self {
30194 compressed_proof: Err(
30195 "no value supplied for compressed_proof".to_string(),
30196 ),
30197 leaf_indices: Err("no value supplied for leaf_indices".to_string()),
30198 leaves: Err("no value supplied for leaves".to_string()),
30199 merkle_trees: Err("no value supplied for merkle_trees".to_string()),
30200 root_indices: Err("no value supplied for root_indices".to_string()),
30201 roots: Err("no value supplied for roots".to_string()),
30202 }
30203 }
30204 }
30205 impl CompressedProofWithContext {
30206 pub fn compressed_proof<T>(mut self, value: T) -> Self
30207 where
30208 T: ::std::convert::TryInto<super::CompressedProof>,
30209 T::Error: ::std::fmt::Display,
30210 {
30211 self.compressed_proof = value
30212 .try_into()
30213 .map_err(|e| {
30214 format!(
30215 "error converting supplied value for compressed_proof: {e}"
30216 )
30217 });
30218 self
30219 }
30220 pub fn leaf_indices<T>(mut self, value: T) -> Self
30221 where
30222 T: ::std::convert::TryInto<::std::vec::Vec<u32>>,
30223 T::Error: ::std::fmt::Display,
30224 {
30225 self.leaf_indices = value
30226 .try_into()
30227 .map_err(|e| {
30228 format!("error converting supplied value for leaf_indices: {e}")
30229 });
30230 self
30231 }
30232 pub fn leaves<T>(mut self, value: T) -> Self
30233 where
30234 T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
30235 T::Error: ::std::fmt::Display,
30236 {
30237 self.leaves = value
30238 .try_into()
30239 .map_err(|e| {
30240 format!("error converting supplied value for leaves: {e}")
30241 });
30242 self
30243 }
30244 pub fn merkle_trees<T>(mut self, value: T) -> Self
30245 where
30246 T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
30247 T::Error: ::std::fmt::Display,
30248 {
30249 self.merkle_trees = value
30250 .try_into()
30251 .map_err(|e| {
30252 format!("error converting supplied value for merkle_trees: {e}")
30253 });
30254 self
30255 }
30256 pub fn root_indices<T>(mut self, value: T) -> Self
30257 where
30258 T: ::std::convert::TryInto<::std::vec::Vec<u64>>,
30259 T::Error: ::std::fmt::Display,
30260 {
30261 self.root_indices = value
30262 .try_into()
30263 .map_err(|e| {
30264 format!("error converting supplied value for root_indices: {e}")
30265 });
30266 self
30267 }
30268 pub fn roots<T>(mut self, value: T) -> Self
30269 where
30270 T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
30271 T::Error: ::std::fmt::Display,
30272 {
30273 self.roots = value
30274 .try_into()
30275 .map_err(|e| {
30276 format!("error converting supplied value for roots: {e}")
30277 });
30278 self
30279 }
30280 }
30281 impl ::std::convert::TryFrom<CompressedProofWithContext>
30282 for super::CompressedProofWithContext {
30283 type Error = super::error::ConversionError;
30284 fn try_from(
30285 value: CompressedProofWithContext,
30286 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30287 Ok(Self {
30288 compressed_proof: value.compressed_proof?,
30289 leaf_indices: value.leaf_indices?,
30290 leaves: value.leaves?,
30291 merkle_trees: value.merkle_trees?,
30292 root_indices: value.root_indices?,
30293 roots: value.roots?,
30294 })
30295 }
30296 }
30297 impl ::std::convert::From<super::CompressedProofWithContext>
30298 for CompressedProofWithContext {
30299 fn from(value: super::CompressedProofWithContext) -> Self {
30300 Self {
30301 compressed_proof: Ok(value.compressed_proof),
30302 leaf_indices: Ok(value.leaf_indices),
30303 leaves: Ok(value.leaves),
30304 merkle_trees: Ok(value.merkle_trees),
30305 root_indices: Ok(value.root_indices),
30306 roots: Ok(value.roots),
30307 }
30308 }
30309 }
30310 #[derive(Clone, Debug)]
30311 pub struct CompressedProofWithContextV2 {
30312 accounts: ::std::result::Result<
30313 ::std::vec::Vec<super::AccountProofInputs>,
30314 ::std::string::String,
30315 >,
30316 addresses: ::std::result::Result<
30317 ::std::vec::Vec<super::AddressProofInputs>,
30318 ::std::string::String,
30319 >,
30320 compressed_proof: ::std::result::Result<
30321 ::std::option::Option<super::CompressedProof>,
30322 ::std::string::String,
30323 >,
30324 }
30325 impl ::std::default::Default for CompressedProofWithContextV2 {
30326 fn default() -> Self {
30327 Self {
30328 accounts: Err("no value supplied for accounts".to_string()),
30329 addresses: Err("no value supplied for addresses".to_string()),
30330 compressed_proof: Ok(Default::default()),
30331 }
30332 }
30333 }
30334 impl CompressedProofWithContextV2 {
30335 pub fn accounts<T>(mut self, value: T) -> Self
30336 where
30337 T: ::std::convert::TryInto<::std::vec::Vec<super::AccountProofInputs>>,
30338 T::Error: ::std::fmt::Display,
30339 {
30340 self.accounts = value
30341 .try_into()
30342 .map_err(|e| {
30343 format!("error converting supplied value for accounts: {e}")
30344 });
30345 self
30346 }
30347 pub fn addresses<T>(mut self, value: T) -> Self
30348 where
30349 T: ::std::convert::TryInto<::std::vec::Vec<super::AddressProofInputs>>,
30350 T::Error: ::std::fmt::Display,
30351 {
30352 self.addresses = value
30353 .try_into()
30354 .map_err(|e| {
30355 format!("error converting supplied value for addresses: {e}")
30356 });
30357 self
30358 }
30359 pub fn compressed_proof<T>(mut self, value: T) -> Self
30360 where
30361 T: ::std::convert::TryInto<
30362 ::std::option::Option<super::CompressedProof>,
30363 >,
30364 T::Error: ::std::fmt::Display,
30365 {
30366 self.compressed_proof = value
30367 .try_into()
30368 .map_err(|e| {
30369 format!(
30370 "error converting supplied value for compressed_proof: {e}"
30371 )
30372 });
30373 self
30374 }
30375 }
30376 impl ::std::convert::TryFrom<CompressedProofWithContextV2>
30377 for super::CompressedProofWithContextV2 {
30378 type Error = super::error::ConversionError;
30379 fn try_from(
30380 value: CompressedProofWithContextV2,
30381 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30382 Ok(Self {
30383 accounts: value.accounts?,
30384 addresses: value.addresses?,
30385 compressed_proof: value.compressed_proof?,
30386 })
30387 }
30388 }
30389 impl ::std::convert::From<super::CompressedProofWithContextV2>
30390 for CompressedProofWithContextV2 {
30391 fn from(value: super::CompressedProofWithContextV2) -> Self {
30392 Self {
30393 accounts: Ok(value.accounts),
30394 addresses: Ok(value.addresses),
30395 compressed_proof: Ok(value.compressed_proof),
30396 }
30397 }
30398 }
30399 #[derive(Clone, Debug)]
30400 pub struct CompressionInfoV2 {
30401 closed_accounts: ::std::result::Result<
30402 ::std::vec::Vec<super::ClosedAccountWithOptionalTokenDataV2>,
30403 ::std::string::String,
30404 >,
30405 opened_accounts: ::std::result::Result<
30406 ::std::vec::Vec<super::AccountWithOptionalTokenDataV2>,
30407 ::std::string::String,
30408 >,
30409 }
30410 impl ::std::default::Default for CompressionInfoV2 {
30411 fn default() -> Self {
30412 Self {
30413 closed_accounts: Err(
30414 "no value supplied for closed_accounts".to_string(),
30415 ),
30416 opened_accounts: Err(
30417 "no value supplied for opened_accounts".to_string(),
30418 ),
30419 }
30420 }
30421 }
30422 impl CompressionInfoV2 {
30423 pub fn closed_accounts<T>(mut self, value: T) -> Self
30424 where
30425 T: ::std::convert::TryInto<
30426 ::std::vec::Vec<super::ClosedAccountWithOptionalTokenDataV2>,
30427 >,
30428 T::Error: ::std::fmt::Display,
30429 {
30430 self.closed_accounts = value
30431 .try_into()
30432 .map_err(|e| {
30433 format!(
30434 "error converting supplied value for closed_accounts: {e}"
30435 )
30436 });
30437 self
30438 }
30439 pub fn opened_accounts<T>(mut self, value: T) -> Self
30440 where
30441 T: ::std::convert::TryInto<
30442 ::std::vec::Vec<super::AccountWithOptionalTokenDataV2>,
30443 >,
30444 T::Error: ::std::fmt::Display,
30445 {
30446 self.opened_accounts = value
30447 .try_into()
30448 .map_err(|e| {
30449 format!(
30450 "error converting supplied value for opened_accounts: {e}"
30451 )
30452 });
30453 self
30454 }
30455 }
30456 impl ::std::convert::TryFrom<CompressionInfoV2> for super::CompressionInfoV2 {
30457 type Error = super::error::ConversionError;
30458 fn try_from(
30459 value: CompressionInfoV2,
30460 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30461 Ok(Self {
30462 closed_accounts: value.closed_accounts?,
30463 opened_accounts: value.opened_accounts?,
30464 })
30465 }
30466 }
30467 impl ::std::convert::From<super::CompressionInfoV2> for CompressionInfoV2 {
30468 fn from(value: super::CompressionInfoV2) -> Self {
30469 Self {
30470 closed_accounts: Ok(value.closed_accounts),
30471 opened_accounts: Ok(value.opened_accounts),
30472 }
30473 }
30474 }
30475 #[derive(Clone, Debug)]
30476 pub struct Context {
30477 slot: ::std::result::Result<u64, ::std::string::String>,
30478 }
30479 impl ::std::default::Default for Context {
30480 fn default() -> Self {
30481 Self {
30482 slot: Err("no value supplied for slot".to_string()),
30483 }
30484 }
30485 }
30486 impl Context {
30487 pub fn slot<T>(mut self, value: T) -> Self
30488 where
30489 T: ::std::convert::TryInto<u64>,
30490 T::Error: ::std::fmt::Display,
30491 {
30492 self.slot = value
30493 .try_into()
30494 .map_err(|e| {
30495 format!("error converting supplied value for slot: {e}")
30496 });
30497 self
30498 }
30499 }
30500 impl ::std::convert::TryFrom<Context> for super::Context {
30501 type Error = super::error::ConversionError;
30502 fn try_from(
30503 value: Context,
30504 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30505 Ok(Self { slot: value.slot? })
30506 }
30507 }
30508 impl ::std::convert::From<super::Context> for Context {
30509 fn from(value: super::Context) -> Self {
30510 Self { slot: Ok(value.slot) }
30511 }
30512 }
30513 #[derive(Clone, Debug)]
30514 pub struct DataSlice {
30515 length: ::std::result::Result<u64, ::std::string::String>,
30516 offset: ::std::result::Result<u64, ::std::string::String>,
30517 }
30518 impl ::std::default::Default for DataSlice {
30519 fn default() -> Self {
30520 Self {
30521 length: Err("no value supplied for length".to_string()),
30522 offset: Err("no value supplied for offset".to_string()),
30523 }
30524 }
30525 }
30526 impl DataSlice {
30527 pub fn length<T>(mut self, value: T) -> Self
30528 where
30529 T: ::std::convert::TryInto<u64>,
30530 T::Error: ::std::fmt::Display,
30531 {
30532 self.length = value
30533 .try_into()
30534 .map_err(|e| {
30535 format!("error converting supplied value for length: {e}")
30536 });
30537 self
30538 }
30539 pub fn offset<T>(mut self, value: T) -> Self
30540 where
30541 T: ::std::convert::TryInto<u64>,
30542 T::Error: ::std::fmt::Display,
30543 {
30544 self.offset = value
30545 .try_into()
30546 .map_err(|e| {
30547 format!("error converting supplied value for offset: {e}")
30548 });
30549 self
30550 }
30551 }
30552 impl ::std::convert::TryFrom<DataSlice> for super::DataSlice {
30553 type Error = super::error::ConversionError;
30554 fn try_from(
30555 value: DataSlice,
30556 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30557 Ok(Self {
30558 length: value.length?,
30559 offset: value.offset?,
30560 })
30561 }
30562 }
30563 impl ::std::convert::From<super::DataSlice> for DataSlice {
30564 fn from(value: super::DataSlice) -> Self {
30565 Self {
30566 length: Ok(value.length),
30567 offset: Ok(value.offset),
30568 }
30569 }
30570 }
30571 #[derive(Clone, Debug)]
30572 pub struct FilterSelector {
30573 memcmp: ::std::result::Result<
30574 ::std::option::Option<super::Memcmp>,
30575 ::std::string::String,
30576 >,
30577 }
30578 impl ::std::default::Default for FilterSelector {
30579 fn default() -> Self {
30580 Self {
30581 memcmp: Ok(Default::default()),
30582 }
30583 }
30584 }
30585 impl FilterSelector {
30586 pub fn memcmp<T>(mut self, value: T) -> Self
30587 where
30588 T: ::std::convert::TryInto<::std::option::Option<super::Memcmp>>,
30589 T::Error: ::std::fmt::Display,
30590 {
30591 self.memcmp = value
30592 .try_into()
30593 .map_err(|e| {
30594 format!("error converting supplied value for memcmp: {e}")
30595 });
30596 self
30597 }
30598 }
30599 impl ::std::convert::TryFrom<FilterSelector> for super::FilterSelector {
30600 type Error = super::error::ConversionError;
30601 fn try_from(
30602 value: FilterSelector,
30603 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30604 Ok(Self { memcmp: value.memcmp? })
30605 }
30606 }
30607 impl ::std::convert::From<super::FilterSelector> for FilterSelector {
30608 fn from(value: super::FilterSelector) -> Self {
30609 Self { memcmp: Ok(value.memcmp) }
30610 }
30611 }
30612 #[derive(Clone, Debug)]
30613 pub struct GetCompressedAccountProofResponseValue {
30614 hash: ::std::result::Result<super::Hash, ::std::string::String>,
30615 leaf_index: ::std::result::Result<u32, ::std::string::String>,
30616 merkle_tree: ::std::result::Result<
30617 super::SerializablePubkey,
30618 ::std::string::String,
30619 >,
30620 proof: ::std::result::Result<
30621 ::std::vec::Vec<super::Hash>,
30622 ::std::string::String,
30623 >,
30624 root: ::std::result::Result<super::Hash, ::std::string::String>,
30625 root_seq: ::std::result::Result<u64, ::std::string::String>,
30626 }
30627 impl ::std::default::Default for GetCompressedAccountProofResponseValue {
30628 fn default() -> Self {
30629 Self {
30630 hash: Err("no value supplied for hash".to_string()),
30631 leaf_index: Err("no value supplied for leaf_index".to_string()),
30632 merkle_tree: Err("no value supplied for merkle_tree".to_string()),
30633 proof: Err("no value supplied for proof".to_string()),
30634 root: Err("no value supplied for root".to_string()),
30635 root_seq: Err("no value supplied for root_seq".to_string()),
30636 }
30637 }
30638 }
30639 impl GetCompressedAccountProofResponseValue {
30640 pub fn hash<T>(mut self, value: T) -> Self
30641 where
30642 T: ::std::convert::TryInto<super::Hash>,
30643 T::Error: ::std::fmt::Display,
30644 {
30645 self.hash = value
30646 .try_into()
30647 .map_err(|e| {
30648 format!("error converting supplied value for hash: {e}")
30649 });
30650 self
30651 }
30652 pub fn leaf_index<T>(mut self, value: T) -> Self
30653 where
30654 T: ::std::convert::TryInto<u32>,
30655 T::Error: ::std::fmt::Display,
30656 {
30657 self.leaf_index = value
30658 .try_into()
30659 .map_err(|e| {
30660 format!("error converting supplied value for leaf_index: {e}")
30661 });
30662 self
30663 }
30664 pub fn merkle_tree<T>(mut self, value: T) -> Self
30665 where
30666 T: ::std::convert::TryInto<super::SerializablePubkey>,
30667 T::Error: ::std::fmt::Display,
30668 {
30669 self.merkle_tree = value
30670 .try_into()
30671 .map_err(|e| {
30672 format!("error converting supplied value for merkle_tree: {e}")
30673 });
30674 self
30675 }
30676 pub fn proof<T>(mut self, value: T) -> Self
30677 where
30678 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
30679 T::Error: ::std::fmt::Display,
30680 {
30681 self.proof = value
30682 .try_into()
30683 .map_err(|e| {
30684 format!("error converting supplied value for proof: {e}")
30685 });
30686 self
30687 }
30688 pub fn root<T>(mut self, value: T) -> Self
30689 where
30690 T: ::std::convert::TryInto<super::Hash>,
30691 T::Error: ::std::fmt::Display,
30692 {
30693 self.root = value
30694 .try_into()
30695 .map_err(|e| {
30696 format!("error converting supplied value for root: {e}")
30697 });
30698 self
30699 }
30700 pub fn root_seq<T>(mut self, value: T) -> Self
30701 where
30702 T: ::std::convert::TryInto<u64>,
30703 T::Error: ::std::fmt::Display,
30704 {
30705 self.root_seq = value
30706 .try_into()
30707 .map_err(|e| {
30708 format!("error converting supplied value for root_seq: {e}")
30709 });
30710 self
30711 }
30712 }
30713 impl ::std::convert::TryFrom<GetCompressedAccountProofResponseValue>
30714 for super::GetCompressedAccountProofResponseValue {
30715 type Error = super::error::ConversionError;
30716 fn try_from(
30717 value: GetCompressedAccountProofResponseValue,
30718 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30719 Ok(Self {
30720 hash: value.hash?,
30721 leaf_index: value.leaf_index?,
30722 merkle_tree: value.merkle_tree?,
30723 proof: value.proof?,
30724 root: value.root?,
30725 root_seq: value.root_seq?,
30726 })
30727 }
30728 }
30729 impl ::std::convert::From<super::GetCompressedAccountProofResponseValue>
30730 for GetCompressedAccountProofResponseValue {
30731 fn from(value: super::GetCompressedAccountProofResponseValue) -> Self {
30732 Self {
30733 hash: Ok(value.hash),
30734 leaf_index: Ok(value.leaf_index),
30735 merkle_tree: Ok(value.merkle_tree),
30736 proof: Ok(value.proof),
30737 root: Ok(value.root),
30738 root_seq: Ok(value.root_seq),
30739 }
30740 }
30741 }
30742 #[derive(Clone, Debug)]
30743 pub struct GetCompressedAccountProofResponseValueV2 {
30744 hash: ::std::result::Result<super::Hash, ::std::string::String>,
30745 leaf_index: ::std::result::Result<u32, ::std::string::String>,
30746 proof: ::std::result::Result<
30747 ::std::vec::Vec<super::Hash>,
30748 ::std::string::String,
30749 >,
30750 prove_by_index: ::std::result::Result<bool, ::std::string::String>,
30751 root: ::std::result::Result<super::Hash, ::std::string::String>,
30752 root_seq: ::std::result::Result<u64, ::std::string::String>,
30753 tree_context: ::std::result::Result<
30754 super::TreeContextInfo,
30755 ::std::string::String,
30756 >,
30757 }
30758 impl ::std::default::Default for GetCompressedAccountProofResponseValueV2 {
30759 fn default() -> Self {
30760 Self {
30761 hash: Err("no value supplied for hash".to_string()),
30762 leaf_index: Err("no value supplied for leaf_index".to_string()),
30763 proof: Err("no value supplied for proof".to_string()),
30764 prove_by_index: Err(
30765 "no value supplied for prove_by_index".to_string(),
30766 ),
30767 root: Err("no value supplied for root".to_string()),
30768 root_seq: Err("no value supplied for root_seq".to_string()),
30769 tree_context: Err("no value supplied for tree_context".to_string()),
30770 }
30771 }
30772 }
30773 impl GetCompressedAccountProofResponseValueV2 {
30774 pub fn hash<T>(mut self, value: T) -> Self
30775 where
30776 T: ::std::convert::TryInto<super::Hash>,
30777 T::Error: ::std::fmt::Display,
30778 {
30779 self.hash = value
30780 .try_into()
30781 .map_err(|e| {
30782 format!("error converting supplied value for hash: {e}")
30783 });
30784 self
30785 }
30786 pub fn leaf_index<T>(mut self, value: T) -> Self
30787 where
30788 T: ::std::convert::TryInto<u32>,
30789 T::Error: ::std::fmt::Display,
30790 {
30791 self.leaf_index = value
30792 .try_into()
30793 .map_err(|e| {
30794 format!("error converting supplied value for leaf_index: {e}")
30795 });
30796 self
30797 }
30798 pub fn proof<T>(mut self, value: T) -> Self
30799 where
30800 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
30801 T::Error: ::std::fmt::Display,
30802 {
30803 self.proof = value
30804 .try_into()
30805 .map_err(|e| {
30806 format!("error converting supplied value for proof: {e}")
30807 });
30808 self
30809 }
30810 pub fn prove_by_index<T>(mut self, value: T) -> Self
30811 where
30812 T: ::std::convert::TryInto<bool>,
30813 T::Error: ::std::fmt::Display,
30814 {
30815 self.prove_by_index = value
30816 .try_into()
30817 .map_err(|e| {
30818 format!(
30819 "error converting supplied value for prove_by_index: {e}"
30820 )
30821 });
30822 self
30823 }
30824 pub fn root<T>(mut self, value: T) -> Self
30825 where
30826 T: ::std::convert::TryInto<super::Hash>,
30827 T::Error: ::std::fmt::Display,
30828 {
30829 self.root = value
30830 .try_into()
30831 .map_err(|e| {
30832 format!("error converting supplied value for root: {e}")
30833 });
30834 self
30835 }
30836 pub fn root_seq<T>(mut self, value: T) -> Self
30837 where
30838 T: ::std::convert::TryInto<u64>,
30839 T::Error: ::std::fmt::Display,
30840 {
30841 self.root_seq = value
30842 .try_into()
30843 .map_err(|e| {
30844 format!("error converting supplied value for root_seq: {e}")
30845 });
30846 self
30847 }
30848 pub fn tree_context<T>(mut self, value: T) -> Self
30849 where
30850 T: ::std::convert::TryInto<super::TreeContextInfo>,
30851 T::Error: ::std::fmt::Display,
30852 {
30853 self.tree_context = value
30854 .try_into()
30855 .map_err(|e| {
30856 format!("error converting supplied value for tree_context: {e}")
30857 });
30858 self
30859 }
30860 }
30861 impl ::std::convert::TryFrom<GetCompressedAccountProofResponseValueV2>
30862 for super::GetCompressedAccountProofResponseValueV2 {
30863 type Error = super::error::ConversionError;
30864 fn try_from(
30865 value: GetCompressedAccountProofResponseValueV2,
30866 ) -> ::std::result::Result<Self, super::error::ConversionError> {
30867 Ok(Self {
30868 hash: value.hash?,
30869 leaf_index: value.leaf_index?,
30870 proof: value.proof?,
30871 prove_by_index: value.prove_by_index?,
30872 root: value.root?,
30873 root_seq: value.root_seq?,
30874 tree_context: value.tree_context?,
30875 })
30876 }
30877 }
30878 impl ::std::convert::From<super::GetCompressedAccountProofResponseValueV2>
30879 for GetCompressedAccountProofResponseValueV2 {
30880 fn from(value: super::GetCompressedAccountProofResponseValueV2) -> Self {
30881 Self {
30882 hash: Ok(value.hash),
30883 leaf_index: Ok(value.leaf_index),
30884 proof: Ok(value.proof),
30885 prove_by_index: Ok(value.prove_by_index),
30886 root: Ok(value.root),
30887 root_seq: Ok(value.root_seq),
30888 tree_context: Ok(value.tree_context),
30889 }
30890 }
30891 }
30892 #[derive(Clone, Debug)]
30893 pub struct InputQueueData {
30894 account_hashes: ::std::result::Result<
30895 ::std::vec::Vec<super::Hash>,
30896 ::std::string::String,
30897 >,
30898 first_queue_index: ::std::result::Result<u64, ::std::string::String>,
30899 leaf_indices: ::std::result::Result<
30900 ::std::vec::Vec<u64>,
30901 ::std::string::String,
30902 >,
30903 leaves: ::std::result::Result<
30904 ::std::vec::Vec<super::Hash>,
30905 ::std::string::String,
30906 >,
30907 leaves_hash_chains: ::std::result::Result<
30908 ::std::vec::Vec<super::Hash>,
30909 ::std::string::String,
30910 >,
30911 nullifiers: ::std::result::Result<
30912 ::std::vec::Vec<super::Hash>,
30913 ::std::string::String,
30914 >,
30915 tx_hashes: ::std::result::Result<
30916 ::std::vec::Vec<super::Hash>,
30917 ::std::string::String,
30918 >,
30919 }
30920 impl ::std::default::Default for InputQueueData {
30921 fn default() -> Self {
30922 Self {
30923 account_hashes: Err(
30924 "no value supplied for account_hashes".to_string(),
30925 ),
30926 first_queue_index: Err(
30927 "no value supplied for first_queue_index".to_string(),
30928 ),
30929 leaf_indices: Err("no value supplied for leaf_indices".to_string()),
30930 leaves: Err("no value supplied for leaves".to_string()),
30931 leaves_hash_chains: Err(
30932 "no value supplied for leaves_hash_chains".to_string(),
30933 ),
30934 nullifiers: Err("no value supplied for nullifiers".to_string()),
30935 tx_hashes: Err("no value supplied for tx_hashes".to_string()),
30936 }
30937 }
30938 }
30939 impl InputQueueData {
30940 pub fn account_hashes<T>(mut self, value: T) -> Self
30941 where
30942 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
30943 T::Error: ::std::fmt::Display,
30944 {
30945 self.account_hashes = value
30946 .try_into()
30947 .map_err(|e| {
30948 format!(
30949 "error converting supplied value for account_hashes: {e}"
30950 )
30951 });
30952 self
30953 }
30954 pub fn first_queue_index<T>(mut self, value: T) -> Self
30955 where
30956 T: ::std::convert::TryInto<u64>,
30957 T::Error: ::std::fmt::Display,
30958 {
30959 self.first_queue_index = value
30960 .try_into()
30961 .map_err(|e| {
30962 format!(
30963 "error converting supplied value for first_queue_index: {e}"
30964 )
30965 });
30966 self
30967 }
30968 pub fn leaf_indices<T>(mut self, value: T) -> Self
30969 where
30970 T: ::std::convert::TryInto<::std::vec::Vec<u64>>,
30971 T::Error: ::std::fmt::Display,
30972 {
30973 self.leaf_indices = value
30974 .try_into()
30975 .map_err(|e| {
30976 format!("error converting supplied value for leaf_indices: {e}")
30977 });
30978 self
30979 }
30980 pub fn leaves<T>(mut self, value: T) -> Self
30981 where
30982 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
30983 T::Error: ::std::fmt::Display,
30984 {
30985 self.leaves = value
30986 .try_into()
30987 .map_err(|e| {
30988 format!("error converting supplied value for leaves: {e}")
30989 });
30990 self
30991 }
30992 pub fn leaves_hash_chains<T>(mut self, value: T) -> Self
30993 where
30994 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
30995 T::Error: ::std::fmt::Display,
30996 {
30997 self.leaves_hash_chains = value
30998 .try_into()
30999 .map_err(|e| {
31000 format!(
31001 "error converting supplied value for leaves_hash_chains: {e}"
31002 )
31003 });
31004 self
31005 }
31006 pub fn nullifiers<T>(mut self, value: T) -> Self
31007 where
31008 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
31009 T::Error: ::std::fmt::Display,
31010 {
31011 self.nullifiers = value
31012 .try_into()
31013 .map_err(|e| {
31014 format!("error converting supplied value for nullifiers: {e}")
31015 });
31016 self
31017 }
31018 pub fn tx_hashes<T>(mut self, value: T) -> Self
31019 where
31020 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
31021 T::Error: ::std::fmt::Display,
31022 {
31023 self.tx_hashes = value
31024 .try_into()
31025 .map_err(|e| {
31026 format!("error converting supplied value for tx_hashes: {e}")
31027 });
31028 self
31029 }
31030 }
31031 impl ::std::convert::TryFrom<InputQueueData> for super::InputQueueData {
31032 type Error = super::error::ConversionError;
31033 fn try_from(
31034 value: InputQueueData,
31035 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31036 Ok(Self {
31037 account_hashes: value.account_hashes?,
31038 first_queue_index: value.first_queue_index?,
31039 leaf_indices: value.leaf_indices?,
31040 leaves: value.leaves?,
31041 leaves_hash_chains: value.leaves_hash_chains?,
31042 nullifiers: value.nullifiers?,
31043 tx_hashes: value.tx_hashes?,
31044 })
31045 }
31046 }
31047 impl ::std::convert::From<super::InputQueueData> for InputQueueData {
31048 fn from(value: super::InputQueueData) -> Self {
31049 Self {
31050 account_hashes: Ok(value.account_hashes),
31051 first_queue_index: Ok(value.first_queue_index),
31052 leaf_indices: Ok(value.leaf_indices),
31053 leaves: Ok(value.leaves),
31054 leaves_hash_chains: Ok(value.leaves_hash_chains),
31055 nullifiers: Ok(value.nullifiers),
31056 tx_hashes: Ok(value.tx_hashes),
31057 }
31058 }
31059 }
31060 #[derive(Clone, Debug)]
31061 pub struct Memcmp {
31062 bytes: ::std::result::Result<super::Base58String, ::std::string::String>,
31063 offset: ::std::result::Result<u64, ::std::string::String>,
31064 }
31065 impl ::std::default::Default for Memcmp {
31066 fn default() -> Self {
31067 Self {
31068 bytes: Err("no value supplied for bytes".to_string()),
31069 offset: Err("no value supplied for offset".to_string()),
31070 }
31071 }
31072 }
31073 impl Memcmp {
31074 pub fn bytes<T>(mut self, value: T) -> Self
31075 where
31076 T: ::std::convert::TryInto<super::Base58String>,
31077 T::Error: ::std::fmt::Display,
31078 {
31079 self.bytes = value
31080 .try_into()
31081 .map_err(|e| {
31082 format!("error converting supplied value for bytes: {e}")
31083 });
31084 self
31085 }
31086 pub fn offset<T>(mut self, value: T) -> Self
31087 where
31088 T: ::std::convert::TryInto<u64>,
31089 T::Error: ::std::fmt::Display,
31090 {
31091 self.offset = value
31092 .try_into()
31093 .map_err(|e| {
31094 format!("error converting supplied value for offset: {e}")
31095 });
31096 self
31097 }
31098 }
31099 impl ::std::convert::TryFrom<Memcmp> for super::Memcmp {
31100 type Error = super::error::ConversionError;
31101 fn try_from(
31102 value: Memcmp,
31103 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31104 Ok(Self {
31105 bytes: value.bytes?,
31106 offset: value.offset?,
31107 })
31108 }
31109 }
31110 impl ::std::convert::From<super::Memcmp> for Memcmp {
31111 fn from(value: super::Memcmp) -> Self {
31112 Self {
31113 bytes: Ok(value.bytes),
31114 offset: Ok(value.offset),
31115 }
31116 }
31117 }
31118 #[derive(Clone, Debug)]
31119 pub struct MerkleContextV2 {
31120 cpi_context: ::std::result::Result<
31121 ::std::option::Option<super::SerializablePubkey>,
31122 ::std::string::String,
31123 >,
31124 next_tree_context: ::std::result::Result<
31125 ::std::option::Option<super::TreeContextInfo>,
31126 ::std::string::String,
31127 >,
31128 queue: ::std::result::Result<
31129 super::SerializablePubkey,
31130 ::std::string::String,
31131 >,
31132 tree: ::std::result::Result<
31133 super::SerializablePubkey,
31134 ::std::string::String,
31135 >,
31136 tree_type: ::std::result::Result<u16, ::std::string::String>,
31137 }
31138 impl ::std::default::Default for MerkleContextV2 {
31139 fn default() -> Self {
31140 Self {
31141 cpi_context: Ok(Default::default()),
31142 next_tree_context: Ok(Default::default()),
31143 queue: Err("no value supplied for queue".to_string()),
31144 tree: Err("no value supplied for tree".to_string()),
31145 tree_type: Err("no value supplied for tree_type".to_string()),
31146 }
31147 }
31148 }
31149 impl MerkleContextV2 {
31150 pub fn cpi_context<T>(mut self, value: T) -> Self
31151 where
31152 T: ::std::convert::TryInto<
31153 ::std::option::Option<super::SerializablePubkey>,
31154 >,
31155 T::Error: ::std::fmt::Display,
31156 {
31157 self.cpi_context = value
31158 .try_into()
31159 .map_err(|e| {
31160 format!("error converting supplied value for cpi_context: {e}")
31161 });
31162 self
31163 }
31164 pub fn next_tree_context<T>(mut self, value: T) -> Self
31165 where
31166 T: ::std::convert::TryInto<
31167 ::std::option::Option<super::TreeContextInfo>,
31168 >,
31169 T::Error: ::std::fmt::Display,
31170 {
31171 self.next_tree_context = value
31172 .try_into()
31173 .map_err(|e| {
31174 format!(
31175 "error converting supplied value for next_tree_context: {e}"
31176 )
31177 });
31178 self
31179 }
31180 pub fn queue<T>(mut self, value: T) -> Self
31181 where
31182 T: ::std::convert::TryInto<super::SerializablePubkey>,
31183 T::Error: ::std::fmt::Display,
31184 {
31185 self.queue = value
31186 .try_into()
31187 .map_err(|e| {
31188 format!("error converting supplied value for queue: {e}")
31189 });
31190 self
31191 }
31192 pub fn tree<T>(mut self, value: T) -> Self
31193 where
31194 T: ::std::convert::TryInto<super::SerializablePubkey>,
31195 T::Error: ::std::fmt::Display,
31196 {
31197 self.tree = value
31198 .try_into()
31199 .map_err(|e| {
31200 format!("error converting supplied value for tree: {e}")
31201 });
31202 self
31203 }
31204 pub fn tree_type<T>(mut self, value: T) -> Self
31205 where
31206 T: ::std::convert::TryInto<u16>,
31207 T::Error: ::std::fmt::Display,
31208 {
31209 self.tree_type = value
31210 .try_into()
31211 .map_err(|e| {
31212 format!("error converting supplied value for tree_type: {e}")
31213 });
31214 self
31215 }
31216 }
31217 impl ::std::convert::TryFrom<MerkleContextV2> for super::MerkleContextV2 {
31218 type Error = super::error::ConversionError;
31219 fn try_from(
31220 value: MerkleContextV2,
31221 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31222 Ok(Self {
31223 cpi_context: value.cpi_context?,
31224 next_tree_context: value.next_tree_context?,
31225 queue: value.queue?,
31226 tree: value.tree?,
31227 tree_type: value.tree_type?,
31228 })
31229 }
31230 }
31231 impl ::std::convert::From<super::MerkleContextV2> for MerkleContextV2 {
31232 fn from(value: super::MerkleContextV2) -> Self {
31233 Self {
31234 cpi_context: Ok(value.cpi_context),
31235 next_tree_context: Ok(value.next_tree_context),
31236 queue: Ok(value.queue),
31237 tree: Ok(value.tree),
31238 tree_type: Ok(value.tree_type),
31239 }
31240 }
31241 }
31242 #[derive(Clone, Debug)]
31243 pub struct MerkleContextWithNewAddressProof {
31244 address: ::std::result::Result<
31245 super::SerializablePubkey,
31246 ::std::string::String,
31247 >,
31248 higher_range_address: ::std::result::Result<
31249 super::SerializablePubkey,
31250 ::std::string::String,
31251 >,
31252 low_element_leaf_index: ::std::result::Result<u32, ::std::string::String>,
31253 lower_range_address: ::std::result::Result<
31254 super::SerializablePubkey,
31255 ::std::string::String,
31256 >,
31257 merkle_tree: ::std::result::Result<
31258 super::SerializablePubkey,
31259 ::std::string::String,
31260 >,
31261 next_index: ::std::result::Result<u32, ::std::string::String>,
31262 proof: ::std::result::Result<
31263 ::std::vec::Vec<super::Hash>,
31264 ::std::string::String,
31265 >,
31266 root: ::std::result::Result<super::Hash, ::std::string::String>,
31267 root_seq: ::std::result::Result<u64, ::std::string::String>,
31268 }
31269 impl ::std::default::Default for MerkleContextWithNewAddressProof {
31270 fn default() -> Self {
31271 Self {
31272 address: Err("no value supplied for address".to_string()),
31273 higher_range_address: Err(
31274 "no value supplied for higher_range_address".to_string(),
31275 ),
31276 low_element_leaf_index: Err(
31277 "no value supplied for low_element_leaf_index".to_string(),
31278 ),
31279 lower_range_address: Err(
31280 "no value supplied for lower_range_address".to_string(),
31281 ),
31282 merkle_tree: Err("no value supplied for merkle_tree".to_string()),
31283 next_index: Err("no value supplied for next_index".to_string()),
31284 proof: Err("no value supplied for proof".to_string()),
31285 root: Err("no value supplied for root".to_string()),
31286 root_seq: Err("no value supplied for root_seq".to_string()),
31287 }
31288 }
31289 }
31290 impl MerkleContextWithNewAddressProof {
31291 pub fn address<T>(mut self, value: T) -> Self
31292 where
31293 T: ::std::convert::TryInto<super::SerializablePubkey>,
31294 T::Error: ::std::fmt::Display,
31295 {
31296 self.address = value
31297 .try_into()
31298 .map_err(|e| {
31299 format!("error converting supplied value for address: {e}")
31300 });
31301 self
31302 }
31303 pub fn higher_range_address<T>(mut self, value: T) -> Self
31304 where
31305 T: ::std::convert::TryInto<super::SerializablePubkey>,
31306 T::Error: ::std::fmt::Display,
31307 {
31308 self.higher_range_address = value
31309 .try_into()
31310 .map_err(|e| {
31311 format!(
31312 "error converting supplied value for higher_range_address: {e}"
31313 )
31314 });
31315 self
31316 }
31317 pub fn low_element_leaf_index<T>(mut self, value: T) -> Self
31318 where
31319 T: ::std::convert::TryInto<u32>,
31320 T::Error: ::std::fmt::Display,
31321 {
31322 self.low_element_leaf_index = value
31323 .try_into()
31324 .map_err(|e| {
31325 format!(
31326 "error converting supplied value for low_element_leaf_index: {e}"
31327 )
31328 });
31329 self
31330 }
31331 pub fn lower_range_address<T>(mut self, value: T) -> Self
31332 where
31333 T: ::std::convert::TryInto<super::SerializablePubkey>,
31334 T::Error: ::std::fmt::Display,
31335 {
31336 self.lower_range_address = value
31337 .try_into()
31338 .map_err(|e| {
31339 format!(
31340 "error converting supplied value for lower_range_address: {e}"
31341 )
31342 });
31343 self
31344 }
31345 pub fn merkle_tree<T>(mut self, value: T) -> Self
31346 where
31347 T: ::std::convert::TryInto<super::SerializablePubkey>,
31348 T::Error: ::std::fmt::Display,
31349 {
31350 self.merkle_tree = value
31351 .try_into()
31352 .map_err(|e| {
31353 format!("error converting supplied value for merkle_tree: {e}")
31354 });
31355 self
31356 }
31357 pub fn next_index<T>(mut self, value: T) -> Self
31358 where
31359 T: ::std::convert::TryInto<u32>,
31360 T::Error: ::std::fmt::Display,
31361 {
31362 self.next_index = value
31363 .try_into()
31364 .map_err(|e| {
31365 format!("error converting supplied value for next_index: {e}")
31366 });
31367 self
31368 }
31369 pub fn proof<T>(mut self, value: T) -> Self
31370 where
31371 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
31372 T::Error: ::std::fmt::Display,
31373 {
31374 self.proof = value
31375 .try_into()
31376 .map_err(|e| {
31377 format!("error converting supplied value for proof: {e}")
31378 });
31379 self
31380 }
31381 pub fn root<T>(mut self, value: T) -> Self
31382 where
31383 T: ::std::convert::TryInto<super::Hash>,
31384 T::Error: ::std::fmt::Display,
31385 {
31386 self.root = value
31387 .try_into()
31388 .map_err(|e| {
31389 format!("error converting supplied value for root: {e}")
31390 });
31391 self
31392 }
31393 pub fn root_seq<T>(mut self, value: T) -> Self
31394 where
31395 T: ::std::convert::TryInto<u64>,
31396 T::Error: ::std::fmt::Display,
31397 {
31398 self.root_seq = value
31399 .try_into()
31400 .map_err(|e| {
31401 format!("error converting supplied value for root_seq: {e}")
31402 });
31403 self
31404 }
31405 }
31406 impl ::std::convert::TryFrom<MerkleContextWithNewAddressProof>
31407 for super::MerkleContextWithNewAddressProof {
31408 type Error = super::error::ConversionError;
31409 fn try_from(
31410 value: MerkleContextWithNewAddressProof,
31411 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31412 Ok(Self {
31413 address: value.address?,
31414 higher_range_address: value.higher_range_address?,
31415 low_element_leaf_index: value.low_element_leaf_index?,
31416 lower_range_address: value.lower_range_address?,
31417 merkle_tree: value.merkle_tree?,
31418 next_index: value.next_index?,
31419 proof: value.proof?,
31420 root: value.root?,
31421 root_seq: value.root_seq?,
31422 })
31423 }
31424 }
31425 impl ::std::convert::From<super::MerkleContextWithNewAddressProof>
31426 for MerkleContextWithNewAddressProof {
31427 fn from(value: super::MerkleContextWithNewAddressProof) -> Self {
31428 Self {
31429 address: Ok(value.address),
31430 higher_range_address: Ok(value.higher_range_address),
31431 low_element_leaf_index: Ok(value.low_element_leaf_index),
31432 lower_range_address: Ok(value.lower_range_address),
31433 merkle_tree: Ok(value.merkle_tree),
31434 next_index: Ok(value.next_index),
31435 proof: Ok(value.proof),
31436 root: Ok(value.root),
31437 root_seq: Ok(value.root_seq),
31438 }
31439 }
31440 }
31441 #[derive(Clone, Debug)]
31442 pub struct Node {
31443 hash: ::std::result::Result<super::Hash, ::std::string::String>,
31444 index: ::std::result::Result<u64, ::std::string::String>,
31445 }
31446 impl ::std::default::Default for Node {
31447 fn default() -> Self {
31448 Self {
31449 hash: Err("no value supplied for hash".to_string()),
31450 index: Err("no value supplied for index".to_string()),
31451 }
31452 }
31453 }
31454 impl Node {
31455 pub fn hash<T>(mut self, value: T) -> Self
31456 where
31457 T: ::std::convert::TryInto<super::Hash>,
31458 T::Error: ::std::fmt::Display,
31459 {
31460 self.hash = value
31461 .try_into()
31462 .map_err(|e| {
31463 format!("error converting supplied value for hash: {e}")
31464 });
31465 self
31466 }
31467 pub fn index<T>(mut self, value: T) -> Self
31468 where
31469 T: ::std::convert::TryInto<u64>,
31470 T::Error: ::std::fmt::Display,
31471 {
31472 self.index = value
31473 .try_into()
31474 .map_err(|e| {
31475 format!("error converting supplied value for index: {e}")
31476 });
31477 self
31478 }
31479 }
31480 impl ::std::convert::TryFrom<Node> for super::Node {
31481 type Error = super::error::ConversionError;
31482 fn try_from(
31483 value: Node,
31484 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31485 Ok(Self {
31486 hash: value.hash?,
31487 index: value.index?,
31488 })
31489 }
31490 }
31491 impl ::std::convert::From<super::Node> for Node {
31492 fn from(value: super::Node) -> Self {
31493 Self {
31494 hash: Ok(value.hash),
31495 index: Ok(value.index),
31496 }
31497 }
31498 }
31499 #[derive(Clone, Debug)]
31500 pub struct OutputQueueData {
31501 account_hashes: ::std::result::Result<
31502 ::std::vec::Vec<super::Hash>,
31503 ::std::string::String,
31504 >,
31505 first_queue_index: ::std::result::Result<u64, ::std::string::String>,
31506 leaf_indices: ::std::result::Result<
31507 ::std::vec::Vec<u64>,
31508 ::std::string::String,
31509 >,
31510 leaves: ::std::result::Result<
31511 ::std::vec::Vec<super::Hash>,
31512 ::std::string::String,
31513 >,
31514 leaves_hash_chains: ::std::result::Result<
31515 ::std::vec::Vec<super::Hash>,
31516 ::std::string::String,
31517 >,
31518 next_index: ::std::result::Result<u64, ::std::string::String>,
31519 }
31520 impl ::std::default::Default for OutputQueueData {
31521 fn default() -> Self {
31522 Self {
31523 account_hashes: Err(
31524 "no value supplied for account_hashes".to_string(),
31525 ),
31526 first_queue_index: Err(
31527 "no value supplied for first_queue_index".to_string(),
31528 ),
31529 leaf_indices: Err("no value supplied for leaf_indices".to_string()),
31530 leaves: Err("no value supplied for leaves".to_string()),
31531 leaves_hash_chains: Err(
31532 "no value supplied for leaves_hash_chains".to_string(),
31533 ),
31534 next_index: Err("no value supplied for next_index".to_string()),
31535 }
31536 }
31537 }
31538 impl OutputQueueData {
31539 pub fn account_hashes<T>(mut self, value: T) -> Self
31540 where
31541 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
31542 T::Error: ::std::fmt::Display,
31543 {
31544 self.account_hashes = value
31545 .try_into()
31546 .map_err(|e| {
31547 format!(
31548 "error converting supplied value for account_hashes: {e}"
31549 )
31550 });
31551 self
31552 }
31553 pub fn first_queue_index<T>(mut self, value: T) -> Self
31554 where
31555 T: ::std::convert::TryInto<u64>,
31556 T::Error: ::std::fmt::Display,
31557 {
31558 self.first_queue_index = value
31559 .try_into()
31560 .map_err(|e| {
31561 format!(
31562 "error converting supplied value for first_queue_index: {e}"
31563 )
31564 });
31565 self
31566 }
31567 pub fn leaf_indices<T>(mut self, value: T) -> Self
31568 where
31569 T: ::std::convert::TryInto<::std::vec::Vec<u64>>,
31570 T::Error: ::std::fmt::Display,
31571 {
31572 self.leaf_indices = value
31573 .try_into()
31574 .map_err(|e| {
31575 format!("error converting supplied value for leaf_indices: {e}")
31576 });
31577 self
31578 }
31579 pub fn leaves<T>(mut self, value: T) -> Self
31580 where
31581 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
31582 T::Error: ::std::fmt::Display,
31583 {
31584 self.leaves = value
31585 .try_into()
31586 .map_err(|e| {
31587 format!("error converting supplied value for leaves: {e}")
31588 });
31589 self
31590 }
31591 pub fn leaves_hash_chains<T>(mut self, value: T) -> Self
31592 where
31593 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
31594 T::Error: ::std::fmt::Display,
31595 {
31596 self.leaves_hash_chains = value
31597 .try_into()
31598 .map_err(|e| {
31599 format!(
31600 "error converting supplied value for leaves_hash_chains: {e}"
31601 )
31602 });
31603 self
31604 }
31605 pub fn next_index<T>(mut self, value: T) -> Self
31606 where
31607 T: ::std::convert::TryInto<u64>,
31608 T::Error: ::std::fmt::Display,
31609 {
31610 self.next_index = value
31611 .try_into()
31612 .map_err(|e| {
31613 format!("error converting supplied value for next_index: {e}")
31614 });
31615 self
31616 }
31617 }
31618 impl ::std::convert::TryFrom<OutputQueueData> for super::OutputQueueData {
31619 type Error = super::error::ConversionError;
31620 fn try_from(
31621 value: OutputQueueData,
31622 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31623 Ok(Self {
31624 account_hashes: value.account_hashes?,
31625 first_queue_index: value.first_queue_index?,
31626 leaf_indices: value.leaf_indices?,
31627 leaves: value.leaves?,
31628 leaves_hash_chains: value.leaves_hash_chains?,
31629 next_index: value.next_index?,
31630 })
31631 }
31632 }
31633 impl ::std::convert::From<super::OutputQueueData> for OutputQueueData {
31634 fn from(value: super::OutputQueueData) -> Self {
31635 Self {
31636 account_hashes: Ok(value.account_hashes),
31637 first_queue_index: Ok(value.first_queue_index),
31638 leaf_indices: Ok(value.leaf_indices),
31639 leaves: Ok(value.leaves),
31640 leaves_hash_chains: Ok(value.leaves_hash_chains),
31641 next_index: Ok(value.next_index),
31642 }
31643 }
31644 }
31645 #[derive(Clone, Debug)]
31646 pub struct OwnerBalance {
31647 balance: ::std::result::Result<
31648 super::UnsignedInteger,
31649 ::std::string::String,
31650 >,
31651 owner: ::std::result::Result<
31652 super::SerializablePubkey,
31653 ::std::string::String,
31654 >,
31655 }
31656 impl ::std::default::Default for OwnerBalance {
31657 fn default() -> Self {
31658 Self {
31659 balance: Err("no value supplied for balance".to_string()),
31660 owner: Err("no value supplied for owner".to_string()),
31661 }
31662 }
31663 }
31664 impl OwnerBalance {
31665 pub fn balance<T>(mut self, value: T) -> Self
31666 where
31667 T: ::std::convert::TryInto<super::UnsignedInteger>,
31668 T::Error: ::std::fmt::Display,
31669 {
31670 self.balance = value
31671 .try_into()
31672 .map_err(|e| {
31673 format!("error converting supplied value for balance: {e}")
31674 });
31675 self
31676 }
31677 pub fn owner<T>(mut self, value: T) -> Self
31678 where
31679 T: ::std::convert::TryInto<super::SerializablePubkey>,
31680 T::Error: ::std::fmt::Display,
31681 {
31682 self.owner = value
31683 .try_into()
31684 .map_err(|e| {
31685 format!("error converting supplied value for owner: {e}")
31686 });
31687 self
31688 }
31689 }
31690 impl ::std::convert::TryFrom<OwnerBalance> for super::OwnerBalance {
31691 type Error = super::error::ConversionError;
31692 fn try_from(
31693 value: OwnerBalance,
31694 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31695 Ok(Self {
31696 balance: value.balance?,
31697 owner: value.owner?,
31698 })
31699 }
31700 }
31701 impl ::std::convert::From<super::OwnerBalance> for OwnerBalance {
31702 fn from(value: super::OwnerBalance) -> Self {
31703 Self {
31704 balance: Ok(value.balance),
31705 owner: Ok(value.owner),
31706 }
31707 }
31708 }
31709 #[derive(Clone, Debug)]
31710 pub struct OwnerBalanceList {
31711 cursor: ::std::result::Result<
31712 ::std::option::Option<super::Base58String>,
31713 ::std::string::String,
31714 >,
31715 items: ::std::result::Result<
31716 ::std::vec::Vec<super::OwnerBalance>,
31717 ::std::string::String,
31718 >,
31719 }
31720 impl ::std::default::Default for OwnerBalanceList {
31721 fn default() -> Self {
31722 Self {
31723 cursor: Ok(Default::default()),
31724 items: Err("no value supplied for items".to_string()),
31725 }
31726 }
31727 }
31728 impl OwnerBalanceList {
31729 pub fn cursor<T>(mut self, value: T) -> Self
31730 where
31731 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
31732 T::Error: ::std::fmt::Display,
31733 {
31734 self.cursor = value
31735 .try_into()
31736 .map_err(|e| {
31737 format!("error converting supplied value for cursor: {e}")
31738 });
31739 self
31740 }
31741 pub fn items<T>(mut self, value: T) -> Self
31742 where
31743 T: ::std::convert::TryInto<::std::vec::Vec<super::OwnerBalance>>,
31744 T::Error: ::std::fmt::Display,
31745 {
31746 self.items = value
31747 .try_into()
31748 .map_err(|e| {
31749 format!("error converting supplied value for items: {e}")
31750 });
31751 self
31752 }
31753 }
31754 impl ::std::convert::TryFrom<OwnerBalanceList> for super::OwnerBalanceList {
31755 type Error = super::error::ConversionError;
31756 fn try_from(
31757 value: OwnerBalanceList,
31758 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31759 Ok(Self {
31760 cursor: value.cursor?,
31761 items: value.items?,
31762 })
31763 }
31764 }
31765 impl ::std::convert::From<super::OwnerBalanceList> for OwnerBalanceList {
31766 fn from(value: super::OwnerBalanceList) -> Self {
31767 Self {
31768 cursor: Ok(value.cursor),
31769 items: Ok(value.items),
31770 }
31771 }
31772 }
31773 #[derive(Clone, Debug)]
31774 pub struct OwnerBalancesResponse {
31775 context: ::std::result::Result<super::Context, ::std::string::String>,
31776 value: ::std::result::Result<super::OwnerBalanceList, ::std::string::String>,
31777 }
31778 impl ::std::default::Default for OwnerBalancesResponse {
31779 fn default() -> Self {
31780 Self {
31781 context: Err("no value supplied for context".to_string()),
31782 value: Err("no value supplied for value".to_string()),
31783 }
31784 }
31785 }
31786 impl OwnerBalancesResponse {
31787 pub fn context<T>(mut self, value: T) -> Self
31788 where
31789 T: ::std::convert::TryInto<super::Context>,
31790 T::Error: ::std::fmt::Display,
31791 {
31792 self.context = value
31793 .try_into()
31794 .map_err(|e| {
31795 format!("error converting supplied value for context: {e}")
31796 });
31797 self
31798 }
31799 pub fn value<T>(mut self, value: T) -> Self
31800 where
31801 T: ::std::convert::TryInto<super::OwnerBalanceList>,
31802 T::Error: ::std::fmt::Display,
31803 {
31804 self.value = value
31805 .try_into()
31806 .map_err(|e| {
31807 format!("error converting supplied value for value: {e}")
31808 });
31809 self
31810 }
31811 }
31812 impl ::std::convert::TryFrom<OwnerBalancesResponse>
31813 for super::OwnerBalancesResponse {
31814 type Error = super::error::ConversionError;
31815 fn try_from(
31816 value: OwnerBalancesResponse,
31817 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31818 Ok(Self {
31819 context: value.context?,
31820 value: value.value?,
31821 })
31822 }
31823 }
31824 impl ::std::convert::From<super::OwnerBalancesResponse>
31825 for OwnerBalancesResponse {
31826 fn from(value: super::OwnerBalancesResponse) -> Self {
31827 Self {
31828 context: Ok(value.context),
31829 value: Ok(value.value),
31830 }
31831 }
31832 }
31833 #[derive(Clone, Debug)]
31834 pub struct PaginatedAccountList {
31835 cursor: ::std::result::Result<
31836 ::std::option::Option<super::Hash>,
31837 ::std::string::String,
31838 >,
31839 items: ::std::result::Result<
31840 ::std::vec::Vec<super::Account>,
31841 ::std::string::String,
31842 >,
31843 }
31844 impl ::std::default::Default for PaginatedAccountList {
31845 fn default() -> Self {
31846 Self {
31847 cursor: Ok(Default::default()),
31848 items: Err("no value supplied for items".to_string()),
31849 }
31850 }
31851 }
31852 impl PaginatedAccountList {
31853 pub fn cursor<T>(mut self, value: T) -> Self
31854 where
31855 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
31856 T::Error: ::std::fmt::Display,
31857 {
31858 self.cursor = value
31859 .try_into()
31860 .map_err(|e| {
31861 format!("error converting supplied value for cursor: {e}")
31862 });
31863 self
31864 }
31865 pub fn items<T>(mut self, value: T) -> Self
31866 where
31867 T: ::std::convert::TryInto<::std::vec::Vec<super::Account>>,
31868 T::Error: ::std::fmt::Display,
31869 {
31870 self.items = value
31871 .try_into()
31872 .map_err(|e| {
31873 format!("error converting supplied value for items: {e}")
31874 });
31875 self
31876 }
31877 }
31878 impl ::std::convert::TryFrom<PaginatedAccountList>
31879 for super::PaginatedAccountList {
31880 type Error = super::error::ConversionError;
31881 fn try_from(
31882 value: PaginatedAccountList,
31883 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31884 Ok(Self {
31885 cursor: value.cursor?,
31886 items: value.items?,
31887 })
31888 }
31889 }
31890 impl ::std::convert::From<super::PaginatedAccountList> for PaginatedAccountList {
31891 fn from(value: super::PaginatedAccountList) -> Self {
31892 Self {
31893 cursor: Ok(value.cursor),
31894 items: Ok(value.items),
31895 }
31896 }
31897 }
31898 #[derive(Clone, Debug)]
31899 pub struct PaginatedAccountListV2 {
31900 cursor: ::std::result::Result<
31901 ::std::option::Option<super::Hash>,
31902 ::std::string::String,
31903 >,
31904 items: ::std::result::Result<
31905 ::std::vec::Vec<super::AccountV2>,
31906 ::std::string::String,
31907 >,
31908 }
31909 impl ::std::default::Default for PaginatedAccountListV2 {
31910 fn default() -> Self {
31911 Self {
31912 cursor: Ok(Default::default()),
31913 items: Err("no value supplied for items".to_string()),
31914 }
31915 }
31916 }
31917 impl PaginatedAccountListV2 {
31918 pub fn cursor<T>(mut self, value: T) -> Self
31919 where
31920 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
31921 T::Error: ::std::fmt::Display,
31922 {
31923 self.cursor = value
31924 .try_into()
31925 .map_err(|e| {
31926 format!("error converting supplied value for cursor: {e}")
31927 });
31928 self
31929 }
31930 pub fn items<T>(mut self, value: T) -> Self
31931 where
31932 T: ::std::convert::TryInto<::std::vec::Vec<super::AccountV2>>,
31933 T::Error: ::std::fmt::Display,
31934 {
31935 self.items = value
31936 .try_into()
31937 .map_err(|e| {
31938 format!("error converting supplied value for items: {e}")
31939 });
31940 self
31941 }
31942 }
31943 impl ::std::convert::TryFrom<PaginatedAccountListV2>
31944 for super::PaginatedAccountListV2 {
31945 type Error = super::error::ConversionError;
31946 fn try_from(
31947 value: PaginatedAccountListV2,
31948 ) -> ::std::result::Result<Self, super::error::ConversionError> {
31949 Ok(Self {
31950 cursor: value.cursor?,
31951 items: value.items?,
31952 })
31953 }
31954 }
31955 impl ::std::convert::From<super::PaginatedAccountListV2>
31956 for PaginatedAccountListV2 {
31957 fn from(value: super::PaginatedAccountListV2) -> Self {
31958 Self {
31959 cursor: Ok(value.cursor),
31960 items: Ok(value.items),
31961 }
31962 }
31963 }
31964 #[derive(Clone, Debug)]
31965 pub struct PaginatedSignatureInfoList {
31966 cursor: ::std::result::Result<
31967 ::std::option::Option<::std::string::String>,
31968 ::std::string::String,
31969 >,
31970 items: ::std::result::Result<
31971 ::std::vec::Vec<super::SignatureInfo>,
31972 ::std::string::String,
31973 >,
31974 }
31975 impl ::std::default::Default for PaginatedSignatureInfoList {
31976 fn default() -> Self {
31977 Self {
31978 cursor: Ok(Default::default()),
31979 items: Err("no value supplied for items".to_string()),
31980 }
31981 }
31982 }
31983 impl PaginatedSignatureInfoList {
31984 pub fn cursor<T>(mut self, value: T) -> Self
31985 where
31986 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
31987 T::Error: ::std::fmt::Display,
31988 {
31989 self.cursor = value
31990 .try_into()
31991 .map_err(|e| {
31992 format!("error converting supplied value for cursor: {e}")
31993 });
31994 self
31995 }
31996 pub fn items<T>(mut self, value: T) -> Self
31997 where
31998 T: ::std::convert::TryInto<::std::vec::Vec<super::SignatureInfo>>,
31999 T::Error: ::std::fmt::Display,
32000 {
32001 self.items = value
32002 .try_into()
32003 .map_err(|e| {
32004 format!("error converting supplied value for items: {e}")
32005 });
32006 self
32007 }
32008 }
32009 impl ::std::convert::TryFrom<PaginatedSignatureInfoList>
32010 for super::PaginatedSignatureInfoList {
32011 type Error = super::error::ConversionError;
32012 fn try_from(
32013 value: PaginatedSignatureInfoList,
32014 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32015 Ok(Self {
32016 cursor: value.cursor?,
32017 items: value.items?,
32018 })
32019 }
32020 }
32021 impl ::std::convert::From<super::PaginatedSignatureInfoList>
32022 for PaginatedSignatureInfoList {
32023 fn from(value: super::PaginatedSignatureInfoList) -> Self {
32024 Self {
32025 cursor: Ok(value.cursor),
32026 items: Ok(value.items),
32027 }
32028 }
32029 }
32030 #[derive(Clone, Debug)]
32031 pub struct PostGetAccountInterfaceBody {
32032 id: ::std::result::Result<
32033 super::PostGetAccountInterfaceBodyId,
32034 ::std::string::String,
32035 >,
32036 jsonrpc: ::std::result::Result<
32037 super::PostGetAccountInterfaceBodyJsonrpc,
32038 ::std::string::String,
32039 >,
32040 method: ::std::result::Result<
32041 super::PostGetAccountInterfaceBodyMethod,
32042 ::std::string::String,
32043 >,
32044 params: ::std::result::Result<
32045 super::PostGetAccountInterfaceBodyParams,
32046 ::std::string::String,
32047 >,
32048 }
32049 impl ::std::default::Default for PostGetAccountInterfaceBody {
32050 fn default() -> Self {
32051 Self {
32052 id: Err("no value supplied for id".to_string()),
32053 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
32054 method: Err("no value supplied for method".to_string()),
32055 params: Err("no value supplied for params".to_string()),
32056 }
32057 }
32058 }
32059 impl PostGetAccountInterfaceBody {
32060 pub fn id<T>(mut self, value: T) -> Self
32061 where
32062 T: ::std::convert::TryInto<super::PostGetAccountInterfaceBodyId>,
32063 T::Error: ::std::fmt::Display,
32064 {
32065 self.id = value
32066 .try_into()
32067 .map_err(|e| format!("error converting supplied value for id: {e}"));
32068 self
32069 }
32070 pub fn jsonrpc<T>(mut self, value: T) -> Self
32071 where
32072 T: ::std::convert::TryInto<super::PostGetAccountInterfaceBodyJsonrpc>,
32073 T::Error: ::std::fmt::Display,
32074 {
32075 self.jsonrpc = value
32076 .try_into()
32077 .map_err(|e| {
32078 format!("error converting supplied value for jsonrpc: {e}")
32079 });
32080 self
32081 }
32082 pub fn method<T>(mut self, value: T) -> Self
32083 where
32084 T: ::std::convert::TryInto<super::PostGetAccountInterfaceBodyMethod>,
32085 T::Error: ::std::fmt::Display,
32086 {
32087 self.method = value
32088 .try_into()
32089 .map_err(|e| {
32090 format!("error converting supplied value for method: {e}")
32091 });
32092 self
32093 }
32094 pub fn params<T>(mut self, value: T) -> Self
32095 where
32096 T: ::std::convert::TryInto<super::PostGetAccountInterfaceBodyParams>,
32097 T::Error: ::std::fmt::Display,
32098 {
32099 self.params = value
32100 .try_into()
32101 .map_err(|e| {
32102 format!("error converting supplied value for params: {e}")
32103 });
32104 self
32105 }
32106 }
32107 impl ::std::convert::TryFrom<PostGetAccountInterfaceBody>
32108 for super::PostGetAccountInterfaceBody {
32109 type Error = super::error::ConversionError;
32110 fn try_from(
32111 value: PostGetAccountInterfaceBody,
32112 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32113 Ok(Self {
32114 id: value.id?,
32115 jsonrpc: value.jsonrpc?,
32116 method: value.method?,
32117 params: value.params?,
32118 })
32119 }
32120 }
32121 impl ::std::convert::From<super::PostGetAccountInterfaceBody>
32122 for PostGetAccountInterfaceBody {
32123 fn from(value: super::PostGetAccountInterfaceBody) -> Self {
32124 Self {
32125 id: Ok(value.id),
32126 jsonrpc: Ok(value.jsonrpc),
32127 method: Ok(value.method),
32128 params: Ok(value.params),
32129 }
32130 }
32131 }
32132 #[derive(Clone, Debug)]
32133 pub struct PostGetAccountInterfaceBodyParams {
32134 address: ::std::result::Result<
32135 super::SerializablePubkey,
32136 ::std::string::String,
32137 >,
32138 }
32139 impl ::std::default::Default for PostGetAccountInterfaceBodyParams {
32140 fn default() -> Self {
32141 Self {
32142 address: Err("no value supplied for address".to_string()),
32143 }
32144 }
32145 }
32146 impl PostGetAccountInterfaceBodyParams {
32147 pub fn address<T>(mut self, value: T) -> Self
32148 where
32149 T: ::std::convert::TryInto<super::SerializablePubkey>,
32150 T::Error: ::std::fmt::Display,
32151 {
32152 self.address = value
32153 .try_into()
32154 .map_err(|e| {
32155 format!("error converting supplied value for address: {e}")
32156 });
32157 self
32158 }
32159 }
32160 impl ::std::convert::TryFrom<PostGetAccountInterfaceBodyParams>
32161 for super::PostGetAccountInterfaceBodyParams {
32162 type Error = super::error::ConversionError;
32163 fn try_from(
32164 value: PostGetAccountInterfaceBodyParams,
32165 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32166 Ok(Self { address: value.address? })
32167 }
32168 }
32169 impl ::std::convert::From<super::PostGetAccountInterfaceBodyParams>
32170 for PostGetAccountInterfaceBodyParams {
32171 fn from(value: super::PostGetAccountInterfaceBodyParams) -> Self {
32172 Self { address: Ok(value.address) }
32173 }
32174 }
32175 #[derive(Clone, Debug)]
32176 pub struct PostGetAccountInterfaceResponse {
32177 error: ::std::result::Result<
32178 ::std::option::Option<super::PostGetAccountInterfaceResponseError>,
32179 ::std::string::String,
32180 >,
32181 id: ::std::result::Result<
32182 super::PostGetAccountInterfaceResponseId,
32183 ::std::string::String,
32184 >,
32185 jsonrpc: ::std::result::Result<
32186 super::PostGetAccountInterfaceResponseJsonrpc,
32187 ::std::string::String,
32188 >,
32189 result: ::std::result::Result<
32190 ::std::option::Option<super::PostGetAccountInterfaceResponseResult>,
32191 ::std::string::String,
32192 >,
32193 }
32194 impl ::std::default::Default for PostGetAccountInterfaceResponse {
32195 fn default() -> Self {
32196 Self {
32197 error: Ok(Default::default()),
32198 id: Err("no value supplied for id".to_string()),
32199 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
32200 result: Ok(Default::default()),
32201 }
32202 }
32203 }
32204 impl PostGetAccountInterfaceResponse {
32205 pub fn error<T>(mut self, value: T) -> Self
32206 where
32207 T: ::std::convert::TryInto<
32208 ::std::option::Option<super::PostGetAccountInterfaceResponseError>,
32209 >,
32210 T::Error: ::std::fmt::Display,
32211 {
32212 self.error = value
32213 .try_into()
32214 .map_err(|e| {
32215 format!("error converting supplied value for error: {e}")
32216 });
32217 self
32218 }
32219 pub fn id<T>(mut self, value: T) -> Self
32220 where
32221 T: ::std::convert::TryInto<super::PostGetAccountInterfaceResponseId>,
32222 T::Error: ::std::fmt::Display,
32223 {
32224 self.id = value
32225 .try_into()
32226 .map_err(|e| format!("error converting supplied value for id: {e}"));
32227 self
32228 }
32229 pub fn jsonrpc<T>(mut self, value: T) -> Self
32230 where
32231 T: ::std::convert::TryInto<
32232 super::PostGetAccountInterfaceResponseJsonrpc,
32233 >,
32234 T::Error: ::std::fmt::Display,
32235 {
32236 self.jsonrpc = value
32237 .try_into()
32238 .map_err(|e| {
32239 format!("error converting supplied value for jsonrpc: {e}")
32240 });
32241 self
32242 }
32243 pub fn result<T>(mut self, value: T) -> Self
32244 where
32245 T: ::std::convert::TryInto<
32246 ::std::option::Option<super::PostGetAccountInterfaceResponseResult>,
32247 >,
32248 T::Error: ::std::fmt::Display,
32249 {
32250 self.result = value
32251 .try_into()
32252 .map_err(|e| {
32253 format!("error converting supplied value for result: {e}")
32254 });
32255 self
32256 }
32257 }
32258 impl ::std::convert::TryFrom<PostGetAccountInterfaceResponse>
32259 for super::PostGetAccountInterfaceResponse {
32260 type Error = super::error::ConversionError;
32261 fn try_from(
32262 value: PostGetAccountInterfaceResponse,
32263 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32264 Ok(Self {
32265 error: value.error?,
32266 id: value.id?,
32267 jsonrpc: value.jsonrpc?,
32268 result: value.result?,
32269 })
32270 }
32271 }
32272 impl ::std::convert::From<super::PostGetAccountInterfaceResponse>
32273 for PostGetAccountInterfaceResponse {
32274 fn from(value: super::PostGetAccountInterfaceResponse) -> Self {
32275 Self {
32276 error: Ok(value.error),
32277 id: Ok(value.id),
32278 jsonrpc: Ok(value.jsonrpc),
32279 result: Ok(value.result),
32280 }
32281 }
32282 }
32283 #[derive(Clone, Debug)]
32284 pub struct PostGetAccountInterfaceResponseError {
32285 code: ::std::result::Result<
32286 ::std::option::Option<i64>,
32287 ::std::string::String,
32288 >,
32289 message: ::std::result::Result<
32290 ::std::option::Option<::std::string::String>,
32291 ::std::string::String,
32292 >,
32293 }
32294 impl ::std::default::Default for PostGetAccountInterfaceResponseError {
32295 fn default() -> Self {
32296 Self {
32297 code: Ok(Default::default()),
32298 message: Ok(Default::default()),
32299 }
32300 }
32301 }
32302 impl PostGetAccountInterfaceResponseError {
32303 pub fn code<T>(mut self, value: T) -> Self
32304 where
32305 T: ::std::convert::TryInto<::std::option::Option<i64>>,
32306 T::Error: ::std::fmt::Display,
32307 {
32308 self.code = value
32309 .try_into()
32310 .map_err(|e| {
32311 format!("error converting supplied value for code: {e}")
32312 });
32313 self
32314 }
32315 pub fn message<T>(mut self, value: T) -> Self
32316 where
32317 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
32318 T::Error: ::std::fmt::Display,
32319 {
32320 self.message = value
32321 .try_into()
32322 .map_err(|e| {
32323 format!("error converting supplied value for message: {e}")
32324 });
32325 self
32326 }
32327 }
32328 impl ::std::convert::TryFrom<PostGetAccountInterfaceResponseError>
32329 for super::PostGetAccountInterfaceResponseError {
32330 type Error = super::error::ConversionError;
32331 fn try_from(
32332 value: PostGetAccountInterfaceResponseError,
32333 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32334 Ok(Self {
32335 code: value.code?,
32336 message: value.message?,
32337 })
32338 }
32339 }
32340 impl ::std::convert::From<super::PostGetAccountInterfaceResponseError>
32341 for PostGetAccountInterfaceResponseError {
32342 fn from(value: super::PostGetAccountInterfaceResponseError) -> Self {
32343 Self {
32344 code: Ok(value.code),
32345 message: Ok(value.message),
32346 }
32347 }
32348 }
32349 #[derive(Clone, Debug)]
32350 pub struct PostGetAccountInterfaceResponseResult {
32351 context: ::std::result::Result<super::Context, ::std::string::String>,
32352 value: ::std::result::Result<
32353 ::std::option::Option<super::AccountInterface>,
32354 ::std::string::String,
32355 >,
32356 }
32357 impl ::std::default::Default for PostGetAccountInterfaceResponseResult {
32358 fn default() -> Self {
32359 Self {
32360 context: Err("no value supplied for context".to_string()),
32361 value: Ok(Default::default()),
32362 }
32363 }
32364 }
32365 impl PostGetAccountInterfaceResponseResult {
32366 pub fn context<T>(mut self, value: T) -> Self
32367 where
32368 T: ::std::convert::TryInto<super::Context>,
32369 T::Error: ::std::fmt::Display,
32370 {
32371 self.context = value
32372 .try_into()
32373 .map_err(|e| {
32374 format!("error converting supplied value for context: {e}")
32375 });
32376 self
32377 }
32378 pub fn value<T>(mut self, value: T) -> Self
32379 where
32380 T: ::std::convert::TryInto<
32381 ::std::option::Option<super::AccountInterface>,
32382 >,
32383 T::Error: ::std::fmt::Display,
32384 {
32385 self.value = value
32386 .try_into()
32387 .map_err(|e| {
32388 format!("error converting supplied value for value: {e}")
32389 });
32390 self
32391 }
32392 }
32393 impl ::std::convert::TryFrom<PostGetAccountInterfaceResponseResult>
32394 for super::PostGetAccountInterfaceResponseResult {
32395 type Error = super::error::ConversionError;
32396 fn try_from(
32397 value: PostGetAccountInterfaceResponseResult,
32398 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32399 Ok(Self {
32400 context: value.context?,
32401 value: value.value?,
32402 })
32403 }
32404 }
32405 impl ::std::convert::From<super::PostGetAccountInterfaceResponseResult>
32406 for PostGetAccountInterfaceResponseResult {
32407 fn from(value: super::PostGetAccountInterfaceResponseResult) -> Self {
32408 Self {
32409 context: Ok(value.context),
32410 value: Ok(value.value),
32411 }
32412 }
32413 }
32414 #[derive(Clone, Debug)]
32415 pub struct PostGetCompressedAccountBalanceBody {
32416 id: ::std::result::Result<
32417 super::PostGetCompressedAccountBalanceBodyId,
32418 ::std::string::String,
32419 >,
32420 jsonrpc: ::std::result::Result<
32421 super::PostGetCompressedAccountBalanceBodyJsonrpc,
32422 ::std::string::String,
32423 >,
32424 method: ::std::result::Result<
32425 super::PostGetCompressedAccountBalanceBodyMethod,
32426 ::std::string::String,
32427 >,
32428 params: ::std::result::Result<
32429 super::PostGetCompressedAccountBalanceBodyParams,
32430 ::std::string::String,
32431 >,
32432 }
32433 impl ::std::default::Default for PostGetCompressedAccountBalanceBody {
32434 fn default() -> Self {
32435 Self {
32436 id: Err("no value supplied for id".to_string()),
32437 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
32438 method: Err("no value supplied for method".to_string()),
32439 params: Err("no value supplied for params".to_string()),
32440 }
32441 }
32442 }
32443 impl PostGetCompressedAccountBalanceBody {
32444 pub fn id<T>(mut self, value: T) -> Self
32445 where
32446 T: ::std::convert::TryInto<super::PostGetCompressedAccountBalanceBodyId>,
32447 T::Error: ::std::fmt::Display,
32448 {
32449 self.id = value
32450 .try_into()
32451 .map_err(|e| format!("error converting supplied value for id: {e}"));
32452 self
32453 }
32454 pub fn jsonrpc<T>(mut self, value: T) -> Self
32455 where
32456 T: ::std::convert::TryInto<
32457 super::PostGetCompressedAccountBalanceBodyJsonrpc,
32458 >,
32459 T::Error: ::std::fmt::Display,
32460 {
32461 self.jsonrpc = value
32462 .try_into()
32463 .map_err(|e| {
32464 format!("error converting supplied value for jsonrpc: {e}")
32465 });
32466 self
32467 }
32468 pub fn method<T>(mut self, value: T) -> Self
32469 where
32470 T: ::std::convert::TryInto<
32471 super::PostGetCompressedAccountBalanceBodyMethod,
32472 >,
32473 T::Error: ::std::fmt::Display,
32474 {
32475 self.method = value
32476 .try_into()
32477 .map_err(|e| {
32478 format!("error converting supplied value for method: {e}")
32479 });
32480 self
32481 }
32482 pub fn params<T>(mut self, value: T) -> Self
32483 where
32484 T: ::std::convert::TryInto<
32485 super::PostGetCompressedAccountBalanceBodyParams,
32486 >,
32487 T::Error: ::std::fmt::Display,
32488 {
32489 self.params = value
32490 .try_into()
32491 .map_err(|e| {
32492 format!("error converting supplied value for params: {e}")
32493 });
32494 self
32495 }
32496 }
32497 impl ::std::convert::TryFrom<PostGetCompressedAccountBalanceBody>
32498 for super::PostGetCompressedAccountBalanceBody {
32499 type Error = super::error::ConversionError;
32500 fn try_from(
32501 value: PostGetCompressedAccountBalanceBody,
32502 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32503 Ok(Self {
32504 id: value.id?,
32505 jsonrpc: value.jsonrpc?,
32506 method: value.method?,
32507 params: value.params?,
32508 })
32509 }
32510 }
32511 impl ::std::convert::From<super::PostGetCompressedAccountBalanceBody>
32512 for PostGetCompressedAccountBalanceBody {
32513 fn from(value: super::PostGetCompressedAccountBalanceBody) -> Self {
32514 Self {
32515 id: Ok(value.id),
32516 jsonrpc: Ok(value.jsonrpc),
32517 method: Ok(value.method),
32518 params: Ok(value.params),
32519 }
32520 }
32521 }
32522 #[derive(Clone, Debug)]
32523 pub struct PostGetCompressedAccountBalanceBodyParams {
32524 address: ::std::result::Result<
32525 ::std::option::Option<super::SerializablePubkey>,
32526 ::std::string::String,
32527 >,
32528 hash: ::std::result::Result<
32529 ::std::option::Option<super::Hash>,
32530 ::std::string::String,
32531 >,
32532 }
32533 impl ::std::default::Default for PostGetCompressedAccountBalanceBodyParams {
32534 fn default() -> Self {
32535 Self {
32536 address: Ok(Default::default()),
32537 hash: Ok(Default::default()),
32538 }
32539 }
32540 }
32541 impl PostGetCompressedAccountBalanceBodyParams {
32542 pub fn address<T>(mut self, value: T) -> Self
32543 where
32544 T: ::std::convert::TryInto<
32545 ::std::option::Option<super::SerializablePubkey>,
32546 >,
32547 T::Error: ::std::fmt::Display,
32548 {
32549 self.address = value
32550 .try_into()
32551 .map_err(|e| {
32552 format!("error converting supplied value for address: {e}")
32553 });
32554 self
32555 }
32556 pub fn hash<T>(mut self, value: T) -> Self
32557 where
32558 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
32559 T::Error: ::std::fmt::Display,
32560 {
32561 self.hash = value
32562 .try_into()
32563 .map_err(|e| {
32564 format!("error converting supplied value for hash: {e}")
32565 });
32566 self
32567 }
32568 }
32569 impl ::std::convert::TryFrom<PostGetCompressedAccountBalanceBodyParams>
32570 for super::PostGetCompressedAccountBalanceBodyParams {
32571 type Error = super::error::ConversionError;
32572 fn try_from(
32573 value: PostGetCompressedAccountBalanceBodyParams,
32574 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32575 Ok(Self {
32576 address: value.address?,
32577 hash: value.hash?,
32578 })
32579 }
32580 }
32581 impl ::std::convert::From<super::PostGetCompressedAccountBalanceBodyParams>
32582 for PostGetCompressedAccountBalanceBodyParams {
32583 fn from(value: super::PostGetCompressedAccountBalanceBodyParams) -> Self {
32584 Self {
32585 address: Ok(value.address),
32586 hash: Ok(value.hash),
32587 }
32588 }
32589 }
32590 #[derive(Clone, Debug)]
32591 pub struct PostGetCompressedAccountBalanceResponse {
32592 error: ::std::result::Result<
32593 ::std::option::Option<
32594 super::PostGetCompressedAccountBalanceResponseError,
32595 >,
32596 ::std::string::String,
32597 >,
32598 id: ::std::result::Result<
32599 super::PostGetCompressedAccountBalanceResponseId,
32600 ::std::string::String,
32601 >,
32602 jsonrpc: ::std::result::Result<
32603 super::PostGetCompressedAccountBalanceResponseJsonrpc,
32604 ::std::string::String,
32605 >,
32606 result: ::std::result::Result<
32607 ::std::option::Option<
32608 super::PostGetCompressedAccountBalanceResponseResult,
32609 >,
32610 ::std::string::String,
32611 >,
32612 }
32613 impl ::std::default::Default for PostGetCompressedAccountBalanceResponse {
32614 fn default() -> Self {
32615 Self {
32616 error: Ok(Default::default()),
32617 id: Err("no value supplied for id".to_string()),
32618 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
32619 result: Ok(Default::default()),
32620 }
32621 }
32622 }
32623 impl PostGetCompressedAccountBalanceResponse {
32624 pub fn error<T>(mut self, value: T) -> Self
32625 where
32626 T: ::std::convert::TryInto<
32627 ::std::option::Option<
32628 super::PostGetCompressedAccountBalanceResponseError,
32629 >,
32630 >,
32631 T::Error: ::std::fmt::Display,
32632 {
32633 self.error = value
32634 .try_into()
32635 .map_err(|e| {
32636 format!("error converting supplied value for error: {e}")
32637 });
32638 self
32639 }
32640 pub fn id<T>(mut self, value: T) -> Self
32641 where
32642 T: ::std::convert::TryInto<
32643 super::PostGetCompressedAccountBalanceResponseId,
32644 >,
32645 T::Error: ::std::fmt::Display,
32646 {
32647 self.id = value
32648 .try_into()
32649 .map_err(|e| format!("error converting supplied value for id: {e}"));
32650 self
32651 }
32652 pub fn jsonrpc<T>(mut self, value: T) -> Self
32653 where
32654 T: ::std::convert::TryInto<
32655 super::PostGetCompressedAccountBalanceResponseJsonrpc,
32656 >,
32657 T::Error: ::std::fmt::Display,
32658 {
32659 self.jsonrpc = value
32660 .try_into()
32661 .map_err(|e| {
32662 format!("error converting supplied value for jsonrpc: {e}")
32663 });
32664 self
32665 }
32666 pub fn result<T>(mut self, value: T) -> Self
32667 where
32668 T: ::std::convert::TryInto<
32669 ::std::option::Option<
32670 super::PostGetCompressedAccountBalanceResponseResult,
32671 >,
32672 >,
32673 T::Error: ::std::fmt::Display,
32674 {
32675 self.result = value
32676 .try_into()
32677 .map_err(|e| {
32678 format!("error converting supplied value for result: {e}")
32679 });
32680 self
32681 }
32682 }
32683 impl ::std::convert::TryFrom<PostGetCompressedAccountBalanceResponse>
32684 for super::PostGetCompressedAccountBalanceResponse {
32685 type Error = super::error::ConversionError;
32686 fn try_from(
32687 value: PostGetCompressedAccountBalanceResponse,
32688 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32689 Ok(Self {
32690 error: value.error?,
32691 id: value.id?,
32692 jsonrpc: value.jsonrpc?,
32693 result: value.result?,
32694 })
32695 }
32696 }
32697 impl ::std::convert::From<super::PostGetCompressedAccountBalanceResponse>
32698 for PostGetCompressedAccountBalanceResponse {
32699 fn from(value: super::PostGetCompressedAccountBalanceResponse) -> Self {
32700 Self {
32701 error: Ok(value.error),
32702 id: Ok(value.id),
32703 jsonrpc: Ok(value.jsonrpc),
32704 result: Ok(value.result),
32705 }
32706 }
32707 }
32708 #[derive(Clone, Debug)]
32709 pub struct PostGetCompressedAccountBalanceResponseError {
32710 code: ::std::result::Result<
32711 ::std::option::Option<i64>,
32712 ::std::string::String,
32713 >,
32714 message: ::std::result::Result<
32715 ::std::option::Option<::std::string::String>,
32716 ::std::string::String,
32717 >,
32718 }
32719 impl ::std::default::Default for PostGetCompressedAccountBalanceResponseError {
32720 fn default() -> Self {
32721 Self {
32722 code: Ok(Default::default()),
32723 message: Ok(Default::default()),
32724 }
32725 }
32726 }
32727 impl PostGetCompressedAccountBalanceResponseError {
32728 pub fn code<T>(mut self, value: T) -> Self
32729 where
32730 T: ::std::convert::TryInto<::std::option::Option<i64>>,
32731 T::Error: ::std::fmt::Display,
32732 {
32733 self.code = value
32734 .try_into()
32735 .map_err(|e| {
32736 format!("error converting supplied value for code: {e}")
32737 });
32738 self
32739 }
32740 pub fn message<T>(mut self, value: T) -> Self
32741 where
32742 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
32743 T::Error: ::std::fmt::Display,
32744 {
32745 self.message = value
32746 .try_into()
32747 .map_err(|e| {
32748 format!("error converting supplied value for message: {e}")
32749 });
32750 self
32751 }
32752 }
32753 impl ::std::convert::TryFrom<PostGetCompressedAccountBalanceResponseError>
32754 for super::PostGetCompressedAccountBalanceResponseError {
32755 type Error = super::error::ConversionError;
32756 fn try_from(
32757 value: PostGetCompressedAccountBalanceResponseError,
32758 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32759 Ok(Self {
32760 code: value.code?,
32761 message: value.message?,
32762 })
32763 }
32764 }
32765 impl ::std::convert::From<super::PostGetCompressedAccountBalanceResponseError>
32766 for PostGetCompressedAccountBalanceResponseError {
32767 fn from(value: super::PostGetCompressedAccountBalanceResponseError) -> Self {
32768 Self {
32769 code: Ok(value.code),
32770 message: Ok(value.message),
32771 }
32772 }
32773 }
32774 #[derive(Clone, Debug)]
32775 pub struct PostGetCompressedAccountBalanceResponseResult {
32776 context: ::std::result::Result<super::Context, ::std::string::String>,
32777 value: ::std::result::Result<super::UnsignedInteger, ::std::string::String>,
32778 }
32779 impl ::std::default::Default for PostGetCompressedAccountBalanceResponseResult {
32780 fn default() -> Self {
32781 Self {
32782 context: Err("no value supplied for context".to_string()),
32783 value: Err("no value supplied for value".to_string()),
32784 }
32785 }
32786 }
32787 impl PostGetCompressedAccountBalanceResponseResult {
32788 pub fn context<T>(mut self, value: T) -> Self
32789 where
32790 T: ::std::convert::TryInto<super::Context>,
32791 T::Error: ::std::fmt::Display,
32792 {
32793 self.context = value
32794 .try_into()
32795 .map_err(|e| {
32796 format!("error converting supplied value for context: {e}")
32797 });
32798 self
32799 }
32800 pub fn value<T>(mut self, value: T) -> Self
32801 where
32802 T: ::std::convert::TryInto<super::UnsignedInteger>,
32803 T::Error: ::std::fmt::Display,
32804 {
32805 self.value = value
32806 .try_into()
32807 .map_err(|e| {
32808 format!("error converting supplied value for value: {e}")
32809 });
32810 self
32811 }
32812 }
32813 impl ::std::convert::TryFrom<PostGetCompressedAccountBalanceResponseResult>
32814 for super::PostGetCompressedAccountBalanceResponseResult {
32815 type Error = super::error::ConversionError;
32816 fn try_from(
32817 value: PostGetCompressedAccountBalanceResponseResult,
32818 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32819 Ok(Self {
32820 context: value.context?,
32821 value: value.value?,
32822 })
32823 }
32824 }
32825 impl ::std::convert::From<super::PostGetCompressedAccountBalanceResponseResult>
32826 for PostGetCompressedAccountBalanceResponseResult {
32827 fn from(
32828 value: super::PostGetCompressedAccountBalanceResponseResult,
32829 ) -> Self {
32830 Self {
32831 context: Ok(value.context),
32832 value: Ok(value.value),
32833 }
32834 }
32835 }
32836 #[derive(Clone, Debug)]
32837 pub struct PostGetCompressedAccountBody {
32838 id: ::std::result::Result<
32839 super::PostGetCompressedAccountBodyId,
32840 ::std::string::String,
32841 >,
32842 jsonrpc: ::std::result::Result<
32843 super::PostGetCompressedAccountBodyJsonrpc,
32844 ::std::string::String,
32845 >,
32846 method: ::std::result::Result<
32847 super::PostGetCompressedAccountBodyMethod,
32848 ::std::string::String,
32849 >,
32850 params: ::std::result::Result<
32851 super::PostGetCompressedAccountBodyParams,
32852 ::std::string::String,
32853 >,
32854 }
32855 impl ::std::default::Default for PostGetCompressedAccountBody {
32856 fn default() -> Self {
32857 Self {
32858 id: Err("no value supplied for id".to_string()),
32859 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
32860 method: Err("no value supplied for method".to_string()),
32861 params: Err("no value supplied for params".to_string()),
32862 }
32863 }
32864 }
32865 impl PostGetCompressedAccountBody {
32866 pub fn id<T>(mut self, value: T) -> Self
32867 where
32868 T: ::std::convert::TryInto<super::PostGetCompressedAccountBodyId>,
32869 T::Error: ::std::fmt::Display,
32870 {
32871 self.id = value
32872 .try_into()
32873 .map_err(|e| format!("error converting supplied value for id: {e}"));
32874 self
32875 }
32876 pub fn jsonrpc<T>(mut self, value: T) -> Self
32877 where
32878 T: ::std::convert::TryInto<super::PostGetCompressedAccountBodyJsonrpc>,
32879 T::Error: ::std::fmt::Display,
32880 {
32881 self.jsonrpc = value
32882 .try_into()
32883 .map_err(|e| {
32884 format!("error converting supplied value for jsonrpc: {e}")
32885 });
32886 self
32887 }
32888 pub fn method<T>(mut self, value: T) -> Self
32889 where
32890 T: ::std::convert::TryInto<super::PostGetCompressedAccountBodyMethod>,
32891 T::Error: ::std::fmt::Display,
32892 {
32893 self.method = value
32894 .try_into()
32895 .map_err(|e| {
32896 format!("error converting supplied value for method: {e}")
32897 });
32898 self
32899 }
32900 pub fn params<T>(mut self, value: T) -> Self
32901 where
32902 T: ::std::convert::TryInto<super::PostGetCompressedAccountBodyParams>,
32903 T::Error: ::std::fmt::Display,
32904 {
32905 self.params = value
32906 .try_into()
32907 .map_err(|e| {
32908 format!("error converting supplied value for params: {e}")
32909 });
32910 self
32911 }
32912 }
32913 impl ::std::convert::TryFrom<PostGetCompressedAccountBody>
32914 for super::PostGetCompressedAccountBody {
32915 type Error = super::error::ConversionError;
32916 fn try_from(
32917 value: PostGetCompressedAccountBody,
32918 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32919 Ok(Self {
32920 id: value.id?,
32921 jsonrpc: value.jsonrpc?,
32922 method: value.method?,
32923 params: value.params?,
32924 })
32925 }
32926 }
32927 impl ::std::convert::From<super::PostGetCompressedAccountBody>
32928 for PostGetCompressedAccountBody {
32929 fn from(value: super::PostGetCompressedAccountBody) -> Self {
32930 Self {
32931 id: Ok(value.id),
32932 jsonrpc: Ok(value.jsonrpc),
32933 method: Ok(value.method),
32934 params: Ok(value.params),
32935 }
32936 }
32937 }
32938 #[derive(Clone, Debug)]
32939 pub struct PostGetCompressedAccountBodyParams {
32940 address: ::std::result::Result<
32941 ::std::option::Option<super::SerializablePubkey>,
32942 ::std::string::String,
32943 >,
32944 hash: ::std::result::Result<
32945 ::std::option::Option<super::Hash>,
32946 ::std::string::String,
32947 >,
32948 }
32949 impl ::std::default::Default for PostGetCompressedAccountBodyParams {
32950 fn default() -> Self {
32951 Self {
32952 address: Ok(Default::default()),
32953 hash: Ok(Default::default()),
32954 }
32955 }
32956 }
32957 impl PostGetCompressedAccountBodyParams {
32958 pub fn address<T>(mut self, value: T) -> Self
32959 where
32960 T: ::std::convert::TryInto<
32961 ::std::option::Option<super::SerializablePubkey>,
32962 >,
32963 T::Error: ::std::fmt::Display,
32964 {
32965 self.address = value
32966 .try_into()
32967 .map_err(|e| {
32968 format!("error converting supplied value for address: {e}")
32969 });
32970 self
32971 }
32972 pub fn hash<T>(mut self, value: T) -> Self
32973 where
32974 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
32975 T::Error: ::std::fmt::Display,
32976 {
32977 self.hash = value
32978 .try_into()
32979 .map_err(|e| {
32980 format!("error converting supplied value for hash: {e}")
32981 });
32982 self
32983 }
32984 }
32985 impl ::std::convert::TryFrom<PostGetCompressedAccountBodyParams>
32986 for super::PostGetCompressedAccountBodyParams {
32987 type Error = super::error::ConversionError;
32988 fn try_from(
32989 value: PostGetCompressedAccountBodyParams,
32990 ) -> ::std::result::Result<Self, super::error::ConversionError> {
32991 Ok(Self {
32992 address: value.address?,
32993 hash: value.hash?,
32994 })
32995 }
32996 }
32997 impl ::std::convert::From<super::PostGetCompressedAccountBodyParams>
32998 for PostGetCompressedAccountBodyParams {
32999 fn from(value: super::PostGetCompressedAccountBodyParams) -> Self {
33000 Self {
33001 address: Ok(value.address),
33002 hash: Ok(value.hash),
33003 }
33004 }
33005 }
33006 #[derive(Clone, Debug)]
33007 pub struct PostGetCompressedAccountProofBody {
33008 id: ::std::result::Result<
33009 super::PostGetCompressedAccountProofBodyId,
33010 ::std::string::String,
33011 >,
33012 jsonrpc: ::std::result::Result<
33013 super::PostGetCompressedAccountProofBodyJsonrpc,
33014 ::std::string::String,
33015 >,
33016 method: ::std::result::Result<
33017 super::PostGetCompressedAccountProofBodyMethod,
33018 ::std::string::String,
33019 >,
33020 params: ::std::result::Result<
33021 super::PostGetCompressedAccountProofBodyParams,
33022 ::std::string::String,
33023 >,
33024 }
33025 impl ::std::default::Default for PostGetCompressedAccountProofBody {
33026 fn default() -> Self {
33027 Self {
33028 id: Err("no value supplied for id".to_string()),
33029 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
33030 method: Err("no value supplied for method".to_string()),
33031 params: Err("no value supplied for params".to_string()),
33032 }
33033 }
33034 }
33035 impl PostGetCompressedAccountProofBody {
33036 pub fn id<T>(mut self, value: T) -> Self
33037 where
33038 T: ::std::convert::TryInto<super::PostGetCompressedAccountProofBodyId>,
33039 T::Error: ::std::fmt::Display,
33040 {
33041 self.id = value
33042 .try_into()
33043 .map_err(|e| format!("error converting supplied value for id: {e}"));
33044 self
33045 }
33046 pub fn jsonrpc<T>(mut self, value: T) -> Self
33047 where
33048 T: ::std::convert::TryInto<
33049 super::PostGetCompressedAccountProofBodyJsonrpc,
33050 >,
33051 T::Error: ::std::fmt::Display,
33052 {
33053 self.jsonrpc = value
33054 .try_into()
33055 .map_err(|e| {
33056 format!("error converting supplied value for jsonrpc: {e}")
33057 });
33058 self
33059 }
33060 pub fn method<T>(mut self, value: T) -> Self
33061 where
33062 T: ::std::convert::TryInto<
33063 super::PostGetCompressedAccountProofBodyMethod,
33064 >,
33065 T::Error: ::std::fmt::Display,
33066 {
33067 self.method = value
33068 .try_into()
33069 .map_err(|e| {
33070 format!("error converting supplied value for method: {e}")
33071 });
33072 self
33073 }
33074 pub fn params<T>(mut self, value: T) -> Self
33075 where
33076 T: ::std::convert::TryInto<
33077 super::PostGetCompressedAccountProofBodyParams,
33078 >,
33079 T::Error: ::std::fmt::Display,
33080 {
33081 self.params = value
33082 .try_into()
33083 .map_err(|e| {
33084 format!("error converting supplied value for params: {e}")
33085 });
33086 self
33087 }
33088 }
33089 impl ::std::convert::TryFrom<PostGetCompressedAccountProofBody>
33090 for super::PostGetCompressedAccountProofBody {
33091 type Error = super::error::ConversionError;
33092 fn try_from(
33093 value: PostGetCompressedAccountProofBody,
33094 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33095 Ok(Self {
33096 id: value.id?,
33097 jsonrpc: value.jsonrpc?,
33098 method: value.method?,
33099 params: value.params?,
33100 })
33101 }
33102 }
33103 impl ::std::convert::From<super::PostGetCompressedAccountProofBody>
33104 for PostGetCompressedAccountProofBody {
33105 fn from(value: super::PostGetCompressedAccountProofBody) -> Self {
33106 Self {
33107 id: Ok(value.id),
33108 jsonrpc: Ok(value.jsonrpc),
33109 method: Ok(value.method),
33110 params: Ok(value.params),
33111 }
33112 }
33113 }
33114 #[derive(Clone, Debug)]
33115 pub struct PostGetCompressedAccountProofBodyParams {
33116 hash: ::std::result::Result<super::Hash, ::std::string::String>,
33117 }
33118 impl ::std::default::Default for PostGetCompressedAccountProofBodyParams {
33119 fn default() -> Self {
33120 Self {
33121 hash: Err("no value supplied for hash".to_string()),
33122 }
33123 }
33124 }
33125 impl PostGetCompressedAccountProofBodyParams {
33126 pub fn hash<T>(mut self, value: T) -> Self
33127 where
33128 T: ::std::convert::TryInto<super::Hash>,
33129 T::Error: ::std::fmt::Display,
33130 {
33131 self.hash = value
33132 .try_into()
33133 .map_err(|e| {
33134 format!("error converting supplied value for hash: {e}")
33135 });
33136 self
33137 }
33138 }
33139 impl ::std::convert::TryFrom<PostGetCompressedAccountProofBodyParams>
33140 for super::PostGetCompressedAccountProofBodyParams {
33141 type Error = super::error::ConversionError;
33142 fn try_from(
33143 value: PostGetCompressedAccountProofBodyParams,
33144 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33145 Ok(Self { hash: value.hash? })
33146 }
33147 }
33148 impl ::std::convert::From<super::PostGetCompressedAccountProofBodyParams>
33149 for PostGetCompressedAccountProofBodyParams {
33150 fn from(value: super::PostGetCompressedAccountProofBodyParams) -> Self {
33151 Self { hash: Ok(value.hash) }
33152 }
33153 }
33154 #[derive(Clone, Debug)]
33155 pub struct PostGetCompressedAccountProofResponse {
33156 error: ::std::result::Result<
33157 ::std::option::Option<super::PostGetCompressedAccountProofResponseError>,
33158 ::std::string::String,
33159 >,
33160 id: ::std::result::Result<
33161 super::PostGetCompressedAccountProofResponseId,
33162 ::std::string::String,
33163 >,
33164 jsonrpc: ::std::result::Result<
33165 super::PostGetCompressedAccountProofResponseJsonrpc,
33166 ::std::string::String,
33167 >,
33168 result: ::std::result::Result<
33169 ::std::option::Option<
33170 super::PostGetCompressedAccountProofResponseResult,
33171 >,
33172 ::std::string::String,
33173 >,
33174 }
33175 impl ::std::default::Default for PostGetCompressedAccountProofResponse {
33176 fn default() -> Self {
33177 Self {
33178 error: Ok(Default::default()),
33179 id: Err("no value supplied for id".to_string()),
33180 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
33181 result: Ok(Default::default()),
33182 }
33183 }
33184 }
33185 impl PostGetCompressedAccountProofResponse {
33186 pub fn error<T>(mut self, value: T) -> Self
33187 where
33188 T: ::std::convert::TryInto<
33189 ::std::option::Option<
33190 super::PostGetCompressedAccountProofResponseError,
33191 >,
33192 >,
33193 T::Error: ::std::fmt::Display,
33194 {
33195 self.error = value
33196 .try_into()
33197 .map_err(|e| {
33198 format!("error converting supplied value for error: {e}")
33199 });
33200 self
33201 }
33202 pub fn id<T>(mut self, value: T) -> Self
33203 where
33204 T: ::std::convert::TryInto<
33205 super::PostGetCompressedAccountProofResponseId,
33206 >,
33207 T::Error: ::std::fmt::Display,
33208 {
33209 self.id = value
33210 .try_into()
33211 .map_err(|e| format!("error converting supplied value for id: {e}"));
33212 self
33213 }
33214 pub fn jsonrpc<T>(mut self, value: T) -> Self
33215 where
33216 T: ::std::convert::TryInto<
33217 super::PostGetCompressedAccountProofResponseJsonrpc,
33218 >,
33219 T::Error: ::std::fmt::Display,
33220 {
33221 self.jsonrpc = value
33222 .try_into()
33223 .map_err(|e| {
33224 format!("error converting supplied value for jsonrpc: {e}")
33225 });
33226 self
33227 }
33228 pub fn result<T>(mut self, value: T) -> Self
33229 where
33230 T: ::std::convert::TryInto<
33231 ::std::option::Option<
33232 super::PostGetCompressedAccountProofResponseResult,
33233 >,
33234 >,
33235 T::Error: ::std::fmt::Display,
33236 {
33237 self.result = value
33238 .try_into()
33239 .map_err(|e| {
33240 format!("error converting supplied value for result: {e}")
33241 });
33242 self
33243 }
33244 }
33245 impl ::std::convert::TryFrom<PostGetCompressedAccountProofResponse>
33246 for super::PostGetCompressedAccountProofResponse {
33247 type Error = super::error::ConversionError;
33248 fn try_from(
33249 value: PostGetCompressedAccountProofResponse,
33250 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33251 Ok(Self {
33252 error: value.error?,
33253 id: value.id?,
33254 jsonrpc: value.jsonrpc?,
33255 result: value.result?,
33256 })
33257 }
33258 }
33259 impl ::std::convert::From<super::PostGetCompressedAccountProofResponse>
33260 for PostGetCompressedAccountProofResponse {
33261 fn from(value: super::PostGetCompressedAccountProofResponse) -> Self {
33262 Self {
33263 error: Ok(value.error),
33264 id: Ok(value.id),
33265 jsonrpc: Ok(value.jsonrpc),
33266 result: Ok(value.result),
33267 }
33268 }
33269 }
33270 #[derive(Clone, Debug)]
33271 pub struct PostGetCompressedAccountProofResponseError {
33272 code: ::std::result::Result<
33273 ::std::option::Option<i64>,
33274 ::std::string::String,
33275 >,
33276 message: ::std::result::Result<
33277 ::std::option::Option<::std::string::String>,
33278 ::std::string::String,
33279 >,
33280 }
33281 impl ::std::default::Default for PostGetCompressedAccountProofResponseError {
33282 fn default() -> Self {
33283 Self {
33284 code: Ok(Default::default()),
33285 message: Ok(Default::default()),
33286 }
33287 }
33288 }
33289 impl PostGetCompressedAccountProofResponseError {
33290 pub fn code<T>(mut self, value: T) -> Self
33291 where
33292 T: ::std::convert::TryInto<::std::option::Option<i64>>,
33293 T::Error: ::std::fmt::Display,
33294 {
33295 self.code = value
33296 .try_into()
33297 .map_err(|e| {
33298 format!("error converting supplied value for code: {e}")
33299 });
33300 self
33301 }
33302 pub fn message<T>(mut self, value: T) -> Self
33303 where
33304 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
33305 T::Error: ::std::fmt::Display,
33306 {
33307 self.message = value
33308 .try_into()
33309 .map_err(|e| {
33310 format!("error converting supplied value for message: {e}")
33311 });
33312 self
33313 }
33314 }
33315 impl ::std::convert::TryFrom<PostGetCompressedAccountProofResponseError>
33316 for super::PostGetCompressedAccountProofResponseError {
33317 type Error = super::error::ConversionError;
33318 fn try_from(
33319 value: PostGetCompressedAccountProofResponseError,
33320 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33321 Ok(Self {
33322 code: value.code?,
33323 message: value.message?,
33324 })
33325 }
33326 }
33327 impl ::std::convert::From<super::PostGetCompressedAccountProofResponseError>
33328 for PostGetCompressedAccountProofResponseError {
33329 fn from(value: super::PostGetCompressedAccountProofResponseError) -> Self {
33330 Self {
33331 code: Ok(value.code),
33332 message: Ok(value.message),
33333 }
33334 }
33335 }
33336 #[derive(Clone, Debug)]
33337 pub struct PostGetCompressedAccountProofResponseResult {
33338 context: ::std::result::Result<super::Context, ::std::string::String>,
33339 value: ::std::result::Result<
33340 super::GetCompressedAccountProofResponseValue,
33341 ::std::string::String,
33342 >,
33343 }
33344 impl ::std::default::Default for PostGetCompressedAccountProofResponseResult {
33345 fn default() -> Self {
33346 Self {
33347 context: Err("no value supplied for context".to_string()),
33348 value: Err("no value supplied for value".to_string()),
33349 }
33350 }
33351 }
33352 impl PostGetCompressedAccountProofResponseResult {
33353 pub fn context<T>(mut self, value: T) -> Self
33354 where
33355 T: ::std::convert::TryInto<super::Context>,
33356 T::Error: ::std::fmt::Display,
33357 {
33358 self.context = value
33359 .try_into()
33360 .map_err(|e| {
33361 format!("error converting supplied value for context: {e}")
33362 });
33363 self
33364 }
33365 pub fn value<T>(mut self, value: T) -> Self
33366 where
33367 T: ::std::convert::TryInto<
33368 super::GetCompressedAccountProofResponseValue,
33369 >,
33370 T::Error: ::std::fmt::Display,
33371 {
33372 self.value = value
33373 .try_into()
33374 .map_err(|e| {
33375 format!("error converting supplied value for value: {e}")
33376 });
33377 self
33378 }
33379 }
33380 impl ::std::convert::TryFrom<PostGetCompressedAccountProofResponseResult>
33381 for super::PostGetCompressedAccountProofResponseResult {
33382 type Error = super::error::ConversionError;
33383 fn try_from(
33384 value: PostGetCompressedAccountProofResponseResult,
33385 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33386 Ok(Self {
33387 context: value.context?,
33388 value: value.value?,
33389 })
33390 }
33391 }
33392 impl ::std::convert::From<super::PostGetCompressedAccountProofResponseResult>
33393 for PostGetCompressedAccountProofResponseResult {
33394 fn from(value: super::PostGetCompressedAccountProofResponseResult) -> Self {
33395 Self {
33396 context: Ok(value.context),
33397 value: Ok(value.value),
33398 }
33399 }
33400 }
33401 #[derive(Clone, Debug)]
33402 pub struct PostGetCompressedAccountProofV2Body {
33403 id: ::std::result::Result<
33404 super::PostGetCompressedAccountProofV2BodyId,
33405 ::std::string::String,
33406 >,
33407 jsonrpc: ::std::result::Result<
33408 super::PostGetCompressedAccountProofV2BodyJsonrpc,
33409 ::std::string::String,
33410 >,
33411 method: ::std::result::Result<
33412 super::PostGetCompressedAccountProofV2BodyMethod,
33413 ::std::string::String,
33414 >,
33415 params: ::std::result::Result<
33416 super::PostGetCompressedAccountProofV2BodyParams,
33417 ::std::string::String,
33418 >,
33419 }
33420 impl ::std::default::Default for PostGetCompressedAccountProofV2Body {
33421 fn default() -> Self {
33422 Self {
33423 id: Err("no value supplied for id".to_string()),
33424 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
33425 method: Err("no value supplied for method".to_string()),
33426 params: Err("no value supplied for params".to_string()),
33427 }
33428 }
33429 }
33430 impl PostGetCompressedAccountProofV2Body {
33431 pub fn id<T>(mut self, value: T) -> Self
33432 where
33433 T: ::std::convert::TryInto<super::PostGetCompressedAccountProofV2BodyId>,
33434 T::Error: ::std::fmt::Display,
33435 {
33436 self.id = value
33437 .try_into()
33438 .map_err(|e| format!("error converting supplied value for id: {e}"));
33439 self
33440 }
33441 pub fn jsonrpc<T>(mut self, value: T) -> Self
33442 where
33443 T: ::std::convert::TryInto<
33444 super::PostGetCompressedAccountProofV2BodyJsonrpc,
33445 >,
33446 T::Error: ::std::fmt::Display,
33447 {
33448 self.jsonrpc = value
33449 .try_into()
33450 .map_err(|e| {
33451 format!("error converting supplied value for jsonrpc: {e}")
33452 });
33453 self
33454 }
33455 pub fn method<T>(mut self, value: T) -> Self
33456 where
33457 T: ::std::convert::TryInto<
33458 super::PostGetCompressedAccountProofV2BodyMethod,
33459 >,
33460 T::Error: ::std::fmt::Display,
33461 {
33462 self.method = value
33463 .try_into()
33464 .map_err(|e| {
33465 format!("error converting supplied value for method: {e}")
33466 });
33467 self
33468 }
33469 pub fn params<T>(mut self, value: T) -> Self
33470 where
33471 T: ::std::convert::TryInto<
33472 super::PostGetCompressedAccountProofV2BodyParams,
33473 >,
33474 T::Error: ::std::fmt::Display,
33475 {
33476 self.params = value
33477 .try_into()
33478 .map_err(|e| {
33479 format!("error converting supplied value for params: {e}")
33480 });
33481 self
33482 }
33483 }
33484 impl ::std::convert::TryFrom<PostGetCompressedAccountProofV2Body>
33485 for super::PostGetCompressedAccountProofV2Body {
33486 type Error = super::error::ConversionError;
33487 fn try_from(
33488 value: PostGetCompressedAccountProofV2Body,
33489 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33490 Ok(Self {
33491 id: value.id?,
33492 jsonrpc: value.jsonrpc?,
33493 method: value.method?,
33494 params: value.params?,
33495 })
33496 }
33497 }
33498 impl ::std::convert::From<super::PostGetCompressedAccountProofV2Body>
33499 for PostGetCompressedAccountProofV2Body {
33500 fn from(value: super::PostGetCompressedAccountProofV2Body) -> Self {
33501 Self {
33502 id: Ok(value.id),
33503 jsonrpc: Ok(value.jsonrpc),
33504 method: Ok(value.method),
33505 params: Ok(value.params),
33506 }
33507 }
33508 }
33509 #[derive(Clone, Debug)]
33510 pub struct PostGetCompressedAccountProofV2BodyParams {
33511 hash: ::std::result::Result<super::Hash, ::std::string::String>,
33512 }
33513 impl ::std::default::Default for PostGetCompressedAccountProofV2BodyParams {
33514 fn default() -> Self {
33515 Self {
33516 hash: Err("no value supplied for hash".to_string()),
33517 }
33518 }
33519 }
33520 impl PostGetCompressedAccountProofV2BodyParams {
33521 pub fn hash<T>(mut self, value: T) -> Self
33522 where
33523 T: ::std::convert::TryInto<super::Hash>,
33524 T::Error: ::std::fmt::Display,
33525 {
33526 self.hash = value
33527 .try_into()
33528 .map_err(|e| {
33529 format!("error converting supplied value for hash: {e}")
33530 });
33531 self
33532 }
33533 }
33534 impl ::std::convert::TryFrom<PostGetCompressedAccountProofV2BodyParams>
33535 for super::PostGetCompressedAccountProofV2BodyParams {
33536 type Error = super::error::ConversionError;
33537 fn try_from(
33538 value: PostGetCompressedAccountProofV2BodyParams,
33539 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33540 Ok(Self { hash: value.hash? })
33541 }
33542 }
33543 impl ::std::convert::From<super::PostGetCompressedAccountProofV2BodyParams>
33544 for PostGetCompressedAccountProofV2BodyParams {
33545 fn from(value: super::PostGetCompressedAccountProofV2BodyParams) -> Self {
33546 Self { hash: Ok(value.hash) }
33547 }
33548 }
33549 #[derive(Clone, Debug)]
33550 pub struct PostGetCompressedAccountProofV2Response {
33551 error: ::std::result::Result<
33552 ::std::option::Option<
33553 super::PostGetCompressedAccountProofV2ResponseError,
33554 >,
33555 ::std::string::String,
33556 >,
33557 id: ::std::result::Result<
33558 super::PostGetCompressedAccountProofV2ResponseId,
33559 ::std::string::String,
33560 >,
33561 jsonrpc: ::std::result::Result<
33562 super::PostGetCompressedAccountProofV2ResponseJsonrpc,
33563 ::std::string::String,
33564 >,
33565 result: ::std::result::Result<
33566 ::std::option::Option<
33567 super::PostGetCompressedAccountProofV2ResponseResult,
33568 >,
33569 ::std::string::String,
33570 >,
33571 }
33572 impl ::std::default::Default for PostGetCompressedAccountProofV2Response {
33573 fn default() -> Self {
33574 Self {
33575 error: Ok(Default::default()),
33576 id: Err("no value supplied for id".to_string()),
33577 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
33578 result: Ok(Default::default()),
33579 }
33580 }
33581 }
33582 impl PostGetCompressedAccountProofV2Response {
33583 pub fn error<T>(mut self, value: T) -> Self
33584 where
33585 T: ::std::convert::TryInto<
33586 ::std::option::Option<
33587 super::PostGetCompressedAccountProofV2ResponseError,
33588 >,
33589 >,
33590 T::Error: ::std::fmt::Display,
33591 {
33592 self.error = value
33593 .try_into()
33594 .map_err(|e| {
33595 format!("error converting supplied value for error: {e}")
33596 });
33597 self
33598 }
33599 pub fn id<T>(mut self, value: T) -> Self
33600 where
33601 T: ::std::convert::TryInto<
33602 super::PostGetCompressedAccountProofV2ResponseId,
33603 >,
33604 T::Error: ::std::fmt::Display,
33605 {
33606 self.id = value
33607 .try_into()
33608 .map_err(|e| format!("error converting supplied value for id: {e}"));
33609 self
33610 }
33611 pub fn jsonrpc<T>(mut self, value: T) -> Self
33612 where
33613 T: ::std::convert::TryInto<
33614 super::PostGetCompressedAccountProofV2ResponseJsonrpc,
33615 >,
33616 T::Error: ::std::fmt::Display,
33617 {
33618 self.jsonrpc = value
33619 .try_into()
33620 .map_err(|e| {
33621 format!("error converting supplied value for jsonrpc: {e}")
33622 });
33623 self
33624 }
33625 pub fn result<T>(mut self, value: T) -> Self
33626 where
33627 T: ::std::convert::TryInto<
33628 ::std::option::Option<
33629 super::PostGetCompressedAccountProofV2ResponseResult,
33630 >,
33631 >,
33632 T::Error: ::std::fmt::Display,
33633 {
33634 self.result = value
33635 .try_into()
33636 .map_err(|e| {
33637 format!("error converting supplied value for result: {e}")
33638 });
33639 self
33640 }
33641 }
33642 impl ::std::convert::TryFrom<PostGetCompressedAccountProofV2Response>
33643 for super::PostGetCompressedAccountProofV2Response {
33644 type Error = super::error::ConversionError;
33645 fn try_from(
33646 value: PostGetCompressedAccountProofV2Response,
33647 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33648 Ok(Self {
33649 error: value.error?,
33650 id: value.id?,
33651 jsonrpc: value.jsonrpc?,
33652 result: value.result?,
33653 })
33654 }
33655 }
33656 impl ::std::convert::From<super::PostGetCompressedAccountProofV2Response>
33657 for PostGetCompressedAccountProofV2Response {
33658 fn from(value: super::PostGetCompressedAccountProofV2Response) -> Self {
33659 Self {
33660 error: Ok(value.error),
33661 id: Ok(value.id),
33662 jsonrpc: Ok(value.jsonrpc),
33663 result: Ok(value.result),
33664 }
33665 }
33666 }
33667 #[derive(Clone, Debug)]
33668 pub struct PostGetCompressedAccountProofV2ResponseError {
33669 code: ::std::result::Result<
33670 ::std::option::Option<i64>,
33671 ::std::string::String,
33672 >,
33673 message: ::std::result::Result<
33674 ::std::option::Option<::std::string::String>,
33675 ::std::string::String,
33676 >,
33677 }
33678 impl ::std::default::Default for PostGetCompressedAccountProofV2ResponseError {
33679 fn default() -> Self {
33680 Self {
33681 code: Ok(Default::default()),
33682 message: Ok(Default::default()),
33683 }
33684 }
33685 }
33686 impl PostGetCompressedAccountProofV2ResponseError {
33687 pub fn code<T>(mut self, value: T) -> Self
33688 where
33689 T: ::std::convert::TryInto<::std::option::Option<i64>>,
33690 T::Error: ::std::fmt::Display,
33691 {
33692 self.code = value
33693 .try_into()
33694 .map_err(|e| {
33695 format!("error converting supplied value for code: {e}")
33696 });
33697 self
33698 }
33699 pub fn message<T>(mut self, value: T) -> Self
33700 where
33701 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
33702 T::Error: ::std::fmt::Display,
33703 {
33704 self.message = value
33705 .try_into()
33706 .map_err(|e| {
33707 format!("error converting supplied value for message: {e}")
33708 });
33709 self
33710 }
33711 }
33712 impl ::std::convert::TryFrom<PostGetCompressedAccountProofV2ResponseError>
33713 for super::PostGetCompressedAccountProofV2ResponseError {
33714 type Error = super::error::ConversionError;
33715 fn try_from(
33716 value: PostGetCompressedAccountProofV2ResponseError,
33717 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33718 Ok(Self {
33719 code: value.code?,
33720 message: value.message?,
33721 })
33722 }
33723 }
33724 impl ::std::convert::From<super::PostGetCompressedAccountProofV2ResponseError>
33725 for PostGetCompressedAccountProofV2ResponseError {
33726 fn from(value: super::PostGetCompressedAccountProofV2ResponseError) -> Self {
33727 Self {
33728 code: Ok(value.code),
33729 message: Ok(value.message),
33730 }
33731 }
33732 }
33733 #[derive(Clone, Debug)]
33734 pub struct PostGetCompressedAccountProofV2ResponseResult {
33735 context: ::std::result::Result<super::Context, ::std::string::String>,
33736 value: ::std::result::Result<
33737 super::GetCompressedAccountProofResponseValueV2,
33738 ::std::string::String,
33739 >,
33740 }
33741 impl ::std::default::Default for PostGetCompressedAccountProofV2ResponseResult {
33742 fn default() -> Self {
33743 Self {
33744 context: Err("no value supplied for context".to_string()),
33745 value: Err("no value supplied for value".to_string()),
33746 }
33747 }
33748 }
33749 impl PostGetCompressedAccountProofV2ResponseResult {
33750 pub fn context<T>(mut self, value: T) -> Self
33751 where
33752 T: ::std::convert::TryInto<super::Context>,
33753 T::Error: ::std::fmt::Display,
33754 {
33755 self.context = value
33756 .try_into()
33757 .map_err(|e| {
33758 format!("error converting supplied value for context: {e}")
33759 });
33760 self
33761 }
33762 pub fn value<T>(mut self, value: T) -> Self
33763 where
33764 T: ::std::convert::TryInto<
33765 super::GetCompressedAccountProofResponseValueV2,
33766 >,
33767 T::Error: ::std::fmt::Display,
33768 {
33769 self.value = value
33770 .try_into()
33771 .map_err(|e| {
33772 format!("error converting supplied value for value: {e}")
33773 });
33774 self
33775 }
33776 }
33777 impl ::std::convert::TryFrom<PostGetCompressedAccountProofV2ResponseResult>
33778 for super::PostGetCompressedAccountProofV2ResponseResult {
33779 type Error = super::error::ConversionError;
33780 fn try_from(
33781 value: PostGetCompressedAccountProofV2ResponseResult,
33782 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33783 Ok(Self {
33784 context: value.context?,
33785 value: value.value?,
33786 })
33787 }
33788 }
33789 impl ::std::convert::From<super::PostGetCompressedAccountProofV2ResponseResult>
33790 for PostGetCompressedAccountProofV2ResponseResult {
33791 fn from(
33792 value: super::PostGetCompressedAccountProofV2ResponseResult,
33793 ) -> Self {
33794 Self {
33795 context: Ok(value.context),
33796 value: Ok(value.value),
33797 }
33798 }
33799 }
33800 #[derive(Clone, Debug)]
33801 pub struct PostGetCompressedAccountResponse {
33802 error: ::std::result::Result<
33803 ::std::option::Option<super::PostGetCompressedAccountResponseError>,
33804 ::std::string::String,
33805 >,
33806 id: ::std::result::Result<
33807 super::PostGetCompressedAccountResponseId,
33808 ::std::string::String,
33809 >,
33810 jsonrpc: ::std::result::Result<
33811 super::PostGetCompressedAccountResponseJsonrpc,
33812 ::std::string::String,
33813 >,
33814 result: ::std::result::Result<
33815 ::std::option::Option<super::PostGetCompressedAccountResponseResult>,
33816 ::std::string::String,
33817 >,
33818 }
33819 impl ::std::default::Default for PostGetCompressedAccountResponse {
33820 fn default() -> Self {
33821 Self {
33822 error: Ok(Default::default()),
33823 id: Err("no value supplied for id".to_string()),
33824 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
33825 result: Ok(Default::default()),
33826 }
33827 }
33828 }
33829 impl PostGetCompressedAccountResponse {
33830 pub fn error<T>(mut self, value: T) -> Self
33831 where
33832 T: ::std::convert::TryInto<
33833 ::std::option::Option<super::PostGetCompressedAccountResponseError>,
33834 >,
33835 T::Error: ::std::fmt::Display,
33836 {
33837 self.error = value
33838 .try_into()
33839 .map_err(|e| {
33840 format!("error converting supplied value for error: {e}")
33841 });
33842 self
33843 }
33844 pub fn id<T>(mut self, value: T) -> Self
33845 where
33846 T: ::std::convert::TryInto<super::PostGetCompressedAccountResponseId>,
33847 T::Error: ::std::fmt::Display,
33848 {
33849 self.id = value
33850 .try_into()
33851 .map_err(|e| format!("error converting supplied value for id: {e}"));
33852 self
33853 }
33854 pub fn jsonrpc<T>(mut self, value: T) -> Self
33855 where
33856 T: ::std::convert::TryInto<
33857 super::PostGetCompressedAccountResponseJsonrpc,
33858 >,
33859 T::Error: ::std::fmt::Display,
33860 {
33861 self.jsonrpc = value
33862 .try_into()
33863 .map_err(|e| {
33864 format!("error converting supplied value for jsonrpc: {e}")
33865 });
33866 self
33867 }
33868 pub fn result<T>(mut self, value: T) -> Self
33869 where
33870 T: ::std::convert::TryInto<
33871 ::std::option::Option<super::PostGetCompressedAccountResponseResult>,
33872 >,
33873 T::Error: ::std::fmt::Display,
33874 {
33875 self.result = value
33876 .try_into()
33877 .map_err(|e| {
33878 format!("error converting supplied value for result: {e}")
33879 });
33880 self
33881 }
33882 }
33883 impl ::std::convert::TryFrom<PostGetCompressedAccountResponse>
33884 for super::PostGetCompressedAccountResponse {
33885 type Error = super::error::ConversionError;
33886 fn try_from(
33887 value: PostGetCompressedAccountResponse,
33888 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33889 Ok(Self {
33890 error: value.error?,
33891 id: value.id?,
33892 jsonrpc: value.jsonrpc?,
33893 result: value.result?,
33894 })
33895 }
33896 }
33897 impl ::std::convert::From<super::PostGetCompressedAccountResponse>
33898 for PostGetCompressedAccountResponse {
33899 fn from(value: super::PostGetCompressedAccountResponse) -> Self {
33900 Self {
33901 error: Ok(value.error),
33902 id: Ok(value.id),
33903 jsonrpc: Ok(value.jsonrpc),
33904 result: Ok(value.result),
33905 }
33906 }
33907 }
33908 #[derive(Clone, Debug)]
33909 pub struct PostGetCompressedAccountResponseError {
33910 code: ::std::result::Result<
33911 ::std::option::Option<i64>,
33912 ::std::string::String,
33913 >,
33914 message: ::std::result::Result<
33915 ::std::option::Option<::std::string::String>,
33916 ::std::string::String,
33917 >,
33918 }
33919 impl ::std::default::Default for PostGetCompressedAccountResponseError {
33920 fn default() -> Self {
33921 Self {
33922 code: Ok(Default::default()),
33923 message: Ok(Default::default()),
33924 }
33925 }
33926 }
33927 impl PostGetCompressedAccountResponseError {
33928 pub fn code<T>(mut self, value: T) -> Self
33929 where
33930 T: ::std::convert::TryInto<::std::option::Option<i64>>,
33931 T::Error: ::std::fmt::Display,
33932 {
33933 self.code = value
33934 .try_into()
33935 .map_err(|e| {
33936 format!("error converting supplied value for code: {e}")
33937 });
33938 self
33939 }
33940 pub fn message<T>(mut self, value: T) -> Self
33941 where
33942 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
33943 T::Error: ::std::fmt::Display,
33944 {
33945 self.message = value
33946 .try_into()
33947 .map_err(|e| {
33948 format!("error converting supplied value for message: {e}")
33949 });
33950 self
33951 }
33952 }
33953 impl ::std::convert::TryFrom<PostGetCompressedAccountResponseError>
33954 for super::PostGetCompressedAccountResponseError {
33955 type Error = super::error::ConversionError;
33956 fn try_from(
33957 value: PostGetCompressedAccountResponseError,
33958 ) -> ::std::result::Result<Self, super::error::ConversionError> {
33959 Ok(Self {
33960 code: value.code?,
33961 message: value.message?,
33962 })
33963 }
33964 }
33965 impl ::std::convert::From<super::PostGetCompressedAccountResponseError>
33966 for PostGetCompressedAccountResponseError {
33967 fn from(value: super::PostGetCompressedAccountResponseError) -> Self {
33968 Self {
33969 code: Ok(value.code),
33970 message: Ok(value.message),
33971 }
33972 }
33973 }
33974 #[derive(Clone, Debug)]
33975 pub struct PostGetCompressedAccountResponseResult {
33976 context: ::std::result::Result<super::Context, ::std::string::String>,
33977 value: ::std::result::Result<
33978 ::std::option::Option<super::Account>,
33979 ::std::string::String,
33980 >,
33981 }
33982 impl ::std::default::Default for PostGetCompressedAccountResponseResult {
33983 fn default() -> Self {
33984 Self {
33985 context: Err("no value supplied for context".to_string()),
33986 value: Ok(Default::default()),
33987 }
33988 }
33989 }
33990 impl PostGetCompressedAccountResponseResult {
33991 pub fn context<T>(mut self, value: T) -> Self
33992 where
33993 T: ::std::convert::TryInto<super::Context>,
33994 T::Error: ::std::fmt::Display,
33995 {
33996 self.context = value
33997 .try_into()
33998 .map_err(|e| {
33999 format!("error converting supplied value for context: {e}")
34000 });
34001 self
34002 }
34003 pub fn value<T>(mut self, value: T) -> Self
34004 where
34005 T: ::std::convert::TryInto<::std::option::Option<super::Account>>,
34006 T::Error: ::std::fmt::Display,
34007 {
34008 self.value = value
34009 .try_into()
34010 .map_err(|e| {
34011 format!("error converting supplied value for value: {e}")
34012 });
34013 self
34014 }
34015 }
34016 impl ::std::convert::TryFrom<PostGetCompressedAccountResponseResult>
34017 for super::PostGetCompressedAccountResponseResult {
34018 type Error = super::error::ConversionError;
34019 fn try_from(
34020 value: PostGetCompressedAccountResponseResult,
34021 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34022 Ok(Self {
34023 context: value.context?,
34024 value: value.value?,
34025 })
34026 }
34027 }
34028 impl ::std::convert::From<super::PostGetCompressedAccountResponseResult>
34029 for PostGetCompressedAccountResponseResult {
34030 fn from(value: super::PostGetCompressedAccountResponseResult) -> Self {
34031 Self {
34032 context: Ok(value.context),
34033 value: Ok(value.value),
34034 }
34035 }
34036 }
34037 #[derive(Clone, Debug)]
34038 pub struct PostGetCompressedAccountV2Body {
34039 id: ::std::result::Result<
34040 super::PostGetCompressedAccountV2BodyId,
34041 ::std::string::String,
34042 >,
34043 jsonrpc: ::std::result::Result<
34044 super::PostGetCompressedAccountV2BodyJsonrpc,
34045 ::std::string::String,
34046 >,
34047 method: ::std::result::Result<
34048 super::PostGetCompressedAccountV2BodyMethod,
34049 ::std::string::String,
34050 >,
34051 params: ::std::result::Result<
34052 super::PostGetCompressedAccountV2BodyParams,
34053 ::std::string::String,
34054 >,
34055 }
34056 impl ::std::default::Default for PostGetCompressedAccountV2Body {
34057 fn default() -> Self {
34058 Self {
34059 id: Err("no value supplied for id".to_string()),
34060 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
34061 method: Err("no value supplied for method".to_string()),
34062 params: Err("no value supplied for params".to_string()),
34063 }
34064 }
34065 }
34066 impl PostGetCompressedAccountV2Body {
34067 pub fn id<T>(mut self, value: T) -> Self
34068 where
34069 T: ::std::convert::TryInto<super::PostGetCompressedAccountV2BodyId>,
34070 T::Error: ::std::fmt::Display,
34071 {
34072 self.id = value
34073 .try_into()
34074 .map_err(|e| format!("error converting supplied value for id: {e}"));
34075 self
34076 }
34077 pub fn jsonrpc<T>(mut self, value: T) -> Self
34078 where
34079 T: ::std::convert::TryInto<super::PostGetCompressedAccountV2BodyJsonrpc>,
34080 T::Error: ::std::fmt::Display,
34081 {
34082 self.jsonrpc = value
34083 .try_into()
34084 .map_err(|e| {
34085 format!("error converting supplied value for jsonrpc: {e}")
34086 });
34087 self
34088 }
34089 pub fn method<T>(mut self, value: T) -> Self
34090 where
34091 T: ::std::convert::TryInto<super::PostGetCompressedAccountV2BodyMethod>,
34092 T::Error: ::std::fmt::Display,
34093 {
34094 self.method = value
34095 .try_into()
34096 .map_err(|e| {
34097 format!("error converting supplied value for method: {e}")
34098 });
34099 self
34100 }
34101 pub fn params<T>(mut self, value: T) -> Self
34102 where
34103 T: ::std::convert::TryInto<super::PostGetCompressedAccountV2BodyParams>,
34104 T::Error: ::std::fmt::Display,
34105 {
34106 self.params = value
34107 .try_into()
34108 .map_err(|e| {
34109 format!("error converting supplied value for params: {e}")
34110 });
34111 self
34112 }
34113 }
34114 impl ::std::convert::TryFrom<PostGetCompressedAccountV2Body>
34115 for super::PostGetCompressedAccountV2Body {
34116 type Error = super::error::ConversionError;
34117 fn try_from(
34118 value: PostGetCompressedAccountV2Body,
34119 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34120 Ok(Self {
34121 id: value.id?,
34122 jsonrpc: value.jsonrpc?,
34123 method: value.method?,
34124 params: value.params?,
34125 })
34126 }
34127 }
34128 impl ::std::convert::From<super::PostGetCompressedAccountV2Body>
34129 for PostGetCompressedAccountV2Body {
34130 fn from(value: super::PostGetCompressedAccountV2Body) -> Self {
34131 Self {
34132 id: Ok(value.id),
34133 jsonrpc: Ok(value.jsonrpc),
34134 method: Ok(value.method),
34135 params: Ok(value.params),
34136 }
34137 }
34138 }
34139 #[derive(Clone, Debug)]
34140 pub struct PostGetCompressedAccountV2BodyParams {
34141 address: ::std::result::Result<
34142 ::std::option::Option<super::SerializablePubkey>,
34143 ::std::string::String,
34144 >,
34145 hash: ::std::result::Result<
34146 ::std::option::Option<super::Hash>,
34147 ::std::string::String,
34148 >,
34149 }
34150 impl ::std::default::Default for PostGetCompressedAccountV2BodyParams {
34151 fn default() -> Self {
34152 Self {
34153 address: Ok(Default::default()),
34154 hash: Ok(Default::default()),
34155 }
34156 }
34157 }
34158 impl PostGetCompressedAccountV2BodyParams {
34159 pub fn address<T>(mut self, value: T) -> Self
34160 where
34161 T: ::std::convert::TryInto<
34162 ::std::option::Option<super::SerializablePubkey>,
34163 >,
34164 T::Error: ::std::fmt::Display,
34165 {
34166 self.address = value
34167 .try_into()
34168 .map_err(|e| {
34169 format!("error converting supplied value for address: {e}")
34170 });
34171 self
34172 }
34173 pub fn hash<T>(mut self, value: T) -> Self
34174 where
34175 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
34176 T::Error: ::std::fmt::Display,
34177 {
34178 self.hash = value
34179 .try_into()
34180 .map_err(|e| {
34181 format!("error converting supplied value for hash: {e}")
34182 });
34183 self
34184 }
34185 }
34186 impl ::std::convert::TryFrom<PostGetCompressedAccountV2BodyParams>
34187 for super::PostGetCompressedAccountV2BodyParams {
34188 type Error = super::error::ConversionError;
34189 fn try_from(
34190 value: PostGetCompressedAccountV2BodyParams,
34191 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34192 Ok(Self {
34193 address: value.address?,
34194 hash: value.hash?,
34195 })
34196 }
34197 }
34198 impl ::std::convert::From<super::PostGetCompressedAccountV2BodyParams>
34199 for PostGetCompressedAccountV2BodyParams {
34200 fn from(value: super::PostGetCompressedAccountV2BodyParams) -> Self {
34201 Self {
34202 address: Ok(value.address),
34203 hash: Ok(value.hash),
34204 }
34205 }
34206 }
34207 #[derive(Clone, Debug)]
34208 pub struct PostGetCompressedAccountV2Response {
34209 error: ::std::result::Result<
34210 ::std::option::Option<super::PostGetCompressedAccountV2ResponseError>,
34211 ::std::string::String,
34212 >,
34213 id: ::std::result::Result<
34214 super::PostGetCompressedAccountV2ResponseId,
34215 ::std::string::String,
34216 >,
34217 jsonrpc: ::std::result::Result<
34218 super::PostGetCompressedAccountV2ResponseJsonrpc,
34219 ::std::string::String,
34220 >,
34221 result: ::std::result::Result<
34222 ::std::option::Option<super::PostGetCompressedAccountV2ResponseResult>,
34223 ::std::string::String,
34224 >,
34225 }
34226 impl ::std::default::Default for PostGetCompressedAccountV2Response {
34227 fn default() -> Self {
34228 Self {
34229 error: Ok(Default::default()),
34230 id: Err("no value supplied for id".to_string()),
34231 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
34232 result: Ok(Default::default()),
34233 }
34234 }
34235 }
34236 impl PostGetCompressedAccountV2Response {
34237 pub fn error<T>(mut self, value: T) -> Self
34238 where
34239 T: ::std::convert::TryInto<
34240 ::std::option::Option<super::PostGetCompressedAccountV2ResponseError>,
34241 >,
34242 T::Error: ::std::fmt::Display,
34243 {
34244 self.error = value
34245 .try_into()
34246 .map_err(|e| {
34247 format!("error converting supplied value for error: {e}")
34248 });
34249 self
34250 }
34251 pub fn id<T>(mut self, value: T) -> Self
34252 where
34253 T: ::std::convert::TryInto<super::PostGetCompressedAccountV2ResponseId>,
34254 T::Error: ::std::fmt::Display,
34255 {
34256 self.id = value
34257 .try_into()
34258 .map_err(|e| format!("error converting supplied value for id: {e}"));
34259 self
34260 }
34261 pub fn jsonrpc<T>(mut self, value: T) -> Self
34262 where
34263 T: ::std::convert::TryInto<
34264 super::PostGetCompressedAccountV2ResponseJsonrpc,
34265 >,
34266 T::Error: ::std::fmt::Display,
34267 {
34268 self.jsonrpc = value
34269 .try_into()
34270 .map_err(|e| {
34271 format!("error converting supplied value for jsonrpc: {e}")
34272 });
34273 self
34274 }
34275 pub fn result<T>(mut self, value: T) -> Self
34276 where
34277 T: ::std::convert::TryInto<
34278 ::std::option::Option<
34279 super::PostGetCompressedAccountV2ResponseResult,
34280 >,
34281 >,
34282 T::Error: ::std::fmt::Display,
34283 {
34284 self.result = value
34285 .try_into()
34286 .map_err(|e| {
34287 format!("error converting supplied value for result: {e}")
34288 });
34289 self
34290 }
34291 }
34292 impl ::std::convert::TryFrom<PostGetCompressedAccountV2Response>
34293 for super::PostGetCompressedAccountV2Response {
34294 type Error = super::error::ConversionError;
34295 fn try_from(
34296 value: PostGetCompressedAccountV2Response,
34297 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34298 Ok(Self {
34299 error: value.error?,
34300 id: value.id?,
34301 jsonrpc: value.jsonrpc?,
34302 result: value.result?,
34303 })
34304 }
34305 }
34306 impl ::std::convert::From<super::PostGetCompressedAccountV2Response>
34307 for PostGetCompressedAccountV2Response {
34308 fn from(value: super::PostGetCompressedAccountV2Response) -> Self {
34309 Self {
34310 error: Ok(value.error),
34311 id: Ok(value.id),
34312 jsonrpc: Ok(value.jsonrpc),
34313 result: Ok(value.result),
34314 }
34315 }
34316 }
34317 #[derive(Clone, Debug)]
34318 pub struct PostGetCompressedAccountV2ResponseError {
34319 code: ::std::result::Result<
34320 ::std::option::Option<i64>,
34321 ::std::string::String,
34322 >,
34323 message: ::std::result::Result<
34324 ::std::option::Option<::std::string::String>,
34325 ::std::string::String,
34326 >,
34327 }
34328 impl ::std::default::Default for PostGetCompressedAccountV2ResponseError {
34329 fn default() -> Self {
34330 Self {
34331 code: Ok(Default::default()),
34332 message: Ok(Default::default()),
34333 }
34334 }
34335 }
34336 impl PostGetCompressedAccountV2ResponseError {
34337 pub fn code<T>(mut self, value: T) -> Self
34338 where
34339 T: ::std::convert::TryInto<::std::option::Option<i64>>,
34340 T::Error: ::std::fmt::Display,
34341 {
34342 self.code = value
34343 .try_into()
34344 .map_err(|e| {
34345 format!("error converting supplied value for code: {e}")
34346 });
34347 self
34348 }
34349 pub fn message<T>(mut self, value: T) -> Self
34350 where
34351 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
34352 T::Error: ::std::fmt::Display,
34353 {
34354 self.message = value
34355 .try_into()
34356 .map_err(|e| {
34357 format!("error converting supplied value for message: {e}")
34358 });
34359 self
34360 }
34361 }
34362 impl ::std::convert::TryFrom<PostGetCompressedAccountV2ResponseError>
34363 for super::PostGetCompressedAccountV2ResponseError {
34364 type Error = super::error::ConversionError;
34365 fn try_from(
34366 value: PostGetCompressedAccountV2ResponseError,
34367 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34368 Ok(Self {
34369 code: value.code?,
34370 message: value.message?,
34371 })
34372 }
34373 }
34374 impl ::std::convert::From<super::PostGetCompressedAccountV2ResponseError>
34375 for PostGetCompressedAccountV2ResponseError {
34376 fn from(value: super::PostGetCompressedAccountV2ResponseError) -> Self {
34377 Self {
34378 code: Ok(value.code),
34379 message: Ok(value.message),
34380 }
34381 }
34382 }
34383 #[derive(Clone, Debug)]
34384 pub struct PostGetCompressedAccountV2ResponseResult {
34385 context: ::std::result::Result<super::Context, ::std::string::String>,
34386 value: ::std::result::Result<
34387 ::std::option::Option<super::AccountV2>,
34388 ::std::string::String,
34389 >,
34390 }
34391 impl ::std::default::Default for PostGetCompressedAccountV2ResponseResult {
34392 fn default() -> Self {
34393 Self {
34394 context: Err("no value supplied for context".to_string()),
34395 value: Ok(Default::default()),
34396 }
34397 }
34398 }
34399 impl PostGetCompressedAccountV2ResponseResult {
34400 pub fn context<T>(mut self, value: T) -> Self
34401 where
34402 T: ::std::convert::TryInto<super::Context>,
34403 T::Error: ::std::fmt::Display,
34404 {
34405 self.context = value
34406 .try_into()
34407 .map_err(|e| {
34408 format!("error converting supplied value for context: {e}")
34409 });
34410 self
34411 }
34412 pub fn value<T>(mut self, value: T) -> Self
34413 where
34414 T: ::std::convert::TryInto<::std::option::Option<super::AccountV2>>,
34415 T::Error: ::std::fmt::Display,
34416 {
34417 self.value = value
34418 .try_into()
34419 .map_err(|e| {
34420 format!("error converting supplied value for value: {e}")
34421 });
34422 self
34423 }
34424 }
34425 impl ::std::convert::TryFrom<PostGetCompressedAccountV2ResponseResult>
34426 for super::PostGetCompressedAccountV2ResponseResult {
34427 type Error = super::error::ConversionError;
34428 fn try_from(
34429 value: PostGetCompressedAccountV2ResponseResult,
34430 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34431 Ok(Self {
34432 context: value.context?,
34433 value: value.value?,
34434 })
34435 }
34436 }
34437 impl ::std::convert::From<super::PostGetCompressedAccountV2ResponseResult>
34438 for PostGetCompressedAccountV2ResponseResult {
34439 fn from(value: super::PostGetCompressedAccountV2ResponseResult) -> Self {
34440 Self {
34441 context: Ok(value.context),
34442 value: Ok(value.value),
34443 }
34444 }
34445 }
34446 #[derive(Clone, Debug)]
34447 pub struct PostGetCompressedAccountsByOwnerBody {
34448 id: ::std::result::Result<
34449 super::PostGetCompressedAccountsByOwnerBodyId,
34450 ::std::string::String,
34451 >,
34452 jsonrpc: ::std::result::Result<
34453 super::PostGetCompressedAccountsByOwnerBodyJsonrpc,
34454 ::std::string::String,
34455 >,
34456 method: ::std::result::Result<
34457 super::PostGetCompressedAccountsByOwnerBodyMethod,
34458 ::std::string::String,
34459 >,
34460 params: ::std::result::Result<
34461 super::PostGetCompressedAccountsByOwnerBodyParams,
34462 ::std::string::String,
34463 >,
34464 }
34465 impl ::std::default::Default for PostGetCompressedAccountsByOwnerBody {
34466 fn default() -> Self {
34467 Self {
34468 id: Err("no value supplied for id".to_string()),
34469 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
34470 method: Err("no value supplied for method".to_string()),
34471 params: Err("no value supplied for params".to_string()),
34472 }
34473 }
34474 }
34475 impl PostGetCompressedAccountsByOwnerBody {
34476 pub fn id<T>(mut self, value: T) -> Self
34477 where
34478 T: ::std::convert::TryInto<
34479 super::PostGetCompressedAccountsByOwnerBodyId,
34480 >,
34481 T::Error: ::std::fmt::Display,
34482 {
34483 self.id = value
34484 .try_into()
34485 .map_err(|e| format!("error converting supplied value for id: {e}"));
34486 self
34487 }
34488 pub fn jsonrpc<T>(mut self, value: T) -> Self
34489 where
34490 T: ::std::convert::TryInto<
34491 super::PostGetCompressedAccountsByOwnerBodyJsonrpc,
34492 >,
34493 T::Error: ::std::fmt::Display,
34494 {
34495 self.jsonrpc = value
34496 .try_into()
34497 .map_err(|e| {
34498 format!("error converting supplied value for jsonrpc: {e}")
34499 });
34500 self
34501 }
34502 pub fn method<T>(mut self, value: T) -> Self
34503 where
34504 T: ::std::convert::TryInto<
34505 super::PostGetCompressedAccountsByOwnerBodyMethod,
34506 >,
34507 T::Error: ::std::fmt::Display,
34508 {
34509 self.method = value
34510 .try_into()
34511 .map_err(|e| {
34512 format!("error converting supplied value for method: {e}")
34513 });
34514 self
34515 }
34516 pub fn params<T>(mut self, value: T) -> Self
34517 where
34518 T: ::std::convert::TryInto<
34519 super::PostGetCompressedAccountsByOwnerBodyParams,
34520 >,
34521 T::Error: ::std::fmt::Display,
34522 {
34523 self.params = value
34524 .try_into()
34525 .map_err(|e| {
34526 format!("error converting supplied value for params: {e}")
34527 });
34528 self
34529 }
34530 }
34531 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerBody>
34532 for super::PostGetCompressedAccountsByOwnerBody {
34533 type Error = super::error::ConversionError;
34534 fn try_from(
34535 value: PostGetCompressedAccountsByOwnerBody,
34536 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34537 Ok(Self {
34538 id: value.id?,
34539 jsonrpc: value.jsonrpc?,
34540 method: value.method?,
34541 params: value.params?,
34542 })
34543 }
34544 }
34545 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerBody>
34546 for PostGetCompressedAccountsByOwnerBody {
34547 fn from(value: super::PostGetCompressedAccountsByOwnerBody) -> Self {
34548 Self {
34549 id: Ok(value.id),
34550 jsonrpc: Ok(value.jsonrpc),
34551 method: Ok(value.method),
34552 params: Ok(value.params),
34553 }
34554 }
34555 }
34556 #[derive(Clone, Debug)]
34557 pub struct PostGetCompressedAccountsByOwnerBodyParams {
34558 cursor: ::std::result::Result<
34559 ::std::option::Option<super::Hash>,
34560 ::std::string::String,
34561 >,
34562 data_slice: ::std::result::Result<
34563 ::std::option::Option<super::DataSlice>,
34564 ::std::string::String,
34565 >,
34566 filters: ::std::result::Result<
34567 ::std::vec::Vec<super::FilterSelector>,
34568 ::std::string::String,
34569 >,
34570 limit: ::std::result::Result<
34571 ::std::option::Option<super::Limit>,
34572 ::std::string::String,
34573 >,
34574 owner: ::std::result::Result<
34575 super::SerializablePubkey,
34576 ::std::string::String,
34577 >,
34578 }
34579 impl ::std::default::Default for PostGetCompressedAccountsByOwnerBodyParams {
34580 fn default() -> Self {
34581 Self {
34582 cursor: Ok(Default::default()),
34583 data_slice: Ok(Default::default()),
34584 filters: Ok(Default::default()),
34585 limit: Ok(Default::default()),
34586 owner: Err("no value supplied for owner".to_string()),
34587 }
34588 }
34589 }
34590 impl PostGetCompressedAccountsByOwnerBodyParams {
34591 pub fn cursor<T>(mut self, value: T) -> Self
34592 where
34593 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
34594 T::Error: ::std::fmt::Display,
34595 {
34596 self.cursor = value
34597 .try_into()
34598 .map_err(|e| {
34599 format!("error converting supplied value for cursor: {e}")
34600 });
34601 self
34602 }
34603 pub fn data_slice<T>(mut self, value: T) -> Self
34604 where
34605 T: ::std::convert::TryInto<::std::option::Option<super::DataSlice>>,
34606 T::Error: ::std::fmt::Display,
34607 {
34608 self.data_slice = value
34609 .try_into()
34610 .map_err(|e| {
34611 format!("error converting supplied value for data_slice: {e}")
34612 });
34613 self
34614 }
34615 pub fn filters<T>(mut self, value: T) -> Self
34616 where
34617 T: ::std::convert::TryInto<::std::vec::Vec<super::FilterSelector>>,
34618 T::Error: ::std::fmt::Display,
34619 {
34620 self.filters = value
34621 .try_into()
34622 .map_err(|e| {
34623 format!("error converting supplied value for filters: {e}")
34624 });
34625 self
34626 }
34627 pub fn limit<T>(mut self, value: T) -> Self
34628 where
34629 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
34630 T::Error: ::std::fmt::Display,
34631 {
34632 self.limit = value
34633 .try_into()
34634 .map_err(|e| {
34635 format!("error converting supplied value for limit: {e}")
34636 });
34637 self
34638 }
34639 pub fn owner<T>(mut self, value: T) -> Self
34640 where
34641 T: ::std::convert::TryInto<super::SerializablePubkey>,
34642 T::Error: ::std::fmt::Display,
34643 {
34644 self.owner = value
34645 .try_into()
34646 .map_err(|e| {
34647 format!("error converting supplied value for owner: {e}")
34648 });
34649 self
34650 }
34651 }
34652 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerBodyParams>
34653 for super::PostGetCompressedAccountsByOwnerBodyParams {
34654 type Error = super::error::ConversionError;
34655 fn try_from(
34656 value: PostGetCompressedAccountsByOwnerBodyParams,
34657 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34658 Ok(Self {
34659 cursor: value.cursor?,
34660 data_slice: value.data_slice?,
34661 filters: value.filters?,
34662 limit: value.limit?,
34663 owner: value.owner?,
34664 })
34665 }
34666 }
34667 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerBodyParams>
34668 for PostGetCompressedAccountsByOwnerBodyParams {
34669 fn from(value: super::PostGetCompressedAccountsByOwnerBodyParams) -> Self {
34670 Self {
34671 cursor: Ok(value.cursor),
34672 data_slice: Ok(value.data_slice),
34673 filters: Ok(value.filters),
34674 limit: Ok(value.limit),
34675 owner: Ok(value.owner),
34676 }
34677 }
34678 }
34679 #[derive(Clone, Debug)]
34680 pub struct PostGetCompressedAccountsByOwnerResponse {
34681 error: ::std::result::Result<
34682 ::std::option::Option<
34683 super::PostGetCompressedAccountsByOwnerResponseError,
34684 >,
34685 ::std::string::String,
34686 >,
34687 id: ::std::result::Result<
34688 super::PostGetCompressedAccountsByOwnerResponseId,
34689 ::std::string::String,
34690 >,
34691 jsonrpc: ::std::result::Result<
34692 super::PostGetCompressedAccountsByOwnerResponseJsonrpc,
34693 ::std::string::String,
34694 >,
34695 result: ::std::result::Result<
34696 ::std::option::Option<
34697 super::PostGetCompressedAccountsByOwnerResponseResult,
34698 >,
34699 ::std::string::String,
34700 >,
34701 }
34702 impl ::std::default::Default for PostGetCompressedAccountsByOwnerResponse {
34703 fn default() -> Self {
34704 Self {
34705 error: Ok(Default::default()),
34706 id: Err("no value supplied for id".to_string()),
34707 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
34708 result: Ok(Default::default()),
34709 }
34710 }
34711 }
34712 impl PostGetCompressedAccountsByOwnerResponse {
34713 pub fn error<T>(mut self, value: T) -> Self
34714 where
34715 T: ::std::convert::TryInto<
34716 ::std::option::Option<
34717 super::PostGetCompressedAccountsByOwnerResponseError,
34718 >,
34719 >,
34720 T::Error: ::std::fmt::Display,
34721 {
34722 self.error = value
34723 .try_into()
34724 .map_err(|e| {
34725 format!("error converting supplied value for error: {e}")
34726 });
34727 self
34728 }
34729 pub fn id<T>(mut self, value: T) -> Self
34730 where
34731 T: ::std::convert::TryInto<
34732 super::PostGetCompressedAccountsByOwnerResponseId,
34733 >,
34734 T::Error: ::std::fmt::Display,
34735 {
34736 self.id = value
34737 .try_into()
34738 .map_err(|e| format!("error converting supplied value for id: {e}"));
34739 self
34740 }
34741 pub fn jsonrpc<T>(mut self, value: T) -> Self
34742 where
34743 T: ::std::convert::TryInto<
34744 super::PostGetCompressedAccountsByOwnerResponseJsonrpc,
34745 >,
34746 T::Error: ::std::fmt::Display,
34747 {
34748 self.jsonrpc = value
34749 .try_into()
34750 .map_err(|e| {
34751 format!("error converting supplied value for jsonrpc: {e}")
34752 });
34753 self
34754 }
34755 pub fn result<T>(mut self, value: T) -> Self
34756 where
34757 T: ::std::convert::TryInto<
34758 ::std::option::Option<
34759 super::PostGetCompressedAccountsByOwnerResponseResult,
34760 >,
34761 >,
34762 T::Error: ::std::fmt::Display,
34763 {
34764 self.result = value
34765 .try_into()
34766 .map_err(|e| {
34767 format!("error converting supplied value for result: {e}")
34768 });
34769 self
34770 }
34771 }
34772 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerResponse>
34773 for super::PostGetCompressedAccountsByOwnerResponse {
34774 type Error = super::error::ConversionError;
34775 fn try_from(
34776 value: PostGetCompressedAccountsByOwnerResponse,
34777 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34778 Ok(Self {
34779 error: value.error?,
34780 id: value.id?,
34781 jsonrpc: value.jsonrpc?,
34782 result: value.result?,
34783 })
34784 }
34785 }
34786 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerResponse>
34787 for PostGetCompressedAccountsByOwnerResponse {
34788 fn from(value: super::PostGetCompressedAccountsByOwnerResponse) -> Self {
34789 Self {
34790 error: Ok(value.error),
34791 id: Ok(value.id),
34792 jsonrpc: Ok(value.jsonrpc),
34793 result: Ok(value.result),
34794 }
34795 }
34796 }
34797 #[derive(Clone, Debug)]
34798 pub struct PostGetCompressedAccountsByOwnerResponseError {
34799 code: ::std::result::Result<
34800 ::std::option::Option<i64>,
34801 ::std::string::String,
34802 >,
34803 message: ::std::result::Result<
34804 ::std::option::Option<::std::string::String>,
34805 ::std::string::String,
34806 >,
34807 }
34808 impl ::std::default::Default for PostGetCompressedAccountsByOwnerResponseError {
34809 fn default() -> Self {
34810 Self {
34811 code: Ok(Default::default()),
34812 message: Ok(Default::default()),
34813 }
34814 }
34815 }
34816 impl PostGetCompressedAccountsByOwnerResponseError {
34817 pub fn code<T>(mut self, value: T) -> Self
34818 where
34819 T: ::std::convert::TryInto<::std::option::Option<i64>>,
34820 T::Error: ::std::fmt::Display,
34821 {
34822 self.code = value
34823 .try_into()
34824 .map_err(|e| {
34825 format!("error converting supplied value for code: {e}")
34826 });
34827 self
34828 }
34829 pub fn message<T>(mut self, value: T) -> Self
34830 where
34831 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
34832 T::Error: ::std::fmt::Display,
34833 {
34834 self.message = value
34835 .try_into()
34836 .map_err(|e| {
34837 format!("error converting supplied value for message: {e}")
34838 });
34839 self
34840 }
34841 }
34842 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerResponseError>
34843 for super::PostGetCompressedAccountsByOwnerResponseError {
34844 type Error = super::error::ConversionError;
34845 fn try_from(
34846 value: PostGetCompressedAccountsByOwnerResponseError,
34847 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34848 Ok(Self {
34849 code: value.code?,
34850 message: value.message?,
34851 })
34852 }
34853 }
34854 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerResponseError>
34855 for PostGetCompressedAccountsByOwnerResponseError {
34856 fn from(
34857 value: super::PostGetCompressedAccountsByOwnerResponseError,
34858 ) -> Self {
34859 Self {
34860 code: Ok(value.code),
34861 message: Ok(value.message),
34862 }
34863 }
34864 }
34865 #[derive(Clone, Debug)]
34866 pub struct PostGetCompressedAccountsByOwnerResponseResult {
34867 context: ::std::result::Result<super::Context, ::std::string::String>,
34868 value: ::std::result::Result<
34869 super::PaginatedAccountList,
34870 ::std::string::String,
34871 >,
34872 }
34873 impl ::std::default::Default for PostGetCompressedAccountsByOwnerResponseResult {
34874 fn default() -> Self {
34875 Self {
34876 context: Err("no value supplied for context".to_string()),
34877 value: Err("no value supplied for value".to_string()),
34878 }
34879 }
34880 }
34881 impl PostGetCompressedAccountsByOwnerResponseResult {
34882 pub fn context<T>(mut self, value: T) -> Self
34883 where
34884 T: ::std::convert::TryInto<super::Context>,
34885 T::Error: ::std::fmt::Display,
34886 {
34887 self.context = value
34888 .try_into()
34889 .map_err(|e| {
34890 format!("error converting supplied value for context: {e}")
34891 });
34892 self
34893 }
34894 pub fn value<T>(mut self, value: T) -> Self
34895 where
34896 T: ::std::convert::TryInto<super::PaginatedAccountList>,
34897 T::Error: ::std::fmt::Display,
34898 {
34899 self.value = value
34900 .try_into()
34901 .map_err(|e| {
34902 format!("error converting supplied value for value: {e}")
34903 });
34904 self
34905 }
34906 }
34907 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerResponseResult>
34908 for super::PostGetCompressedAccountsByOwnerResponseResult {
34909 type Error = super::error::ConversionError;
34910 fn try_from(
34911 value: PostGetCompressedAccountsByOwnerResponseResult,
34912 ) -> ::std::result::Result<Self, super::error::ConversionError> {
34913 Ok(Self {
34914 context: value.context?,
34915 value: value.value?,
34916 })
34917 }
34918 }
34919 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerResponseResult>
34920 for PostGetCompressedAccountsByOwnerResponseResult {
34921 fn from(
34922 value: super::PostGetCompressedAccountsByOwnerResponseResult,
34923 ) -> Self {
34924 Self {
34925 context: Ok(value.context),
34926 value: Ok(value.value),
34927 }
34928 }
34929 }
34930 #[derive(Clone, Debug)]
34931 pub struct PostGetCompressedAccountsByOwnerV2Body {
34932 id: ::std::result::Result<
34933 super::PostGetCompressedAccountsByOwnerV2BodyId,
34934 ::std::string::String,
34935 >,
34936 jsonrpc: ::std::result::Result<
34937 super::PostGetCompressedAccountsByOwnerV2BodyJsonrpc,
34938 ::std::string::String,
34939 >,
34940 method: ::std::result::Result<
34941 super::PostGetCompressedAccountsByOwnerV2BodyMethod,
34942 ::std::string::String,
34943 >,
34944 params: ::std::result::Result<
34945 super::PostGetCompressedAccountsByOwnerV2BodyParams,
34946 ::std::string::String,
34947 >,
34948 }
34949 impl ::std::default::Default for PostGetCompressedAccountsByOwnerV2Body {
34950 fn default() -> Self {
34951 Self {
34952 id: Err("no value supplied for id".to_string()),
34953 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
34954 method: Err("no value supplied for method".to_string()),
34955 params: Err("no value supplied for params".to_string()),
34956 }
34957 }
34958 }
34959 impl PostGetCompressedAccountsByOwnerV2Body {
34960 pub fn id<T>(mut self, value: T) -> Self
34961 where
34962 T: ::std::convert::TryInto<
34963 super::PostGetCompressedAccountsByOwnerV2BodyId,
34964 >,
34965 T::Error: ::std::fmt::Display,
34966 {
34967 self.id = value
34968 .try_into()
34969 .map_err(|e| format!("error converting supplied value for id: {e}"));
34970 self
34971 }
34972 pub fn jsonrpc<T>(mut self, value: T) -> Self
34973 where
34974 T: ::std::convert::TryInto<
34975 super::PostGetCompressedAccountsByOwnerV2BodyJsonrpc,
34976 >,
34977 T::Error: ::std::fmt::Display,
34978 {
34979 self.jsonrpc = value
34980 .try_into()
34981 .map_err(|e| {
34982 format!("error converting supplied value for jsonrpc: {e}")
34983 });
34984 self
34985 }
34986 pub fn method<T>(mut self, value: T) -> Self
34987 where
34988 T: ::std::convert::TryInto<
34989 super::PostGetCompressedAccountsByOwnerV2BodyMethod,
34990 >,
34991 T::Error: ::std::fmt::Display,
34992 {
34993 self.method = value
34994 .try_into()
34995 .map_err(|e| {
34996 format!("error converting supplied value for method: {e}")
34997 });
34998 self
34999 }
35000 pub fn params<T>(mut self, value: T) -> Self
35001 where
35002 T: ::std::convert::TryInto<
35003 super::PostGetCompressedAccountsByOwnerV2BodyParams,
35004 >,
35005 T::Error: ::std::fmt::Display,
35006 {
35007 self.params = value
35008 .try_into()
35009 .map_err(|e| {
35010 format!("error converting supplied value for params: {e}")
35011 });
35012 self
35013 }
35014 }
35015 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerV2Body>
35016 for super::PostGetCompressedAccountsByOwnerV2Body {
35017 type Error = super::error::ConversionError;
35018 fn try_from(
35019 value: PostGetCompressedAccountsByOwnerV2Body,
35020 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35021 Ok(Self {
35022 id: value.id?,
35023 jsonrpc: value.jsonrpc?,
35024 method: value.method?,
35025 params: value.params?,
35026 })
35027 }
35028 }
35029 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerV2Body>
35030 for PostGetCompressedAccountsByOwnerV2Body {
35031 fn from(value: super::PostGetCompressedAccountsByOwnerV2Body) -> Self {
35032 Self {
35033 id: Ok(value.id),
35034 jsonrpc: Ok(value.jsonrpc),
35035 method: Ok(value.method),
35036 params: Ok(value.params),
35037 }
35038 }
35039 }
35040 #[derive(Clone, Debug)]
35041 pub struct PostGetCompressedAccountsByOwnerV2BodyParams {
35042 cursor: ::std::result::Result<
35043 ::std::option::Option<super::Hash>,
35044 ::std::string::String,
35045 >,
35046 data_slice: ::std::result::Result<
35047 ::std::option::Option<super::DataSlice>,
35048 ::std::string::String,
35049 >,
35050 filters: ::std::result::Result<
35051 ::std::vec::Vec<super::FilterSelector>,
35052 ::std::string::String,
35053 >,
35054 limit: ::std::result::Result<
35055 ::std::option::Option<super::Limit>,
35056 ::std::string::String,
35057 >,
35058 owner: ::std::result::Result<
35059 super::SerializablePubkey,
35060 ::std::string::String,
35061 >,
35062 }
35063 impl ::std::default::Default for PostGetCompressedAccountsByOwnerV2BodyParams {
35064 fn default() -> Self {
35065 Self {
35066 cursor: Ok(Default::default()),
35067 data_slice: Ok(Default::default()),
35068 filters: Ok(Default::default()),
35069 limit: Ok(Default::default()),
35070 owner: Err("no value supplied for owner".to_string()),
35071 }
35072 }
35073 }
35074 impl PostGetCompressedAccountsByOwnerV2BodyParams {
35075 pub fn cursor<T>(mut self, value: T) -> Self
35076 where
35077 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
35078 T::Error: ::std::fmt::Display,
35079 {
35080 self.cursor = value
35081 .try_into()
35082 .map_err(|e| {
35083 format!("error converting supplied value for cursor: {e}")
35084 });
35085 self
35086 }
35087 pub fn data_slice<T>(mut self, value: T) -> Self
35088 where
35089 T: ::std::convert::TryInto<::std::option::Option<super::DataSlice>>,
35090 T::Error: ::std::fmt::Display,
35091 {
35092 self.data_slice = value
35093 .try_into()
35094 .map_err(|e| {
35095 format!("error converting supplied value for data_slice: {e}")
35096 });
35097 self
35098 }
35099 pub fn filters<T>(mut self, value: T) -> Self
35100 where
35101 T: ::std::convert::TryInto<::std::vec::Vec<super::FilterSelector>>,
35102 T::Error: ::std::fmt::Display,
35103 {
35104 self.filters = value
35105 .try_into()
35106 .map_err(|e| {
35107 format!("error converting supplied value for filters: {e}")
35108 });
35109 self
35110 }
35111 pub fn limit<T>(mut self, value: T) -> Self
35112 where
35113 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
35114 T::Error: ::std::fmt::Display,
35115 {
35116 self.limit = value
35117 .try_into()
35118 .map_err(|e| {
35119 format!("error converting supplied value for limit: {e}")
35120 });
35121 self
35122 }
35123 pub fn owner<T>(mut self, value: T) -> Self
35124 where
35125 T: ::std::convert::TryInto<super::SerializablePubkey>,
35126 T::Error: ::std::fmt::Display,
35127 {
35128 self.owner = value
35129 .try_into()
35130 .map_err(|e| {
35131 format!("error converting supplied value for owner: {e}")
35132 });
35133 self
35134 }
35135 }
35136 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerV2BodyParams>
35137 for super::PostGetCompressedAccountsByOwnerV2BodyParams {
35138 type Error = super::error::ConversionError;
35139 fn try_from(
35140 value: PostGetCompressedAccountsByOwnerV2BodyParams,
35141 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35142 Ok(Self {
35143 cursor: value.cursor?,
35144 data_slice: value.data_slice?,
35145 filters: value.filters?,
35146 limit: value.limit?,
35147 owner: value.owner?,
35148 })
35149 }
35150 }
35151 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerV2BodyParams>
35152 for PostGetCompressedAccountsByOwnerV2BodyParams {
35153 fn from(value: super::PostGetCompressedAccountsByOwnerV2BodyParams) -> Self {
35154 Self {
35155 cursor: Ok(value.cursor),
35156 data_slice: Ok(value.data_slice),
35157 filters: Ok(value.filters),
35158 limit: Ok(value.limit),
35159 owner: Ok(value.owner),
35160 }
35161 }
35162 }
35163 #[derive(Clone, Debug)]
35164 pub struct PostGetCompressedAccountsByOwnerV2Response {
35165 error: ::std::result::Result<
35166 ::std::option::Option<
35167 super::PostGetCompressedAccountsByOwnerV2ResponseError,
35168 >,
35169 ::std::string::String,
35170 >,
35171 id: ::std::result::Result<
35172 super::PostGetCompressedAccountsByOwnerV2ResponseId,
35173 ::std::string::String,
35174 >,
35175 jsonrpc: ::std::result::Result<
35176 super::PostGetCompressedAccountsByOwnerV2ResponseJsonrpc,
35177 ::std::string::String,
35178 >,
35179 result: ::std::result::Result<
35180 ::std::option::Option<
35181 super::PostGetCompressedAccountsByOwnerV2ResponseResult,
35182 >,
35183 ::std::string::String,
35184 >,
35185 }
35186 impl ::std::default::Default for PostGetCompressedAccountsByOwnerV2Response {
35187 fn default() -> Self {
35188 Self {
35189 error: Ok(Default::default()),
35190 id: Err("no value supplied for id".to_string()),
35191 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
35192 result: Ok(Default::default()),
35193 }
35194 }
35195 }
35196 impl PostGetCompressedAccountsByOwnerV2Response {
35197 pub fn error<T>(mut self, value: T) -> Self
35198 where
35199 T: ::std::convert::TryInto<
35200 ::std::option::Option<
35201 super::PostGetCompressedAccountsByOwnerV2ResponseError,
35202 >,
35203 >,
35204 T::Error: ::std::fmt::Display,
35205 {
35206 self.error = value
35207 .try_into()
35208 .map_err(|e| {
35209 format!("error converting supplied value for error: {e}")
35210 });
35211 self
35212 }
35213 pub fn id<T>(mut self, value: T) -> Self
35214 where
35215 T: ::std::convert::TryInto<
35216 super::PostGetCompressedAccountsByOwnerV2ResponseId,
35217 >,
35218 T::Error: ::std::fmt::Display,
35219 {
35220 self.id = value
35221 .try_into()
35222 .map_err(|e| format!("error converting supplied value for id: {e}"));
35223 self
35224 }
35225 pub fn jsonrpc<T>(mut self, value: T) -> Self
35226 where
35227 T: ::std::convert::TryInto<
35228 super::PostGetCompressedAccountsByOwnerV2ResponseJsonrpc,
35229 >,
35230 T::Error: ::std::fmt::Display,
35231 {
35232 self.jsonrpc = value
35233 .try_into()
35234 .map_err(|e| {
35235 format!("error converting supplied value for jsonrpc: {e}")
35236 });
35237 self
35238 }
35239 pub fn result<T>(mut self, value: T) -> Self
35240 where
35241 T: ::std::convert::TryInto<
35242 ::std::option::Option<
35243 super::PostGetCompressedAccountsByOwnerV2ResponseResult,
35244 >,
35245 >,
35246 T::Error: ::std::fmt::Display,
35247 {
35248 self.result = value
35249 .try_into()
35250 .map_err(|e| {
35251 format!("error converting supplied value for result: {e}")
35252 });
35253 self
35254 }
35255 }
35256 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerV2Response>
35257 for super::PostGetCompressedAccountsByOwnerV2Response {
35258 type Error = super::error::ConversionError;
35259 fn try_from(
35260 value: PostGetCompressedAccountsByOwnerV2Response,
35261 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35262 Ok(Self {
35263 error: value.error?,
35264 id: value.id?,
35265 jsonrpc: value.jsonrpc?,
35266 result: value.result?,
35267 })
35268 }
35269 }
35270 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerV2Response>
35271 for PostGetCompressedAccountsByOwnerV2Response {
35272 fn from(value: super::PostGetCompressedAccountsByOwnerV2Response) -> Self {
35273 Self {
35274 error: Ok(value.error),
35275 id: Ok(value.id),
35276 jsonrpc: Ok(value.jsonrpc),
35277 result: Ok(value.result),
35278 }
35279 }
35280 }
35281 #[derive(Clone, Debug)]
35282 pub struct PostGetCompressedAccountsByOwnerV2ResponseError {
35283 code: ::std::result::Result<
35284 ::std::option::Option<i64>,
35285 ::std::string::String,
35286 >,
35287 message: ::std::result::Result<
35288 ::std::option::Option<::std::string::String>,
35289 ::std::string::String,
35290 >,
35291 }
35292 impl ::std::default::Default
35293 for PostGetCompressedAccountsByOwnerV2ResponseError {
35294 fn default() -> Self {
35295 Self {
35296 code: Ok(Default::default()),
35297 message: Ok(Default::default()),
35298 }
35299 }
35300 }
35301 impl PostGetCompressedAccountsByOwnerV2ResponseError {
35302 pub fn code<T>(mut self, value: T) -> Self
35303 where
35304 T: ::std::convert::TryInto<::std::option::Option<i64>>,
35305 T::Error: ::std::fmt::Display,
35306 {
35307 self.code = value
35308 .try_into()
35309 .map_err(|e| {
35310 format!("error converting supplied value for code: {e}")
35311 });
35312 self
35313 }
35314 pub fn message<T>(mut self, value: T) -> Self
35315 where
35316 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
35317 T::Error: ::std::fmt::Display,
35318 {
35319 self.message = value
35320 .try_into()
35321 .map_err(|e| {
35322 format!("error converting supplied value for message: {e}")
35323 });
35324 self
35325 }
35326 }
35327 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerV2ResponseError>
35328 for super::PostGetCompressedAccountsByOwnerV2ResponseError {
35329 type Error = super::error::ConversionError;
35330 fn try_from(
35331 value: PostGetCompressedAccountsByOwnerV2ResponseError,
35332 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35333 Ok(Self {
35334 code: value.code?,
35335 message: value.message?,
35336 })
35337 }
35338 }
35339 impl ::std::convert::From<super::PostGetCompressedAccountsByOwnerV2ResponseError>
35340 for PostGetCompressedAccountsByOwnerV2ResponseError {
35341 fn from(
35342 value: super::PostGetCompressedAccountsByOwnerV2ResponseError,
35343 ) -> Self {
35344 Self {
35345 code: Ok(value.code),
35346 message: Ok(value.message),
35347 }
35348 }
35349 }
35350 #[derive(Clone, Debug)]
35351 pub struct PostGetCompressedAccountsByOwnerV2ResponseResult {
35352 context: ::std::result::Result<super::Context, ::std::string::String>,
35353 value: ::std::result::Result<
35354 super::PaginatedAccountListV2,
35355 ::std::string::String,
35356 >,
35357 }
35358 impl ::std::default::Default
35359 for PostGetCompressedAccountsByOwnerV2ResponseResult {
35360 fn default() -> Self {
35361 Self {
35362 context: Err("no value supplied for context".to_string()),
35363 value: Err("no value supplied for value".to_string()),
35364 }
35365 }
35366 }
35367 impl PostGetCompressedAccountsByOwnerV2ResponseResult {
35368 pub fn context<T>(mut self, value: T) -> Self
35369 where
35370 T: ::std::convert::TryInto<super::Context>,
35371 T::Error: ::std::fmt::Display,
35372 {
35373 self.context = value
35374 .try_into()
35375 .map_err(|e| {
35376 format!("error converting supplied value for context: {e}")
35377 });
35378 self
35379 }
35380 pub fn value<T>(mut self, value: T) -> Self
35381 where
35382 T: ::std::convert::TryInto<super::PaginatedAccountListV2>,
35383 T::Error: ::std::fmt::Display,
35384 {
35385 self.value = value
35386 .try_into()
35387 .map_err(|e| {
35388 format!("error converting supplied value for value: {e}")
35389 });
35390 self
35391 }
35392 }
35393 impl ::std::convert::TryFrom<PostGetCompressedAccountsByOwnerV2ResponseResult>
35394 for super::PostGetCompressedAccountsByOwnerV2ResponseResult {
35395 type Error = super::error::ConversionError;
35396 fn try_from(
35397 value: PostGetCompressedAccountsByOwnerV2ResponseResult,
35398 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35399 Ok(Self {
35400 context: value.context?,
35401 value: value.value?,
35402 })
35403 }
35404 }
35405 impl ::std::convert::From<
35406 super::PostGetCompressedAccountsByOwnerV2ResponseResult,
35407 > for PostGetCompressedAccountsByOwnerV2ResponseResult {
35408 fn from(
35409 value: super::PostGetCompressedAccountsByOwnerV2ResponseResult,
35410 ) -> Self {
35411 Self {
35412 context: Ok(value.context),
35413 value: Ok(value.value),
35414 }
35415 }
35416 }
35417 #[derive(Clone, Debug)]
35418 pub struct PostGetCompressedBalanceByOwnerBody {
35419 id: ::std::result::Result<
35420 super::PostGetCompressedBalanceByOwnerBodyId,
35421 ::std::string::String,
35422 >,
35423 jsonrpc: ::std::result::Result<
35424 super::PostGetCompressedBalanceByOwnerBodyJsonrpc,
35425 ::std::string::String,
35426 >,
35427 method: ::std::result::Result<
35428 super::PostGetCompressedBalanceByOwnerBodyMethod,
35429 ::std::string::String,
35430 >,
35431 params: ::std::result::Result<
35432 super::PostGetCompressedBalanceByOwnerBodyParams,
35433 ::std::string::String,
35434 >,
35435 }
35436 impl ::std::default::Default for PostGetCompressedBalanceByOwnerBody {
35437 fn default() -> Self {
35438 Self {
35439 id: Err("no value supplied for id".to_string()),
35440 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
35441 method: Err("no value supplied for method".to_string()),
35442 params: Err("no value supplied for params".to_string()),
35443 }
35444 }
35445 }
35446 impl PostGetCompressedBalanceByOwnerBody {
35447 pub fn id<T>(mut self, value: T) -> Self
35448 where
35449 T: ::std::convert::TryInto<super::PostGetCompressedBalanceByOwnerBodyId>,
35450 T::Error: ::std::fmt::Display,
35451 {
35452 self.id = value
35453 .try_into()
35454 .map_err(|e| format!("error converting supplied value for id: {e}"));
35455 self
35456 }
35457 pub fn jsonrpc<T>(mut self, value: T) -> Self
35458 where
35459 T: ::std::convert::TryInto<
35460 super::PostGetCompressedBalanceByOwnerBodyJsonrpc,
35461 >,
35462 T::Error: ::std::fmt::Display,
35463 {
35464 self.jsonrpc = value
35465 .try_into()
35466 .map_err(|e| {
35467 format!("error converting supplied value for jsonrpc: {e}")
35468 });
35469 self
35470 }
35471 pub fn method<T>(mut self, value: T) -> Self
35472 where
35473 T: ::std::convert::TryInto<
35474 super::PostGetCompressedBalanceByOwnerBodyMethod,
35475 >,
35476 T::Error: ::std::fmt::Display,
35477 {
35478 self.method = value
35479 .try_into()
35480 .map_err(|e| {
35481 format!("error converting supplied value for method: {e}")
35482 });
35483 self
35484 }
35485 pub fn params<T>(mut self, value: T) -> Self
35486 where
35487 T: ::std::convert::TryInto<
35488 super::PostGetCompressedBalanceByOwnerBodyParams,
35489 >,
35490 T::Error: ::std::fmt::Display,
35491 {
35492 self.params = value
35493 .try_into()
35494 .map_err(|e| {
35495 format!("error converting supplied value for params: {e}")
35496 });
35497 self
35498 }
35499 }
35500 impl ::std::convert::TryFrom<PostGetCompressedBalanceByOwnerBody>
35501 for super::PostGetCompressedBalanceByOwnerBody {
35502 type Error = super::error::ConversionError;
35503 fn try_from(
35504 value: PostGetCompressedBalanceByOwnerBody,
35505 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35506 Ok(Self {
35507 id: value.id?,
35508 jsonrpc: value.jsonrpc?,
35509 method: value.method?,
35510 params: value.params?,
35511 })
35512 }
35513 }
35514 impl ::std::convert::From<super::PostGetCompressedBalanceByOwnerBody>
35515 for PostGetCompressedBalanceByOwnerBody {
35516 fn from(value: super::PostGetCompressedBalanceByOwnerBody) -> Self {
35517 Self {
35518 id: Ok(value.id),
35519 jsonrpc: Ok(value.jsonrpc),
35520 method: Ok(value.method),
35521 params: Ok(value.params),
35522 }
35523 }
35524 }
35525 #[derive(Clone, Debug)]
35526 pub struct PostGetCompressedBalanceByOwnerBodyParams {
35527 owner: ::std::result::Result<
35528 super::SerializablePubkey,
35529 ::std::string::String,
35530 >,
35531 }
35532 impl ::std::default::Default for PostGetCompressedBalanceByOwnerBodyParams {
35533 fn default() -> Self {
35534 Self {
35535 owner: Err("no value supplied for owner".to_string()),
35536 }
35537 }
35538 }
35539 impl PostGetCompressedBalanceByOwnerBodyParams {
35540 pub fn owner<T>(mut self, value: T) -> Self
35541 where
35542 T: ::std::convert::TryInto<super::SerializablePubkey>,
35543 T::Error: ::std::fmt::Display,
35544 {
35545 self.owner = value
35546 .try_into()
35547 .map_err(|e| {
35548 format!("error converting supplied value for owner: {e}")
35549 });
35550 self
35551 }
35552 }
35553 impl ::std::convert::TryFrom<PostGetCompressedBalanceByOwnerBodyParams>
35554 for super::PostGetCompressedBalanceByOwnerBodyParams {
35555 type Error = super::error::ConversionError;
35556 fn try_from(
35557 value: PostGetCompressedBalanceByOwnerBodyParams,
35558 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35559 Ok(Self { owner: value.owner? })
35560 }
35561 }
35562 impl ::std::convert::From<super::PostGetCompressedBalanceByOwnerBodyParams>
35563 for PostGetCompressedBalanceByOwnerBodyParams {
35564 fn from(value: super::PostGetCompressedBalanceByOwnerBodyParams) -> Self {
35565 Self { owner: Ok(value.owner) }
35566 }
35567 }
35568 #[derive(Clone, Debug)]
35569 pub struct PostGetCompressedBalanceByOwnerResponse {
35570 error: ::std::result::Result<
35571 ::std::option::Option<
35572 super::PostGetCompressedBalanceByOwnerResponseError,
35573 >,
35574 ::std::string::String,
35575 >,
35576 id: ::std::result::Result<
35577 super::PostGetCompressedBalanceByOwnerResponseId,
35578 ::std::string::String,
35579 >,
35580 jsonrpc: ::std::result::Result<
35581 super::PostGetCompressedBalanceByOwnerResponseJsonrpc,
35582 ::std::string::String,
35583 >,
35584 result: ::std::result::Result<
35585 ::std::option::Option<
35586 super::PostGetCompressedBalanceByOwnerResponseResult,
35587 >,
35588 ::std::string::String,
35589 >,
35590 }
35591 impl ::std::default::Default for PostGetCompressedBalanceByOwnerResponse {
35592 fn default() -> Self {
35593 Self {
35594 error: Ok(Default::default()),
35595 id: Err("no value supplied for id".to_string()),
35596 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
35597 result: Ok(Default::default()),
35598 }
35599 }
35600 }
35601 impl PostGetCompressedBalanceByOwnerResponse {
35602 pub fn error<T>(mut self, value: T) -> Self
35603 where
35604 T: ::std::convert::TryInto<
35605 ::std::option::Option<
35606 super::PostGetCompressedBalanceByOwnerResponseError,
35607 >,
35608 >,
35609 T::Error: ::std::fmt::Display,
35610 {
35611 self.error = value
35612 .try_into()
35613 .map_err(|e| {
35614 format!("error converting supplied value for error: {e}")
35615 });
35616 self
35617 }
35618 pub fn id<T>(mut self, value: T) -> Self
35619 where
35620 T: ::std::convert::TryInto<
35621 super::PostGetCompressedBalanceByOwnerResponseId,
35622 >,
35623 T::Error: ::std::fmt::Display,
35624 {
35625 self.id = value
35626 .try_into()
35627 .map_err(|e| format!("error converting supplied value for id: {e}"));
35628 self
35629 }
35630 pub fn jsonrpc<T>(mut self, value: T) -> Self
35631 where
35632 T: ::std::convert::TryInto<
35633 super::PostGetCompressedBalanceByOwnerResponseJsonrpc,
35634 >,
35635 T::Error: ::std::fmt::Display,
35636 {
35637 self.jsonrpc = value
35638 .try_into()
35639 .map_err(|e| {
35640 format!("error converting supplied value for jsonrpc: {e}")
35641 });
35642 self
35643 }
35644 pub fn result<T>(mut self, value: T) -> Self
35645 where
35646 T: ::std::convert::TryInto<
35647 ::std::option::Option<
35648 super::PostGetCompressedBalanceByOwnerResponseResult,
35649 >,
35650 >,
35651 T::Error: ::std::fmt::Display,
35652 {
35653 self.result = value
35654 .try_into()
35655 .map_err(|e| {
35656 format!("error converting supplied value for result: {e}")
35657 });
35658 self
35659 }
35660 }
35661 impl ::std::convert::TryFrom<PostGetCompressedBalanceByOwnerResponse>
35662 for super::PostGetCompressedBalanceByOwnerResponse {
35663 type Error = super::error::ConversionError;
35664 fn try_from(
35665 value: PostGetCompressedBalanceByOwnerResponse,
35666 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35667 Ok(Self {
35668 error: value.error?,
35669 id: value.id?,
35670 jsonrpc: value.jsonrpc?,
35671 result: value.result?,
35672 })
35673 }
35674 }
35675 impl ::std::convert::From<super::PostGetCompressedBalanceByOwnerResponse>
35676 for PostGetCompressedBalanceByOwnerResponse {
35677 fn from(value: super::PostGetCompressedBalanceByOwnerResponse) -> Self {
35678 Self {
35679 error: Ok(value.error),
35680 id: Ok(value.id),
35681 jsonrpc: Ok(value.jsonrpc),
35682 result: Ok(value.result),
35683 }
35684 }
35685 }
35686 #[derive(Clone, Debug)]
35687 pub struct PostGetCompressedBalanceByOwnerResponseError {
35688 code: ::std::result::Result<
35689 ::std::option::Option<i64>,
35690 ::std::string::String,
35691 >,
35692 message: ::std::result::Result<
35693 ::std::option::Option<::std::string::String>,
35694 ::std::string::String,
35695 >,
35696 }
35697 impl ::std::default::Default for PostGetCompressedBalanceByOwnerResponseError {
35698 fn default() -> Self {
35699 Self {
35700 code: Ok(Default::default()),
35701 message: Ok(Default::default()),
35702 }
35703 }
35704 }
35705 impl PostGetCompressedBalanceByOwnerResponseError {
35706 pub fn code<T>(mut self, value: T) -> Self
35707 where
35708 T: ::std::convert::TryInto<::std::option::Option<i64>>,
35709 T::Error: ::std::fmt::Display,
35710 {
35711 self.code = value
35712 .try_into()
35713 .map_err(|e| {
35714 format!("error converting supplied value for code: {e}")
35715 });
35716 self
35717 }
35718 pub fn message<T>(mut self, value: T) -> Self
35719 where
35720 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
35721 T::Error: ::std::fmt::Display,
35722 {
35723 self.message = value
35724 .try_into()
35725 .map_err(|e| {
35726 format!("error converting supplied value for message: {e}")
35727 });
35728 self
35729 }
35730 }
35731 impl ::std::convert::TryFrom<PostGetCompressedBalanceByOwnerResponseError>
35732 for super::PostGetCompressedBalanceByOwnerResponseError {
35733 type Error = super::error::ConversionError;
35734 fn try_from(
35735 value: PostGetCompressedBalanceByOwnerResponseError,
35736 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35737 Ok(Self {
35738 code: value.code?,
35739 message: value.message?,
35740 })
35741 }
35742 }
35743 impl ::std::convert::From<super::PostGetCompressedBalanceByOwnerResponseError>
35744 for PostGetCompressedBalanceByOwnerResponseError {
35745 fn from(value: super::PostGetCompressedBalanceByOwnerResponseError) -> Self {
35746 Self {
35747 code: Ok(value.code),
35748 message: Ok(value.message),
35749 }
35750 }
35751 }
35752 #[derive(Clone, Debug)]
35753 pub struct PostGetCompressedBalanceByOwnerResponseResult {
35754 context: ::std::result::Result<super::Context, ::std::string::String>,
35755 value: ::std::result::Result<super::UnsignedInteger, ::std::string::String>,
35756 }
35757 impl ::std::default::Default for PostGetCompressedBalanceByOwnerResponseResult {
35758 fn default() -> Self {
35759 Self {
35760 context: Err("no value supplied for context".to_string()),
35761 value: Err("no value supplied for value".to_string()),
35762 }
35763 }
35764 }
35765 impl PostGetCompressedBalanceByOwnerResponseResult {
35766 pub fn context<T>(mut self, value: T) -> Self
35767 where
35768 T: ::std::convert::TryInto<super::Context>,
35769 T::Error: ::std::fmt::Display,
35770 {
35771 self.context = value
35772 .try_into()
35773 .map_err(|e| {
35774 format!("error converting supplied value for context: {e}")
35775 });
35776 self
35777 }
35778 pub fn value<T>(mut self, value: T) -> Self
35779 where
35780 T: ::std::convert::TryInto<super::UnsignedInteger>,
35781 T::Error: ::std::fmt::Display,
35782 {
35783 self.value = value
35784 .try_into()
35785 .map_err(|e| {
35786 format!("error converting supplied value for value: {e}")
35787 });
35788 self
35789 }
35790 }
35791 impl ::std::convert::TryFrom<PostGetCompressedBalanceByOwnerResponseResult>
35792 for super::PostGetCompressedBalanceByOwnerResponseResult {
35793 type Error = super::error::ConversionError;
35794 fn try_from(
35795 value: PostGetCompressedBalanceByOwnerResponseResult,
35796 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35797 Ok(Self {
35798 context: value.context?,
35799 value: value.value?,
35800 })
35801 }
35802 }
35803 impl ::std::convert::From<super::PostGetCompressedBalanceByOwnerResponseResult>
35804 for PostGetCompressedBalanceByOwnerResponseResult {
35805 fn from(
35806 value: super::PostGetCompressedBalanceByOwnerResponseResult,
35807 ) -> Self {
35808 Self {
35809 context: Ok(value.context),
35810 value: Ok(value.value),
35811 }
35812 }
35813 }
35814 #[derive(Clone, Debug)]
35815 pub struct PostGetCompressedMintTokenHoldersBody {
35816 id: ::std::result::Result<
35817 super::PostGetCompressedMintTokenHoldersBodyId,
35818 ::std::string::String,
35819 >,
35820 jsonrpc: ::std::result::Result<
35821 super::PostGetCompressedMintTokenHoldersBodyJsonrpc,
35822 ::std::string::String,
35823 >,
35824 method: ::std::result::Result<
35825 super::PostGetCompressedMintTokenHoldersBodyMethod,
35826 ::std::string::String,
35827 >,
35828 params: ::std::result::Result<
35829 super::PostGetCompressedMintTokenHoldersBodyParams,
35830 ::std::string::String,
35831 >,
35832 }
35833 impl ::std::default::Default for PostGetCompressedMintTokenHoldersBody {
35834 fn default() -> Self {
35835 Self {
35836 id: Err("no value supplied for id".to_string()),
35837 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
35838 method: Err("no value supplied for method".to_string()),
35839 params: Err("no value supplied for params".to_string()),
35840 }
35841 }
35842 }
35843 impl PostGetCompressedMintTokenHoldersBody {
35844 pub fn id<T>(mut self, value: T) -> Self
35845 where
35846 T: ::std::convert::TryInto<
35847 super::PostGetCompressedMintTokenHoldersBodyId,
35848 >,
35849 T::Error: ::std::fmt::Display,
35850 {
35851 self.id = value
35852 .try_into()
35853 .map_err(|e| format!("error converting supplied value for id: {e}"));
35854 self
35855 }
35856 pub fn jsonrpc<T>(mut self, value: T) -> Self
35857 where
35858 T: ::std::convert::TryInto<
35859 super::PostGetCompressedMintTokenHoldersBodyJsonrpc,
35860 >,
35861 T::Error: ::std::fmt::Display,
35862 {
35863 self.jsonrpc = value
35864 .try_into()
35865 .map_err(|e| {
35866 format!("error converting supplied value for jsonrpc: {e}")
35867 });
35868 self
35869 }
35870 pub fn method<T>(mut self, value: T) -> Self
35871 where
35872 T: ::std::convert::TryInto<
35873 super::PostGetCompressedMintTokenHoldersBodyMethod,
35874 >,
35875 T::Error: ::std::fmt::Display,
35876 {
35877 self.method = value
35878 .try_into()
35879 .map_err(|e| {
35880 format!("error converting supplied value for method: {e}")
35881 });
35882 self
35883 }
35884 pub fn params<T>(mut self, value: T) -> Self
35885 where
35886 T: ::std::convert::TryInto<
35887 super::PostGetCompressedMintTokenHoldersBodyParams,
35888 >,
35889 T::Error: ::std::fmt::Display,
35890 {
35891 self.params = value
35892 .try_into()
35893 .map_err(|e| {
35894 format!("error converting supplied value for params: {e}")
35895 });
35896 self
35897 }
35898 }
35899 impl ::std::convert::TryFrom<PostGetCompressedMintTokenHoldersBody>
35900 for super::PostGetCompressedMintTokenHoldersBody {
35901 type Error = super::error::ConversionError;
35902 fn try_from(
35903 value: PostGetCompressedMintTokenHoldersBody,
35904 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35905 Ok(Self {
35906 id: value.id?,
35907 jsonrpc: value.jsonrpc?,
35908 method: value.method?,
35909 params: value.params?,
35910 })
35911 }
35912 }
35913 impl ::std::convert::From<super::PostGetCompressedMintTokenHoldersBody>
35914 for PostGetCompressedMintTokenHoldersBody {
35915 fn from(value: super::PostGetCompressedMintTokenHoldersBody) -> Self {
35916 Self {
35917 id: Ok(value.id),
35918 jsonrpc: Ok(value.jsonrpc),
35919 method: Ok(value.method),
35920 params: Ok(value.params),
35921 }
35922 }
35923 }
35924 #[derive(Clone, Debug)]
35925 pub struct PostGetCompressedMintTokenHoldersBodyParams {
35926 cursor: ::std::result::Result<
35927 ::std::option::Option<super::Base58String>,
35928 ::std::string::String,
35929 >,
35930 limit: ::std::result::Result<
35931 ::std::option::Option<super::Limit>,
35932 ::std::string::String,
35933 >,
35934 mint: ::std::result::Result<
35935 super::SerializablePubkey,
35936 ::std::string::String,
35937 >,
35938 }
35939 impl ::std::default::Default for PostGetCompressedMintTokenHoldersBodyParams {
35940 fn default() -> Self {
35941 Self {
35942 cursor: Ok(Default::default()),
35943 limit: Ok(Default::default()),
35944 mint: Err("no value supplied for mint".to_string()),
35945 }
35946 }
35947 }
35948 impl PostGetCompressedMintTokenHoldersBodyParams {
35949 pub fn cursor<T>(mut self, value: T) -> Self
35950 where
35951 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
35952 T::Error: ::std::fmt::Display,
35953 {
35954 self.cursor = value
35955 .try_into()
35956 .map_err(|e| {
35957 format!("error converting supplied value for cursor: {e}")
35958 });
35959 self
35960 }
35961 pub fn limit<T>(mut self, value: T) -> Self
35962 where
35963 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
35964 T::Error: ::std::fmt::Display,
35965 {
35966 self.limit = value
35967 .try_into()
35968 .map_err(|e| {
35969 format!("error converting supplied value for limit: {e}")
35970 });
35971 self
35972 }
35973 pub fn mint<T>(mut self, value: T) -> Self
35974 where
35975 T: ::std::convert::TryInto<super::SerializablePubkey>,
35976 T::Error: ::std::fmt::Display,
35977 {
35978 self.mint = value
35979 .try_into()
35980 .map_err(|e| {
35981 format!("error converting supplied value for mint: {e}")
35982 });
35983 self
35984 }
35985 }
35986 impl ::std::convert::TryFrom<PostGetCompressedMintTokenHoldersBodyParams>
35987 for super::PostGetCompressedMintTokenHoldersBodyParams {
35988 type Error = super::error::ConversionError;
35989 fn try_from(
35990 value: PostGetCompressedMintTokenHoldersBodyParams,
35991 ) -> ::std::result::Result<Self, super::error::ConversionError> {
35992 Ok(Self {
35993 cursor: value.cursor?,
35994 limit: value.limit?,
35995 mint: value.mint?,
35996 })
35997 }
35998 }
35999 impl ::std::convert::From<super::PostGetCompressedMintTokenHoldersBodyParams>
36000 for PostGetCompressedMintTokenHoldersBodyParams {
36001 fn from(value: super::PostGetCompressedMintTokenHoldersBodyParams) -> Self {
36002 Self {
36003 cursor: Ok(value.cursor),
36004 limit: Ok(value.limit),
36005 mint: Ok(value.mint),
36006 }
36007 }
36008 }
36009 #[derive(Clone, Debug)]
36010 pub struct PostGetCompressedMintTokenHoldersResponse {
36011 error: ::std::result::Result<
36012 ::std::option::Option<
36013 super::PostGetCompressedMintTokenHoldersResponseError,
36014 >,
36015 ::std::string::String,
36016 >,
36017 id: ::std::result::Result<
36018 super::PostGetCompressedMintTokenHoldersResponseId,
36019 ::std::string::String,
36020 >,
36021 jsonrpc: ::std::result::Result<
36022 super::PostGetCompressedMintTokenHoldersResponseJsonrpc,
36023 ::std::string::String,
36024 >,
36025 result: ::std::result::Result<
36026 ::std::option::Option<
36027 super::PostGetCompressedMintTokenHoldersResponseResult,
36028 >,
36029 ::std::string::String,
36030 >,
36031 }
36032 impl ::std::default::Default for PostGetCompressedMintTokenHoldersResponse {
36033 fn default() -> Self {
36034 Self {
36035 error: Ok(Default::default()),
36036 id: Err("no value supplied for id".to_string()),
36037 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
36038 result: Ok(Default::default()),
36039 }
36040 }
36041 }
36042 impl PostGetCompressedMintTokenHoldersResponse {
36043 pub fn error<T>(mut self, value: T) -> Self
36044 where
36045 T: ::std::convert::TryInto<
36046 ::std::option::Option<
36047 super::PostGetCompressedMintTokenHoldersResponseError,
36048 >,
36049 >,
36050 T::Error: ::std::fmt::Display,
36051 {
36052 self.error = value
36053 .try_into()
36054 .map_err(|e| {
36055 format!("error converting supplied value for error: {e}")
36056 });
36057 self
36058 }
36059 pub fn id<T>(mut self, value: T) -> Self
36060 where
36061 T: ::std::convert::TryInto<
36062 super::PostGetCompressedMintTokenHoldersResponseId,
36063 >,
36064 T::Error: ::std::fmt::Display,
36065 {
36066 self.id = value
36067 .try_into()
36068 .map_err(|e| format!("error converting supplied value for id: {e}"));
36069 self
36070 }
36071 pub fn jsonrpc<T>(mut self, value: T) -> Self
36072 where
36073 T: ::std::convert::TryInto<
36074 super::PostGetCompressedMintTokenHoldersResponseJsonrpc,
36075 >,
36076 T::Error: ::std::fmt::Display,
36077 {
36078 self.jsonrpc = value
36079 .try_into()
36080 .map_err(|e| {
36081 format!("error converting supplied value for jsonrpc: {e}")
36082 });
36083 self
36084 }
36085 pub fn result<T>(mut self, value: T) -> Self
36086 where
36087 T: ::std::convert::TryInto<
36088 ::std::option::Option<
36089 super::PostGetCompressedMintTokenHoldersResponseResult,
36090 >,
36091 >,
36092 T::Error: ::std::fmt::Display,
36093 {
36094 self.result = value
36095 .try_into()
36096 .map_err(|e| {
36097 format!("error converting supplied value for result: {e}")
36098 });
36099 self
36100 }
36101 }
36102 impl ::std::convert::TryFrom<PostGetCompressedMintTokenHoldersResponse>
36103 for super::PostGetCompressedMintTokenHoldersResponse {
36104 type Error = super::error::ConversionError;
36105 fn try_from(
36106 value: PostGetCompressedMintTokenHoldersResponse,
36107 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36108 Ok(Self {
36109 error: value.error?,
36110 id: value.id?,
36111 jsonrpc: value.jsonrpc?,
36112 result: value.result?,
36113 })
36114 }
36115 }
36116 impl ::std::convert::From<super::PostGetCompressedMintTokenHoldersResponse>
36117 for PostGetCompressedMintTokenHoldersResponse {
36118 fn from(value: super::PostGetCompressedMintTokenHoldersResponse) -> Self {
36119 Self {
36120 error: Ok(value.error),
36121 id: Ok(value.id),
36122 jsonrpc: Ok(value.jsonrpc),
36123 result: Ok(value.result),
36124 }
36125 }
36126 }
36127 #[derive(Clone, Debug)]
36128 pub struct PostGetCompressedMintTokenHoldersResponseError {
36129 code: ::std::result::Result<
36130 ::std::option::Option<i64>,
36131 ::std::string::String,
36132 >,
36133 message: ::std::result::Result<
36134 ::std::option::Option<::std::string::String>,
36135 ::std::string::String,
36136 >,
36137 }
36138 impl ::std::default::Default for PostGetCompressedMintTokenHoldersResponseError {
36139 fn default() -> Self {
36140 Self {
36141 code: Ok(Default::default()),
36142 message: Ok(Default::default()),
36143 }
36144 }
36145 }
36146 impl PostGetCompressedMintTokenHoldersResponseError {
36147 pub fn code<T>(mut self, value: T) -> Self
36148 where
36149 T: ::std::convert::TryInto<::std::option::Option<i64>>,
36150 T::Error: ::std::fmt::Display,
36151 {
36152 self.code = value
36153 .try_into()
36154 .map_err(|e| {
36155 format!("error converting supplied value for code: {e}")
36156 });
36157 self
36158 }
36159 pub fn message<T>(mut self, value: T) -> Self
36160 where
36161 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
36162 T::Error: ::std::fmt::Display,
36163 {
36164 self.message = value
36165 .try_into()
36166 .map_err(|e| {
36167 format!("error converting supplied value for message: {e}")
36168 });
36169 self
36170 }
36171 }
36172 impl ::std::convert::TryFrom<PostGetCompressedMintTokenHoldersResponseError>
36173 for super::PostGetCompressedMintTokenHoldersResponseError {
36174 type Error = super::error::ConversionError;
36175 fn try_from(
36176 value: PostGetCompressedMintTokenHoldersResponseError,
36177 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36178 Ok(Self {
36179 code: value.code?,
36180 message: value.message?,
36181 })
36182 }
36183 }
36184 impl ::std::convert::From<super::PostGetCompressedMintTokenHoldersResponseError>
36185 for PostGetCompressedMintTokenHoldersResponseError {
36186 fn from(
36187 value: super::PostGetCompressedMintTokenHoldersResponseError,
36188 ) -> Self {
36189 Self {
36190 code: Ok(value.code),
36191 message: Ok(value.message),
36192 }
36193 }
36194 }
36195 #[derive(Clone, Debug)]
36196 pub struct PostGetCompressedMintTokenHoldersResponseResult {
36197 context: ::std::result::Result<super::Context, ::std::string::String>,
36198 value: ::std::result::Result<super::OwnerBalanceList, ::std::string::String>,
36199 }
36200 impl ::std::default::Default
36201 for PostGetCompressedMintTokenHoldersResponseResult {
36202 fn default() -> Self {
36203 Self {
36204 context: Err("no value supplied for context".to_string()),
36205 value: Err("no value supplied for value".to_string()),
36206 }
36207 }
36208 }
36209 impl PostGetCompressedMintTokenHoldersResponseResult {
36210 pub fn context<T>(mut self, value: T) -> Self
36211 where
36212 T: ::std::convert::TryInto<super::Context>,
36213 T::Error: ::std::fmt::Display,
36214 {
36215 self.context = value
36216 .try_into()
36217 .map_err(|e| {
36218 format!("error converting supplied value for context: {e}")
36219 });
36220 self
36221 }
36222 pub fn value<T>(mut self, value: T) -> Self
36223 where
36224 T: ::std::convert::TryInto<super::OwnerBalanceList>,
36225 T::Error: ::std::fmt::Display,
36226 {
36227 self.value = value
36228 .try_into()
36229 .map_err(|e| {
36230 format!("error converting supplied value for value: {e}")
36231 });
36232 self
36233 }
36234 }
36235 impl ::std::convert::TryFrom<PostGetCompressedMintTokenHoldersResponseResult>
36236 for super::PostGetCompressedMintTokenHoldersResponseResult {
36237 type Error = super::error::ConversionError;
36238 fn try_from(
36239 value: PostGetCompressedMintTokenHoldersResponseResult,
36240 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36241 Ok(Self {
36242 context: value.context?,
36243 value: value.value?,
36244 })
36245 }
36246 }
36247 impl ::std::convert::From<super::PostGetCompressedMintTokenHoldersResponseResult>
36248 for PostGetCompressedMintTokenHoldersResponseResult {
36249 fn from(
36250 value: super::PostGetCompressedMintTokenHoldersResponseResult,
36251 ) -> Self {
36252 Self {
36253 context: Ok(value.context),
36254 value: Ok(value.value),
36255 }
36256 }
36257 }
36258 #[derive(Clone, Debug)]
36259 pub struct PostGetCompressedTokenAccountBalanceBody {
36260 id: ::std::result::Result<
36261 super::PostGetCompressedTokenAccountBalanceBodyId,
36262 ::std::string::String,
36263 >,
36264 jsonrpc: ::std::result::Result<
36265 super::PostGetCompressedTokenAccountBalanceBodyJsonrpc,
36266 ::std::string::String,
36267 >,
36268 method: ::std::result::Result<
36269 super::PostGetCompressedTokenAccountBalanceBodyMethod,
36270 ::std::string::String,
36271 >,
36272 params: ::std::result::Result<
36273 super::PostGetCompressedTokenAccountBalanceBodyParams,
36274 ::std::string::String,
36275 >,
36276 }
36277 impl ::std::default::Default for PostGetCompressedTokenAccountBalanceBody {
36278 fn default() -> Self {
36279 Self {
36280 id: Err("no value supplied for id".to_string()),
36281 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
36282 method: Err("no value supplied for method".to_string()),
36283 params: Err("no value supplied for params".to_string()),
36284 }
36285 }
36286 }
36287 impl PostGetCompressedTokenAccountBalanceBody {
36288 pub fn id<T>(mut self, value: T) -> Self
36289 where
36290 T: ::std::convert::TryInto<
36291 super::PostGetCompressedTokenAccountBalanceBodyId,
36292 >,
36293 T::Error: ::std::fmt::Display,
36294 {
36295 self.id = value
36296 .try_into()
36297 .map_err(|e| format!("error converting supplied value for id: {e}"));
36298 self
36299 }
36300 pub fn jsonrpc<T>(mut self, value: T) -> Self
36301 where
36302 T: ::std::convert::TryInto<
36303 super::PostGetCompressedTokenAccountBalanceBodyJsonrpc,
36304 >,
36305 T::Error: ::std::fmt::Display,
36306 {
36307 self.jsonrpc = value
36308 .try_into()
36309 .map_err(|e| {
36310 format!("error converting supplied value for jsonrpc: {e}")
36311 });
36312 self
36313 }
36314 pub fn method<T>(mut self, value: T) -> Self
36315 where
36316 T: ::std::convert::TryInto<
36317 super::PostGetCompressedTokenAccountBalanceBodyMethod,
36318 >,
36319 T::Error: ::std::fmt::Display,
36320 {
36321 self.method = value
36322 .try_into()
36323 .map_err(|e| {
36324 format!("error converting supplied value for method: {e}")
36325 });
36326 self
36327 }
36328 pub fn params<T>(mut self, value: T) -> Self
36329 where
36330 T: ::std::convert::TryInto<
36331 super::PostGetCompressedTokenAccountBalanceBodyParams,
36332 >,
36333 T::Error: ::std::fmt::Display,
36334 {
36335 self.params = value
36336 .try_into()
36337 .map_err(|e| {
36338 format!("error converting supplied value for params: {e}")
36339 });
36340 self
36341 }
36342 }
36343 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountBalanceBody>
36344 for super::PostGetCompressedTokenAccountBalanceBody {
36345 type Error = super::error::ConversionError;
36346 fn try_from(
36347 value: PostGetCompressedTokenAccountBalanceBody,
36348 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36349 Ok(Self {
36350 id: value.id?,
36351 jsonrpc: value.jsonrpc?,
36352 method: value.method?,
36353 params: value.params?,
36354 })
36355 }
36356 }
36357 impl ::std::convert::From<super::PostGetCompressedTokenAccountBalanceBody>
36358 for PostGetCompressedTokenAccountBalanceBody {
36359 fn from(value: super::PostGetCompressedTokenAccountBalanceBody) -> Self {
36360 Self {
36361 id: Ok(value.id),
36362 jsonrpc: Ok(value.jsonrpc),
36363 method: Ok(value.method),
36364 params: Ok(value.params),
36365 }
36366 }
36367 }
36368 #[derive(Clone, Debug)]
36369 pub struct PostGetCompressedTokenAccountBalanceBodyParams {
36370 address: ::std::result::Result<
36371 ::std::option::Option<super::SerializablePubkey>,
36372 ::std::string::String,
36373 >,
36374 hash: ::std::result::Result<
36375 ::std::option::Option<super::Hash>,
36376 ::std::string::String,
36377 >,
36378 }
36379 impl ::std::default::Default for PostGetCompressedTokenAccountBalanceBodyParams {
36380 fn default() -> Self {
36381 Self {
36382 address: Ok(Default::default()),
36383 hash: Ok(Default::default()),
36384 }
36385 }
36386 }
36387 impl PostGetCompressedTokenAccountBalanceBodyParams {
36388 pub fn address<T>(mut self, value: T) -> Self
36389 where
36390 T: ::std::convert::TryInto<
36391 ::std::option::Option<super::SerializablePubkey>,
36392 >,
36393 T::Error: ::std::fmt::Display,
36394 {
36395 self.address = value
36396 .try_into()
36397 .map_err(|e| {
36398 format!("error converting supplied value for address: {e}")
36399 });
36400 self
36401 }
36402 pub fn hash<T>(mut self, value: T) -> Self
36403 where
36404 T: ::std::convert::TryInto<::std::option::Option<super::Hash>>,
36405 T::Error: ::std::fmt::Display,
36406 {
36407 self.hash = value
36408 .try_into()
36409 .map_err(|e| {
36410 format!("error converting supplied value for hash: {e}")
36411 });
36412 self
36413 }
36414 }
36415 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountBalanceBodyParams>
36416 for super::PostGetCompressedTokenAccountBalanceBodyParams {
36417 type Error = super::error::ConversionError;
36418 fn try_from(
36419 value: PostGetCompressedTokenAccountBalanceBodyParams,
36420 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36421 Ok(Self {
36422 address: value.address?,
36423 hash: value.hash?,
36424 })
36425 }
36426 }
36427 impl ::std::convert::From<super::PostGetCompressedTokenAccountBalanceBodyParams>
36428 for PostGetCompressedTokenAccountBalanceBodyParams {
36429 fn from(
36430 value: super::PostGetCompressedTokenAccountBalanceBodyParams,
36431 ) -> Self {
36432 Self {
36433 address: Ok(value.address),
36434 hash: Ok(value.hash),
36435 }
36436 }
36437 }
36438 #[derive(Clone, Debug)]
36439 pub struct PostGetCompressedTokenAccountBalanceResponse {
36440 error: ::std::result::Result<
36441 ::std::option::Option<
36442 super::PostGetCompressedTokenAccountBalanceResponseError,
36443 >,
36444 ::std::string::String,
36445 >,
36446 id: ::std::result::Result<
36447 super::PostGetCompressedTokenAccountBalanceResponseId,
36448 ::std::string::String,
36449 >,
36450 jsonrpc: ::std::result::Result<
36451 super::PostGetCompressedTokenAccountBalanceResponseJsonrpc,
36452 ::std::string::String,
36453 >,
36454 result: ::std::result::Result<
36455 ::std::option::Option<
36456 super::PostGetCompressedTokenAccountBalanceResponseResult,
36457 >,
36458 ::std::string::String,
36459 >,
36460 }
36461 impl ::std::default::Default for PostGetCompressedTokenAccountBalanceResponse {
36462 fn default() -> Self {
36463 Self {
36464 error: Ok(Default::default()),
36465 id: Err("no value supplied for id".to_string()),
36466 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
36467 result: Ok(Default::default()),
36468 }
36469 }
36470 }
36471 impl PostGetCompressedTokenAccountBalanceResponse {
36472 pub fn error<T>(mut self, value: T) -> Self
36473 where
36474 T: ::std::convert::TryInto<
36475 ::std::option::Option<
36476 super::PostGetCompressedTokenAccountBalanceResponseError,
36477 >,
36478 >,
36479 T::Error: ::std::fmt::Display,
36480 {
36481 self.error = value
36482 .try_into()
36483 .map_err(|e| {
36484 format!("error converting supplied value for error: {e}")
36485 });
36486 self
36487 }
36488 pub fn id<T>(mut self, value: T) -> Self
36489 where
36490 T: ::std::convert::TryInto<
36491 super::PostGetCompressedTokenAccountBalanceResponseId,
36492 >,
36493 T::Error: ::std::fmt::Display,
36494 {
36495 self.id = value
36496 .try_into()
36497 .map_err(|e| format!("error converting supplied value for id: {e}"));
36498 self
36499 }
36500 pub fn jsonrpc<T>(mut self, value: T) -> Self
36501 where
36502 T: ::std::convert::TryInto<
36503 super::PostGetCompressedTokenAccountBalanceResponseJsonrpc,
36504 >,
36505 T::Error: ::std::fmt::Display,
36506 {
36507 self.jsonrpc = value
36508 .try_into()
36509 .map_err(|e| {
36510 format!("error converting supplied value for jsonrpc: {e}")
36511 });
36512 self
36513 }
36514 pub fn result<T>(mut self, value: T) -> Self
36515 where
36516 T: ::std::convert::TryInto<
36517 ::std::option::Option<
36518 super::PostGetCompressedTokenAccountBalanceResponseResult,
36519 >,
36520 >,
36521 T::Error: ::std::fmt::Display,
36522 {
36523 self.result = value
36524 .try_into()
36525 .map_err(|e| {
36526 format!("error converting supplied value for result: {e}")
36527 });
36528 self
36529 }
36530 }
36531 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountBalanceResponse>
36532 for super::PostGetCompressedTokenAccountBalanceResponse {
36533 type Error = super::error::ConversionError;
36534 fn try_from(
36535 value: PostGetCompressedTokenAccountBalanceResponse,
36536 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36537 Ok(Self {
36538 error: value.error?,
36539 id: value.id?,
36540 jsonrpc: value.jsonrpc?,
36541 result: value.result?,
36542 })
36543 }
36544 }
36545 impl ::std::convert::From<super::PostGetCompressedTokenAccountBalanceResponse>
36546 for PostGetCompressedTokenAccountBalanceResponse {
36547 fn from(value: super::PostGetCompressedTokenAccountBalanceResponse) -> Self {
36548 Self {
36549 error: Ok(value.error),
36550 id: Ok(value.id),
36551 jsonrpc: Ok(value.jsonrpc),
36552 result: Ok(value.result),
36553 }
36554 }
36555 }
36556 #[derive(Clone, Debug)]
36557 pub struct PostGetCompressedTokenAccountBalanceResponseError {
36558 code: ::std::result::Result<
36559 ::std::option::Option<i64>,
36560 ::std::string::String,
36561 >,
36562 message: ::std::result::Result<
36563 ::std::option::Option<::std::string::String>,
36564 ::std::string::String,
36565 >,
36566 }
36567 impl ::std::default::Default
36568 for PostGetCompressedTokenAccountBalanceResponseError {
36569 fn default() -> Self {
36570 Self {
36571 code: Ok(Default::default()),
36572 message: Ok(Default::default()),
36573 }
36574 }
36575 }
36576 impl PostGetCompressedTokenAccountBalanceResponseError {
36577 pub fn code<T>(mut self, value: T) -> Self
36578 where
36579 T: ::std::convert::TryInto<::std::option::Option<i64>>,
36580 T::Error: ::std::fmt::Display,
36581 {
36582 self.code = value
36583 .try_into()
36584 .map_err(|e| {
36585 format!("error converting supplied value for code: {e}")
36586 });
36587 self
36588 }
36589 pub fn message<T>(mut self, value: T) -> Self
36590 where
36591 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
36592 T::Error: ::std::fmt::Display,
36593 {
36594 self.message = value
36595 .try_into()
36596 .map_err(|e| {
36597 format!("error converting supplied value for message: {e}")
36598 });
36599 self
36600 }
36601 }
36602 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountBalanceResponseError>
36603 for super::PostGetCompressedTokenAccountBalanceResponseError {
36604 type Error = super::error::ConversionError;
36605 fn try_from(
36606 value: PostGetCompressedTokenAccountBalanceResponseError,
36607 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36608 Ok(Self {
36609 code: value.code?,
36610 message: value.message?,
36611 })
36612 }
36613 }
36614 impl ::std::convert::From<
36615 super::PostGetCompressedTokenAccountBalanceResponseError,
36616 > for PostGetCompressedTokenAccountBalanceResponseError {
36617 fn from(
36618 value: super::PostGetCompressedTokenAccountBalanceResponseError,
36619 ) -> Self {
36620 Self {
36621 code: Ok(value.code),
36622 message: Ok(value.message),
36623 }
36624 }
36625 }
36626 #[derive(Clone, Debug)]
36627 pub struct PostGetCompressedTokenAccountBalanceResponseResult {
36628 context: ::std::result::Result<super::Context, ::std::string::String>,
36629 value: ::std::result::Result<
36630 super::TokenAccountBalance,
36631 ::std::string::String,
36632 >,
36633 }
36634 impl ::std::default::Default
36635 for PostGetCompressedTokenAccountBalanceResponseResult {
36636 fn default() -> Self {
36637 Self {
36638 context: Err("no value supplied for context".to_string()),
36639 value: Err("no value supplied for value".to_string()),
36640 }
36641 }
36642 }
36643 impl PostGetCompressedTokenAccountBalanceResponseResult {
36644 pub fn context<T>(mut self, value: T) -> Self
36645 where
36646 T: ::std::convert::TryInto<super::Context>,
36647 T::Error: ::std::fmt::Display,
36648 {
36649 self.context = value
36650 .try_into()
36651 .map_err(|e| {
36652 format!("error converting supplied value for context: {e}")
36653 });
36654 self
36655 }
36656 pub fn value<T>(mut self, value: T) -> Self
36657 where
36658 T: ::std::convert::TryInto<super::TokenAccountBalance>,
36659 T::Error: ::std::fmt::Display,
36660 {
36661 self.value = value
36662 .try_into()
36663 .map_err(|e| {
36664 format!("error converting supplied value for value: {e}")
36665 });
36666 self
36667 }
36668 }
36669 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountBalanceResponseResult>
36670 for super::PostGetCompressedTokenAccountBalanceResponseResult {
36671 type Error = super::error::ConversionError;
36672 fn try_from(
36673 value: PostGetCompressedTokenAccountBalanceResponseResult,
36674 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36675 Ok(Self {
36676 context: value.context?,
36677 value: value.value?,
36678 })
36679 }
36680 }
36681 impl ::std::convert::From<
36682 super::PostGetCompressedTokenAccountBalanceResponseResult,
36683 > for PostGetCompressedTokenAccountBalanceResponseResult {
36684 fn from(
36685 value: super::PostGetCompressedTokenAccountBalanceResponseResult,
36686 ) -> Self {
36687 Self {
36688 context: Ok(value.context),
36689 value: Ok(value.value),
36690 }
36691 }
36692 }
36693 #[derive(Clone, Debug)]
36694 pub struct PostGetCompressedTokenAccountsByDelegateBody {
36695 id: ::std::result::Result<
36696 super::PostGetCompressedTokenAccountsByDelegateBodyId,
36697 ::std::string::String,
36698 >,
36699 jsonrpc: ::std::result::Result<
36700 super::PostGetCompressedTokenAccountsByDelegateBodyJsonrpc,
36701 ::std::string::String,
36702 >,
36703 method: ::std::result::Result<
36704 super::PostGetCompressedTokenAccountsByDelegateBodyMethod,
36705 ::std::string::String,
36706 >,
36707 params: ::std::result::Result<
36708 super::PostGetCompressedTokenAccountsByDelegateBodyParams,
36709 ::std::string::String,
36710 >,
36711 }
36712 impl ::std::default::Default for PostGetCompressedTokenAccountsByDelegateBody {
36713 fn default() -> Self {
36714 Self {
36715 id: Err("no value supplied for id".to_string()),
36716 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
36717 method: Err("no value supplied for method".to_string()),
36718 params: Err("no value supplied for params".to_string()),
36719 }
36720 }
36721 }
36722 impl PostGetCompressedTokenAccountsByDelegateBody {
36723 pub fn id<T>(mut self, value: T) -> Self
36724 where
36725 T: ::std::convert::TryInto<
36726 super::PostGetCompressedTokenAccountsByDelegateBodyId,
36727 >,
36728 T::Error: ::std::fmt::Display,
36729 {
36730 self.id = value
36731 .try_into()
36732 .map_err(|e| format!("error converting supplied value for id: {e}"));
36733 self
36734 }
36735 pub fn jsonrpc<T>(mut self, value: T) -> Self
36736 where
36737 T: ::std::convert::TryInto<
36738 super::PostGetCompressedTokenAccountsByDelegateBodyJsonrpc,
36739 >,
36740 T::Error: ::std::fmt::Display,
36741 {
36742 self.jsonrpc = value
36743 .try_into()
36744 .map_err(|e| {
36745 format!("error converting supplied value for jsonrpc: {e}")
36746 });
36747 self
36748 }
36749 pub fn method<T>(mut self, value: T) -> Self
36750 where
36751 T: ::std::convert::TryInto<
36752 super::PostGetCompressedTokenAccountsByDelegateBodyMethod,
36753 >,
36754 T::Error: ::std::fmt::Display,
36755 {
36756 self.method = value
36757 .try_into()
36758 .map_err(|e| {
36759 format!("error converting supplied value for method: {e}")
36760 });
36761 self
36762 }
36763 pub fn params<T>(mut self, value: T) -> Self
36764 where
36765 T: ::std::convert::TryInto<
36766 super::PostGetCompressedTokenAccountsByDelegateBodyParams,
36767 >,
36768 T::Error: ::std::fmt::Display,
36769 {
36770 self.params = value
36771 .try_into()
36772 .map_err(|e| {
36773 format!("error converting supplied value for params: {e}")
36774 });
36775 self
36776 }
36777 }
36778 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByDelegateBody>
36779 for super::PostGetCompressedTokenAccountsByDelegateBody {
36780 type Error = super::error::ConversionError;
36781 fn try_from(
36782 value: PostGetCompressedTokenAccountsByDelegateBody,
36783 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36784 Ok(Self {
36785 id: value.id?,
36786 jsonrpc: value.jsonrpc?,
36787 method: value.method?,
36788 params: value.params?,
36789 })
36790 }
36791 }
36792 impl ::std::convert::From<super::PostGetCompressedTokenAccountsByDelegateBody>
36793 for PostGetCompressedTokenAccountsByDelegateBody {
36794 fn from(value: super::PostGetCompressedTokenAccountsByDelegateBody) -> Self {
36795 Self {
36796 id: Ok(value.id),
36797 jsonrpc: Ok(value.jsonrpc),
36798 method: Ok(value.method),
36799 params: Ok(value.params),
36800 }
36801 }
36802 }
36803 #[derive(Clone, Debug)]
36804 pub struct PostGetCompressedTokenAccountsByDelegateBodyParams {
36805 cursor: ::std::result::Result<
36806 ::std::option::Option<super::Base58String>,
36807 ::std::string::String,
36808 >,
36809 delegate: ::std::result::Result<
36810 super::SerializablePubkey,
36811 ::std::string::String,
36812 >,
36813 limit: ::std::result::Result<
36814 ::std::option::Option<super::Limit>,
36815 ::std::string::String,
36816 >,
36817 mint: ::std::result::Result<
36818 ::std::option::Option<super::SerializablePubkey>,
36819 ::std::string::String,
36820 >,
36821 }
36822 impl ::std::default::Default
36823 for PostGetCompressedTokenAccountsByDelegateBodyParams {
36824 fn default() -> Self {
36825 Self {
36826 cursor: Ok(Default::default()),
36827 delegate: Err("no value supplied for delegate".to_string()),
36828 limit: Ok(Default::default()),
36829 mint: Ok(Default::default()),
36830 }
36831 }
36832 }
36833 impl PostGetCompressedTokenAccountsByDelegateBodyParams {
36834 pub fn cursor<T>(mut self, value: T) -> Self
36835 where
36836 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
36837 T::Error: ::std::fmt::Display,
36838 {
36839 self.cursor = value
36840 .try_into()
36841 .map_err(|e| {
36842 format!("error converting supplied value for cursor: {e}")
36843 });
36844 self
36845 }
36846 pub fn delegate<T>(mut self, value: T) -> Self
36847 where
36848 T: ::std::convert::TryInto<super::SerializablePubkey>,
36849 T::Error: ::std::fmt::Display,
36850 {
36851 self.delegate = value
36852 .try_into()
36853 .map_err(|e| {
36854 format!("error converting supplied value for delegate: {e}")
36855 });
36856 self
36857 }
36858 pub fn limit<T>(mut self, value: T) -> Self
36859 where
36860 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
36861 T::Error: ::std::fmt::Display,
36862 {
36863 self.limit = value
36864 .try_into()
36865 .map_err(|e| {
36866 format!("error converting supplied value for limit: {e}")
36867 });
36868 self
36869 }
36870 pub fn mint<T>(mut self, value: T) -> Self
36871 where
36872 T: ::std::convert::TryInto<
36873 ::std::option::Option<super::SerializablePubkey>,
36874 >,
36875 T::Error: ::std::fmt::Display,
36876 {
36877 self.mint = value
36878 .try_into()
36879 .map_err(|e| {
36880 format!("error converting supplied value for mint: {e}")
36881 });
36882 self
36883 }
36884 }
36885 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByDelegateBodyParams>
36886 for super::PostGetCompressedTokenAccountsByDelegateBodyParams {
36887 type Error = super::error::ConversionError;
36888 fn try_from(
36889 value: PostGetCompressedTokenAccountsByDelegateBodyParams,
36890 ) -> ::std::result::Result<Self, super::error::ConversionError> {
36891 Ok(Self {
36892 cursor: value.cursor?,
36893 delegate: value.delegate?,
36894 limit: value.limit?,
36895 mint: value.mint?,
36896 })
36897 }
36898 }
36899 impl ::std::convert::From<
36900 super::PostGetCompressedTokenAccountsByDelegateBodyParams,
36901 > for PostGetCompressedTokenAccountsByDelegateBodyParams {
36902 fn from(
36903 value: super::PostGetCompressedTokenAccountsByDelegateBodyParams,
36904 ) -> Self {
36905 Self {
36906 cursor: Ok(value.cursor),
36907 delegate: Ok(value.delegate),
36908 limit: Ok(value.limit),
36909 mint: Ok(value.mint),
36910 }
36911 }
36912 }
36913 #[derive(Clone, Debug)]
36914 pub struct PostGetCompressedTokenAccountsByDelegateResponse {
36915 error: ::std::result::Result<
36916 ::std::option::Option<
36917 super::PostGetCompressedTokenAccountsByDelegateResponseError,
36918 >,
36919 ::std::string::String,
36920 >,
36921 id: ::std::result::Result<
36922 super::PostGetCompressedTokenAccountsByDelegateResponseId,
36923 ::std::string::String,
36924 >,
36925 jsonrpc: ::std::result::Result<
36926 super::PostGetCompressedTokenAccountsByDelegateResponseJsonrpc,
36927 ::std::string::String,
36928 >,
36929 result: ::std::result::Result<
36930 ::std::option::Option<
36931 super::PostGetCompressedTokenAccountsByDelegateResponseResult,
36932 >,
36933 ::std::string::String,
36934 >,
36935 }
36936 impl ::std::default::Default
36937 for PostGetCompressedTokenAccountsByDelegateResponse {
36938 fn default() -> Self {
36939 Self {
36940 error: Ok(Default::default()),
36941 id: Err("no value supplied for id".to_string()),
36942 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
36943 result: Ok(Default::default()),
36944 }
36945 }
36946 }
36947 impl PostGetCompressedTokenAccountsByDelegateResponse {
36948 pub fn error<T>(mut self, value: T) -> Self
36949 where
36950 T: ::std::convert::TryInto<
36951 ::std::option::Option<
36952 super::PostGetCompressedTokenAccountsByDelegateResponseError,
36953 >,
36954 >,
36955 T::Error: ::std::fmt::Display,
36956 {
36957 self.error = value
36958 .try_into()
36959 .map_err(|e| {
36960 format!("error converting supplied value for error: {e}")
36961 });
36962 self
36963 }
36964 pub fn id<T>(mut self, value: T) -> Self
36965 where
36966 T: ::std::convert::TryInto<
36967 super::PostGetCompressedTokenAccountsByDelegateResponseId,
36968 >,
36969 T::Error: ::std::fmt::Display,
36970 {
36971 self.id = value
36972 .try_into()
36973 .map_err(|e| format!("error converting supplied value for id: {e}"));
36974 self
36975 }
36976 pub fn jsonrpc<T>(mut self, value: T) -> Self
36977 where
36978 T: ::std::convert::TryInto<
36979 super::PostGetCompressedTokenAccountsByDelegateResponseJsonrpc,
36980 >,
36981 T::Error: ::std::fmt::Display,
36982 {
36983 self.jsonrpc = value
36984 .try_into()
36985 .map_err(|e| {
36986 format!("error converting supplied value for jsonrpc: {e}")
36987 });
36988 self
36989 }
36990 pub fn result<T>(mut self, value: T) -> Self
36991 where
36992 T: ::std::convert::TryInto<
36993 ::std::option::Option<
36994 super::PostGetCompressedTokenAccountsByDelegateResponseResult,
36995 >,
36996 >,
36997 T::Error: ::std::fmt::Display,
36998 {
36999 self.result = value
37000 .try_into()
37001 .map_err(|e| {
37002 format!("error converting supplied value for result: {e}")
37003 });
37004 self
37005 }
37006 }
37007 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByDelegateResponse>
37008 for super::PostGetCompressedTokenAccountsByDelegateResponse {
37009 type Error = super::error::ConversionError;
37010 fn try_from(
37011 value: PostGetCompressedTokenAccountsByDelegateResponse,
37012 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37013 Ok(Self {
37014 error: value.error?,
37015 id: value.id?,
37016 jsonrpc: value.jsonrpc?,
37017 result: value.result?,
37018 })
37019 }
37020 }
37021 impl ::std::convert::From<
37022 super::PostGetCompressedTokenAccountsByDelegateResponse,
37023 > for PostGetCompressedTokenAccountsByDelegateResponse {
37024 fn from(
37025 value: super::PostGetCompressedTokenAccountsByDelegateResponse,
37026 ) -> Self {
37027 Self {
37028 error: Ok(value.error),
37029 id: Ok(value.id),
37030 jsonrpc: Ok(value.jsonrpc),
37031 result: Ok(value.result),
37032 }
37033 }
37034 }
37035 #[derive(Clone, Debug)]
37036 pub struct PostGetCompressedTokenAccountsByDelegateResponseError {
37037 code: ::std::result::Result<
37038 ::std::option::Option<i64>,
37039 ::std::string::String,
37040 >,
37041 message: ::std::result::Result<
37042 ::std::option::Option<::std::string::String>,
37043 ::std::string::String,
37044 >,
37045 }
37046 impl ::std::default::Default
37047 for PostGetCompressedTokenAccountsByDelegateResponseError {
37048 fn default() -> Self {
37049 Self {
37050 code: Ok(Default::default()),
37051 message: Ok(Default::default()),
37052 }
37053 }
37054 }
37055 impl PostGetCompressedTokenAccountsByDelegateResponseError {
37056 pub fn code<T>(mut self, value: T) -> Self
37057 where
37058 T: ::std::convert::TryInto<::std::option::Option<i64>>,
37059 T::Error: ::std::fmt::Display,
37060 {
37061 self.code = value
37062 .try_into()
37063 .map_err(|e| {
37064 format!("error converting supplied value for code: {e}")
37065 });
37066 self
37067 }
37068 pub fn message<T>(mut self, value: T) -> Self
37069 where
37070 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
37071 T::Error: ::std::fmt::Display,
37072 {
37073 self.message = value
37074 .try_into()
37075 .map_err(|e| {
37076 format!("error converting supplied value for message: {e}")
37077 });
37078 self
37079 }
37080 }
37081 impl ::std::convert::TryFrom<
37082 PostGetCompressedTokenAccountsByDelegateResponseError,
37083 > for super::PostGetCompressedTokenAccountsByDelegateResponseError {
37084 type Error = super::error::ConversionError;
37085 fn try_from(
37086 value: PostGetCompressedTokenAccountsByDelegateResponseError,
37087 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37088 Ok(Self {
37089 code: value.code?,
37090 message: value.message?,
37091 })
37092 }
37093 }
37094 impl ::std::convert::From<
37095 super::PostGetCompressedTokenAccountsByDelegateResponseError,
37096 > for PostGetCompressedTokenAccountsByDelegateResponseError {
37097 fn from(
37098 value: super::PostGetCompressedTokenAccountsByDelegateResponseError,
37099 ) -> Self {
37100 Self {
37101 code: Ok(value.code),
37102 message: Ok(value.message),
37103 }
37104 }
37105 }
37106 #[derive(Clone, Debug)]
37107 pub struct PostGetCompressedTokenAccountsByDelegateResponseResult {
37108 context: ::std::result::Result<super::Context, ::std::string::String>,
37109 value: ::std::result::Result<super::TokenAccountList, ::std::string::String>,
37110 }
37111 impl ::std::default::Default
37112 for PostGetCompressedTokenAccountsByDelegateResponseResult {
37113 fn default() -> Self {
37114 Self {
37115 context: Err("no value supplied for context".to_string()),
37116 value: Err("no value supplied for value".to_string()),
37117 }
37118 }
37119 }
37120 impl PostGetCompressedTokenAccountsByDelegateResponseResult {
37121 pub fn context<T>(mut self, value: T) -> Self
37122 where
37123 T: ::std::convert::TryInto<super::Context>,
37124 T::Error: ::std::fmt::Display,
37125 {
37126 self.context = value
37127 .try_into()
37128 .map_err(|e| {
37129 format!("error converting supplied value for context: {e}")
37130 });
37131 self
37132 }
37133 pub fn value<T>(mut self, value: T) -> Self
37134 where
37135 T: ::std::convert::TryInto<super::TokenAccountList>,
37136 T::Error: ::std::fmt::Display,
37137 {
37138 self.value = value
37139 .try_into()
37140 .map_err(|e| {
37141 format!("error converting supplied value for value: {e}")
37142 });
37143 self
37144 }
37145 }
37146 impl ::std::convert::TryFrom<
37147 PostGetCompressedTokenAccountsByDelegateResponseResult,
37148 > for super::PostGetCompressedTokenAccountsByDelegateResponseResult {
37149 type Error = super::error::ConversionError;
37150 fn try_from(
37151 value: PostGetCompressedTokenAccountsByDelegateResponseResult,
37152 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37153 Ok(Self {
37154 context: value.context?,
37155 value: value.value?,
37156 })
37157 }
37158 }
37159 impl ::std::convert::From<
37160 super::PostGetCompressedTokenAccountsByDelegateResponseResult,
37161 > for PostGetCompressedTokenAccountsByDelegateResponseResult {
37162 fn from(
37163 value: super::PostGetCompressedTokenAccountsByDelegateResponseResult,
37164 ) -> Self {
37165 Self {
37166 context: Ok(value.context),
37167 value: Ok(value.value),
37168 }
37169 }
37170 }
37171 #[derive(Clone, Debug)]
37172 pub struct PostGetCompressedTokenAccountsByDelegateV2Body {
37173 id: ::std::result::Result<
37174 super::PostGetCompressedTokenAccountsByDelegateV2BodyId,
37175 ::std::string::String,
37176 >,
37177 jsonrpc: ::std::result::Result<
37178 super::PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc,
37179 ::std::string::String,
37180 >,
37181 method: ::std::result::Result<
37182 super::PostGetCompressedTokenAccountsByDelegateV2BodyMethod,
37183 ::std::string::String,
37184 >,
37185 params: ::std::result::Result<
37186 super::PostGetCompressedTokenAccountsByDelegateV2BodyParams,
37187 ::std::string::String,
37188 >,
37189 }
37190 impl ::std::default::Default for PostGetCompressedTokenAccountsByDelegateV2Body {
37191 fn default() -> Self {
37192 Self {
37193 id: Err("no value supplied for id".to_string()),
37194 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
37195 method: Err("no value supplied for method".to_string()),
37196 params: Err("no value supplied for params".to_string()),
37197 }
37198 }
37199 }
37200 impl PostGetCompressedTokenAccountsByDelegateV2Body {
37201 pub fn id<T>(mut self, value: T) -> Self
37202 where
37203 T: ::std::convert::TryInto<
37204 super::PostGetCompressedTokenAccountsByDelegateV2BodyId,
37205 >,
37206 T::Error: ::std::fmt::Display,
37207 {
37208 self.id = value
37209 .try_into()
37210 .map_err(|e| format!("error converting supplied value for id: {e}"));
37211 self
37212 }
37213 pub fn jsonrpc<T>(mut self, value: T) -> Self
37214 where
37215 T: ::std::convert::TryInto<
37216 super::PostGetCompressedTokenAccountsByDelegateV2BodyJsonrpc,
37217 >,
37218 T::Error: ::std::fmt::Display,
37219 {
37220 self.jsonrpc = value
37221 .try_into()
37222 .map_err(|e| {
37223 format!("error converting supplied value for jsonrpc: {e}")
37224 });
37225 self
37226 }
37227 pub fn method<T>(mut self, value: T) -> Self
37228 where
37229 T: ::std::convert::TryInto<
37230 super::PostGetCompressedTokenAccountsByDelegateV2BodyMethod,
37231 >,
37232 T::Error: ::std::fmt::Display,
37233 {
37234 self.method = value
37235 .try_into()
37236 .map_err(|e| {
37237 format!("error converting supplied value for method: {e}")
37238 });
37239 self
37240 }
37241 pub fn params<T>(mut self, value: T) -> Self
37242 where
37243 T: ::std::convert::TryInto<
37244 super::PostGetCompressedTokenAccountsByDelegateV2BodyParams,
37245 >,
37246 T::Error: ::std::fmt::Display,
37247 {
37248 self.params = value
37249 .try_into()
37250 .map_err(|e| {
37251 format!("error converting supplied value for params: {e}")
37252 });
37253 self
37254 }
37255 }
37256 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByDelegateV2Body>
37257 for super::PostGetCompressedTokenAccountsByDelegateV2Body {
37258 type Error = super::error::ConversionError;
37259 fn try_from(
37260 value: PostGetCompressedTokenAccountsByDelegateV2Body,
37261 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37262 Ok(Self {
37263 id: value.id?,
37264 jsonrpc: value.jsonrpc?,
37265 method: value.method?,
37266 params: value.params?,
37267 })
37268 }
37269 }
37270 impl ::std::convert::From<super::PostGetCompressedTokenAccountsByDelegateV2Body>
37271 for PostGetCompressedTokenAccountsByDelegateV2Body {
37272 fn from(
37273 value: super::PostGetCompressedTokenAccountsByDelegateV2Body,
37274 ) -> Self {
37275 Self {
37276 id: Ok(value.id),
37277 jsonrpc: Ok(value.jsonrpc),
37278 method: Ok(value.method),
37279 params: Ok(value.params),
37280 }
37281 }
37282 }
37283 #[derive(Clone, Debug)]
37284 pub struct PostGetCompressedTokenAccountsByDelegateV2BodyParams {
37285 cursor: ::std::result::Result<
37286 ::std::option::Option<super::Base58String>,
37287 ::std::string::String,
37288 >,
37289 delegate: ::std::result::Result<
37290 super::SerializablePubkey,
37291 ::std::string::String,
37292 >,
37293 limit: ::std::result::Result<
37294 ::std::option::Option<super::Limit>,
37295 ::std::string::String,
37296 >,
37297 mint: ::std::result::Result<
37298 ::std::option::Option<super::SerializablePubkey>,
37299 ::std::string::String,
37300 >,
37301 }
37302 impl ::std::default::Default
37303 for PostGetCompressedTokenAccountsByDelegateV2BodyParams {
37304 fn default() -> Self {
37305 Self {
37306 cursor: Ok(Default::default()),
37307 delegate: Err("no value supplied for delegate".to_string()),
37308 limit: Ok(Default::default()),
37309 mint: Ok(Default::default()),
37310 }
37311 }
37312 }
37313 impl PostGetCompressedTokenAccountsByDelegateV2BodyParams {
37314 pub fn cursor<T>(mut self, value: T) -> Self
37315 where
37316 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
37317 T::Error: ::std::fmt::Display,
37318 {
37319 self.cursor = value
37320 .try_into()
37321 .map_err(|e| {
37322 format!("error converting supplied value for cursor: {e}")
37323 });
37324 self
37325 }
37326 pub fn delegate<T>(mut self, value: T) -> Self
37327 where
37328 T: ::std::convert::TryInto<super::SerializablePubkey>,
37329 T::Error: ::std::fmt::Display,
37330 {
37331 self.delegate = value
37332 .try_into()
37333 .map_err(|e| {
37334 format!("error converting supplied value for delegate: {e}")
37335 });
37336 self
37337 }
37338 pub fn limit<T>(mut self, value: T) -> Self
37339 where
37340 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
37341 T::Error: ::std::fmt::Display,
37342 {
37343 self.limit = value
37344 .try_into()
37345 .map_err(|e| {
37346 format!("error converting supplied value for limit: {e}")
37347 });
37348 self
37349 }
37350 pub fn mint<T>(mut self, value: T) -> Self
37351 where
37352 T: ::std::convert::TryInto<
37353 ::std::option::Option<super::SerializablePubkey>,
37354 >,
37355 T::Error: ::std::fmt::Display,
37356 {
37357 self.mint = value
37358 .try_into()
37359 .map_err(|e| {
37360 format!("error converting supplied value for mint: {e}")
37361 });
37362 self
37363 }
37364 }
37365 impl ::std::convert::TryFrom<
37366 PostGetCompressedTokenAccountsByDelegateV2BodyParams,
37367 > for super::PostGetCompressedTokenAccountsByDelegateV2BodyParams {
37368 type Error = super::error::ConversionError;
37369 fn try_from(
37370 value: PostGetCompressedTokenAccountsByDelegateV2BodyParams,
37371 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37372 Ok(Self {
37373 cursor: value.cursor?,
37374 delegate: value.delegate?,
37375 limit: value.limit?,
37376 mint: value.mint?,
37377 })
37378 }
37379 }
37380 impl ::std::convert::From<
37381 super::PostGetCompressedTokenAccountsByDelegateV2BodyParams,
37382 > for PostGetCompressedTokenAccountsByDelegateV2BodyParams {
37383 fn from(
37384 value: super::PostGetCompressedTokenAccountsByDelegateV2BodyParams,
37385 ) -> Self {
37386 Self {
37387 cursor: Ok(value.cursor),
37388 delegate: Ok(value.delegate),
37389 limit: Ok(value.limit),
37390 mint: Ok(value.mint),
37391 }
37392 }
37393 }
37394 #[derive(Clone, Debug)]
37395 pub struct PostGetCompressedTokenAccountsByDelegateV2Response {
37396 error: ::std::result::Result<
37397 ::std::option::Option<
37398 super::PostGetCompressedTokenAccountsByDelegateV2ResponseError,
37399 >,
37400 ::std::string::String,
37401 >,
37402 id: ::std::result::Result<
37403 super::PostGetCompressedTokenAccountsByDelegateV2ResponseId,
37404 ::std::string::String,
37405 >,
37406 jsonrpc: ::std::result::Result<
37407 super::PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc,
37408 ::std::string::String,
37409 >,
37410 result: ::std::result::Result<
37411 ::std::option::Option<
37412 super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult,
37413 >,
37414 ::std::string::String,
37415 >,
37416 }
37417 impl ::std::default::Default
37418 for PostGetCompressedTokenAccountsByDelegateV2Response {
37419 fn default() -> Self {
37420 Self {
37421 error: Ok(Default::default()),
37422 id: Err("no value supplied for id".to_string()),
37423 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
37424 result: Ok(Default::default()),
37425 }
37426 }
37427 }
37428 impl PostGetCompressedTokenAccountsByDelegateV2Response {
37429 pub fn error<T>(mut self, value: T) -> Self
37430 where
37431 T: ::std::convert::TryInto<
37432 ::std::option::Option<
37433 super::PostGetCompressedTokenAccountsByDelegateV2ResponseError,
37434 >,
37435 >,
37436 T::Error: ::std::fmt::Display,
37437 {
37438 self.error = value
37439 .try_into()
37440 .map_err(|e| {
37441 format!("error converting supplied value for error: {e}")
37442 });
37443 self
37444 }
37445 pub fn id<T>(mut self, value: T) -> Self
37446 where
37447 T: ::std::convert::TryInto<
37448 super::PostGetCompressedTokenAccountsByDelegateV2ResponseId,
37449 >,
37450 T::Error: ::std::fmt::Display,
37451 {
37452 self.id = value
37453 .try_into()
37454 .map_err(|e| format!("error converting supplied value for id: {e}"));
37455 self
37456 }
37457 pub fn jsonrpc<T>(mut self, value: T) -> Self
37458 where
37459 T: ::std::convert::TryInto<
37460 super::PostGetCompressedTokenAccountsByDelegateV2ResponseJsonrpc,
37461 >,
37462 T::Error: ::std::fmt::Display,
37463 {
37464 self.jsonrpc = value
37465 .try_into()
37466 .map_err(|e| {
37467 format!("error converting supplied value for jsonrpc: {e}")
37468 });
37469 self
37470 }
37471 pub fn result<T>(mut self, value: T) -> Self
37472 where
37473 T: ::std::convert::TryInto<
37474 ::std::option::Option<
37475 super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult,
37476 >,
37477 >,
37478 T::Error: ::std::fmt::Display,
37479 {
37480 self.result = value
37481 .try_into()
37482 .map_err(|e| {
37483 format!("error converting supplied value for result: {e}")
37484 });
37485 self
37486 }
37487 }
37488 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByDelegateV2Response>
37489 for super::PostGetCompressedTokenAccountsByDelegateV2Response {
37490 type Error = super::error::ConversionError;
37491 fn try_from(
37492 value: PostGetCompressedTokenAccountsByDelegateV2Response,
37493 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37494 Ok(Self {
37495 error: value.error?,
37496 id: value.id?,
37497 jsonrpc: value.jsonrpc?,
37498 result: value.result?,
37499 })
37500 }
37501 }
37502 impl ::std::convert::From<
37503 super::PostGetCompressedTokenAccountsByDelegateV2Response,
37504 > for PostGetCompressedTokenAccountsByDelegateV2Response {
37505 fn from(
37506 value: super::PostGetCompressedTokenAccountsByDelegateV2Response,
37507 ) -> Self {
37508 Self {
37509 error: Ok(value.error),
37510 id: Ok(value.id),
37511 jsonrpc: Ok(value.jsonrpc),
37512 result: Ok(value.result),
37513 }
37514 }
37515 }
37516 #[derive(Clone, Debug)]
37517 pub struct PostGetCompressedTokenAccountsByDelegateV2ResponseError {
37518 code: ::std::result::Result<
37519 ::std::option::Option<i64>,
37520 ::std::string::String,
37521 >,
37522 message: ::std::result::Result<
37523 ::std::option::Option<::std::string::String>,
37524 ::std::string::String,
37525 >,
37526 }
37527 impl ::std::default::Default
37528 for PostGetCompressedTokenAccountsByDelegateV2ResponseError {
37529 fn default() -> Self {
37530 Self {
37531 code: Ok(Default::default()),
37532 message: Ok(Default::default()),
37533 }
37534 }
37535 }
37536 impl PostGetCompressedTokenAccountsByDelegateV2ResponseError {
37537 pub fn code<T>(mut self, value: T) -> Self
37538 where
37539 T: ::std::convert::TryInto<::std::option::Option<i64>>,
37540 T::Error: ::std::fmt::Display,
37541 {
37542 self.code = value
37543 .try_into()
37544 .map_err(|e| {
37545 format!("error converting supplied value for code: {e}")
37546 });
37547 self
37548 }
37549 pub fn message<T>(mut self, value: T) -> Self
37550 where
37551 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
37552 T::Error: ::std::fmt::Display,
37553 {
37554 self.message = value
37555 .try_into()
37556 .map_err(|e| {
37557 format!("error converting supplied value for message: {e}")
37558 });
37559 self
37560 }
37561 }
37562 impl ::std::convert::TryFrom<
37563 PostGetCompressedTokenAccountsByDelegateV2ResponseError,
37564 > for super::PostGetCompressedTokenAccountsByDelegateV2ResponseError {
37565 type Error = super::error::ConversionError;
37566 fn try_from(
37567 value: PostGetCompressedTokenAccountsByDelegateV2ResponseError,
37568 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37569 Ok(Self {
37570 code: value.code?,
37571 message: value.message?,
37572 })
37573 }
37574 }
37575 impl ::std::convert::From<
37576 super::PostGetCompressedTokenAccountsByDelegateV2ResponseError,
37577 > for PostGetCompressedTokenAccountsByDelegateV2ResponseError {
37578 fn from(
37579 value: super::PostGetCompressedTokenAccountsByDelegateV2ResponseError,
37580 ) -> Self {
37581 Self {
37582 code: Ok(value.code),
37583 message: Ok(value.message),
37584 }
37585 }
37586 }
37587 #[derive(Clone, Debug)]
37588 pub struct PostGetCompressedTokenAccountsByDelegateV2ResponseResult {
37589 context: ::std::result::Result<super::Context, ::std::string::String>,
37590 value: ::std::result::Result<
37591 super::TokenAccountListV2,
37592 ::std::string::String,
37593 >,
37594 }
37595 impl ::std::default::Default
37596 for PostGetCompressedTokenAccountsByDelegateV2ResponseResult {
37597 fn default() -> Self {
37598 Self {
37599 context: Err("no value supplied for context".to_string()),
37600 value: Err("no value supplied for value".to_string()),
37601 }
37602 }
37603 }
37604 impl PostGetCompressedTokenAccountsByDelegateV2ResponseResult {
37605 pub fn context<T>(mut self, value: T) -> Self
37606 where
37607 T: ::std::convert::TryInto<super::Context>,
37608 T::Error: ::std::fmt::Display,
37609 {
37610 self.context = value
37611 .try_into()
37612 .map_err(|e| {
37613 format!("error converting supplied value for context: {e}")
37614 });
37615 self
37616 }
37617 pub fn value<T>(mut self, value: T) -> Self
37618 where
37619 T: ::std::convert::TryInto<super::TokenAccountListV2>,
37620 T::Error: ::std::fmt::Display,
37621 {
37622 self.value = value
37623 .try_into()
37624 .map_err(|e| {
37625 format!("error converting supplied value for value: {e}")
37626 });
37627 self
37628 }
37629 }
37630 impl ::std::convert::TryFrom<
37631 PostGetCompressedTokenAccountsByDelegateV2ResponseResult,
37632 > for super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult {
37633 type Error = super::error::ConversionError;
37634 fn try_from(
37635 value: PostGetCompressedTokenAccountsByDelegateV2ResponseResult,
37636 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37637 Ok(Self {
37638 context: value.context?,
37639 value: value.value?,
37640 })
37641 }
37642 }
37643 impl ::std::convert::From<
37644 super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult,
37645 > for PostGetCompressedTokenAccountsByDelegateV2ResponseResult {
37646 fn from(
37647 value: super::PostGetCompressedTokenAccountsByDelegateV2ResponseResult,
37648 ) -> Self {
37649 Self {
37650 context: Ok(value.context),
37651 value: Ok(value.value),
37652 }
37653 }
37654 }
37655 #[derive(Clone, Debug)]
37656 pub struct PostGetCompressedTokenAccountsByOwnerBody {
37657 id: ::std::result::Result<
37658 super::PostGetCompressedTokenAccountsByOwnerBodyId,
37659 ::std::string::String,
37660 >,
37661 jsonrpc: ::std::result::Result<
37662 super::PostGetCompressedTokenAccountsByOwnerBodyJsonrpc,
37663 ::std::string::String,
37664 >,
37665 method: ::std::result::Result<
37666 super::PostGetCompressedTokenAccountsByOwnerBodyMethod,
37667 ::std::string::String,
37668 >,
37669 params: ::std::result::Result<
37670 super::PostGetCompressedTokenAccountsByOwnerBodyParams,
37671 ::std::string::String,
37672 >,
37673 }
37674 impl ::std::default::Default for PostGetCompressedTokenAccountsByOwnerBody {
37675 fn default() -> Self {
37676 Self {
37677 id: Err("no value supplied for id".to_string()),
37678 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
37679 method: Err("no value supplied for method".to_string()),
37680 params: Err("no value supplied for params".to_string()),
37681 }
37682 }
37683 }
37684 impl PostGetCompressedTokenAccountsByOwnerBody {
37685 pub fn id<T>(mut self, value: T) -> Self
37686 where
37687 T: ::std::convert::TryInto<
37688 super::PostGetCompressedTokenAccountsByOwnerBodyId,
37689 >,
37690 T::Error: ::std::fmt::Display,
37691 {
37692 self.id = value
37693 .try_into()
37694 .map_err(|e| format!("error converting supplied value for id: {e}"));
37695 self
37696 }
37697 pub fn jsonrpc<T>(mut self, value: T) -> Self
37698 where
37699 T: ::std::convert::TryInto<
37700 super::PostGetCompressedTokenAccountsByOwnerBodyJsonrpc,
37701 >,
37702 T::Error: ::std::fmt::Display,
37703 {
37704 self.jsonrpc = value
37705 .try_into()
37706 .map_err(|e| {
37707 format!("error converting supplied value for jsonrpc: {e}")
37708 });
37709 self
37710 }
37711 pub fn method<T>(mut self, value: T) -> Self
37712 where
37713 T: ::std::convert::TryInto<
37714 super::PostGetCompressedTokenAccountsByOwnerBodyMethod,
37715 >,
37716 T::Error: ::std::fmt::Display,
37717 {
37718 self.method = value
37719 .try_into()
37720 .map_err(|e| {
37721 format!("error converting supplied value for method: {e}")
37722 });
37723 self
37724 }
37725 pub fn params<T>(mut self, value: T) -> Self
37726 where
37727 T: ::std::convert::TryInto<
37728 super::PostGetCompressedTokenAccountsByOwnerBodyParams,
37729 >,
37730 T::Error: ::std::fmt::Display,
37731 {
37732 self.params = value
37733 .try_into()
37734 .map_err(|e| {
37735 format!("error converting supplied value for params: {e}")
37736 });
37737 self
37738 }
37739 }
37740 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByOwnerBody>
37741 for super::PostGetCompressedTokenAccountsByOwnerBody {
37742 type Error = super::error::ConversionError;
37743 fn try_from(
37744 value: PostGetCompressedTokenAccountsByOwnerBody,
37745 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37746 Ok(Self {
37747 id: value.id?,
37748 jsonrpc: value.jsonrpc?,
37749 method: value.method?,
37750 params: value.params?,
37751 })
37752 }
37753 }
37754 impl ::std::convert::From<super::PostGetCompressedTokenAccountsByOwnerBody>
37755 for PostGetCompressedTokenAccountsByOwnerBody {
37756 fn from(value: super::PostGetCompressedTokenAccountsByOwnerBody) -> Self {
37757 Self {
37758 id: Ok(value.id),
37759 jsonrpc: Ok(value.jsonrpc),
37760 method: Ok(value.method),
37761 params: Ok(value.params),
37762 }
37763 }
37764 }
37765 #[derive(Clone, Debug)]
37766 pub struct PostGetCompressedTokenAccountsByOwnerBodyParams {
37767 cursor: ::std::result::Result<
37768 ::std::option::Option<super::Base58String>,
37769 ::std::string::String,
37770 >,
37771 limit: ::std::result::Result<
37772 ::std::option::Option<super::Limit>,
37773 ::std::string::String,
37774 >,
37775 mint: ::std::result::Result<
37776 ::std::option::Option<super::SerializablePubkey>,
37777 ::std::string::String,
37778 >,
37779 owner: ::std::result::Result<
37780 super::SerializablePubkey,
37781 ::std::string::String,
37782 >,
37783 }
37784 impl ::std::default::Default
37785 for PostGetCompressedTokenAccountsByOwnerBodyParams {
37786 fn default() -> Self {
37787 Self {
37788 cursor: Ok(Default::default()),
37789 limit: Ok(Default::default()),
37790 mint: Ok(Default::default()),
37791 owner: Err("no value supplied for owner".to_string()),
37792 }
37793 }
37794 }
37795 impl PostGetCompressedTokenAccountsByOwnerBodyParams {
37796 pub fn cursor<T>(mut self, value: T) -> Self
37797 where
37798 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
37799 T::Error: ::std::fmt::Display,
37800 {
37801 self.cursor = value
37802 .try_into()
37803 .map_err(|e| {
37804 format!("error converting supplied value for cursor: {e}")
37805 });
37806 self
37807 }
37808 pub fn limit<T>(mut self, value: T) -> Self
37809 where
37810 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
37811 T::Error: ::std::fmt::Display,
37812 {
37813 self.limit = value
37814 .try_into()
37815 .map_err(|e| {
37816 format!("error converting supplied value for limit: {e}")
37817 });
37818 self
37819 }
37820 pub fn mint<T>(mut self, value: T) -> Self
37821 where
37822 T: ::std::convert::TryInto<
37823 ::std::option::Option<super::SerializablePubkey>,
37824 >,
37825 T::Error: ::std::fmt::Display,
37826 {
37827 self.mint = value
37828 .try_into()
37829 .map_err(|e| {
37830 format!("error converting supplied value for mint: {e}")
37831 });
37832 self
37833 }
37834 pub fn owner<T>(mut self, value: T) -> Self
37835 where
37836 T: ::std::convert::TryInto<super::SerializablePubkey>,
37837 T::Error: ::std::fmt::Display,
37838 {
37839 self.owner = value
37840 .try_into()
37841 .map_err(|e| {
37842 format!("error converting supplied value for owner: {e}")
37843 });
37844 self
37845 }
37846 }
37847 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByOwnerBodyParams>
37848 for super::PostGetCompressedTokenAccountsByOwnerBodyParams {
37849 type Error = super::error::ConversionError;
37850 fn try_from(
37851 value: PostGetCompressedTokenAccountsByOwnerBodyParams,
37852 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37853 Ok(Self {
37854 cursor: value.cursor?,
37855 limit: value.limit?,
37856 mint: value.mint?,
37857 owner: value.owner?,
37858 })
37859 }
37860 }
37861 impl ::std::convert::From<super::PostGetCompressedTokenAccountsByOwnerBodyParams>
37862 for PostGetCompressedTokenAccountsByOwnerBodyParams {
37863 fn from(
37864 value: super::PostGetCompressedTokenAccountsByOwnerBodyParams,
37865 ) -> Self {
37866 Self {
37867 cursor: Ok(value.cursor),
37868 limit: Ok(value.limit),
37869 mint: Ok(value.mint),
37870 owner: Ok(value.owner),
37871 }
37872 }
37873 }
37874 #[derive(Clone, Debug)]
37875 pub struct PostGetCompressedTokenAccountsByOwnerResponse {
37876 error: ::std::result::Result<
37877 ::std::option::Option<
37878 super::PostGetCompressedTokenAccountsByOwnerResponseError,
37879 >,
37880 ::std::string::String,
37881 >,
37882 id: ::std::result::Result<
37883 super::PostGetCompressedTokenAccountsByOwnerResponseId,
37884 ::std::string::String,
37885 >,
37886 jsonrpc: ::std::result::Result<
37887 super::PostGetCompressedTokenAccountsByOwnerResponseJsonrpc,
37888 ::std::string::String,
37889 >,
37890 result: ::std::result::Result<
37891 ::std::option::Option<
37892 super::PostGetCompressedTokenAccountsByOwnerResponseResult,
37893 >,
37894 ::std::string::String,
37895 >,
37896 }
37897 impl ::std::default::Default for PostGetCompressedTokenAccountsByOwnerResponse {
37898 fn default() -> Self {
37899 Self {
37900 error: Ok(Default::default()),
37901 id: Err("no value supplied for id".to_string()),
37902 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
37903 result: Ok(Default::default()),
37904 }
37905 }
37906 }
37907 impl PostGetCompressedTokenAccountsByOwnerResponse {
37908 pub fn error<T>(mut self, value: T) -> Self
37909 where
37910 T: ::std::convert::TryInto<
37911 ::std::option::Option<
37912 super::PostGetCompressedTokenAccountsByOwnerResponseError,
37913 >,
37914 >,
37915 T::Error: ::std::fmt::Display,
37916 {
37917 self.error = value
37918 .try_into()
37919 .map_err(|e| {
37920 format!("error converting supplied value for error: {e}")
37921 });
37922 self
37923 }
37924 pub fn id<T>(mut self, value: T) -> Self
37925 where
37926 T: ::std::convert::TryInto<
37927 super::PostGetCompressedTokenAccountsByOwnerResponseId,
37928 >,
37929 T::Error: ::std::fmt::Display,
37930 {
37931 self.id = value
37932 .try_into()
37933 .map_err(|e| format!("error converting supplied value for id: {e}"));
37934 self
37935 }
37936 pub fn jsonrpc<T>(mut self, value: T) -> Self
37937 where
37938 T: ::std::convert::TryInto<
37939 super::PostGetCompressedTokenAccountsByOwnerResponseJsonrpc,
37940 >,
37941 T::Error: ::std::fmt::Display,
37942 {
37943 self.jsonrpc = value
37944 .try_into()
37945 .map_err(|e| {
37946 format!("error converting supplied value for jsonrpc: {e}")
37947 });
37948 self
37949 }
37950 pub fn result<T>(mut self, value: T) -> Self
37951 where
37952 T: ::std::convert::TryInto<
37953 ::std::option::Option<
37954 super::PostGetCompressedTokenAccountsByOwnerResponseResult,
37955 >,
37956 >,
37957 T::Error: ::std::fmt::Display,
37958 {
37959 self.result = value
37960 .try_into()
37961 .map_err(|e| {
37962 format!("error converting supplied value for result: {e}")
37963 });
37964 self
37965 }
37966 }
37967 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByOwnerResponse>
37968 for super::PostGetCompressedTokenAccountsByOwnerResponse {
37969 type Error = super::error::ConversionError;
37970 fn try_from(
37971 value: PostGetCompressedTokenAccountsByOwnerResponse,
37972 ) -> ::std::result::Result<Self, super::error::ConversionError> {
37973 Ok(Self {
37974 error: value.error?,
37975 id: value.id?,
37976 jsonrpc: value.jsonrpc?,
37977 result: value.result?,
37978 })
37979 }
37980 }
37981 impl ::std::convert::From<super::PostGetCompressedTokenAccountsByOwnerResponse>
37982 for PostGetCompressedTokenAccountsByOwnerResponse {
37983 fn from(
37984 value: super::PostGetCompressedTokenAccountsByOwnerResponse,
37985 ) -> Self {
37986 Self {
37987 error: Ok(value.error),
37988 id: Ok(value.id),
37989 jsonrpc: Ok(value.jsonrpc),
37990 result: Ok(value.result),
37991 }
37992 }
37993 }
37994 #[derive(Clone, Debug)]
37995 pub struct PostGetCompressedTokenAccountsByOwnerResponseError {
37996 code: ::std::result::Result<
37997 ::std::option::Option<i64>,
37998 ::std::string::String,
37999 >,
38000 message: ::std::result::Result<
38001 ::std::option::Option<::std::string::String>,
38002 ::std::string::String,
38003 >,
38004 }
38005 impl ::std::default::Default
38006 for PostGetCompressedTokenAccountsByOwnerResponseError {
38007 fn default() -> Self {
38008 Self {
38009 code: Ok(Default::default()),
38010 message: Ok(Default::default()),
38011 }
38012 }
38013 }
38014 impl PostGetCompressedTokenAccountsByOwnerResponseError {
38015 pub fn code<T>(mut self, value: T) -> Self
38016 where
38017 T: ::std::convert::TryInto<::std::option::Option<i64>>,
38018 T::Error: ::std::fmt::Display,
38019 {
38020 self.code = value
38021 .try_into()
38022 .map_err(|e| {
38023 format!("error converting supplied value for code: {e}")
38024 });
38025 self
38026 }
38027 pub fn message<T>(mut self, value: T) -> Self
38028 where
38029 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
38030 T::Error: ::std::fmt::Display,
38031 {
38032 self.message = value
38033 .try_into()
38034 .map_err(|e| {
38035 format!("error converting supplied value for message: {e}")
38036 });
38037 self
38038 }
38039 }
38040 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByOwnerResponseError>
38041 for super::PostGetCompressedTokenAccountsByOwnerResponseError {
38042 type Error = super::error::ConversionError;
38043 fn try_from(
38044 value: PostGetCompressedTokenAccountsByOwnerResponseError,
38045 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38046 Ok(Self {
38047 code: value.code?,
38048 message: value.message?,
38049 })
38050 }
38051 }
38052 impl ::std::convert::From<
38053 super::PostGetCompressedTokenAccountsByOwnerResponseError,
38054 > for PostGetCompressedTokenAccountsByOwnerResponseError {
38055 fn from(
38056 value: super::PostGetCompressedTokenAccountsByOwnerResponseError,
38057 ) -> Self {
38058 Self {
38059 code: Ok(value.code),
38060 message: Ok(value.message),
38061 }
38062 }
38063 }
38064 #[derive(Clone, Debug)]
38065 pub struct PostGetCompressedTokenAccountsByOwnerResponseResult {
38066 context: ::std::result::Result<super::Context, ::std::string::String>,
38067 value: ::std::result::Result<super::TokenAccountList, ::std::string::String>,
38068 }
38069 impl ::std::default::Default
38070 for PostGetCompressedTokenAccountsByOwnerResponseResult {
38071 fn default() -> Self {
38072 Self {
38073 context: Err("no value supplied for context".to_string()),
38074 value: Err("no value supplied for value".to_string()),
38075 }
38076 }
38077 }
38078 impl PostGetCompressedTokenAccountsByOwnerResponseResult {
38079 pub fn context<T>(mut self, value: T) -> Self
38080 where
38081 T: ::std::convert::TryInto<super::Context>,
38082 T::Error: ::std::fmt::Display,
38083 {
38084 self.context = value
38085 .try_into()
38086 .map_err(|e| {
38087 format!("error converting supplied value for context: {e}")
38088 });
38089 self
38090 }
38091 pub fn value<T>(mut self, value: T) -> Self
38092 where
38093 T: ::std::convert::TryInto<super::TokenAccountList>,
38094 T::Error: ::std::fmt::Display,
38095 {
38096 self.value = value
38097 .try_into()
38098 .map_err(|e| {
38099 format!("error converting supplied value for value: {e}")
38100 });
38101 self
38102 }
38103 }
38104 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByOwnerResponseResult>
38105 for super::PostGetCompressedTokenAccountsByOwnerResponseResult {
38106 type Error = super::error::ConversionError;
38107 fn try_from(
38108 value: PostGetCompressedTokenAccountsByOwnerResponseResult,
38109 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38110 Ok(Self {
38111 context: value.context?,
38112 value: value.value?,
38113 })
38114 }
38115 }
38116 impl ::std::convert::From<
38117 super::PostGetCompressedTokenAccountsByOwnerResponseResult,
38118 > for PostGetCompressedTokenAccountsByOwnerResponseResult {
38119 fn from(
38120 value: super::PostGetCompressedTokenAccountsByOwnerResponseResult,
38121 ) -> Self {
38122 Self {
38123 context: Ok(value.context),
38124 value: Ok(value.value),
38125 }
38126 }
38127 }
38128 #[derive(Clone, Debug)]
38129 pub struct PostGetCompressedTokenAccountsByOwnerV2Body {
38130 id: ::std::result::Result<
38131 super::PostGetCompressedTokenAccountsByOwnerV2BodyId,
38132 ::std::string::String,
38133 >,
38134 jsonrpc: ::std::result::Result<
38135 super::PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc,
38136 ::std::string::String,
38137 >,
38138 method: ::std::result::Result<
38139 super::PostGetCompressedTokenAccountsByOwnerV2BodyMethod,
38140 ::std::string::String,
38141 >,
38142 params: ::std::result::Result<
38143 super::PostGetCompressedTokenAccountsByOwnerV2BodyParams,
38144 ::std::string::String,
38145 >,
38146 }
38147 impl ::std::default::Default for PostGetCompressedTokenAccountsByOwnerV2Body {
38148 fn default() -> Self {
38149 Self {
38150 id: Err("no value supplied for id".to_string()),
38151 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
38152 method: Err("no value supplied for method".to_string()),
38153 params: Err("no value supplied for params".to_string()),
38154 }
38155 }
38156 }
38157 impl PostGetCompressedTokenAccountsByOwnerV2Body {
38158 pub fn id<T>(mut self, value: T) -> Self
38159 where
38160 T: ::std::convert::TryInto<
38161 super::PostGetCompressedTokenAccountsByOwnerV2BodyId,
38162 >,
38163 T::Error: ::std::fmt::Display,
38164 {
38165 self.id = value
38166 .try_into()
38167 .map_err(|e| format!("error converting supplied value for id: {e}"));
38168 self
38169 }
38170 pub fn jsonrpc<T>(mut self, value: T) -> Self
38171 where
38172 T: ::std::convert::TryInto<
38173 super::PostGetCompressedTokenAccountsByOwnerV2BodyJsonrpc,
38174 >,
38175 T::Error: ::std::fmt::Display,
38176 {
38177 self.jsonrpc = value
38178 .try_into()
38179 .map_err(|e| {
38180 format!("error converting supplied value for jsonrpc: {e}")
38181 });
38182 self
38183 }
38184 pub fn method<T>(mut self, value: T) -> Self
38185 where
38186 T: ::std::convert::TryInto<
38187 super::PostGetCompressedTokenAccountsByOwnerV2BodyMethod,
38188 >,
38189 T::Error: ::std::fmt::Display,
38190 {
38191 self.method = value
38192 .try_into()
38193 .map_err(|e| {
38194 format!("error converting supplied value for method: {e}")
38195 });
38196 self
38197 }
38198 pub fn params<T>(mut self, value: T) -> Self
38199 where
38200 T: ::std::convert::TryInto<
38201 super::PostGetCompressedTokenAccountsByOwnerV2BodyParams,
38202 >,
38203 T::Error: ::std::fmt::Display,
38204 {
38205 self.params = value
38206 .try_into()
38207 .map_err(|e| {
38208 format!("error converting supplied value for params: {e}")
38209 });
38210 self
38211 }
38212 }
38213 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByOwnerV2Body>
38214 for super::PostGetCompressedTokenAccountsByOwnerV2Body {
38215 type Error = super::error::ConversionError;
38216 fn try_from(
38217 value: PostGetCompressedTokenAccountsByOwnerV2Body,
38218 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38219 Ok(Self {
38220 id: value.id?,
38221 jsonrpc: value.jsonrpc?,
38222 method: value.method?,
38223 params: value.params?,
38224 })
38225 }
38226 }
38227 impl ::std::convert::From<super::PostGetCompressedTokenAccountsByOwnerV2Body>
38228 for PostGetCompressedTokenAccountsByOwnerV2Body {
38229 fn from(value: super::PostGetCompressedTokenAccountsByOwnerV2Body) -> Self {
38230 Self {
38231 id: Ok(value.id),
38232 jsonrpc: Ok(value.jsonrpc),
38233 method: Ok(value.method),
38234 params: Ok(value.params),
38235 }
38236 }
38237 }
38238 #[derive(Clone, Debug)]
38239 pub struct PostGetCompressedTokenAccountsByOwnerV2BodyParams {
38240 cursor: ::std::result::Result<
38241 ::std::option::Option<super::Base58String>,
38242 ::std::string::String,
38243 >,
38244 limit: ::std::result::Result<
38245 ::std::option::Option<super::Limit>,
38246 ::std::string::String,
38247 >,
38248 mint: ::std::result::Result<
38249 ::std::option::Option<super::SerializablePubkey>,
38250 ::std::string::String,
38251 >,
38252 owner: ::std::result::Result<
38253 super::SerializablePubkey,
38254 ::std::string::String,
38255 >,
38256 }
38257 impl ::std::default::Default
38258 for PostGetCompressedTokenAccountsByOwnerV2BodyParams {
38259 fn default() -> Self {
38260 Self {
38261 cursor: Ok(Default::default()),
38262 limit: Ok(Default::default()),
38263 mint: Ok(Default::default()),
38264 owner: Err("no value supplied for owner".to_string()),
38265 }
38266 }
38267 }
38268 impl PostGetCompressedTokenAccountsByOwnerV2BodyParams {
38269 pub fn cursor<T>(mut self, value: T) -> Self
38270 where
38271 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
38272 T::Error: ::std::fmt::Display,
38273 {
38274 self.cursor = value
38275 .try_into()
38276 .map_err(|e| {
38277 format!("error converting supplied value for cursor: {e}")
38278 });
38279 self
38280 }
38281 pub fn limit<T>(mut self, value: T) -> Self
38282 where
38283 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
38284 T::Error: ::std::fmt::Display,
38285 {
38286 self.limit = value
38287 .try_into()
38288 .map_err(|e| {
38289 format!("error converting supplied value for limit: {e}")
38290 });
38291 self
38292 }
38293 pub fn mint<T>(mut self, value: T) -> Self
38294 where
38295 T: ::std::convert::TryInto<
38296 ::std::option::Option<super::SerializablePubkey>,
38297 >,
38298 T::Error: ::std::fmt::Display,
38299 {
38300 self.mint = value
38301 .try_into()
38302 .map_err(|e| {
38303 format!("error converting supplied value for mint: {e}")
38304 });
38305 self
38306 }
38307 pub fn owner<T>(mut self, value: T) -> Self
38308 where
38309 T: ::std::convert::TryInto<super::SerializablePubkey>,
38310 T::Error: ::std::fmt::Display,
38311 {
38312 self.owner = value
38313 .try_into()
38314 .map_err(|e| {
38315 format!("error converting supplied value for owner: {e}")
38316 });
38317 self
38318 }
38319 }
38320 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByOwnerV2BodyParams>
38321 for super::PostGetCompressedTokenAccountsByOwnerV2BodyParams {
38322 type Error = super::error::ConversionError;
38323 fn try_from(
38324 value: PostGetCompressedTokenAccountsByOwnerV2BodyParams,
38325 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38326 Ok(Self {
38327 cursor: value.cursor?,
38328 limit: value.limit?,
38329 mint: value.mint?,
38330 owner: value.owner?,
38331 })
38332 }
38333 }
38334 impl ::std::convert::From<
38335 super::PostGetCompressedTokenAccountsByOwnerV2BodyParams,
38336 > for PostGetCompressedTokenAccountsByOwnerV2BodyParams {
38337 fn from(
38338 value: super::PostGetCompressedTokenAccountsByOwnerV2BodyParams,
38339 ) -> Self {
38340 Self {
38341 cursor: Ok(value.cursor),
38342 limit: Ok(value.limit),
38343 mint: Ok(value.mint),
38344 owner: Ok(value.owner),
38345 }
38346 }
38347 }
38348 #[derive(Clone, Debug)]
38349 pub struct PostGetCompressedTokenAccountsByOwnerV2Response {
38350 error: ::std::result::Result<
38351 ::std::option::Option<
38352 super::PostGetCompressedTokenAccountsByOwnerV2ResponseError,
38353 >,
38354 ::std::string::String,
38355 >,
38356 id: ::std::result::Result<
38357 super::PostGetCompressedTokenAccountsByOwnerV2ResponseId,
38358 ::std::string::String,
38359 >,
38360 jsonrpc: ::std::result::Result<
38361 super::PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc,
38362 ::std::string::String,
38363 >,
38364 result: ::std::result::Result<
38365 ::std::option::Option<
38366 super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult,
38367 >,
38368 ::std::string::String,
38369 >,
38370 }
38371 impl ::std::default::Default
38372 for PostGetCompressedTokenAccountsByOwnerV2Response {
38373 fn default() -> Self {
38374 Self {
38375 error: Ok(Default::default()),
38376 id: Err("no value supplied for id".to_string()),
38377 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
38378 result: Ok(Default::default()),
38379 }
38380 }
38381 }
38382 impl PostGetCompressedTokenAccountsByOwnerV2Response {
38383 pub fn error<T>(mut self, value: T) -> Self
38384 where
38385 T: ::std::convert::TryInto<
38386 ::std::option::Option<
38387 super::PostGetCompressedTokenAccountsByOwnerV2ResponseError,
38388 >,
38389 >,
38390 T::Error: ::std::fmt::Display,
38391 {
38392 self.error = value
38393 .try_into()
38394 .map_err(|e| {
38395 format!("error converting supplied value for error: {e}")
38396 });
38397 self
38398 }
38399 pub fn id<T>(mut self, value: T) -> Self
38400 where
38401 T: ::std::convert::TryInto<
38402 super::PostGetCompressedTokenAccountsByOwnerV2ResponseId,
38403 >,
38404 T::Error: ::std::fmt::Display,
38405 {
38406 self.id = value
38407 .try_into()
38408 .map_err(|e| format!("error converting supplied value for id: {e}"));
38409 self
38410 }
38411 pub fn jsonrpc<T>(mut self, value: T) -> Self
38412 where
38413 T: ::std::convert::TryInto<
38414 super::PostGetCompressedTokenAccountsByOwnerV2ResponseJsonrpc,
38415 >,
38416 T::Error: ::std::fmt::Display,
38417 {
38418 self.jsonrpc = value
38419 .try_into()
38420 .map_err(|e| {
38421 format!("error converting supplied value for jsonrpc: {e}")
38422 });
38423 self
38424 }
38425 pub fn result<T>(mut self, value: T) -> Self
38426 where
38427 T: ::std::convert::TryInto<
38428 ::std::option::Option<
38429 super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult,
38430 >,
38431 >,
38432 T::Error: ::std::fmt::Display,
38433 {
38434 self.result = value
38435 .try_into()
38436 .map_err(|e| {
38437 format!("error converting supplied value for result: {e}")
38438 });
38439 self
38440 }
38441 }
38442 impl ::std::convert::TryFrom<PostGetCompressedTokenAccountsByOwnerV2Response>
38443 for super::PostGetCompressedTokenAccountsByOwnerV2Response {
38444 type Error = super::error::ConversionError;
38445 fn try_from(
38446 value: PostGetCompressedTokenAccountsByOwnerV2Response,
38447 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38448 Ok(Self {
38449 error: value.error?,
38450 id: value.id?,
38451 jsonrpc: value.jsonrpc?,
38452 result: value.result?,
38453 })
38454 }
38455 }
38456 impl ::std::convert::From<super::PostGetCompressedTokenAccountsByOwnerV2Response>
38457 for PostGetCompressedTokenAccountsByOwnerV2Response {
38458 fn from(
38459 value: super::PostGetCompressedTokenAccountsByOwnerV2Response,
38460 ) -> Self {
38461 Self {
38462 error: Ok(value.error),
38463 id: Ok(value.id),
38464 jsonrpc: Ok(value.jsonrpc),
38465 result: Ok(value.result),
38466 }
38467 }
38468 }
38469 #[derive(Clone, Debug)]
38470 pub struct PostGetCompressedTokenAccountsByOwnerV2ResponseError {
38471 code: ::std::result::Result<
38472 ::std::option::Option<i64>,
38473 ::std::string::String,
38474 >,
38475 message: ::std::result::Result<
38476 ::std::option::Option<::std::string::String>,
38477 ::std::string::String,
38478 >,
38479 }
38480 impl ::std::default::Default
38481 for PostGetCompressedTokenAccountsByOwnerV2ResponseError {
38482 fn default() -> Self {
38483 Self {
38484 code: Ok(Default::default()),
38485 message: Ok(Default::default()),
38486 }
38487 }
38488 }
38489 impl PostGetCompressedTokenAccountsByOwnerV2ResponseError {
38490 pub fn code<T>(mut self, value: T) -> Self
38491 where
38492 T: ::std::convert::TryInto<::std::option::Option<i64>>,
38493 T::Error: ::std::fmt::Display,
38494 {
38495 self.code = value
38496 .try_into()
38497 .map_err(|e| {
38498 format!("error converting supplied value for code: {e}")
38499 });
38500 self
38501 }
38502 pub fn message<T>(mut self, value: T) -> Self
38503 where
38504 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
38505 T::Error: ::std::fmt::Display,
38506 {
38507 self.message = value
38508 .try_into()
38509 .map_err(|e| {
38510 format!("error converting supplied value for message: {e}")
38511 });
38512 self
38513 }
38514 }
38515 impl ::std::convert::TryFrom<
38516 PostGetCompressedTokenAccountsByOwnerV2ResponseError,
38517 > for super::PostGetCompressedTokenAccountsByOwnerV2ResponseError {
38518 type Error = super::error::ConversionError;
38519 fn try_from(
38520 value: PostGetCompressedTokenAccountsByOwnerV2ResponseError,
38521 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38522 Ok(Self {
38523 code: value.code?,
38524 message: value.message?,
38525 })
38526 }
38527 }
38528 impl ::std::convert::From<
38529 super::PostGetCompressedTokenAccountsByOwnerV2ResponseError,
38530 > for PostGetCompressedTokenAccountsByOwnerV2ResponseError {
38531 fn from(
38532 value: super::PostGetCompressedTokenAccountsByOwnerV2ResponseError,
38533 ) -> Self {
38534 Self {
38535 code: Ok(value.code),
38536 message: Ok(value.message),
38537 }
38538 }
38539 }
38540 #[derive(Clone, Debug)]
38541 pub struct PostGetCompressedTokenAccountsByOwnerV2ResponseResult {
38542 context: ::std::result::Result<super::Context, ::std::string::String>,
38543 value: ::std::result::Result<
38544 super::TokenAccountListV2,
38545 ::std::string::String,
38546 >,
38547 }
38548 impl ::std::default::Default
38549 for PostGetCompressedTokenAccountsByOwnerV2ResponseResult {
38550 fn default() -> Self {
38551 Self {
38552 context: Err("no value supplied for context".to_string()),
38553 value: Err("no value supplied for value".to_string()),
38554 }
38555 }
38556 }
38557 impl PostGetCompressedTokenAccountsByOwnerV2ResponseResult {
38558 pub fn context<T>(mut self, value: T) -> Self
38559 where
38560 T: ::std::convert::TryInto<super::Context>,
38561 T::Error: ::std::fmt::Display,
38562 {
38563 self.context = value
38564 .try_into()
38565 .map_err(|e| {
38566 format!("error converting supplied value for context: {e}")
38567 });
38568 self
38569 }
38570 pub fn value<T>(mut self, value: T) -> Self
38571 where
38572 T: ::std::convert::TryInto<super::TokenAccountListV2>,
38573 T::Error: ::std::fmt::Display,
38574 {
38575 self.value = value
38576 .try_into()
38577 .map_err(|e| {
38578 format!("error converting supplied value for value: {e}")
38579 });
38580 self
38581 }
38582 }
38583 impl ::std::convert::TryFrom<
38584 PostGetCompressedTokenAccountsByOwnerV2ResponseResult,
38585 > for super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult {
38586 type Error = super::error::ConversionError;
38587 fn try_from(
38588 value: PostGetCompressedTokenAccountsByOwnerV2ResponseResult,
38589 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38590 Ok(Self {
38591 context: value.context?,
38592 value: value.value?,
38593 })
38594 }
38595 }
38596 impl ::std::convert::From<
38597 super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult,
38598 > for PostGetCompressedTokenAccountsByOwnerV2ResponseResult {
38599 fn from(
38600 value: super::PostGetCompressedTokenAccountsByOwnerV2ResponseResult,
38601 ) -> Self {
38602 Self {
38603 context: Ok(value.context),
38604 value: Ok(value.value),
38605 }
38606 }
38607 }
38608 #[derive(Clone, Debug)]
38609 pub struct PostGetCompressedTokenBalancesByOwnerBody {
38610 id: ::std::result::Result<
38611 super::PostGetCompressedTokenBalancesByOwnerBodyId,
38612 ::std::string::String,
38613 >,
38614 jsonrpc: ::std::result::Result<
38615 super::PostGetCompressedTokenBalancesByOwnerBodyJsonrpc,
38616 ::std::string::String,
38617 >,
38618 method: ::std::result::Result<
38619 super::PostGetCompressedTokenBalancesByOwnerBodyMethod,
38620 ::std::string::String,
38621 >,
38622 params: ::std::result::Result<
38623 super::PostGetCompressedTokenBalancesByOwnerBodyParams,
38624 ::std::string::String,
38625 >,
38626 }
38627 impl ::std::default::Default for PostGetCompressedTokenBalancesByOwnerBody {
38628 fn default() -> Self {
38629 Self {
38630 id: Err("no value supplied for id".to_string()),
38631 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
38632 method: Err("no value supplied for method".to_string()),
38633 params: Err("no value supplied for params".to_string()),
38634 }
38635 }
38636 }
38637 impl PostGetCompressedTokenBalancesByOwnerBody {
38638 pub fn id<T>(mut self, value: T) -> Self
38639 where
38640 T: ::std::convert::TryInto<
38641 super::PostGetCompressedTokenBalancesByOwnerBodyId,
38642 >,
38643 T::Error: ::std::fmt::Display,
38644 {
38645 self.id = value
38646 .try_into()
38647 .map_err(|e| format!("error converting supplied value for id: {e}"));
38648 self
38649 }
38650 pub fn jsonrpc<T>(mut self, value: T) -> Self
38651 where
38652 T: ::std::convert::TryInto<
38653 super::PostGetCompressedTokenBalancesByOwnerBodyJsonrpc,
38654 >,
38655 T::Error: ::std::fmt::Display,
38656 {
38657 self.jsonrpc = value
38658 .try_into()
38659 .map_err(|e| {
38660 format!("error converting supplied value for jsonrpc: {e}")
38661 });
38662 self
38663 }
38664 pub fn method<T>(mut self, value: T) -> Self
38665 where
38666 T: ::std::convert::TryInto<
38667 super::PostGetCompressedTokenBalancesByOwnerBodyMethod,
38668 >,
38669 T::Error: ::std::fmt::Display,
38670 {
38671 self.method = value
38672 .try_into()
38673 .map_err(|e| {
38674 format!("error converting supplied value for method: {e}")
38675 });
38676 self
38677 }
38678 pub fn params<T>(mut self, value: T) -> Self
38679 where
38680 T: ::std::convert::TryInto<
38681 super::PostGetCompressedTokenBalancesByOwnerBodyParams,
38682 >,
38683 T::Error: ::std::fmt::Display,
38684 {
38685 self.params = value
38686 .try_into()
38687 .map_err(|e| {
38688 format!("error converting supplied value for params: {e}")
38689 });
38690 self
38691 }
38692 }
38693 impl ::std::convert::TryFrom<PostGetCompressedTokenBalancesByOwnerBody>
38694 for super::PostGetCompressedTokenBalancesByOwnerBody {
38695 type Error = super::error::ConversionError;
38696 fn try_from(
38697 value: PostGetCompressedTokenBalancesByOwnerBody,
38698 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38699 Ok(Self {
38700 id: value.id?,
38701 jsonrpc: value.jsonrpc?,
38702 method: value.method?,
38703 params: value.params?,
38704 })
38705 }
38706 }
38707 impl ::std::convert::From<super::PostGetCompressedTokenBalancesByOwnerBody>
38708 for PostGetCompressedTokenBalancesByOwnerBody {
38709 fn from(value: super::PostGetCompressedTokenBalancesByOwnerBody) -> Self {
38710 Self {
38711 id: Ok(value.id),
38712 jsonrpc: Ok(value.jsonrpc),
38713 method: Ok(value.method),
38714 params: Ok(value.params),
38715 }
38716 }
38717 }
38718 #[derive(Clone, Debug)]
38719 pub struct PostGetCompressedTokenBalancesByOwnerBodyParams {
38720 cursor: ::std::result::Result<
38721 ::std::option::Option<super::Base58String>,
38722 ::std::string::String,
38723 >,
38724 limit: ::std::result::Result<
38725 ::std::option::Option<super::Limit>,
38726 ::std::string::String,
38727 >,
38728 mint: ::std::result::Result<
38729 ::std::option::Option<super::SerializablePubkey>,
38730 ::std::string::String,
38731 >,
38732 owner: ::std::result::Result<
38733 super::SerializablePubkey,
38734 ::std::string::String,
38735 >,
38736 }
38737 impl ::std::default::Default
38738 for PostGetCompressedTokenBalancesByOwnerBodyParams {
38739 fn default() -> Self {
38740 Self {
38741 cursor: Ok(Default::default()),
38742 limit: Ok(Default::default()),
38743 mint: Ok(Default::default()),
38744 owner: Err("no value supplied for owner".to_string()),
38745 }
38746 }
38747 }
38748 impl PostGetCompressedTokenBalancesByOwnerBodyParams {
38749 pub fn cursor<T>(mut self, value: T) -> Self
38750 where
38751 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
38752 T::Error: ::std::fmt::Display,
38753 {
38754 self.cursor = value
38755 .try_into()
38756 .map_err(|e| {
38757 format!("error converting supplied value for cursor: {e}")
38758 });
38759 self
38760 }
38761 pub fn limit<T>(mut self, value: T) -> Self
38762 where
38763 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
38764 T::Error: ::std::fmt::Display,
38765 {
38766 self.limit = value
38767 .try_into()
38768 .map_err(|e| {
38769 format!("error converting supplied value for limit: {e}")
38770 });
38771 self
38772 }
38773 pub fn mint<T>(mut self, value: T) -> Self
38774 where
38775 T: ::std::convert::TryInto<
38776 ::std::option::Option<super::SerializablePubkey>,
38777 >,
38778 T::Error: ::std::fmt::Display,
38779 {
38780 self.mint = value
38781 .try_into()
38782 .map_err(|e| {
38783 format!("error converting supplied value for mint: {e}")
38784 });
38785 self
38786 }
38787 pub fn owner<T>(mut self, value: T) -> Self
38788 where
38789 T: ::std::convert::TryInto<super::SerializablePubkey>,
38790 T::Error: ::std::fmt::Display,
38791 {
38792 self.owner = value
38793 .try_into()
38794 .map_err(|e| {
38795 format!("error converting supplied value for owner: {e}")
38796 });
38797 self
38798 }
38799 }
38800 impl ::std::convert::TryFrom<PostGetCompressedTokenBalancesByOwnerBodyParams>
38801 for super::PostGetCompressedTokenBalancesByOwnerBodyParams {
38802 type Error = super::error::ConversionError;
38803 fn try_from(
38804 value: PostGetCompressedTokenBalancesByOwnerBodyParams,
38805 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38806 Ok(Self {
38807 cursor: value.cursor?,
38808 limit: value.limit?,
38809 mint: value.mint?,
38810 owner: value.owner?,
38811 })
38812 }
38813 }
38814 impl ::std::convert::From<super::PostGetCompressedTokenBalancesByOwnerBodyParams>
38815 for PostGetCompressedTokenBalancesByOwnerBodyParams {
38816 fn from(
38817 value: super::PostGetCompressedTokenBalancesByOwnerBodyParams,
38818 ) -> Self {
38819 Self {
38820 cursor: Ok(value.cursor),
38821 limit: Ok(value.limit),
38822 mint: Ok(value.mint),
38823 owner: Ok(value.owner),
38824 }
38825 }
38826 }
38827 #[derive(Clone, Debug)]
38828 pub struct PostGetCompressedTokenBalancesByOwnerResponse {
38829 error: ::std::result::Result<
38830 ::std::option::Option<
38831 super::PostGetCompressedTokenBalancesByOwnerResponseError,
38832 >,
38833 ::std::string::String,
38834 >,
38835 id: ::std::result::Result<
38836 super::PostGetCompressedTokenBalancesByOwnerResponseId,
38837 ::std::string::String,
38838 >,
38839 jsonrpc: ::std::result::Result<
38840 super::PostGetCompressedTokenBalancesByOwnerResponseJsonrpc,
38841 ::std::string::String,
38842 >,
38843 result: ::std::result::Result<
38844 ::std::option::Option<
38845 super::PostGetCompressedTokenBalancesByOwnerResponseResult,
38846 >,
38847 ::std::string::String,
38848 >,
38849 }
38850 impl ::std::default::Default for PostGetCompressedTokenBalancesByOwnerResponse {
38851 fn default() -> Self {
38852 Self {
38853 error: Ok(Default::default()),
38854 id: Err("no value supplied for id".to_string()),
38855 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
38856 result: Ok(Default::default()),
38857 }
38858 }
38859 }
38860 impl PostGetCompressedTokenBalancesByOwnerResponse {
38861 pub fn error<T>(mut self, value: T) -> Self
38862 where
38863 T: ::std::convert::TryInto<
38864 ::std::option::Option<
38865 super::PostGetCompressedTokenBalancesByOwnerResponseError,
38866 >,
38867 >,
38868 T::Error: ::std::fmt::Display,
38869 {
38870 self.error = value
38871 .try_into()
38872 .map_err(|e| {
38873 format!("error converting supplied value for error: {e}")
38874 });
38875 self
38876 }
38877 pub fn id<T>(mut self, value: T) -> Self
38878 where
38879 T: ::std::convert::TryInto<
38880 super::PostGetCompressedTokenBalancesByOwnerResponseId,
38881 >,
38882 T::Error: ::std::fmt::Display,
38883 {
38884 self.id = value
38885 .try_into()
38886 .map_err(|e| format!("error converting supplied value for id: {e}"));
38887 self
38888 }
38889 pub fn jsonrpc<T>(mut self, value: T) -> Self
38890 where
38891 T: ::std::convert::TryInto<
38892 super::PostGetCompressedTokenBalancesByOwnerResponseJsonrpc,
38893 >,
38894 T::Error: ::std::fmt::Display,
38895 {
38896 self.jsonrpc = value
38897 .try_into()
38898 .map_err(|e| {
38899 format!("error converting supplied value for jsonrpc: {e}")
38900 });
38901 self
38902 }
38903 pub fn result<T>(mut self, value: T) -> Self
38904 where
38905 T: ::std::convert::TryInto<
38906 ::std::option::Option<
38907 super::PostGetCompressedTokenBalancesByOwnerResponseResult,
38908 >,
38909 >,
38910 T::Error: ::std::fmt::Display,
38911 {
38912 self.result = value
38913 .try_into()
38914 .map_err(|e| {
38915 format!("error converting supplied value for result: {e}")
38916 });
38917 self
38918 }
38919 }
38920 impl ::std::convert::TryFrom<PostGetCompressedTokenBalancesByOwnerResponse>
38921 for super::PostGetCompressedTokenBalancesByOwnerResponse {
38922 type Error = super::error::ConversionError;
38923 fn try_from(
38924 value: PostGetCompressedTokenBalancesByOwnerResponse,
38925 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38926 Ok(Self {
38927 error: value.error?,
38928 id: value.id?,
38929 jsonrpc: value.jsonrpc?,
38930 result: value.result?,
38931 })
38932 }
38933 }
38934 impl ::std::convert::From<super::PostGetCompressedTokenBalancesByOwnerResponse>
38935 for PostGetCompressedTokenBalancesByOwnerResponse {
38936 fn from(
38937 value: super::PostGetCompressedTokenBalancesByOwnerResponse,
38938 ) -> Self {
38939 Self {
38940 error: Ok(value.error),
38941 id: Ok(value.id),
38942 jsonrpc: Ok(value.jsonrpc),
38943 result: Ok(value.result),
38944 }
38945 }
38946 }
38947 #[derive(Clone, Debug)]
38948 pub struct PostGetCompressedTokenBalancesByOwnerResponseError {
38949 code: ::std::result::Result<
38950 ::std::option::Option<i64>,
38951 ::std::string::String,
38952 >,
38953 message: ::std::result::Result<
38954 ::std::option::Option<::std::string::String>,
38955 ::std::string::String,
38956 >,
38957 }
38958 impl ::std::default::Default
38959 for PostGetCompressedTokenBalancesByOwnerResponseError {
38960 fn default() -> Self {
38961 Self {
38962 code: Ok(Default::default()),
38963 message: Ok(Default::default()),
38964 }
38965 }
38966 }
38967 impl PostGetCompressedTokenBalancesByOwnerResponseError {
38968 pub fn code<T>(mut self, value: T) -> Self
38969 where
38970 T: ::std::convert::TryInto<::std::option::Option<i64>>,
38971 T::Error: ::std::fmt::Display,
38972 {
38973 self.code = value
38974 .try_into()
38975 .map_err(|e| {
38976 format!("error converting supplied value for code: {e}")
38977 });
38978 self
38979 }
38980 pub fn message<T>(mut self, value: T) -> Self
38981 where
38982 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
38983 T::Error: ::std::fmt::Display,
38984 {
38985 self.message = value
38986 .try_into()
38987 .map_err(|e| {
38988 format!("error converting supplied value for message: {e}")
38989 });
38990 self
38991 }
38992 }
38993 impl ::std::convert::TryFrom<PostGetCompressedTokenBalancesByOwnerResponseError>
38994 for super::PostGetCompressedTokenBalancesByOwnerResponseError {
38995 type Error = super::error::ConversionError;
38996 fn try_from(
38997 value: PostGetCompressedTokenBalancesByOwnerResponseError,
38998 ) -> ::std::result::Result<Self, super::error::ConversionError> {
38999 Ok(Self {
39000 code: value.code?,
39001 message: value.message?,
39002 })
39003 }
39004 }
39005 impl ::std::convert::From<
39006 super::PostGetCompressedTokenBalancesByOwnerResponseError,
39007 > for PostGetCompressedTokenBalancesByOwnerResponseError {
39008 fn from(
39009 value: super::PostGetCompressedTokenBalancesByOwnerResponseError,
39010 ) -> Self {
39011 Self {
39012 code: Ok(value.code),
39013 message: Ok(value.message),
39014 }
39015 }
39016 }
39017 #[derive(Clone, Debug)]
39018 pub struct PostGetCompressedTokenBalancesByOwnerResponseResult {
39019 context: ::std::result::Result<super::Context, ::std::string::String>,
39020 value: ::std::result::Result<super::TokenBalanceList, ::std::string::String>,
39021 }
39022 impl ::std::default::Default
39023 for PostGetCompressedTokenBalancesByOwnerResponseResult {
39024 fn default() -> Self {
39025 Self {
39026 context: Err("no value supplied for context".to_string()),
39027 value: Err("no value supplied for value".to_string()),
39028 }
39029 }
39030 }
39031 impl PostGetCompressedTokenBalancesByOwnerResponseResult {
39032 pub fn context<T>(mut self, value: T) -> Self
39033 where
39034 T: ::std::convert::TryInto<super::Context>,
39035 T::Error: ::std::fmt::Display,
39036 {
39037 self.context = value
39038 .try_into()
39039 .map_err(|e| {
39040 format!("error converting supplied value for context: {e}")
39041 });
39042 self
39043 }
39044 pub fn value<T>(mut self, value: T) -> Self
39045 where
39046 T: ::std::convert::TryInto<super::TokenBalanceList>,
39047 T::Error: ::std::fmt::Display,
39048 {
39049 self.value = value
39050 .try_into()
39051 .map_err(|e| {
39052 format!("error converting supplied value for value: {e}")
39053 });
39054 self
39055 }
39056 }
39057 impl ::std::convert::TryFrom<PostGetCompressedTokenBalancesByOwnerResponseResult>
39058 for super::PostGetCompressedTokenBalancesByOwnerResponseResult {
39059 type Error = super::error::ConversionError;
39060 fn try_from(
39061 value: PostGetCompressedTokenBalancesByOwnerResponseResult,
39062 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39063 Ok(Self {
39064 context: value.context?,
39065 value: value.value?,
39066 })
39067 }
39068 }
39069 impl ::std::convert::From<
39070 super::PostGetCompressedTokenBalancesByOwnerResponseResult,
39071 > for PostGetCompressedTokenBalancesByOwnerResponseResult {
39072 fn from(
39073 value: super::PostGetCompressedTokenBalancesByOwnerResponseResult,
39074 ) -> Self {
39075 Self {
39076 context: Ok(value.context),
39077 value: Ok(value.value),
39078 }
39079 }
39080 }
39081 #[derive(Clone, Debug)]
39082 pub struct PostGetCompressedTokenBalancesByOwnerV2Body {
39083 id: ::std::result::Result<
39084 super::PostGetCompressedTokenBalancesByOwnerV2BodyId,
39085 ::std::string::String,
39086 >,
39087 jsonrpc: ::std::result::Result<
39088 super::PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc,
39089 ::std::string::String,
39090 >,
39091 method: ::std::result::Result<
39092 super::PostGetCompressedTokenBalancesByOwnerV2BodyMethod,
39093 ::std::string::String,
39094 >,
39095 params: ::std::result::Result<
39096 super::PostGetCompressedTokenBalancesByOwnerV2BodyParams,
39097 ::std::string::String,
39098 >,
39099 }
39100 impl ::std::default::Default for PostGetCompressedTokenBalancesByOwnerV2Body {
39101 fn default() -> Self {
39102 Self {
39103 id: Err("no value supplied for id".to_string()),
39104 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
39105 method: Err("no value supplied for method".to_string()),
39106 params: Err("no value supplied for params".to_string()),
39107 }
39108 }
39109 }
39110 impl PostGetCompressedTokenBalancesByOwnerV2Body {
39111 pub fn id<T>(mut self, value: T) -> Self
39112 where
39113 T: ::std::convert::TryInto<
39114 super::PostGetCompressedTokenBalancesByOwnerV2BodyId,
39115 >,
39116 T::Error: ::std::fmt::Display,
39117 {
39118 self.id = value
39119 .try_into()
39120 .map_err(|e| format!("error converting supplied value for id: {e}"));
39121 self
39122 }
39123 pub fn jsonrpc<T>(mut self, value: T) -> Self
39124 where
39125 T: ::std::convert::TryInto<
39126 super::PostGetCompressedTokenBalancesByOwnerV2BodyJsonrpc,
39127 >,
39128 T::Error: ::std::fmt::Display,
39129 {
39130 self.jsonrpc = value
39131 .try_into()
39132 .map_err(|e| {
39133 format!("error converting supplied value for jsonrpc: {e}")
39134 });
39135 self
39136 }
39137 pub fn method<T>(mut self, value: T) -> Self
39138 where
39139 T: ::std::convert::TryInto<
39140 super::PostGetCompressedTokenBalancesByOwnerV2BodyMethod,
39141 >,
39142 T::Error: ::std::fmt::Display,
39143 {
39144 self.method = value
39145 .try_into()
39146 .map_err(|e| {
39147 format!("error converting supplied value for method: {e}")
39148 });
39149 self
39150 }
39151 pub fn params<T>(mut self, value: T) -> Self
39152 where
39153 T: ::std::convert::TryInto<
39154 super::PostGetCompressedTokenBalancesByOwnerV2BodyParams,
39155 >,
39156 T::Error: ::std::fmt::Display,
39157 {
39158 self.params = value
39159 .try_into()
39160 .map_err(|e| {
39161 format!("error converting supplied value for params: {e}")
39162 });
39163 self
39164 }
39165 }
39166 impl ::std::convert::TryFrom<PostGetCompressedTokenBalancesByOwnerV2Body>
39167 for super::PostGetCompressedTokenBalancesByOwnerV2Body {
39168 type Error = super::error::ConversionError;
39169 fn try_from(
39170 value: PostGetCompressedTokenBalancesByOwnerV2Body,
39171 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39172 Ok(Self {
39173 id: value.id?,
39174 jsonrpc: value.jsonrpc?,
39175 method: value.method?,
39176 params: value.params?,
39177 })
39178 }
39179 }
39180 impl ::std::convert::From<super::PostGetCompressedTokenBalancesByOwnerV2Body>
39181 for PostGetCompressedTokenBalancesByOwnerV2Body {
39182 fn from(value: super::PostGetCompressedTokenBalancesByOwnerV2Body) -> Self {
39183 Self {
39184 id: Ok(value.id),
39185 jsonrpc: Ok(value.jsonrpc),
39186 method: Ok(value.method),
39187 params: Ok(value.params),
39188 }
39189 }
39190 }
39191 #[derive(Clone, Debug)]
39192 pub struct PostGetCompressedTokenBalancesByOwnerV2BodyParams {
39193 cursor: ::std::result::Result<
39194 ::std::option::Option<super::Base58String>,
39195 ::std::string::String,
39196 >,
39197 limit: ::std::result::Result<
39198 ::std::option::Option<super::Limit>,
39199 ::std::string::String,
39200 >,
39201 mint: ::std::result::Result<
39202 ::std::option::Option<super::SerializablePubkey>,
39203 ::std::string::String,
39204 >,
39205 owner: ::std::result::Result<
39206 super::SerializablePubkey,
39207 ::std::string::String,
39208 >,
39209 }
39210 impl ::std::default::Default
39211 for PostGetCompressedTokenBalancesByOwnerV2BodyParams {
39212 fn default() -> Self {
39213 Self {
39214 cursor: Ok(Default::default()),
39215 limit: Ok(Default::default()),
39216 mint: Ok(Default::default()),
39217 owner: Err("no value supplied for owner".to_string()),
39218 }
39219 }
39220 }
39221 impl PostGetCompressedTokenBalancesByOwnerV2BodyParams {
39222 pub fn cursor<T>(mut self, value: T) -> Self
39223 where
39224 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
39225 T::Error: ::std::fmt::Display,
39226 {
39227 self.cursor = value
39228 .try_into()
39229 .map_err(|e| {
39230 format!("error converting supplied value for cursor: {e}")
39231 });
39232 self
39233 }
39234 pub fn limit<T>(mut self, value: T) -> Self
39235 where
39236 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
39237 T::Error: ::std::fmt::Display,
39238 {
39239 self.limit = value
39240 .try_into()
39241 .map_err(|e| {
39242 format!("error converting supplied value for limit: {e}")
39243 });
39244 self
39245 }
39246 pub fn mint<T>(mut self, value: T) -> Self
39247 where
39248 T: ::std::convert::TryInto<
39249 ::std::option::Option<super::SerializablePubkey>,
39250 >,
39251 T::Error: ::std::fmt::Display,
39252 {
39253 self.mint = value
39254 .try_into()
39255 .map_err(|e| {
39256 format!("error converting supplied value for mint: {e}")
39257 });
39258 self
39259 }
39260 pub fn owner<T>(mut self, value: T) -> Self
39261 where
39262 T: ::std::convert::TryInto<super::SerializablePubkey>,
39263 T::Error: ::std::fmt::Display,
39264 {
39265 self.owner = value
39266 .try_into()
39267 .map_err(|e| {
39268 format!("error converting supplied value for owner: {e}")
39269 });
39270 self
39271 }
39272 }
39273 impl ::std::convert::TryFrom<PostGetCompressedTokenBalancesByOwnerV2BodyParams>
39274 for super::PostGetCompressedTokenBalancesByOwnerV2BodyParams {
39275 type Error = super::error::ConversionError;
39276 fn try_from(
39277 value: PostGetCompressedTokenBalancesByOwnerV2BodyParams,
39278 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39279 Ok(Self {
39280 cursor: value.cursor?,
39281 limit: value.limit?,
39282 mint: value.mint?,
39283 owner: value.owner?,
39284 })
39285 }
39286 }
39287 impl ::std::convert::From<
39288 super::PostGetCompressedTokenBalancesByOwnerV2BodyParams,
39289 > for PostGetCompressedTokenBalancesByOwnerV2BodyParams {
39290 fn from(
39291 value: super::PostGetCompressedTokenBalancesByOwnerV2BodyParams,
39292 ) -> Self {
39293 Self {
39294 cursor: Ok(value.cursor),
39295 limit: Ok(value.limit),
39296 mint: Ok(value.mint),
39297 owner: Ok(value.owner),
39298 }
39299 }
39300 }
39301 #[derive(Clone, Debug)]
39302 pub struct PostGetCompressedTokenBalancesByOwnerV2Response {
39303 error: ::std::result::Result<
39304 ::std::option::Option<
39305 super::PostGetCompressedTokenBalancesByOwnerV2ResponseError,
39306 >,
39307 ::std::string::String,
39308 >,
39309 id: ::std::result::Result<
39310 super::PostGetCompressedTokenBalancesByOwnerV2ResponseId,
39311 ::std::string::String,
39312 >,
39313 jsonrpc: ::std::result::Result<
39314 super::PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc,
39315 ::std::string::String,
39316 >,
39317 result: ::std::result::Result<
39318 ::std::option::Option<
39319 super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult,
39320 >,
39321 ::std::string::String,
39322 >,
39323 }
39324 impl ::std::default::Default
39325 for PostGetCompressedTokenBalancesByOwnerV2Response {
39326 fn default() -> Self {
39327 Self {
39328 error: Ok(Default::default()),
39329 id: Err("no value supplied for id".to_string()),
39330 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
39331 result: Ok(Default::default()),
39332 }
39333 }
39334 }
39335 impl PostGetCompressedTokenBalancesByOwnerV2Response {
39336 pub fn error<T>(mut self, value: T) -> Self
39337 where
39338 T: ::std::convert::TryInto<
39339 ::std::option::Option<
39340 super::PostGetCompressedTokenBalancesByOwnerV2ResponseError,
39341 >,
39342 >,
39343 T::Error: ::std::fmt::Display,
39344 {
39345 self.error = value
39346 .try_into()
39347 .map_err(|e| {
39348 format!("error converting supplied value for error: {e}")
39349 });
39350 self
39351 }
39352 pub fn id<T>(mut self, value: T) -> Self
39353 where
39354 T: ::std::convert::TryInto<
39355 super::PostGetCompressedTokenBalancesByOwnerV2ResponseId,
39356 >,
39357 T::Error: ::std::fmt::Display,
39358 {
39359 self.id = value
39360 .try_into()
39361 .map_err(|e| format!("error converting supplied value for id: {e}"));
39362 self
39363 }
39364 pub fn jsonrpc<T>(mut self, value: T) -> Self
39365 where
39366 T: ::std::convert::TryInto<
39367 super::PostGetCompressedTokenBalancesByOwnerV2ResponseJsonrpc,
39368 >,
39369 T::Error: ::std::fmt::Display,
39370 {
39371 self.jsonrpc = value
39372 .try_into()
39373 .map_err(|e| {
39374 format!("error converting supplied value for jsonrpc: {e}")
39375 });
39376 self
39377 }
39378 pub fn result<T>(mut self, value: T) -> Self
39379 where
39380 T: ::std::convert::TryInto<
39381 ::std::option::Option<
39382 super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult,
39383 >,
39384 >,
39385 T::Error: ::std::fmt::Display,
39386 {
39387 self.result = value
39388 .try_into()
39389 .map_err(|e| {
39390 format!("error converting supplied value for result: {e}")
39391 });
39392 self
39393 }
39394 }
39395 impl ::std::convert::TryFrom<PostGetCompressedTokenBalancesByOwnerV2Response>
39396 for super::PostGetCompressedTokenBalancesByOwnerV2Response {
39397 type Error = super::error::ConversionError;
39398 fn try_from(
39399 value: PostGetCompressedTokenBalancesByOwnerV2Response,
39400 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39401 Ok(Self {
39402 error: value.error?,
39403 id: value.id?,
39404 jsonrpc: value.jsonrpc?,
39405 result: value.result?,
39406 })
39407 }
39408 }
39409 impl ::std::convert::From<super::PostGetCompressedTokenBalancesByOwnerV2Response>
39410 for PostGetCompressedTokenBalancesByOwnerV2Response {
39411 fn from(
39412 value: super::PostGetCompressedTokenBalancesByOwnerV2Response,
39413 ) -> Self {
39414 Self {
39415 error: Ok(value.error),
39416 id: Ok(value.id),
39417 jsonrpc: Ok(value.jsonrpc),
39418 result: Ok(value.result),
39419 }
39420 }
39421 }
39422 #[derive(Clone, Debug)]
39423 pub struct PostGetCompressedTokenBalancesByOwnerV2ResponseError {
39424 code: ::std::result::Result<
39425 ::std::option::Option<i64>,
39426 ::std::string::String,
39427 >,
39428 message: ::std::result::Result<
39429 ::std::option::Option<::std::string::String>,
39430 ::std::string::String,
39431 >,
39432 }
39433 impl ::std::default::Default
39434 for PostGetCompressedTokenBalancesByOwnerV2ResponseError {
39435 fn default() -> Self {
39436 Self {
39437 code: Ok(Default::default()),
39438 message: Ok(Default::default()),
39439 }
39440 }
39441 }
39442 impl PostGetCompressedTokenBalancesByOwnerV2ResponseError {
39443 pub fn code<T>(mut self, value: T) -> Self
39444 where
39445 T: ::std::convert::TryInto<::std::option::Option<i64>>,
39446 T::Error: ::std::fmt::Display,
39447 {
39448 self.code = value
39449 .try_into()
39450 .map_err(|e| {
39451 format!("error converting supplied value for code: {e}")
39452 });
39453 self
39454 }
39455 pub fn message<T>(mut self, value: T) -> Self
39456 where
39457 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
39458 T::Error: ::std::fmt::Display,
39459 {
39460 self.message = value
39461 .try_into()
39462 .map_err(|e| {
39463 format!("error converting supplied value for message: {e}")
39464 });
39465 self
39466 }
39467 }
39468 impl ::std::convert::TryFrom<
39469 PostGetCompressedTokenBalancesByOwnerV2ResponseError,
39470 > for super::PostGetCompressedTokenBalancesByOwnerV2ResponseError {
39471 type Error = super::error::ConversionError;
39472 fn try_from(
39473 value: PostGetCompressedTokenBalancesByOwnerV2ResponseError,
39474 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39475 Ok(Self {
39476 code: value.code?,
39477 message: value.message?,
39478 })
39479 }
39480 }
39481 impl ::std::convert::From<
39482 super::PostGetCompressedTokenBalancesByOwnerV2ResponseError,
39483 > for PostGetCompressedTokenBalancesByOwnerV2ResponseError {
39484 fn from(
39485 value: super::PostGetCompressedTokenBalancesByOwnerV2ResponseError,
39486 ) -> Self {
39487 Self {
39488 code: Ok(value.code),
39489 message: Ok(value.message),
39490 }
39491 }
39492 }
39493 #[derive(Clone, Debug)]
39494 pub struct PostGetCompressedTokenBalancesByOwnerV2ResponseResult {
39495 context: ::std::result::Result<super::Context, ::std::string::String>,
39496 value: ::std::result::Result<
39497 super::TokenBalanceListV2,
39498 ::std::string::String,
39499 >,
39500 }
39501 impl ::std::default::Default
39502 for PostGetCompressedTokenBalancesByOwnerV2ResponseResult {
39503 fn default() -> Self {
39504 Self {
39505 context: Err("no value supplied for context".to_string()),
39506 value: Err("no value supplied for value".to_string()),
39507 }
39508 }
39509 }
39510 impl PostGetCompressedTokenBalancesByOwnerV2ResponseResult {
39511 pub fn context<T>(mut self, value: T) -> Self
39512 where
39513 T: ::std::convert::TryInto<super::Context>,
39514 T::Error: ::std::fmt::Display,
39515 {
39516 self.context = value
39517 .try_into()
39518 .map_err(|e| {
39519 format!("error converting supplied value for context: {e}")
39520 });
39521 self
39522 }
39523 pub fn value<T>(mut self, value: T) -> Self
39524 where
39525 T: ::std::convert::TryInto<super::TokenBalanceListV2>,
39526 T::Error: ::std::fmt::Display,
39527 {
39528 self.value = value
39529 .try_into()
39530 .map_err(|e| {
39531 format!("error converting supplied value for value: {e}")
39532 });
39533 self
39534 }
39535 }
39536 impl ::std::convert::TryFrom<
39537 PostGetCompressedTokenBalancesByOwnerV2ResponseResult,
39538 > for super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult {
39539 type Error = super::error::ConversionError;
39540 fn try_from(
39541 value: PostGetCompressedTokenBalancesByOwnerV2ResponseResult,
39542 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39543 Ok(Self {
39544 context: value.context?,
39545 value: value.value?,
39546 })
39547 }
39548 }
39549 impl ::std::convert::From<
39550 super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult,
39551 > for PostGetCompressedTokenBalancesByOwnerV2ResponseResult {
39552 fn from(
39553 value: super::PostGetCompressedTokenBalancesByOwnerV2ResponseResult,
39554 ) -> Self {
39555 Self {
39556 context: Ok(value.context),
39557 value: Ok(value.value),
39558 }
39559 }
39560 }
39561 #[derive(Clone, Debug)]
39562 pub struct PostGetCompressionSignaturesForAccountBody {
39563 id: ::std::result::Result<
39564 super::PostGetCompressionSignaturesForAccountBodyId,
39565 ::std::string::String,
39566 >,
39567 jsonrpc: ::std::result::Result<
39568 super::PostGetCompressionSignaturesForAccountBodyJsonrpc,
39569 ::std::string::String,
39570 >,
39571 method: ::std::result::Result<
39572 super::PostGetCompressionSignaturesForAccountBodyMethod,
39573 ::std::string::String,
39574 >,
39575 params: ::std::result::Result<
39576 super::PostGetCompressionSignaturesForAccountBodyParams,
39577 ::std::string::String,
39578 >,
39579 }
39580 impl ::std::default::Default for PostGetCompressionSignaturesForAccountBody {
39581 fn default() -> Self {
39582 Self {
39583 id: Err("no value supplied for id".to_string()),
39584 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
39585 method: Err("no value supplied for method".to_string()),
39586 params: Err("no value supplied for params".to_string()),
39587 }
39588 }
39589 }
39590 impl PostGetCompressionSignaturesForAccountBody {
39591 pub fn id<T>(mut self, value: T) -> Self
39592 where
39593 T: ::std::convert::TryInto<
39594 super::PostGetCompressionSignaturesForAccountBodyId,
39595 >,
39596 T::Error: ::std::fmt::Display,
39597 {
39598 self.id = value
39599 .try_into()
39600 .map_err(|e| format!("error converting supplied value for id: {e}"));
39601 self
39602 }
39603 pub fn jsonrpc<T>(mut self, value: T) -> Self
39604 where
39605 T: ::std::convert::TryInto<
39606 super::PostGetCompressionSignaturesForAccountBodyJsonrpc,
39607 >,
39608 T::Error: ::std::fmt::Display,
39609 {
39610 self.jsonrpc = value
39611 .try_into()
39612 .map_err(|e| {
39613 format!("error converting supplied value for jsonrpc: {e}")
39614 });
39615 self
39616 }
39617 pub fn method<T>(mut self, value: T) -> Self
39618 where
39619 T: ::std::convert::TryInto<
39620 super::PostGetCompressionSignaturesForAccountBodyMethod,
39621 >,
39622 T::Error: ::std::fmt::Display,
39623 {
39624 self.method = value
39625 .try_into()
39626 .map_err(|e| {
39627 format!("error converting supplied value for method: {e}")
39628 });
39629 self
39630 }
39631 pub fn params<T>(mut self, value: T) -> Self
39632 where
39633 T: ::std::convert::TryInto<
39634 super::PostGetCompressionSignaturesForAccountBodyParams,
39635 >,
39636 T::Error: ::std::fmt::Display,
39637 {
39638 self.params = value
39639 .try_into()
39640 .map_err(|e| {
39641 format!("error converting supplied value for params: {e}")
39642 });
39643 self
39644 }
39645 }
39646 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForAccountBody>
39647 for super::PostGetCompressionSignaturesForAccountBody {
39648 type Error = super::error::ConversionError;
39649 fn try_from(
39650 value: PostGetCompressionSignaturesForAccountBody,
39651 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39652 Ok(Self {
39653 id: value.id?,
39654 jsonrpc: value.jsonrpc?,
39655 method: value.method?,
39656 params: value.params?,
39657 })
39658 }
39659 }
39660 impl ::std::convert::From<super::PostGetCompressionSignaturesForAccountBody>
39661 for PostGetCompressionSignaturesForAccountBody {
39662 fn from(value: super::PostGetCompressionSignaturesForAccountBody) -> Self {
39663 Self {
39664 id: Ok(value.id),
39665 jsonrpc: Ok(value.jsonrpc),
39666 method: Ok(value.method),
39667 params: Ok(value.params),
39668 }
39669 }
39670 }
39671 #[derive(Clone, Debug)]
39672 pub struct PostGetCompressionSignaturesForAccountBodyParams {
39673 hash: ::std::result::Result<super::Hash, ::std::string::String>,
39674 }
39675 impl ::std::default::Default
39676 for PostGetCompressionSignaturesForAccountBodyParams {
39677 fn default() -> Self {
39678 Self {
39679 hash: Err("no value supplied for hash".to_string()),
39680 }
39681 }
39682 }
39683 impl PostGetCompressionSignaturesForAccountBodyParams {
39684 pub fn hash<T>(mut self, value: T) -> Self
39685 where
39686 T: ::std::convert::TryInto<super::Hash>,
39687 T::Error: ::std::fmt::Display,
39688 {
39689 self.hash = value
39690 .try_into()
39691 .map_err(|e| {
39692 format!("error converting supplied value for hash: {e}")
39693 });
39694 self
39695 }
39696 }
39697 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForAccountBodyParams>
39698 for super::PostGetCompressionSignaturesForAccountBodyParams {
39699 type Error = super::error::ConversionError;
39700 fn try_from(
39701 value: PostGetCompressionSignaturesForAccountBodyParams,
39702 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39703 Ok(Self { hash: value.hash? })
39704 }
39705 }
39706 impl ::std::convert::From<
39707 super::PostGetCompressionSignaturesForAccountBodyParams,
39708 > for PostGetCompressionSignaturesForAccountBodyParams {
39709 fn from(
39710 value: super::PostGetCompressionSignaturesForAccountBodyParams,
39711 ) -> Self {
39712 Self { hash: Ok(value.hash) }
39713 }
39714 }
39715 #[derive(Clone, Debug)]
39716 pub struct PostGetCompressionSignaturesForAccountResponse {
39717 error: ::std::result::Result<
39718 ::std::option::Option<
39719 super::PostGetCompressionSignaturesForAccountResponseError,
39720 >,
39721 ::std::string::String,
39722 >,
39723 id: ::std::result::Result<
39724 super::PostGetCompressionSignaturesForAccountResponseId,
39725 ::std::string::String,
39726 >,
39727 jsonrpc: ::std::result::Result<
39728 super::PostGetCompressionSignaturesForAccountResponseJsonrpc,
39729 ::std::string::String,
39730 >,
39731 result: ::std::result::Result<
39732 ::std::option::Option<
39733 super::PostGetCompressionSignaturesForAccountResponseResult,
39734 >,
39735 ::std::string::String,
39736 >,
39737 }
39738 impl ::std::default::Default for PostGetCompressionSignaturesForAccountResponse {
39739 fn default() -> Self {
39740 Self {
39741 error: Ok(Default::default()),
39742 id: Err("no value supplied for id".to_string()),
39743 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
39744 result: Ok(Default::default()),
39745 }
39746 }
39747 }
39748 impl PostGetCompressionSignaturesForAccountResponse {
39749 pub fn error<T>(mut self, value: T) -> Self
39750 where
39751 T: ::std::convert::TryInto<
39752 ::std::option::Option<
39753 super::PostGetCompressionSignaturesForAccountResponseError,
39754 >,
39755 >,
39756 T::Error: ::std::fmt::Display,
39757 {
39758 self.error = value
39759 .try_into()
39760 .map_err(|e| {
39761 format!("error converting supplied value for error: {e}")
39762 });
39763 self
39764 }
39765 pub fn id<T>(mut self, value: T) -> Self
39766 where
39767 T: ::std::convert::TryInto<
39768 super::PostGetCompressionSignaturesForAccountResponseId,
39769 >,
39770 T::Error: ::std::fmt::Display,
39771 {
39772 self.id = value
39773 .try_into()
39774 .map_err(|e| format!("error converting supplied value for id: {e}"));
39775 self
39776 }
39777 pub fn jsonrpc<T>(mut self, value: T) -> Self
39778 where
39779 T: ::std::convert::TryInto<
39780 super::PostGetCompressionSignaturesForAccountResponseJsonrpc,
39781 >,
39782 T::Error: ::std::fmt::Display,
39783 {
39784 self.jsonrpc = value
39785 .try_into()
39786 .map_err(|e| {
39787 format!("error converting supplied value for jsonrpc: {e}")
39788 });
39789 self
39790 }
39791 pub fn result<T>(mut self, value: T) -> Self
39792 where
39793 T: ::std::convert::TryInto<
39794 ::std::option::Option<
39795 super::PostGetCompressionSignaturesForAccountResponseResult,
39796 >,
39797 >,
39798 T::Error: ::std::fmt::Display,
39799 {
39800 self.result = value
39801 .try_into()
39802 .map_err(|e| {
39803 format!("error converting supplied value for result: {e}")
39804 });
39805 self
39806 }
39807 }
39808 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForAccountResponse>
39809 for super::PostGetCompressionSignaturesForAccountResponse {
39810 type Error = super::error::ConversionError;
39811 fn try_from(
39812 value: PostGetCompressionSignaturesForAccountResponse,
39813 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39814 Ok(Self {
39815 error: value.error?,
39816 id: value.id?,
39817 jsonrpc: value.jsonrpc?,
39818 result: value.result?,
39819 })
39820 }
39821 }
39822 impl ::std::convert::From<super::PostGetCompressionSignaturesForAccountResponse>
39823 for PostGetCompressionSignaturesForAccountResponse {
39824 fn from(
39825 value: super::PostGetCompressionSignaturesForAccountResponse,
39826 ) -> Self {
39827 Self {
39828 error: Ok(value.error),
39829 id: Ok(value.id),
39830 jsonrpc: Ok(value.jsonrpc),
39831 result: Ok(value.result),
39832 }
39833 }
39834 }
39835 #[derive(Clone, Debug)]
39836 pub struct PostGetCompressionSignaturesForAccountResponseError {
39837 code: ::std::result::Result<
39838 ::std::option::Option<i64>,
39839 ::std::string::String,
39840 >,
39841 message: ::std::result::Result<
39842 ::std::option::Option<::std::string::String>,
39843 ::std::string::String,
39844 >,
39845 }
39846 impl ::std::default::Default
39847 for PostGetCompressionSignaturesForAccountResponseError {
39848 fn default() -> Self {
39849 Self {
39850 code: Ok(Default::default()),
39851 message: Ok(Default::default()),
39852 }
39853 }
39854 }
39855 impl PostGetCompressionSignaturesForAccountResponseError {
39856 pub fn code<T>(mut self, value: T) -> Self
39857 where
39858 T: ::std::convert::TryInto<::std::option::Option<i64>>,
39859 T::Error: ::std::fmt::Display,
39860 {
39861 self.code = value
39862 .try_into()
39863 .map_err(|e| {
39864 format!("error converting supplied value for code: {e}")
39865 });
39866 self
39867 }
39868 pub fn message<T>(mut self, value: T) -> Self
39869 where
39870 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
39871 T::Error: ::std::fmt::Display,
39872 {
39873 self.message = value
39874 .try_into()
39875 .map_err(|e| {
39876 format!("error converting supplied value for message: {e}")
39877 });
39878 self
39879 }
39880 }
39881 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForAccountResponseError>
39882 for super::PostGetCompressionSignaturesForAccountResponseError {
39883 type Error = super::error::ConversionError;
39884 fn try_from(
39885 value: PostGetCompressionSignaturesForAccountResponseError,
39886 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39887 Ok(Self {
39888 code: value.code?,
39889 message: value.message?,
39890 })
39891 }
39892 }
39893 impl ::std::convert::From<
39894 super::PostGetCompressionSignaturesForAccountResponseError,
39895 > for PostGetCompressionSignaturesForAccountResponseError {
39896 fn from(
39897 value: super::PostGetCompressionSignaturesForAccountResponseError,
39898 ) -> Self {
39899 Self {
39900 code: Ok(value.code),
39901 message: Ok(value.message),
39902 }
39903 }
39904 }
39905 #[derive(Clone, Debug)]
39906 pub struct PostGetCompressionSignaturesForAccountResponseResult {
39907 context: ::std::result::Result<super::Context, ::std::string::String>,
39908 value: ::std::result::Result<
39909 super::SignatureInfoList,
39910 ::std::string::String,
39911 >,
39912 }
39913 impl ::std::default::Default
39914 for PostGetCompressionSignaturesForAccountResponseResult {
39915 fn default() -> Self {
39916 Self {
39917 context: Err("no value supplied for context".to_string()),
39918 value: Err("no value supplied for value".to_string()),
39919 }
39920 }
39921 }
39922 impl PostGetCompressionSignaturesForAccountResponseResult {
39923 pub fn context<T>(mut self, value: T) -> Self
39924 where
39925 T: ::std::convert::TryInto<super::Context>,
39926 T::Error: ::std::fmt::Display,
39927 {
39928 self.context = value
39929 .try_into()
39930 .map_err(|e| {
39931 format!("error converting supplied value for context: {e}")
39932 });
39933 self
39934 }
39935 pub fn value<T>(mut self, value: T) -> Self
39936 where
39937 T: ::std::convert::TryInto<super::SignatureInfoList>,
39938 T::Error: ::std::fmt::Display,
39939 {
39940 self.value = value
39941 .try_into()
39942 .map_err(|e| {
39943 format!("error converting supplied value for value: {e}")
39944 });
39945 self
39946 }
39947 }
39948 impl ::std::convert::TryFrom<
39949 PostGetCompressionSignaturesForAccountResponseResult,
39950 > for super::PostGetCompressionSignaturesForAccountResponseResult {
39951 type Error = super::error::ConversionError;
39952 fn try_from(
39953 value: PostGetCompressionSignaturesForAccountResponseResult,
39954 ) -> ::std::result::Result<Self, super::error::ConversionError> {
39955 Ok(Self {
39956 context: value.context?,
39957 value: value.value?,
39958 })
39959 }
39960 }
39961 impl ::std::convert::From<
39962 super::PostGetCompressionSignaturesForAccountResponseResult,
39963 > for PostGetCompressionSignaturesForAccountResponseResult {
39964 fn from(
39965 value: super::PostGetCompressionSignaturesForAccountResponseResult,
39966 ) -> Self {
39967 Self {
39968 context: Ok(value.context),
39969 value: Ok(value.value),
39970 }
39971 }
39972 }
39973 #[derive(Clone, Debug)]
39974 pub struct PostGetCompressionSignaturesForAddressBody {
39975 id: ::std::result::Result<
39976 super::PostGetCompressionSignaturesForAddressBodyId,
39977 ::std::string::String,
39978 >,
39979 jsonrpc: ::std::result::Result<
39980 super::PostGetCompressionSignaturesForAddressBodyJsonrpc,
39981 ::std::string::String,
39982 >,
39983 method: ::std::result::Result<
39984 super::PostGetCompressionSignaturesForAddressBodyMethod,
39985 ::std::string::String,
39986 >,
39987 params: ::std::result::Result<
39988 super::PostGetCompressionSignaturesForAddressBodyParams,
39989 ::std::string::String,
39990 >,
39991 }
39992 impl ::std::default::Default for PostGetCompressionSignaturesForAddressBody {
39993 fn default() -> Self {
39994 Self {
39995 id: Err("no value supplied for id".to_string()),
39996 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
39997 method: Err("no value supplied for method".to_string()),
39998 params: Err("no value supplied for params".to_string()),
39999 }
40000 }
40001 }
40002 impl PostGetCompressionSignaturesForAddressBody {
40003 pub fn id<T>(mut self, value: T) -> Self
40004 where
40005 T: ::std::convert::TryInto<
40006 super::PostGetCompressionSignaturesForAddressBodyId,
40007 >,
40008 T::Error: ::std::fmt::Display,
40009 {
40010 self.id = value
40011 .try_into()
40012 .map_err(|e| format!("error converting supplied value for id: {e}"));
40013 self
40014 }
40015 pub fn jsonrpc<T>(mut self, value: T) -> Self
40016 where
40017 T: ::std::convert::TryInto<
40018 super::PostGetCompressionSignaturesForAddressBodyJsonrpc,
40019 >,
40020 T::Error: ::std::fmt::Display,
40021 {
40022 self.jsonrpc = value
40023 .try_into()
40024 .map_err(|e| {
40025 format!("error converting supplied value for jsonrpc: {e}")
40026 });
40027 self
40028 }
40029 pub fn method<T>(mut self, value: T) -> Self
40030 where
40031 T: ::std::convert::TryInto<
40032 super::PostGetCompressionSignaturesForAddressBodyMethod,
40033 >,
40034 T::Error: ::std::fmt::Display,
40035 {
40036 self.method = value
40037 .try_into()
40038 .map_err(|e| {
40039 format!("error converting supplied value for method: {e}")
40040 });
40041 self
40042 }
40043 pub fn params<T>(mut self, value: T) -> Self
40044 where
40045 T: ::std::convert::TryInto<
40046 super::PostGetCompressionSignaturesForAddressBodyParams,
40047 >,
40048 T::Error: ::std::fmt::Display,
40049 {
40050 self.params = value
40051 .try_into()
40052 .map_err(|e| {
40053 format!("error converting supplied value for params: {e}")
40054 });
40055 self
40056 }
40057 }
40058 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForAddressBody>
40059 for super::PostGetCompressionSignaturesForAddressBody {
40060 type Error = super::error::ConversionError;
40061 fn try_from(
40062 value: PostGetCompressionSignaturesForAddressBody,
40063 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40064 Ok(Self {
40065 id: value.id?,
40066 jsonrpc: value.jsonrpc?,
40067 method: value.method?,
40068 params: value.params?,
40069 })
40070 }
40071 }
40072 impl ::std::convert::From<super::PostGetCompressionSignaturesForAddressBody>
40073 for PostGetCompressionSignaturesForAddressBody {
40074 fn from(value: super::PostGetCompressionSignaturesForAddressBody) -> Self {
40075 Self {
40076 id: Ok(value.id),
40077 jsonrpc: Ok(value.jsonrpc),
40078 method: Ok(value.method),
40079 params: Ok(value.params),
40080 }
40081 }
40082 }
40083 #[derive(Clone, Debug)]
40084 pub struct PostGetCompressionSignaturesForAddressBodyParams {
40085 address: ::std::result::Result<
40086 super::SerializablePubkey,
40087 ::std::string::String,
40088 >,
40089 cursor: ::std::result::Result<
40090 ::std::option::Option<::std::string::String>,
40091 ::std::string::String,
40092 >,
40093 limit: ::std::result::Result<
40094 ::std::option::Option<super::Limit>,
40095 ::std::string::String,
40096 >,
40097 }
40098 impl ::std::default::Default
40099 for PostGetCompressionSignaturesForAddressBodyParams {
40100 fn default() -> Self {
40101 Self {
40102 address: Err("no value supplied for address".to_string()),
40103 cursor: Ok(Default::default()),
40104 limit: Ok(Default::default()),
40105 }
40106 }
40107 }
40108 impl PostGetCompressionSignaturesForAddressBodyParams {
40109 pub fn address<T>(mut self, value: T) -> Self
40110 where
40111 T: ::std::convert::TryInto<super::SerializablePubkey>,
40112 T::Error: ::std::fmt::Display,
40113 {
40114 self.address = value
40115 .try_into()
40116 .map_err(|e| {
40117 format!("error converting supplied value for address: {e}")
40118 });
40119 self
40120 }
40121 pub fn cursor<T>(mut self, value: T) -> Self
40122 where
40123 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
40124 T::Error: ::std::fmt::Display,
40125 {
40126 self.cursor = value
40127 .try_into()
40128 .map_err(|e| {
40129 format!("error converting supplied value for cursor: {e}")
40130 });
40131 self
40132 }
40133 pub fn limit<T>(mut self, value: T) -> Self
40134 where
40135 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
40136 T::Error: ::std::fmt::Display,
40137 {
40138 self.limit = value
40139 .try_into()
40140 .map_err(|e| {
40141 format!("error converting supplied value for limit: {e}")
40142 });
40143 self
40144 }
40145 }
40146 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForAddressBodyParams>
40147 for super::PostGetCompressionSignaturesForAddressBodyParams {
40148 type Error = super::error::ConversionError;
40149 fn try_from(
40150 value: PostGetCompressionSignaturesForAddressBodyParams,
40151 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40152 Ok(Self {
40153 address: value.address?,
40154 cursor: value.cursor?,
40155 limit: value.limit?,
40156 })
40157 }
40158 }
40159 impl ::std::convert::From<
40160 super::PostGetCompressionSignaturesForAddressBodyParams,
40161 > for PostGetCompressionSignaturesForAddressBodyParams {
40162 fn from(
40163 value: super::PostGetCompressionSignaturesForAddressBodyParams,
40164 ) -> Self {
40165 Self {
40166 address: Ok(value.address),
40167 cursor: Ok(value.cursor),
40168 limit: Ok(value.limit),
40169 }
40170 }
40171 }
40172 #[derive(Clone, Debug)]
40173 pub struct PostGetCompressionSignaturesForAddressResponse {
40174 error: ::std::result::Result<
40175 ::std::option::Option<
40176 super::PostGetCompressionSignaturesForAddressResponseError,
40177 >,
40178 ::std::string::String,
40179 >,
40180 id: ::std::result::Result<
40181 super::PostGetCompressionSignaturesForAddressResponseId,
40182 ::std::string::String,
40183 >,
40184 jsonrpc: ::std::result::Result<
40185 super::PostGetCompressionSignaturesForAddressResponseJsonrpc,
40186 ::std::string::String,
40187 >,
40188 result: ::std::result::Result<
40189 ::std::option::Option<
40190 super::PostGetCompressionSignaturesForAddressResponseResult,
40191 >,
40192 ::std::string::String,
40193 >,
40194 }
40195 impl ::std::default::Default for PostGetCompressionSignaturesForAddressResponse {
40196 fn default() -> Self {
40197 Self {
40198 error: Ok(Default::default()),
40199 id: Err("no value supplied for id".to_string()),
40200 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
40201 result: Ok(Default::default()),
40202 }
40203 }
40204 }
40205 impl PostGetCompressionSignaturesForAddressResponse {
40206 pub fn error<T>(mut self, value: T) -> Self
40207 where
40208 T: ::std::convert::TryInto<
40209 ::std::option::Option<
40210 super::PostGetCompressionSignaturesForAddressResponseError,
40211 >,
40212 >,
40213 T::Error: ::std::fmt::Display,
40214 {
40215 self.error = value
40216 .try_into()
40217 .map_err(|e| {
40218 format!("error converting supplied value for error: {e}")
40219 });
40220 self
40221 }
40222 pub fn id<T>(mut self, value: T) -> Self
40223 where
40224 T: ::std::convert::TryInto<
40225 super::PostGetCompressionSignaturesForAddressResponseId,
40226 >,
40227 T::Error: ::std::fmt::Display,
40228 {
40229 self.id = value
40230 .try_into()
40231 .map_err(|e| format!("error converting supplied value for id: {e}"));
40232 self
40233 }
40234 pub fn jsonrpc<T>(mut self, value: T) -> Self
40235 where
40236 T: ::std::convert::TryInto<
40237 super::PostGetCompressionSignaturesForAddressResponseJsonrpc,
40238 >,
40239 T::Error: ::std::fmt::Display,
40240 {
40241 self.jsonrpc = value
40242 .try_into()
40243 .map_err(|e| {
40244 format!("error converting supplied value for jsonrpc: {e}")
40245 });
40246 self
40247 }
40248 pub fn result<T>(mut self, value: T) -> Self
40249 where
40250 T: ::std::convert::TryInto<
40251 ::std::option::Option<
40252 super::PostGetCompressionSignaturesForAddressResponseResult,
40253 >,
40254 >,
40255 T::Error: ::std::fmt::Display,
40256 {
40257 self.result = value
40258 .try_into()
40259 .map_err(|e| {
40260 format!("error converting supplied value for result: {e}")
40261 });
40262 self
40263 }
40264 }
40265 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForAddressResponse>
40266 for super::PostGetCompressionSignaturesForAddressResponse {
40267 type Error = super::error::ConversionError;
40268 fn try_from(
40269 value: PostGetCompressionSignaturesForAddressResponse,
40270 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40271 Ok(Self {
40272 error: value.error?,
40273 id: value.id?,
40274 jsonrpc: value.jsonrpc?,
40275 result: value.result?,
40276 })
40277 }
40278 }
40279 impl ::std::convert::From<super::PostGetCompressionSignaturesForAddressResponse>
40280 for PostGetCompressionSignaturesForAddressResponse {
40281 fn from(
40282 value: super::PostGetCompressionSignaturesForAddressResponse,
40283 ) -> Self {
40284 Self {
40285 error: Ok(value.error),
40286 id: Ok(value.id),
40287 jsonrpc: Ok(value.jsonrpc),
40288 result: Ok(value.result),
40289 }
40290 }
40291 }
40292 #[derive(Clone, Debug)]
40293 pub struct PostGetCompressionSignaturesForAddressResponseError {
40294 code: ::std::result::Result<
40295 ::std::option::Option<i64>,
40296 ::std::string::String,
40297 >,
40298 message: ::std::result::Result<
40299 ::std::option::Option<::std::string::String>,
40300 ::std::string::String,
40301 >,
40302 }
40303 impl ::std::default::Default
40304 for PostGetCompressionSignaturesForAddressResponseError {
40305 fn default() -> Self {
40306 Self {
40307 code: Ok(Default::default()),
40308 message: Ok(Default::default()),
40309 }
40310 }
40311 }
40312 impl PostGetCompressionSignaturesForAddressResponseError {
40313 pub fn code<T>(mut self, value: T) -> Self
40314 where
40315 T: ::std::convert::TryInto<::std::option::Option<i64>>,
40316 T::Error: ::std::fmt::Display,
40317 {
40318 self.code = value
40319 .try_into()
40320 .map_err(|e| {
40321 format!("error converting supplied value for code: {e}")
40322 });
40323 self
40324 }
40325 pub fn message<T>(mut self, value: T) -> Self
40326 where
40327 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
40328 T::Error: ::std::fmt::Display,
40329 {
40330 self.message = value
40331 .try_into()
40332 .map_err(|e| {
40333 format!("error converting supplied value for message: {e}")
40334 });
40335 self
40336 }
40337 }
40338 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForAddressResponseError>
40339 for super::PostGetCompressionSignaturesForAddressResponseError {
40340 type Error = super::error::ConversionError;
40341 fn try_from(
40342 value: PostGetCompressionSignaturesForAddressResponseError,
40343 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40344 Ok(Self {
40345 code: value.code?,
40346 message: value.message?,
40347 })
40348 }
40349 }
40350 impl ::std::convert::From<
40351 super::PostGetCompressionSignaturesForAddressResponseError,
40352 > for PostGetCompressionSignaturesForAddressResponseError {
40353 fn from(
40354 value: super::PostGetCompressionSignaturesForAddressResponseError,
40355 ) -> Self {
40356 Self {
40357 code: Ok(value.code),
40358 message: Ok(value.message),
40359 }
40360 }
40361 }
40362 #[derive(Clone, Debug)]
40363 pub struct PostGetCompressionSignaturesForAddressResponseResult {
40364 context: ::std::result::Result<super::Context, ::std::string::String>,
40365 value: ::std::result::Result<
40366 super::PaginatedSignatureInfoList,
40367 ::std::string::String,
40368 >,
40369 }
40370 impl ::std::default::Default
40371 for PostGetCompressionSignaturesForAddressResponseResult {
40372 fn default() -> Self {
40373 Self {
40374 context: Err("no value supplied for context".to_string()),
40375 value: Err("no value supplied for value".to_string()),
40376 }
40377 }
40378 }
40379 impl PostGetCompressionSignaturesForAddressResponseResult {
40380 pub fn context<T>(mut self, value: T) -> Self
40381 where
40382 T: ::std::convert::TryInto<super::Context>,
40383 T::Error: ::std::fmt::Display,
40384 {
40385 self.context = value
40386 .try_into()
40387 .map_err(|e| {
40388 format!("error converting supplied value for context: {e}")
40389 });
40390 self
40391 }
40392 pub fn value<T>(mut self, value: T) -> Self
40393 where
40394 T: ::std::convert::TryInto<super::PaginatedSignatureInfoList>,
40395 T::Error: ::std::fmt::Display,
40396 {
40397 self.value = value
40398 .try_into()
40399 .map_err(|e| {
40400 format!("error converting supplied value for value: {e}")
40401 });
40402 self
40403 }
40404 }
40405 impl ::std::convert::TryFrom<
40406 PostGetCompressionSignaturesForAddressResponseResult,
40407 > for super::PostGetCompressionSignaturesForAddressResponseResult {
40408 type Error = super::error::ConversionError;
40409 fn try_from(
40410 value: PostGetCompressionSignaturesForAddressResponseResult,
40411 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40412 Ok(Self {
40413 context: value.context?,
40414 value: value.value?,
40415 })
40416 }
40417 }
40418 impl ::std::convert::From<
40419 super::PostGetCompressionSignaturesForAddressResponseResult,
40420 > for PostGetCompressionSignaturesForAddressResponseResult {
40421 fn from(
40422 value: super::PostGetCompressionSignaturesForAddressResponseResult,
40423 ) -> Self {
40424 Self {
40425 context: Ok(value.context),
40426 value: Ok(value.value),
40427 }
40428 }
40429 }
40430 #[derive(Clone, Debug)]
40431 pub struct PostGetCompressionSignaturesForOwnerBody {
40432 id: ::std::result::Result<
40433 super::PostGetCompressionSignaturesForOwnerBodyId,
40434 ::std::string::String,
40435 >,
40436 jsonrpc: ::std::result::Result<
40437 super::PostGetCompressionSignaturesForOwnerBodyJsonrpc,
40438 ::std::string::String,
40439 >,
40440 method: ::std::result::Result<
40441 super::PostGetCompressionSignaturesForOwnerBodyMethod,
40442 ::std::string::String,
40443 >,
40444 params: ::std::result::Result<
40445 super::PostGetCompressionSignaturesForOwnerBodyParams,
40446 ::std::string::String,
40447 >,
40448 }
40449 impl ::std::default::Default for PostGetCompressionSignaturesForOwnerBody {
40450 fn default() -> Self {
40451 Self {
40452 id: Err("no value supplied for id".to_string()),
40453 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
40454 method: Err("no value supplied for method".to_string()),
40455 params: Err("no value supplied for params".to_string()),
40456 }
40457 }
40458 }
40459 impl PostGetCompressionSignaturesForOwnerBody {
40460 pub fn id<T>(mut self, value: T) -> Self
40461 where
40462 T: ::std::convert::TryInto<
40463 super::PostGetCompressionSignaturesForOwnerBodyId,
40464 >,
40465 T::Error: ::std::fmt::Display,
40466 {
40467 self.id = value
40468 .try_into()
40469 .map_err(|e| format!("error converting supplied value for id: {e}"));
40470 self
40471 }
40472 pub fn jsonrpc<T>(mut self, value: T) -> Self
40473 where
40474 T: ::std::convert::TryInto<
40475 super::PostGetCompressionSignaturesForOwnerBodyJsonrpc,
40476 >,
40477 T::Error: ::std::fmt::Display,
40478 {
40479 self.jsonrpc = value
40480 .try_into()
40481 .map_err(|e| {
40482 format!("error converting supplied value for jsonrpc: {e}")
40483 });
40484 self
40485 }
40486 pub fn method<T>(mut self, value: T) -> Self
40487 where
40488 T: ::std::convert::TryInto<
40489 super::PostGetCompressionSignaturesForOwnerBodyMethod,
40490 >,
40491 T::Error: ::std::fmt::Display,
40492 {
40493 self.method = value
40494 .try_into()
40495 .map_err(|e| {
40496 format!("error converting supplied value for method: {e}")
40497 });
40498 self
40499 }
40500 pub fn params<T>(mut self, value: T) -> Self
40501 where
40502 T: ::std::convert::TryInto<
40503 super::PostGetCompressionSignaturesForOwnerBodyParams,
40504 >,
40505 T::Error: ::std::fmt::Display,
40506 {
40507 self.params = value
40508 .try_into()
40509 .map_err(|e| {
40510 format!("error converting supplied value for params: {e}")
40511 });
40512 self
40513 }
40514 }
40515 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForOwnerBody>
40516 for super::PostGetCompressionSignaturesForOwnerBody {
40517 type Error = super::error::ConversionError;
40518 fn try_from(
40519 value: PostGetCompressionSignaturesForOwnerBody,
40520 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40521 Ok(Self {
40522 id: value.id?,
40523 jsonrpc: value.jsonrpc?,
40524 method: value.method?,
40525 params: value.params?,
40526 })
40527 }
40528 }
40529 impl ::std::convert::From<super::PostGetCompressionSignaturesForOwnerBody>
40530 for PostGetCompressionSignaturesForOwnerBody {
40531 fn from(value: super::PostGetCompressionSignaturesForOwnerBody) -> Self {
40532 Self {
40533 id: Ok(value.id),
40534 jsonrpc: Ok(value.jsonrpc),
40535 method: Ok(value.method),
40536 params: Ok(value.params),
40537 }
40538 }
40539 }
40540 #[derive(Clone, Debug)]
40541 pub struct PostGetCompressionSignaturesForOwnerBodyParams {
40542 cursor: ::std::result::Result<
40543 ::std::option::Option<::std::string::String>,
40544 ::std::string::String,
40545 >,
40546 limit: ::std::result::Result<
40547 ::std::option::Option<super::Limit>,
40548 ::std::string::String,
40549 >,
40550 owner: ::std::result::Result<
40551 super::SerializablePubkey,
40552 ::std::string::String,
40553 >,
40554 }
40555 impl ::std::default::Default for PostGetCompressionSignaturesForOwnerBodyParams {
40556 fn default() -> Self {
40557 Self {
40558 cursor: Ok(Default::default()),
40559 limit: Ok(Default::default()),
40560 owner: Err("no value supplied for owner".to_string()),
40561 }
40562 }
40563 }
40564 impl PostGetCompressionSignaturesForOwnerBodyParams {
40565 pub fn cursor<T>(mut self, value: T) -> Self
40566 where
40567 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
40568 T::Error: ::std::fmt::Display,
40569 {
40570 self.cursor = value
40571 .try_into()
40572 .map_err(|e| {
40573 format!("error converting supplied value for cursor: {e}")
40574 });
40575 self
40576 }
40577 pub fn limit<T>(mut self, value: T) -> Self
40578 where
40579 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
40580 T::Error: ::std::fmt::Display,
40581 {
40582 self.limit = value
40583 .try_into()
40584 .map_err(|e| {
40585 format!("error converting supplied value for limit: {e}")
40586 });
40587 self
40588 }
40589 pub fn owner<T>(mut self, value: T) -> Self
40590 where
40591 T: ::std::convert::TryInto<super::SerializablePubkey>,
40592 T::Error: ::std::fmt::Display,
40593 {
40594 self.owner = value
40595 .try_into()
40596 .map_err(|e| {
40597 format!("error converting supplied value for owner: {e}")
40598 });
40599 self
40600 }
40601 }
40602 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForOwnerBodyParams>
40603 for super::PostGetCompressionSignaturesForOwnerBodyParams {
40604 type Error = super::error::ConversionError;
40605 fn try_from(
40606 value: PostGetCompressionSignaturesForOwnerBodyParams,
40607 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40608 Ok(Self {
40609 cursor: value.cursor?,
40610 limit: value.limit?,
40611 owner: value.owner?,
40612 })
40613 }
40614 }
40615 impl ::std::convert::From<super::PostGetCompressionSignaturesForOwnerBodyParams>
40616 for PostGetCompressionSignaturesForOwnerBodyParams {
40617 fn from(
40618 value: super::PostGetCompressionSignaturesForOwnerBodyParams,
40619 ) -> Self {
40620 Self {
40621 cursor: Ok(value.cursor),
40622 limit: Ok(value.limit),
40623 owner: Ok(value.owner),
40624 }
40625 }
40626 }
40627 #[derive(Clone, Debug)]
40628 pub struct PostGetCompressionSignaturesForOwnerResponse {
40629 error: ::std::result::Result<
40630 ::std::option::Option<
40631 super::PostGetCompressionSignaturesForOwnerResponseError,
40632 >,
40633 ::std::string::String,
40634 >,
40635 id: ::std::result::Result<
40636 super::PostGetCompressionSignaturesForOwnerResponseId,
40637 ::std::string::String,
40638 >,
40639 jsonrpc: ::std::result::Result<
40640 super::PostGetCompressionSignaturesForOwnerResponseJsonrpc,
40641 ::std::string::String,
40642 >,
40643 result: ::std::result::Result<
40644 ::std::option::Option<
40645 super::PostGetCompressionSignaturesForOwnerResponseResult,
40646 >,
40647 ::std::string::String,
40648 >,
40649 }
40650 impl ::std::default::Default for PostGetCompressionSignaturesForOwnerResponse {
40651 fn default() -> Self {
40652 Self {
40653 error: Ok(Default::default()),
40654 id: Err("no value supplied for id".to_string()),
40655 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
40656 result: Ok(Default::default()),
40657 }
40658 }
40659 }
40660 impl PostGetCompressionSignaturesForOwnerResponse {
40661 pub fn error<T>(mut self, value: T) -> Self
40662 where
40663 T: ::std::convert::TryInto<
40664 ::std::option::Option<
40665 super::PostGetCompressionSignaturesForOwnerResponseError,
40666 >,
40667 >,
40668 T::Error: ::std::fmt::Display,
40669 {
40670 self.error = value
40671 .try_into()
40672 .map_err(|e| {
40673 format!("error converting supplied value for error: {e}")
40674 });
40675 self
40676 }
40677 pub fn id<T>(mut self, value: T) -> Self
40678 where
40679 T: ::std::convert::TryInto<
40680 super::PostGetCompressionSignaturesForOwnerResponseId,
40681 >,
40682 T::Error: ::std::fmt::Display,
40683 {
40684 self.id = value
40685 .try_into()
40686 .map_err(|e| format!("error converting supplied value for id: {e}"));
40687 self
40688 }
40689 pub fn jsonrpc<T>(mut self, value: T) -> Self
40690 where
40691 T: ::std::convert::TryInto<
40692 super::PostGetCompressionSignaturesForOwnerResponseJsonrpc,
40693 >,
40694 T::Error: ::std::fmt::Display,
40695 {
40696 self.jsonrpc = value
40697 .try_into()
40698 .map_err(|e| {
40699 format!("error converting supplied value for jsonrpc: {e}")
40700 });
40701 self
40702 }
40703 pub fn result<T>(mut self, value: T) -> Self
40704 where
40705 T: ::std::convert::TryInto<
40706 ::std::option::Option<
40707 super::PostGetCompressionSignaturesForOwnerResponseResult,
40708 >,
40709 >,
40710 T::Error: ::std::fmt::Display,
40711 {
40712 self.result = value
40713 .try_into()
40714 .map_err(|e| {
40715 format!("error converting supplied value for result: {e}")
40716 });
40717 self
40718 }
40719 }
40720 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForOwnerResponse>
40721 for super::PostGetCompressionSignaturesForOwnerResponse {
40722 type Error = super::error::ConversionError;
40723 fn try_from(
40724 value: PostGetCompressionSignaturesForOwnerResponse,
40725 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40726 Ok(Self {
40727 error: value.error?,
40728 id: value.id?,
40729 jsonrpc: value.jsonrpc?,
40730 result: value.result?,
40731 })
40732 }
40733 }
40734 impl ::std::convert::From<super::PostGetCompressionSignaturesForOwnerResponse>
40735 for PostGetCompressionSignaturesForOwnerResponse {
40736 fn from(value: super::PostGetCompressionSignaturesForOwnerResponse) -> Self {
40737 Self {
40738 error: Ok(value.error),
40739 id: Ok(value.id),
40740 jsonrpc: Ok(value.jsonrpc),
40741 result: Ok(value.result),
40742 }
40743 }
40744 }
40745 #[derive(Clone, Debug)]
40746 pub struct PostGetCompressionSignaturesForOwnerResponseError {
40747 code: ::std::result::Result<
40748 ::std::option::Option<i64>,
40749 ::std::string::String,
40750 >,
40751 message: ::std::result::Result<
40752 ::std::option::Option<::std::string::String>,
40753 ::std::string::String,
40754 >,
40755 }
40756 impl ::std::default::Default
40757 for PostGetCompressionSignaturesForOwnerResponseError {
40758 fn default() -> Self {
40759 Self {
40760 code: Ok(Default::default()),
40761 message: Ok(Default::default()),
40762 }
40763 }
40764 }
40765 impl PostGetCompressionSignaturesForOwnerResponseError {
40766 pub fn code<T>(mut self, value: T) -> Self
40767 where
40768 T: ::std::convert::TryInto<::std::option::Option<i64>>,
40769 T::Error: ::std::fmt::Display,
40770 {
40771 self.code = value
40772 .try_into()
40773 .map_err(|e| {
40774 format!("error converting supplied value for code: {e}")
40775 });
40776 self
40777 }
40778 pub fn message<T>(mut self, value: T) -> Self
40779 where
40780 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
40781 T::Error: ::std::fmt::Display,
40782 {
40783 self.message = value
40784 .try_into()
40785 .map_err(|e| {
40786 format!("error converting supplied value for message: {e}")
40787 });
40788 self
40789 }
40790 }
40791 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForOwnerResponseError>
40792 for super::PostGetCompressionSignaturesForOwnerResponseError {
40793 type Error = super::error::ConversionError;
40794 fn try_from(
40795 value: PostGetCompressionSignaturesForOwnerResponseError,
40796 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40797 Ok(Self {
40798 code: value.code?,
40799 message: value.message?,
40800 })
40801 }
40802 }
40803 impl ::std::convert::From<
40804 super::PostGetCompressionSignaturesForOwnerResponseError,
40805 > for PostGetCompressionSignaturesForOwnerResponseError {
40806 fn from(
40807 value: super::PostGetCompressionSignaturesForOwnerResponseError,
40808 ) -> Self {
40809 Self {
40810 code: Ok(value.code),
40811 message: Ok(value.message),
40812 }
40813 }
40814 }
40815 #[derive(Clone, Debug)]
40816 pub struct PostGetCompressionSignaturesForOwnerResponseResult {
40817 context: ::std::result::Result<super::Context, ::std::string::String>,
40818 value: ::std::result::Result<
40819 super::PaginatedSignatureInfoList,
40820 ::std::string::String,
40821 >,
40822 }
40823 impl ::std::default::Default
40824 for PostGetCompressionSignaturesForOwnerResponseResult {
40825 fn default() -> Self {
40826 Self {
40827 context: Err("no value supplied for context".to_string()),
40828 value: Err("no value supplied for value".to_string()),
40829 }
40830 }
40831 }
40832 impl PostGetCompressionSignaturesForOwnerResponseResult {
40833 pub fn context<T>(mut self, value: T) -> Self
40834 where
40835 T: ::std::convert::TryInto<super::Context>,
40836 T::Error: ::std::fmt::Display,
40837 {
40838 self.context = value
40839 .try_into()
40840 .map_err(|e| {
40841 format!("error converting supplied value for context: {e}")
40842 });
40843 self
40844 }
40845 pub fn value<T>(mut self, value: T) -> Self
40846 where
40847 T: ::std::convert::TryInto<super::PaginatedSignatureInfoList>,
40848 T::Error: ::std::fmt::Display,
40849 {
40850 self.value = value
40851 .try_into()
40852 .map_err(|e| {
40853 format!("error converting supplied value for value: {e}")
40854 });
40855 self
40856 }
40857 }
40858 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForOwnerResponseResult>
40859 for super::PostGetCompressionSignaturesForOwnerResponseResult {
40860 type Error = super::error::ConversionError;
40861 fn try_from(
40862 value: PostGetCompressionSignaturesForOwnerResponseResult,
40863 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40864 Ok(Self {
40865 context: value.context?,
40866 value: value.value?,
40867 })
40868 }
40869 }
40870 impl ::std::convert::From<
40871 super::PostGetCompressionSignaturesForOwnerResponseResult,
40872 > for PostGetCompressionSignaturesForOwnerResponseResult {
40873 fn from(
40874 value: super::PostGetCompressionSignaturesForOwnerResponseResult,
40875 ) -> Self {
40876 Self {
40877 context: Ok(value.context),
40878 value: Ok(value.value),
40879 }
40880 }
40881 }
40882 #[derive(Clone, Debug)]
40883 pub struct PostGetCompressionSignaturesForTokenOwnerBody {
40884 id: ::std::result::Result<
40885 super::PostGetCompressionSignaturesForTokenOwnerBodyId,
40886 ::std::string::String,
40887 >,
40888 jsonrpc: ::std::result::Result<
40889 super::PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc,
40890 ::std::string::String,
40891 >,
40892 method: ::std::result::Result<
40893 super::PostGetCompressionSignaturesForTokenOwnerBodyMethod,
40894 ::std::string::String,
40895 >,
40896 params: ::std::result::Result<
40897 super::PostGetCompressionSignaturesForTokenOwnerBodyParams,
40898 ::std::string::String,
40899 >,
40900 }
40901 impl ::std::default::Default for PostGetCompressionSignaturesForTokenOwnerBody {
40902 fn default() -> Self {
40903 Self {
40904 id: Err("no value supplied for id".to_string()),
40905 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
40906 method: Err("no value supplied for method".to_string()),
40907 params: Err("no value supplied for params".to_string()),
40908 }
40909 }
40910 }
40911 impl PostGetCompressionSignaturesForTokenOwnerBody {
40912 pub fn id<T>(mut self, value: T) -> Self
40913 where
40914 T: ::std::convert::TryInto<
40915 super::PostGetCompressionSignaturesForTokenOwnerBodyId,
40916 >,
40917 T::Error: ::std::fmt::Display,
40918 {
40919 self.id = value
40920 .try_into()
40921 .map_err(|e| format!("error converting supplied value for id: {e}"));
40922 self
40923 }
40924 pub fn jsonrpc<T>(mut self, value: T) -> Self
40925 where
40926 T: ::std::convert::TryInto<
40927 super::PostGetCompressionSignaturesForTokenOwnerBodyJsonrpc,
40928 >,
40929 T::Error: ::std::fmt::Display,
40930 {
40931 self.jsonrpc = value
40932 .try_into()
40933 .map_err(|e| {
40934 format!("error converting supplied value for jsonrpc: {e}")
40935 });
40936 self
40937 }
40938 pub fn method<T>(mut self, value: T) -> Self
40939 where
40940 T: ::std::convert::TryInto<
40941 super::PostGetCompressionSignaturesForTokenOwnerBodyMethod,
40942 >,
40943 T::Error: ::std::fmt::Display,
40944 {
40945 self.method = value
40946 .try_into()
40947 .map_err(|e| {
40948 format!("error converting supplied value for method: {e}")
40949 });
40950 self
40951 }
40952 pub fn params<T>(mut self, value: T) -> Self
40953 where
40954 T: ::std::convert::TryInto<
40955 super::PostGetCompressionSignaturesForTokenOwnerBodyParams,
40956 >,
40957 T::Error: ::std::fmt::Display,
40958 {
40959 self.params = value
40960 .try_into()
40961 .map_err(|e| {
40962 format!("error converting supplied value for params: {e}")
40963 });
40964 self
40965 }
40966 }
40967 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForTokenOwnerBody>
40968 for super::PostGetCompressionSignaturesForTokenOwnerBody {
40969 type Error = super::error::ConversionError;
40970 fn try_from(
40971 value: PostGetCompressionSignaturesForTokenOwnerBody,
40972 ) -> ::std::result::Result<Self, super::error::ConversionError> {
40973 Ok(Self {
40974 id: value.id?,
40975 jsonrpc: value.jsonrpc?,
40976 method: value.method?,
40977 params: value.params?,
40978 })
40979 }
40980 }
40981 impl ::std::convert::From<super::PostGetCompressionSignaturesForTokenOwnerBody>
40982 for PostGetCompressionSignaturesForTokenOwnerBody {
40983 fn from(
40984 value: super::PostGetCompressionSignaturesForTokenOwnerBody,
40985 ) -> Self {
40986 Self {
40987 id: Ok(value.id),
40988 jsonrpc: Ok(value.jsonrpc),
40989 method: Ok(value.method),
40990 params: Ok(value.params),
40991 }
40992 }
40993 }
40994 #[derive(Clone, Debug)]
40995 pub struct PostGetCompressionSignaturesForTokenOwnerBodyParams {
40996 cursor: ::std::result::Result<
40997 ::std::option::Option<::std::string::String>,
40998 ::std::string::String,
40999 >,
41000 limit: ::std::result::Result<
41001 ::std::option::Option<super::Limit>,
41002 ::std::string::String,
41003 >,
41004 owner: ::std::result::Result<
41005 super::SerializablePubkey,
41006 ::std::string::String,
41007 >,
41008 }
41009 impl ::std::default::Default
41010 for PostGetCompressionSignaturesForTokenOwnerBodyParams {
41011 fn default() -> Self {
41012 Self {
41013 cursor: Ok(Default::default()),
41014 limit: Ok(Default::default()),
41015 owner: Err("no value supplied for owner".to_string()),
41016 }
41017 }
41018 }
41019 impl PostGetCompressionSignaturesForTokenOwnerBodyParams {
41020 pub fn cursor<T>(mut self, value: T) -> Self
41021 where
41022 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
41023 T::Error: ::std::fmt::Display,
41024 {
41025 self.cursor = value
41026 .try_into()
41027 .map_err(|e| {
41028 format!("error converting supplied value for cursor: {e}")
41029 });
41030 self
41031 }
41032 pub fn limit<T>(mut self, value: T) -> Self
41033 where
41034 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
41035 T::Error: ::std::fmt::Display,
41036 {
41037 self.limit = value
41038 .try_into()
41039 .map_err(|e| {
41040 format!("error converting supplied value for limit: {e}")
41041 });
41042 self
41043 }
41044 pub fn owner<T>(mut self, value: T) -> Self
41045 where
41046 T: ::std::convert::TryInto<super::SerializablePubkey>,
41047 T::Error: ::std::fmt::Display,
41048 {
41049 self.owner = value
41050 .try_into()
41051 .map_err(|e| {
41052 format!("error converting supplied value for owner: {e}")
41053 });
41054 self
41055 }
41056 }
41057 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForTokenOwnerBodyParams>
41058 for super::PostGetCompressionSignaturesForTokenOwnerBodyParams {
41059 type Error = super::error::ConversionError;
41060 fn try_from(
41061 value: PostGetCompressionSignaturesForTokenOwnerBodyParams,
41062 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41063 Ok(Self {
41064 cursor: value.cursor?,
41065 limit: value.limit?,
41066 owner: value.owner?,
41067 })
41068 }
41069 }
41070 impl ::std::convert::From<
41071 super::PostGetCompressionSignaturesForTokenOwnerBodyParams,
41072 > for PostGetCompressionSignaturesForTokenOwnerBodyParams {
41073 fn from(
41074 value: super::PostGetCompressionSignaturesForTokenOwnerBodyParams,
41075 ) -> Self {
41076 Self {
41077 cursor: Ok(value.cursor),
41078 limit: Ok(value.limit),
41079 owner: Ok(value.owner),
41080 }
41081 }
41082 }
41083 #[derive(Clone, Debug)]
41084 pub struct PostGetCompressionSignaturesForTokenOwnerResponse {
41085 error: ::std::result::Result<
41086 ::std::option::Option<
41087 super::PostGetCompressionSignaturesForTokenOwnerResponseError,
41088 >,
41089 ::std::string::String,
41090 >,
41091 id: ::std::result::Result<
41092 super::PostGetCompressionSignaturesForTokenOwnerResponseId,
41093 ::std::string::String,
41094 >,
41095 jsonrpc: ::std::result::Result<
41096 super::PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc,
41097 ::std::string::String,
41098 >,
41099 result: ::std::result::Result<
41100 ::std::option::Option<
41101 super::PostGetCompressionSignaturesForTokenOwnerResponseResult,
41102 >,
41103 ::std::string::String,
41104 >,
41105 }
41106 impl ::std::default::Default
41107 for PostGetCompressionSignaturesForTokenOwnerResponse {
41108 fn default() -> Self {
41109 Self {
41110 error: Ok(Default::default()),
41111 id: Err("no value supplied for id".to_string()),
41112 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
41113 result: Ok(Default::default()),
41114 }
41115 }
41116 }
41117 impl PostGetCompressionSignaturesForTokenOwnerResponse {
41118 pub fn error<T>(mut self, value: T) -> Self
41119 where
41120 T: ::std::convert::TryInto<
41121 ::std::option::Option<
41122 super::PostGetCompressionSignaturesForTokenOwnerResponseError,
41123 >,
41124 >,
41125 T::Error: ::std::fmt::Display,
41126 {
41127 self.error = value
41128 .try_into()
41129 .map_err(|e| {
41130 format!("error converting supplied value for error: {e}")
41131 });
41132 self
41133 }
41134 pub fn id<T>(mut self, value: T) -> Self
41135 where
41136 T: ::std::convert::TryInto<
41137 super::PostGetCompressionSignaturesForTokenOwnerResponseId,
41138 >,
41139 T::Error: ::std::fmt::Display,
41140 {
41141 self.id = value
41142 .try_into()
41143 .map_err(|e| format!("error converting supplied value for id: {e}"));
41144 self
41145 }
41146 pub fn jsonrpc<T>(mut self, value: T) -> Self
41147 where
41148 T: ::std::convert::TryInto<
41149 super::PostGetCompressionSignaturesForTokenOwnerResponseJsonrpc,
41150 >,
41151 T::Error: ::std::fmt::Display,
41152 {
41153 self.jsonrpc = value
41154 .try_into()
41155 .map_err(|e| {
41156 format!("error converting supplied value for jsonrpc: {e}")
41157 });
41158 self
41159 }
41160 pub fn result<T>(mut self, value: T) -> Self
41161 where
41162 T: ::std::convert::TryInto<
41163 ::std::option::Option<
41164 super::PostGetCompressionSignaturesForTokenOwnerResponseResult,
41165 >,
41166 >,
41167 T::Error: ::std::fmt::Display,
41168 {
41169 self.result = value
41170 .try_into()
41171 .map_err(|e| {
41172 format!("error converting supplied value for result: {e}")
41173 });
41174 self
41175 }
41176 }
41177 impl ::std::convert::TryFrom<PostGetCompressionSignaturesForTokenOwnerResponse>
41178 for super::PostGetCompressionSignaturesForTokenOwnerResponse {
41179 type Error = super::error::ConversionError;
41180 fn try_from(
41181 value: PostGetCompressionSignaturesForTokenOwnerResponse,
41182 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41183 Ok(Self {
41184 error: value.error?,
41185 id: value.id?,
41186 jsonrpc: value.jsonrpc?,
41187 result: value.result?,
41188 })
41189 }
41190 }
41191 impl ::std::convert::From<
41192 super::PostGetCompressionSignaturesForTokenOwnerResponse,
41193 > for PostGetCompressionSignaturesForTokenOwnerResponse {
41194 fn from(
41195 value: super::PostGetCompressionSignaturesForTokenOwnerResponse,
41196 ) -> Self {
41197 Self {
41198 error: Ok(value.error),
41199 id: Ok(value.id),
41200 jsonrpc: Ok(value.jsonrpc),
41201 result: Ok(value.result),
41202 }
41203 }
41204 }
41205 #[derive(Clone, Debug)]
41206 pub struct PostGetCompressionSignaturesForTokenOwnerResponseError {
41207 code: ::std::result::Result<
41208 ::std::option::Option<i64>,
41209 ::std::string::String,
41210 >,
41211 message: ::std::result::Result<
41212 ::std::option::Option<::std::string::String>,
41213 ::std::string::String,
41214 >,
41215 }
41216 impl ::std::default::Default
41217 for PostGetCompressionSignaturesForTokenOwnerResponseError {
41218 fn default() -> Self {
41219 Self {
41220 code: Ok(Default::default()),
41221 message: Ok(Default::default()),
41222 }
41223 }
41224 }
41225 impl PostGetCompressionSignaturesForTokenOwnerResponseError {
41226 pub fn code<T>(mut self, value: T) -> Self
41227 where
41228 T: ::std::convert::TryInto<::std::option::Option<i64>>,
41229 T::Error: ::std::fmt::Display,
41230 {
41231 self.code = value
41232 .try_into()
41233 .map_err(|e| {
41234 format!("error converting supplied value for code: {e}")
41235 });
41236 self
41237 }
41238 pub fn message<T>(mut self, value: T) -> Self
41239 where
41240 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
41241 T::Error: ::std::fmt::Display,
41242 {
41243 self.message = value
41244 .try_into()
41245 .map_err(|e| {
41246 format!("error converting supplied value for message: {e}")
41247 });
41248 self
41249 }
41250 }
41251 impl ::std::convert::TryFrom<
41252 PostGetCompressionSignaturesForTokenOwnerResponseError,
41253 > for super::PostGetCompressionSignaturesForTokenOwnerResponseError {
41254 type Error = super::error::ConversionError;
41255 fn try_from(
41256 value: PostGetCompressionSignaturesForTokenOwnerResponseError,
41257 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41258 Ok(Self {
41259 code: value.code?,
41260 message: value.message?,
41261 })
41262 }
41263 }
41264 impl ::std::convert::From<
41265 super::PostGetCompressionSignaturesForTokenOwnerResponseError,
41266 > for PostGetCompressionSignaturesForTokenOwnerResponseError {
41267 fn from(
41268 value: super::PostGetCompressionSignaturesForTokenOwnerResponseError,
41269 ) -> Self {
41270 Self {
41271 code: Ok(value.code),
41272 message: Ok(value.message),
41273 }
41274 }
41275 }
41276 #[derive(Clone, Debug)]
41277 pub struct PostGetCompressionSignaturesForTokenOwnerResponseResult {
41278 context: ::std::result::Result<super::Context, ::std::string::String>,
41279 value: ::std::result::Result<
41280 super::PaginatedSignatureInfoList,
41281 ::std::string::String,
41282 >,
41283 }
41284 impl ::std::default::Default
41285 for PostGetCompressionSignaturesForTokenOwnerResponseResult {
41286 fn default() -> Self {
41287 Self {
41288 context: Err("no value supplied for context".to_string()),
41289 value: Err("no value supplied for value".to_string()),
41290 }
41291 }
41292 }
41293 impl PostGetCompressionSignaturesForTokenOwnerResponseResult {
41294 pub fn context<T>(mut self, value: T) -> Self
41295 where
41296 T: ::std::convert::TryInto<super::Context>,
41297 T::Error: ::std::fmt::Display,
41298 {
41299 self.context = value
41300 .try_into()
41301 .map_err(|e| {
41302 format!("error converting supplied value for context: {e}")
41303 });
41304 self
41305 }
41306 pub fn value<T>(mut self, value: T) -> Self
41307 where
41308 T: ::std::convert::TryInto<super::PaginatedSignatureInfoList>,
41309 T::Error: ::std::fmt::Display,
41310 {
41311 self.value = value
41312 .try_into()
41313 .map_err(|e| {
41314 format!("error converting supplied value for value: {e}")
41315 });
41316 self
41317 }
41318 }
41319 impl ::std::convert::TryFrom<
41320 PostGetCompressionSignaturesForTokenOwnerResponseResult,
41321 > for super::PostGetCompressionSignaturesForTokenOwnerResponseResult {
41322 type Error = super::error::ConversionError;
41323 fn try_from(
41324 value: PostGetCompressionSignaturesForTokenOwnerResponseResult,
41325 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41326 Ok(Self {
41327 context: value.context?,
41328 value: value.value?,
41329 })
41330 }
41331 }
41332 impl ::std::convert::From<
41333 super::PostGetCompressionSignaturesForTokenOwnerResponseResult,
41334 > for PostGetCompressionSignaturesForTokenOwnerResponseResult {
41335 fn from(
41336 value: super::PostGetCompressionSignaturesForTokenOwnerResponseResult,
41337 ) -> Self {
41338 Self {
41339 context: Ok(value.context),
41340 value: Ok(value.value),
41341 }
41342 }
41343 }
41344 #[derive(Clone, Debug)]
41345 pub struct PostGetIndexerHealthBody {
41346 id: ::std::result::Result<
41347 super::PostGetIndexerHealthBodyId,
41348 ::std::string::String,
41349 >,
41350 jsonrpc: ::std::result::Result<
41351 super::PostGetIndexerHealthBodyJsonrpc,
41352 ::std::string::String,
41353 >,
41354 method: ::std::result::Result<
41355 super::PostGetIndexerHealthBodyMethod,
41356 ::std::string::String,
41357 >,
41358 }
41359 impl ::std::default::Default for PostGetIndexerHealthBody {
41360 fn default() -> Self {
41361 Self {
41362 id: Err("no value supplied for id".to_string()),
41363 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
41364 method: Err("no value supplied for method".to_string()),
41365 }
41366 }
41367 }
41368 impl PostGetIndexerHealthBody {
41369 pub fn id<T>(mut self, value: T) -> Self
41370 where
41371 T: ::std::convert::TryInto<super::PostGetIndexerHealthBodyId>,
41372 T::Error: ::std::fmt::Display,
41373 {
41374 self.id = value
41375 .try_into()
41376 .map_err(|e| format!("error converting supplied value for id: {e}"));
41377 self
41378 }
41379 pub fn jsonrpc<T>(mut self, value: T) -> Self
41380 where
41381 T: ::std::convert::TryInto<super::PostGetIndexerHealthBodyJsonrpc>,
41382 T::Error: ::std::fmt::Display,
41383 {
41384 self.jsonrpc = value
41385 .try_into()
41386 .map_err(|e| {
41387 format!("error converting supplied value for jsonrpc: {e}")
41388 });
41389 self
41390 }
41391 pub fn method<T>(mut self, value: T) -> Self
41392 where
41393 T: ::std::convert::TryInto<super::PostGetIndexerHealthBodyMethod>,
41394 T::Error: ::std::fmt::Display,
41395 {
41396 self.method = value
41397 .try_into()
41398 .map_err(|e| {
41399 format!("error converting supplied value for method: {e}")
41400 });
41401 self
41402 }
41403 }
41404 impl ::std::convert::TryFrom<PostGetIndexerHealthBody>
41405 for super::PostGetIndexerHealthBody {
41406 type Error = super::error::ConversionError;
41407 fn try_from(
41408 value: PostGetIndexerHealthBody,
41409 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41410 Ok(Self {
41411 id: value.id?,
41412 jsonrpc: value.jsonrpc?,
41413 method: value.method?,
41414 })
41415 }
41416 }
41417 impl ::std::convert::From<super::PostGetIndexerHealthBody>
41418 for PostGetIndexerHealthBody {
41419 fn from(value: super::PostGetIndexerHealthBody) -> Self {
41420 Self {
41421 id: Ok(value.id),
41422 jsonrpc: Ok(value.jsonrpc),
41423 method: Ok(value.method),
41424 }
41425 }
41426 }
41427 #[derive(Clone, Debug)]
41428 pub struct PostGetIndexerHealthResponse {
41429 error: ::std::result::Result<
41430 ::std::option::Option<super::PostGetIndexerHealthResponseError>,
41431 ::std::string::String,
41432 >,
41433 id: ::std::result::Result<
41434 super::PostGetIndexerHealthResponseId,
41435 ::std::string::String,
41436 >,
41437 jsonrpc: ::std::result::Result<
41438 super::PostGetIndexerHealthResponseJsonrpc,
41439 ::std::string::String,
41440 >,
41441 result: ::std::result::Result<
41442 super::PostGetIndexerHealthResponseResult,
41443 ::std::string::String,
41444 >,
41445 }
41446 impl ::std::default::Default for PostGetIndexerHealthResponse {
41447 fn default() -> Self {
41448 Self {
41449 error: Ok(Default::default()),
41450 id: Err("no value supplied for id".to_string()),
41451 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
41452 result: Ok(
41453 super::defaults::post_get_indexer_health_response_result(),
41454 ),
41455 }
41456 }
41457 }
41458 impl PostGetIndexerHealthResponse {
41459 pub fn error<T>(mut self, value: T) -> Self
41460 where
41461 T: ::std::convert::TryInto<
41462 ::std::option::Option<super::PostGetIndexerHealthResponseError>,
41463 >,
41464 T::Error: ::std::fmt::Display,
41465 {
41466 self.error = value
41467 .try_into()
41468 .map_err(|e| {
41469 format!("error converting supplied value for error: {e}")
41470 });
41471 self
41472 }
41473 pub fn id<T>(mut self, value: T) -> Self
41474 where
41475 T: ::std::convert::TryInto<super::PostGetIndexerHealthResponseId>,
41476 T::Error: ::std::fmt::Display,
41477 {
41478 self.id = value
41479 .try_into()
41480 .map_err(|e| format!("error converting supplied value for id: {e}"));
41481 self
41482 }
41483 pub fn jsonrpc<T>(mut self, value: T) -> Self
41484 where
41485 T: ::std::convert::TryInto<super::PostGetIndexerHealthResponseJsonrpc>,
41486 T::Error: ::std::fmt::Display,
41487 {
41488 self.jsonrpc = value
41489 .try_into()
41490 .map_err(|e| {
41491 format!("error converting supplied value for jsonrpc: {e}")
41492 });
41493 self
41494 }
41495 pub fn result<T>(mut self, value: T) -> Self
41496 where
41497 T: ::std::convert::TryInto<super::PostGetIndexerHealthResponseResult>,
41498 T::Error: ::std::fmt::Display,
41499 {
41500 self.result = value
41501 .try_into()
41502 .map_err(|e| {
41503 format!("error converting supplied value for result: {e}")
41504 });
41505 self
41506 }
41507 }
41508 impl ::std::convert::TryFrom<PostGetIndexerHealthResponse>
41509 for super::PostGetIndexerHealthResponse {
41510 type Error = super::error::ConversionError;
41511 fn try_from(
41512 value: PostGetIndexerHealthResponse,
41513 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41514 Ok(Self {
41515 error: value.error?,
41516 id: value.id?,
41517 jsonrpc: value.jsonrpc?,
41518 result: value.result?,
41519 })
41520 }
41521 }
41522 impl ::std::convert::From<super::PostGetIndexerHealthResponse>
41523 for PostGetIndexerHealthResponse {
41524 fn from(value: super::PostGetIndexerHealthResponse) -> Self {
41525 Self {
41526 error: Ok(value.error),
41527 id: Ok(value.id),
41528 jsonrpc: Ok(value.jsonrpc),
41529 result: Ok(value.result),
41530 }
41531 }
41532 }
41533 #[derive(Clone, Debug)]
41534 pub struct PostGetIndexerHealthResponseError {
41535 code: ::std::result::Result<
41536 ::std::option::Option<i64>,
41537 ::std::string::String,
41538 >,
41539 message: ::std::result::Result<
41540 ::std::option::Option<::std::string::String>,
41541 ::std::string::String,
41542 >,
41543 }
41544 impl ::std::default::Default for PostGetIndexerHealthResponseError {
41545 fn default() -> Self {
41546 Self {
41547 code: Ok(Default::default()),
41548 message: Ok(Default::default()),
41549 }
41550 }
41551 }
41552 impl PostGetIndexerHealthResponseError {
41553 pub fn code<T>(mut self, value: T) -> Self
41554 where
41555 T: ::std::convert::TryInto<::std::option::Option<i64>>,
41556 T::Error: ::std::fmt::Display,
41557 {
41558 self.code = value
41559 .try_into()
41560 .map_err(|e| {
41561 format!("error converting supplied value for code: {e}")
41562 });
41563 self
41564 }
41565 pub fn message<T>(mut self, value: T) -> Self
41566 where
41567 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
41568 T::Error: ::std::fmt::Display,
41569 {
41570 self.message = value
41571 .try_into()
41572 .map_err(|e| {
41573 format!("error converting supplied value for message: {e}")
41574 });
41575 self
41576 }
41577 }
41578 impl ::std::convert::TryFrom<PostGetIndexerHealthResponseError>
41579 for super::PostGetIndexerHealthResponseError {
41580 type Error = super::error::ConversionError;
41581 fn try_from(
41582 value: PostGetIndexerHealthResponseError,
41583 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41584 Ok(Self {
41585 code: value.code?,
41586 message: value.message?,
41587 })
41588 }
41589 }
41590 impl ::std::convert::From<super::PostGetIndexerHealthResponseError>
41591 for PostGetIndexerHealthResponseError {
41592 fn from(value: super::PostGetIndexerHealthResponseError) -> Self {
41593 Self {
41594 code: Ok(value.code),
41595 message: Ok(value.message),
41596 }
41597 }
41598 }
41599 #[derive(Clone, Debug)]
41600 pub struct PostGetIndexerSlotBody {
41601 id: ::std::result::Result<
41602 super::PostGetIndexerSlotBodyId,
41603 ::std::string::String,
41604 >,
41605 jsonrpc: ::std::result::Result<
41606 super::PostGetIndexerSlotBodyJsonrpc,
41607 ::std::string::String,
41608 >,
41609 method: ::std::result::Result<
41610 super::PostGetIndexerSlotBodyMethod,
41611 ::std::string::String,
41612 >,
41613 }
41614 impl ::std::default::Default for PostGetIndexerSlotBody {
41615 fn default() -> Self {
41616 Self {
41617 id: Err("no value supplied for id".to_string()),
41618 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
41619 method: Err("no value supplied for method".to_string()),
41620 }
41621 }
41622 }
41623 impl PostGetIndexerSlotBody {
41624 pub fn id<T>(mut self, value: T) -> Self
41625 where
41626 T: ::std::convert::TryInto<super::PostGetIndexerSlotBodyId>,
41627 T::Error: ::std::fmt::Display,
41628 {
41629 self.id = value
41630 .try_into()
41631 .map_err(|e| format!("error converting supplied value for id: {e}"));
41632 self
41633 }
41634 pub fn jsonrpc<T>(mut self, value: T) -> Self
41635 where
41636 T: ::std::convert::TryInto<super::PostGetIndexerSlotBodyJsonrpc>,
41637 T::Error: ::std::fmt::Display,
41638 {
41639 self.jsonrpc = value
41640 .try_into()
41641 .map_err(|e| {
41642 format!("error converting supplied value for jsonrpc: {e}")
41643 });
41644 self
41645 }
41646 pub fn method<T>(mut self, value: T) -> Self
41647 where
41648 T: ::std::convert::TryInto<super::PostGetIndexerSlotBodyMethod>,
41649 T::Error: ::std::fmt::Display,
41650 {
41651 self.method = value
41652 .try_into()
41653 .map_err(|e| {
41654 format!("error converting supplied value for method: {e}")
41655 });
41656 self
41657 }
41658 }
41659 impl ::std::convert::TryFrom<PostGetIndexerSlotBody>
41660 for super::PostGetIndexerSlotBody {
41661 type Error = super::error::ConversionError;
41662 fn try_from(
41663 value: PostGetIndexerSlotBody,
41664 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41665 Ok(Self {
41666 id: value.id?,
41667 jsonrpc: value.jsonrpc?,
41668 method: value.method?,
41669 })
41670 }
41671 }
41672 impl ::std::convert::From<super::PostGetIndexerSlotBody>
41673 for PostGetIndexerSlotBody {
41674 fn from(value: super::PostGetIndexerSlotBody) -> Self {
41675 Self {
41676 id: Ok(value.id),
41677 jsonrpc: Ok(value.jsonrpc),
41678 method: Ok(value.method),
41679 }
41680 }
41681 }
41682 #[derive(Clone, Debug)]
41683 pub struct PostGetIndexerSlotResponse {
41684 error: ::std::result::Result<
41685 ::std::option::Option<super::PostGetIndexerSlotResponseError>,
41686 ::std::string::String,
41687 >,
41688 id: ::std::result::Result<
41689 super::PostGetIndexerSlotResponseId,
41690 ::std::string::String,
41691 >,
41692 jsonrpc: ::std::result::Result<
41693 super::PostGetIndexerSlotResponseJsonrpc,
41694 ::std::string::String,
41695 >,
41696 result: ::std::result::Result<u64, ::std::string::String>,
41697 }
41698 impl ::std::default::Default for PostGetIndexerSlotResponse {
41699 fn default() -> Self {
41700 Self {
41701 error: Ok(Default::default()),
41702 id: Err("no value supplied for id".to_string()),
41703 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
41704 result: Ok(super::defaults::default_u64::<u64, 100>()),
41705 }
41706 }
41707 }
41708 impl PostGetIndexerSlotResponse {
41709 pub fn error<T>(mut self, value: T) -> Self
41710 where
41711 T: ::std::convert::TryInto<
41712 ::std::option::Option<super::PostGetIndexerSlotResponseError>,
41713 >,
41714 T::Error: ::std::fmt::Display,
41715 {
41716 self.error = value
41717 .try_into()
41718 .map_err(|e| {
41719 format!("error converting supplied value for error: {e}")
41720 });
41721 self
41722 }
41723 pub fn id<T>(mut self, value: T) -> Self
41724 where
41725 T: ::std::convert::TryInto<super::PostGetIndexerSlotResponseId>,
41726 T::Error: ::std::fmt::Display,
41727 {
41728 self.id = value
41729 .try_into()
41730 .map_err(|e| format!("error converting supplied value for id: {e}"));
41731 self
41732 }
41733 pub fn jsonrpc<T>(mut self, value: T) -> Self
41734 where
41735 T: ::std::convert::TryInto<super::PostGetIndexerSlotResponseJsonrpc>,
41736 T::Error: ::std::fmt::Display,
41737 {
41738 self.jsonrpc = value
41739 .try_into()
41740 .map_err(|e| {
41741 format!("error converting supplied value for jsonrpc: {e}")
41742 });
41743 self
41744 }
41745 pub fn result<T>(mut self, value: T) -> Self
41746 where
41747 T: ::std::convert::TryInto<u64>,
41748 T::Error: ::std::fmt::Display,
41749 {
41750 self.result = value
41751 .try_into()
41752 .map_err(|e| {
41753 format!("error converting supplied value for result: {e}")
41754 });
41755 self
41756 }
41757 }
41758 impl ::std::convert::TryFrom<PostGetIndexerSlotResponse>
41759 for super::PostGetIndexerSlotResponse {
41760 type Error = super::error::ConversionError;
41761 fn try_from(
41762 value: PostGetIndexerSlotResponse,
41763 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41764 Ok(Self {
41765 error: value.error?,
41766 id: value.id?,
41767 jsonrpc: value.jsonrpc?,
41768 result: value.result?,
41769 })
41770 }
41771 }
41772 impl ::std::convert::From<super::PostGetIndexerSlotResponse>
41773 for PostGetIndexerSlotResponse {
41774 fn from(value: super::PostGetIndexerSlotResponse) -> Self {
41775 Self {
41776 error: Ok(value.error),
41777 id: Ok(value.id),
41778 jsonrpc: Ok(value.jsonrpc),
41779 result: Ok(value.result),
41780 }
41781 }
41782 }
41783 #[derive(Clone, Debug)]
41784 pub struct PostGetIndexerSlotResponseError {
41785 code: ::std::result::Result<
41786 ::std::option::Option<i64>,
41787 ::std::string::String,
41788 >,
41789 message: ::std::result::Result<
41790 ::std::option::Option<::std::string::String>,
41791 ::std::string::String,
41792 >,
41793 }
41794 impl ::std::default::Default for PostGetIndexerSlotResponseError {
41795 fn default() -> Self {
41796 Self {
41797 code: Ok(Default::default()),
41798 message: Ok(Default::default()),
41799 }
41800 }
41801 }
41802 impl PostGetIndexerSlotResponseError {
41803 pub fn code<T>(mut self, value: T) -> Self
41804 where
41805 T: ::std::convert::TryInto<::std::option::Option<i64>>,
41806 T::Error: ::std::fmt::Display,
41807 {
41808 self.code = value
41809 .try_into()
41810 .map_err(|e| {
41811 format!("error converting supplied value for code: {e}")
41812 });
41813 self
41814 }
41815 pub fn message<T>(mut self, value: T) -> Self
41816 where
41817 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
41818 T::Error: ::std::fmt::Display,
41819 {
41820 self.message = value
41821 .try_into()
41822 .map_err(|e| {
41823 format!("error converting supplied value for message: {e}")
41824 });
41825 self
41826 }
41827 }
41828 impl ::std::convert::TryFrom<PostGetIndexerSlotResponseError>
41829 for super::PostGetIndexerSlotResponseError {
41830 type Error = super::error::ConversionError;
41831 fn try_from(
41832 value: PostGetIndexerSlotResponseError,
41833 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41834 Ok(Self {
41835 code: value.code?,
41836 message: value.message?,
41837 })
41838 }
41839 }
41840 impl ::std::convert::From<super::PostGetIndexerSlotResponseError>
41841 for PostGetIndexerSlotResponseError {
41842 fn from(value: super::PostGetIndexerSlotResponseError) -> Self {
41843 Self {
41844 code: Ok(value.code),
41845 message: Ok(value.message),
41846 }
41847 }
41848 }
41849 #[derive(Clone, Debug)]
41850 pub struct PostGetLatestCompressionSignaturesBody {
41851 id: ::std::result::Result<
41852 super::PostGetLatestCompressionSignaturesBodyId,
41853 ::std::string::String,
41854 >,
41855 jsonrpc: ::std::result::Result<
41856 super::PostGetLatestCompressionSignaturesBodyJsonrpc,
41857 ::std::string::String,
41858 >,
41859 method: ::std::result::Result<
41860 super::PostGetLatestCompressionSignaturesBodyMethod,
41861 ::std::string::String,
41862 >,
41863 params: ::std::result::Result<
41864 super::PostGetLatestCompressionSignaturesBodyParams,
41865 ::std::string::String,
41866 >,
41867 }
41868 impl ::std::default::Default for PostGetLatestCompressionSignaturesBody {
41869 fn default() -> Self {
41870 Self {
41871 id: Err("no value supplied for id".to_string()),
41872 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
41873 method: Err("no value supplied for method".to_string()),
41874 params: Err("no value supplied for params".to_string()),
41875 }
41876 }
41877 }
41878 impl PostGetLatestCompressionSignaturesBody {
41879 pub fn id<T>(mut self, value: T) -> Self
41880 where
41881 T: ::std::convert::TryInto<
41882 super::PostGetLatestCompressionSignaturesBodyId,
41883 >,
41884 T::Error: ::std::fmt::Display,
41885 {
41886 self.id = value
41887 .try_into()
41888 .map_err(|e| format!("error converting supplied value for id: {e}"));
41889 self
41890 }
41891 pub fn jsonrpc<T>(mut self, value: T) -> Self
41892 where
41893 T: ::std::convert::TryInto<
41894 super::PostGetLatestCompressionSignaturesBodyJsonrpc,
41895 >,
41896 T::Error: ::std::fmt::Display,
41897 {
41898 self.jsonrpc = value
41899 .try_into()
41900 .map_err(|e| {
41901 format!("error converting supplied value for jsonrpc: {e}")
41902 });
41903 self
41904 }
41905 pub fn method<T>(mut self, value: T) -> Self
41906 where
41907 T: ::std::convert::TryInto<
41908 super::PostGetLatestCompressionSignaturesBodyMethod,
41909 >,
41910 T::Error: ::std::fmt::Display,
41911 {
41912 self.method = value
41913 .try_into()
41914 .map_err(|e| {
41915 format!("error converting supplied value for method: {e}")
41916 });
41917 self
41918 }
41919 pub fn params<T>(mut self, value: T) -> Self
41920 where
41921 T: ::std::convert::TryInto<
41922 super::PostGetLatestCompressionSignaturesBodyParams,
41923 >,
41924 T::Error: ::std::fmt::Display,
41925 {
41926 self.params = value
41927 .try_into()
41928 .map_err(|e| {
41929 format!("error converting supplied value for params: {e}")
41930 });
41931 self
41932 }
41933 }
41934 impl ::std::convert::TryFrom<PostGetLatestCompressionSignaturesBody>
41935 for super::PostGetLatestCompressionSignaturesBody {
41936 type Error = super::error::ConversionError;
41937 fn try_from(
41938 value: PostGetLatestCompressionSignaturesBody,
41939 ) -> ::std::result::Result<Self, super::error::ConversionError> {
41940 Ok(Self {
41941 id: value.id?,
41942 jsonrpc: value.jsonrpc?,
41943 method: value.method?,
41944 params: value.params?,
41945 })
41946 }
41947 }
41948 impl ::std::convert::From<super::PostGetLatestCompressionSignaturesBody>
41949 for PostGetLatestCompressionSignaturesBody {
41950 fn from(value: super::PostGetLatestCompressionSignaturesBody) -> Self {
41951 Self {
41952 id: Ok(value.id),
41953 jsonrpc: Ok(value.jsonrpc),
41954 method: Ok(value.method),
41955 params: Ok(value.params),
41956 }
41957 }
41958 }
41959 #[derive(Clone, Debug)]
41960 pub struct PostGetLatestCompressionSignaturesBodyParams {
41961 cursor: ::std::result::Result<
41962 ::std::option::Option<::std::string::String>,
41963 ::std::string::String,
41964 >,
41965 limit: ::std::result::Result<
41966 ::std::option::Option<super::Limit>,
41967 ::std::string::String,
41968 >,
41969 }
41970 impl ::std::default::Default for PostGetLatestCompressionSignaturesBodyParams {
41971 fn default() -> Self {
41972 Self {
41973 cursor: Ok(Default::default()),
41974 limit: Ok(Default::default()),
41975 }
41976 }
41977 }
41978 impl PostGetLatestCompressionSignaturesBodyParams {
41979 pub fn cursor<T>(mut self, value: T) -> Self
41980 where
41981 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
41982 T::Error: ::std::fmt::Display,
41983 {
41984 self.cursor = value
41985 .try_into()
41986 .map_err(|e| {
41987 format!("error converting supplied value for cursor: {e}")
41988 });
41989 self
41990 }
41991 pub fn limit<T>(mut self, value: T) -> Self
41992 where
41993 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
41994 T::Error: ::std::fmt::Display,
41995 {
41996 self.limit = value
41997 .try_into()
41998 .map_err(|e| {
41999 format!("error converting supplied value for limit: {e}")
42000 });
42001 self
42002 }
42003 }
42004 impl ::std::convert::TryFrom<PostGetLatestCompressionSignaturesBodyParams>
42005 for super::PostGetLatestCompressionSignaturesBodyParams {
42006 type Error = super::error::ConversionError;
42007 fn try_from(
42008 value: PostGetLatestCompressionSignaturesBodyParams,
42009 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42010 Ok(Self {
42011 cursor: value.cursor?,
42012 limit: value.limit?,
42013 })
42014 }
42015 }
42016 impl ::std::convert::From<super::PostGetLatestCompressionSignaturesBodyParams>
42017 for PostGetLatestCompressionSignaturesBodyParams {
42018 fn from(value: super::PostGetLatestCompressionSignaturesBodyParams) -> Self {
42019 Self {
42020 cursor: Ok(value.cursor),
42021 limit: Ok(value.limit),
42022 }
42023 }
42024 }
42025 #[derive(Clone, Debug)]
42026 pub struct PostGetLatestCompressionSignaturesResponse {
42027 error: ::std::result::Result<
42028 ::std::option::Option<
42029 super::PostGetLatestCompressionSignaturesResponseError,
42030 >,
42031 ::std::string::String,
42032 >,
42033 id: ::std::result::Result<
42034 super::PostGetLatestCompressionSignaturesResponseId,
42035 ::std::string::String,
42036 >,
42037 jsonrpc: ::std::result::Result<
42038 super::PostGetLatestCompressionSignaturesResponseJsonrpc,
42039 ::std::string::String,
42040 >,
42041 result: ::std::result::Result<
42042 ::std::option::Option<
42043 super::PostGetLatestCompressionSignaturesResponseResult,
42044 >,
42045 ::std::string::String,
42046 >,
42047 }
42048 impl ::std::default::Default for PostGetLatestCompressionSignaturesResponse {
42049 fn default() -> Self {
42050 Self {
42051 error: Ok(Default::default()),
42052 id: Err("no value supplied for id".to_string()),
42053 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
42054 result: Ok(Default::default()),
42055 }
42056 }
42057 }
42058 impl PostGetLatestCompressionSignaturesResponse {
42059 pub fn error<T>(mut self, value: T) -> Self
42060 where
42061 T: ::std::convert::TryInto<
42062 ::std::option::Option<
42063 super::PostGetLatestCompressionSignaturesResponseError,
42064 >,
42065 >,
42066 T::Error: ::std::fmt::Display,
42067 {
42068 self.error = value
42069 .try_into()
42070 .map_err(|e| {
42071 format!("error converting supplied value for error: {e}")
42072 });
42073 self
42074 }
42075 pub fn id<T>(mut self, value: T) -> Self
42076 where
42077 T: ::std::convert::TryInto<
42078 super::PostGetLatestCompressionSignaturesResponseId,
42079 >,
42080 T::Error: ::std::fmt::Display,
42081 {
42082 self.id = value
42083 .try_into()
42084 .map_err(|e| format!("error converting supplied value for id: {e}"));
42085 self
42086 }
42087 pub fn jsonrpc<T>(mut self, value: T) -> Self
42088 where
42089 T: ::std::convert::TryInto<
42090 super::PostGetLatestCompressionSignaturesResponseJsonrpc,
42091 >,
42092 T::Error: ::std::fmt::Display,
42093 {
42094 self.jsonrpc = value
42095 .try_into()
42096 .map_err(|e| {
42097 format!("error converting supplied value for jsonrpc: {e}")
42098 });
42099 self
42100 }
42101 pub fn result<T>(mut self, value: T) -> Self
42102 where
42103 T: ::std::convert::TryInto<
42104 ::std::option::Option<
42105 super::PostGetLatestCompressionSignaturesResponseResult,
42106 >,
42107 >,
42108 T::Error: ::std::fmt::Display,
42109 {
42110 self.result = value
42111 .try_into()
42112 .map_err(|e| {
42113 format!("error converting supplied value for result: {e}")
42114 });
42115 self
42116 }
42117 }
42118 impl ::std::convert::TryFrom<PostGetLatestCompressionSignaturesResponse>
42119 for super::PostGetLatestCompressionSignaturesResponse {
42120 type Error = super::error::ConversionError;
42121 fn try_from(
42122 value: PostGetLatestCompressionSignaturesResponse,
42123 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42124 Ok(Self {
42125 error: value.error?,
42126 id: value.id?,
42127 jsonrpc: value.jsonrpc?,
42128 result: value.result?,
42129 })
42130 }
42131 }
42132 impl ::std::convert::From<super::PostGetLatestCompressionSignaturesResponse>
42133 for PostGetLatestCompressionSignaturesResponse {
42134 fn from(value: super::PostGetLatestCompressionSignaturesResponse) -> Self {
42135 Self {
42136 error: Ok(value.error),
42137 id: Ok(value.id),
42138 jsonrpc: Ok(value.jsonrpc),
42139 result: Ok(value.result),
42140 }
42141 }
42142 }
42143 #[derive(Clone, Debug)]
42144 pub struct PostGetLatestCompressionSignaturesResponseError {
42145 code: ::std::result::Result<
42146 ::std::option::Option<i64>,
42147 ::std::string::String,
42148 >,
42149 message: ::std::result::Result<
42150 ::std::option::Option<::std::string::String>,
42151 ::std::string::String,
42152 >,
42153 }
42154 impl ::std::default::Default
42155 for PostGetLatestCompressionSignaturesResponseError {
42156 fn default() -> Self {
42157 Self {
42158 code: Ok(Default::default()),
42159 message: Ok(Default::default()),
42160 }
42161 }
42162 }
42163 impl PostGetLatestCompressionSignaturesResponseError {
42164 pub fn code<T>(mut self, value: T) -> Self
42165 where
42166 T: ::std::convert::TryInto<::std::option::Option<i64>>,
42167 T::Error: ::std::fmt::Display,
42168 {
42169 self.code = value
42170 .try_into()
42171 .map_err(|e| {
42172 format!("error converting supplied value for code: {e}")
42173 });
42174 self
42175 }
42176 pub fn message<T>(mut self, value: T) -> Self
42177 where
42178 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
42179 T::Error: ::std::fmt::Display,
42180 {
42181 self.message = value
42182 .try_into()
42183 .map_err(|e| {
42184 format!("error converting supplied value for message: {e}")
42185 });
42186 self
42187 }
42188 }
42189 impl ::std::convert::TryFrom<PostGetLatestCompressionSignaturesResponseError>
42190 for super::PostGetLatestCompressionSignaturesResponseError {
42191 type Error = super::error::ConversionError;
42192 fn try_from(
42193 value: PostGetLatestCompressionSignaturesResponseError,
42194 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42195 Ok(Self {
42196 code: value.code?,
42197 message: value.message?,
42198 })
42199 }
42200 }
42201 impl ::std::convert::From<super::PostGetLatestCompressionSignaturesResponseError>
42202 for PostGetLatestCompressionSignaturesResponseError {
42203 fn from(
42204 value: super::PostGetLatestCompressionSignaturesResponseError,
42205 ) -> Self {
42206 Self {
42207 code: Ok(value.code),
42208 message: Ok(value.message),
42209 }
42210 }
42211 }
42212 #[derive(Clone, Debug)]
42213 pub struct PostGetLatestCompressionSignaturesResponseResult {
42214 context: ::std::result::Result<super::Context, ::std::string::String>,
42215 value: ::std::result::Result<
42216 super::PaginatedSignatureInfoList,
42217 ::std::string::String,
42218 >,
42219 }
42220 impl ::std::default::Default
42221 for PostGetLatestCompressionSignaturesResponseResult {
42222 fn default() -> Self {
42223 Self {
42224 context: Err("no value supplied for context".to_string()),
42225 value: Err("no value supplied for value".to_string()),
42226 }
42227 }
42228 }
42229 impl PostGetLatestCompressionSignaturesResponseResult {
42230 pub fn context<T>(mut self, value: T) -> Self
42231 where
42232 T: ::std::convert::TryInto<super::Context>,
42233 T::Error: ::std::fmt::Display,
42234 {
42235 self.context = value
42236 .try_into()
42237 .map_err(|e| {
42238 format!("error converting supplied value for context: {e}")
42239 });
42240 self
42241 }
42242 pub fn value<T>(mut self, value: T) -> Self
42243 where
42244 T: ::std::convert::TryInto<super::PaginatedSignatureInfoList>,
42245 T::Error: ::std::fmt::Display,
42246 {
42247 self.value = value
42248 .try_into()
42249 .map_err(|e| {
42250 format!("error converting supplied value for value: {e}")
42251 });
42252 self
42253 }
42254 }
42255 impl ::std::convert::TryFrom<PostGetLatestCompressionSignaturesResponseResult>
42256 for super::PostGetLatestCompressionSignaturesResponseResult {
42257 type Error = super::error::ConversionError;
42258 fn try_from(
42259 value: PostGetLatestCompressionSignaturesResponseResult,
42260 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42261 Ok(Self {
42262 context: value.context?,
42263 value: value.value?,
42264 })
42265 }
42266 }
42267 impl ::std::convert::From<
42268 super::PostGetLatestCompressionSignaturesResponseResult,
42269 > for PostGetLatestCompressionSignaturesResponseResult {
42270 fn from(
42271 value: super::PostGetLatestCompressionSignaturesResponseResult,
42272 ) -> Self {
42273 Self {
42274 context: Ok(value.context),
42275 value: Ok(value.value),
42276 }
42277 }
42278 }
42279 #[derive(Clone, Debug)]
42280 pub struct PostGetLatestNonVotingSignaturesBody {
42281 id: ::std::result::Result<
42282 super::PostGetLatestNonVotingSignaturesBodyId,
42283 ::std::string::String,
42284 >,
42285 jsonrpc: ::std::result::Result<
42286 super::PostGetLatestNonVotingSignaturesBodyJsonrpc,
42287 ::std::string::String,
42288 >,
42289 method: ::std::result::Result<
42290 super::PostGetLatestNonVotingSignaturesBodyMethod,
42291 ::std::string::String,
42292 >,
42293 params: ::std::result::Result<
42294 super::PostGetLatestNonVotingSignaturesBodyParams,
42295 ::std::string::String,
42296 >,
42297 }
42298 impl ::std::default::Default for PostGetLatestNonVotingSignaturesBody {
42299 fn default() -> Self {
42300 Self {
42301 id: Err("no value supplied for id".to_string()),
42302 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
42303 method: Err("no value supplied for method".to_string()),
42304 params: Err("no value supplied for params".to_string()),
42305 }
42306 }
42307 }
42308 impl PostGetLatestNonVotingSignaturesBody {
42309 pub fn id<T>(mut self, value: T) -> Self
42310 where
42311 T: ::std::convert::TryInto<
42312 super::PostGetLatestNonVotingSignaturesBodyId,
42313 >,
42314 T::Error: ::std::fmt::Display,
42315 {
42316 self.id = value
42317 .try_into()
42318 .map_err(|e| format!("error converting supplied value for id: {e}"));
42319 self
42320 }
42321 pub fn jsonrpc<T>(mut self, value: T) -> Self
42322 where
42323 T: ::std::convert::TryInto<
42324 super::PostGetLatestNonVotingSignaturesBodyJsonrpc,
42325 >,
42326 T::Error: ::std::fmt::Display,
42327 {
42328 self.jsonrpc = value
42329 .try_into()
42330 .map_err(|e| {
42331 format!("error converting supplied value for jsonrpc: {e}")
42332 });
42333 self
42334 }
42335 pub fn method<T>(mut self, value: T) -> Self
42336 where
42337 T: ::std::convert::TryInto<
42338 super::PostGetLatestNonVotingSignaturesBodyMethod,
42339 >,
42340 T::Error: ::std::fmt::Display,
42341 {
42342 self.method = value
42343 .try_into()
42344 .map_err(|e| {
42345 format!("error converting supplied value for method: {e}")
42346 });
42347 self
42348 }
42349 pub fn params<T>(mut self, value: T) -> Self
42350 where
42351 T: ::std::convert::TryInto<
42352 super::PostGetLatestNonVotingSignaturesBodyParams,
42353 >,
42354 T::Error: ::std::fmt::Display,
42355 {
42356 self.params = value
42357 .try_into()
42358 .map_err(|e| {
42359 format!("error converting supplied value for params: {e}")
42360 });
42361 self
42362 }
42363 }
42364 impl ::std::convert::TryFrom<PostGetLatestNonVotingSignaturesBody>
42365 for super::PostGetLatestNonVotingSignaturesBody {
42366 type Error = super::error::ConversionError;
42367 fn try_from(
42368 value: PostGetLatestNonVotingSignaturesBody,
42369 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42370 Ok(Self {
42371 id: value.id?,
42372 jsonrpc: value.jsonrpc?,
42373 method: value.method?,
42374 params: value.params?,
42375 })
42376 }
42377 }
42378 impl ::std::convert::From<super::PostGetLatestNonVotingSignaturesBody>
42379 for PostGetLatestNonVotingSignaturesBody {
42380 fn from(value: super::PostGetLatestNonVotingSignaturesBody) -> Self {
42381 Self {
42382 id: Ok(value.id),
42383 jsonrpc: Ok(value.jsonrpc),
42384 method: Ok(value.method),
42385 params: Ok(value.params),
42386 }
42387 }
42388 }
42389 #[derive(Clone, Debug)]
42390 pub struct PostGetLatestNonVotingSignaturesBodyParams {
42391 cursor: ::std::result::Result<
42392 ::std::option::Option<::std::string::String>,
42393 ::std::string::String,
42394 >,
42395 limit: ::std::result::Result<
42396 ::std::option::Option<super::Limit>,
42397 ::std::string::String,
42398 >,
42399 }
42400 impl ::std::default::Default for PostGetLatestNonVotingSignaturesBodyParams {
42401 fn default() -> Self {
42402 Self {
42403 cursor: Ok(Default::default()),
42404 limit: Ok(Default::default()),
42405 }
42406 }
42407 }
42408 impl PostGetLatestNonVotingSignaturesBodyParams {
42409 pub fn cursor<T>(mut self, value: T) -> Self
42410 where
42411 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
42412 T::Error: ::std::fmt::Display,
42413 {
42414 self.cursor = value
42415 .try_into()
42416 .map_err(|e| {
42417 format!("error converting supplied value for cursor: {e}")
42418 });
42419 self
42420 }
42421 pub fn limit<T>(mut self, value: T) -> Self
42422 where
42423 T: ::std::convert::TryInto<::std::option::Option<super::Limit>>,
42424 T::Error: ::std::fmt::Display,
42425 {
42426 self.limit = value
42427 .try_into()
42428 .map_err(|e| {
42429 format!("error converting supplied value for limit: {e}")
42430 });
42431 self
42432 }
42433 }
42434 impl ::std::convert::TryFrom<PostGetLatestNonVotingSignaturesBodyParams>
42435 for super::PostGetLatestNonVotingSignaturesBodyParams {
42436 type Error = super::error::ConversionError;
42437 fn try_from(
42438 value: PostGetLatestNonVotingSignaturesBodyParams,
42439 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42440 Ok(Self {
42441 cursor: value.cursor?,
42442 limit: value.limit?,
42443 })
42444 }
42445 }
42446 impl ::std::convert::From<super::PostGetLatestNonVotingSignaturesBodyParams>
42447 for PostGetLatestNonVotingSignaturesBodyParams {
42448 fn from(value: super::PostGetLatestNonVotingSignaturesBodyParams) -> Self {
42449 Self {
42450 cursor: Ok(value.cursor),
42451 limit: Ok(value.limit),
42452 }
42453 }
42454 }
42455 #[derive(Clone, Debug)]
42456 pub struct PostGetLatestNonVotingSignaturesResponse {
42457 error: ::std::result::Result<
42458 ::std::option::Option<
42459 super::PostGetLatestNonVotingSignaturesResponseError,
42460 >,
42461 ::std::string::String,
42462 >,
42463 id: ::std::result::Result<
42464 super::PostGetLatestNonVotingSignaturesResponseId,
42465 ::std::string::String,
42466 >,
42467 jsonrpc: ::std::result::Result<
42468 super::PostGetLatestNonVotingSignaturesResponseJsonrpc,
42469 ::std::string::String,
42470 >,
42471 result: ::std::result::Result<
42472 ::std::option::Option<
42473 super::PostGetLatestNonVotingSignaturesResponseResult,
42474 >,
42475 ::std::string::String,
42476 >,
42477 }
42478 impl ::std::default::Default for PostGetLatestNonVotingSignaturesResponse {
42479 fn default() -> Self {
42480 Self {
42481 error: Ok(Default::default()),
42482 id: Err("no value supplied for id".to_string()),
42483 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
42484 result: Ok(Default::default()),
42485 }
42486 }
42487 }
42488 impl PostGetLatestNonVotingSignaturesResponse {
42489 pub fn error<T>(mut self, value: T) -> Self
42490 where
42491 T: ::std::convert::TryInto<
42492 ::std::option::Option<
42493 super::PostGetLatestNonVotingSignaturesResponseError,
42494 >,
42495 >,
42496 T::Error: ::std::fmt::Display,
42497 {
42498 self.error = value
42499 .try_into()
42500 .map_err(|e| {
42501 format!("error converting supplied value for error: {e}")
42502 });
42503 self
42504 }
42505 pub fn id<T>(mut self, value: T) -> Self
42506 where
42507 T: ::std::convert::TryInto<
42508 super::PostGetLatestNonVotingSignaturesResponseId,
42509 >,
42510 T::Error: ::std::fmt::Display,
42511 {
42512 self.id = value
42513 .try_into()
42514 .map_err(|e| format!("error converting supplied value for id: {e}"));
42515 self
42516 }
42517 pub fn jsonrpc<T>(mut self, value: T) -> Self
42518 where
42519 T: ::std::convert::TryInto<
42520 super::PostGetLatestNonVotingSignaturesResponseJsonrpc,
42521 >,
42522 T::Error: ::std::fmt::Display,
42523 {
42524 self.jsonrpc = value
42525 .try_into()
42526 .map_err(|e| {
42527 format!("error converting supplied value for jsonrpc: {e}")
42528 });
42529 self
42530 }
42531 pub fn result<T>(mut self, value: T) -> Self
42532 where
42533 T: ::std::convert::TryInto<
42534 ::std::option::Option<
42535 super::PostGetLatestNonVotingSignaturesResponseResult,
42536 >,
42537 >,
42538 T::Error: ::std::fmt::Display,
42539 {
42540 self.result = value
42541 .try_into()
42542 .map_err(|e| {
42543 format!("error converting supplied value for result: {e}")
42544 });
42545 self
42546 }
42547 }
42548 impl ::std::convert::TryFrom<PostGetLatestNonVotingSignaturesResponse>
42549 for super::PostGetLatestNonVotingSignaturesResponse {
42550 type Error = super::error::ConversionError;
42551 fn try_from(
42552 value: PostGetLatestNonVotingSignaturesResponse,
42553 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42554 Ok(Self {
42555 error: value.error?,
42556 id: value.id?,
42557 jsonrpc: value.jsonrpc?,
42558 result: value.result?,
42559 })
42560 }
42561 }
42562 impl ::std::convert::From<super::PostGetLatestNonVotingSignaturesResponse>
42563 for PostGetLatestNonVotingSignaturesResponse {
42564 fn from(value: super::PostGetLatestNonVotingSignaturesResponse) -> Self {
42565 Self {
42566 error: Ok(value.error),
42567 id: Ok(value.id),
42568 jsonrpc: Ok(value.jsonrpc),
42569 result: Ok(value.result),
42570 }
42571 }
42572 }
42573 #[derive(Clone, Debug)]
42574 pub struct PostGetLatestNonVotingSignaturesResponseError {
42575 code: ::std::result::Result<
42576 ::std::option::Option<i64>,
42577 ::std::string::String,
42578 >,
42579 message: ::std::result::Result<
42580 ::std::option::Option<::std::string::String>,
42581 ::std::string::String,
42582 >,
42583 }
42584 impl ::std::default::Default for PostGetLatestNonVotingSignaturesResponseError {
42585 fn default() -> Self {
42586 Self {
42587 code: Ok(Default::default()),
42588 message: Ok(Default::default()),
42589 }
42590 }
42591 }
42592 impl PostGetLatestNonVotingSignaturesResponseError {
42593 pub fn code<T>(mut self, value: T) -> Self
42594 where
42595 T: ::std::convert::TryInto<::std::option::Option<i64>>,
42596 T::Error: ::std::fmt::Display,
42597 {
42598 self.code = value
42599 .try_into()
42600 .map_err(|e| {
42601 format!("error converting supplied value for code: {e}")
42602 });
42603 self
42604 }
42605 pub fn message<T>(mut self, value: T) -> Self
42606 where
42607 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
42608 T::Error: ::std::fmt::Display,
42609 {
42610 self.message = value
42611 .try_into()
42612 .map_err(|e| {
42613 format!("error converting supplied value for message: {e}")
42614 });
42615 self
42616 }
42617 }
42618 impl ::std::convert::TryFrom<PostGetLatestNonVotingSignaturesResponseError>
42619 for super::PostGetLatestNonVotingSignaturesResponseError {
42620 type Error = super::error::ConversionError;
42621 fn try_from(
42622 value: PostGetLatestNonVotingSignaturesResponseError,
42623 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42624 Ok(Self {
42625 code: value.code?,
42626 message: value.message?,
42627 })
42628 }
42629 }
42630 impl ::std::convert::From<super::PostGetLatestNonVotingSignaturesResponseError>
42631 for PostGetLatestNonVotingSignaturesResponseError {
42632 fn from(
42633 value: super::PostGetLatestNonVotingSignaturesResponseError,
42634 ) -> Self {
42635 Self {
42636 code: Ok(value.code),
42637 message: Ok(value.message),
42638 }
42639 }
42640 }
42641 #[derive(Clone, Debug)]
42642 pub struct PostGetLatestNonVotingSignaturesResponseResult {
42643 context: ::std::result::Result<super::Context, ::std::string::String>,
42644 value: ::std::result::Result<
42645 super::SignatureInfoListWithError,
42646 ::std::string::String,
42647 >,
42648 }
42649 impl ::std::default::Default for PostGetLatestNonVotingSignaturesResponseResult {
42650 fn default() -> Self {
42651 Self {
42652 context: Err("no value supplied for context".to_string()),
42653 value: Err("no value supplied for value".to_string()),
42654 }
42655 }
42656 }
42657 impl PostGetLatestNonVotingSignaturesResponseResult {
42658 pub fn context<T>(mut self, value: T) -> Self
42659 where
42660 T: ::std::convert::TryInto<super::Context>,
42661 T::Error: ::std::fmt::Display,
42662 {
42663 self.context = value
42664 .try_into()
42665 .map_err(|e| {
42666 format!("error converting supplied value for context: {e}")
42667 });
42668 self
42669 }
42670 pub fn value<T>(mut self, value: T) -> Self
42671 where
42672 T: ::std::convert::TryInto<super::SignatureInfoListWithError>,
42673 T::Error: ::std::fmt::Display,
42674 {
42675 self.value = value
42676 .try_into()
42677 .map_err(|e| {
42678 format!("error converting supplied value for value: {e}")
42679 });
42680 self
42681 }
42682 }
42683 impl ::std::convert::TryFrom<PostGetLatestNonVotingSignaturesResponseResult>
42684 for super::PostGetLatestNonVotingSignaturesResponseResult {
42685 type Error = super::error::ConversionError;
42686 fn try_from(
42687 value: PostGetLatestNonVotingSignaturesResponseResult,
42688 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42689 Ok(Self {
42690 context: value.context?,
42691 value: value.value?,
42692 })
42693 }
42694 }
42695 impl ::std::convert::From<super::PostGetLatestNonVotingSignaturesResponseResult>
42696 for PostGetLatestNonVotingSignaturesResponseResult {
42697 fn from(
42698 value: super::PostGetLatestNonVotingSignaturesResponseResult,
42699 ) -> Self {
42700 Self {
42701 context: Ok(value.context),
42702 value: Ok(value.value),
42703 }
42704 }
42705 }
42706 #[derive(Clone, Debug)]
42707 pub struct PostGetMultipleAccountInterfacesBody {
42708 id: ::std::result::Result<
42709 super::PostGetMultipleAccountInterfacesBodyId,
42710 ::std::string::String,
42711 >,
42712 jsonrpc: ::std::result::Result<
42713 super::PostGetMultipleAccountInterfacesBodyJsonrpc,
42714 ::std::string::String,
42715 >,
42716 method: ::std::result::Result<
42717 super::PostGetMultipleAccountInterfacesBodyMethod,
42718 ::std::string::String,
42719 >,
42720 params: ::std::result::Result<
42721 super::PostGetMultipleAccountInterfacesBodyParams,
42722 ::std::string::String,
42723 >,
42724 }
42725 impl ::std::default::Default for PostGetMultipleAccountInterfacesBody {
42726 fn default() -> Self {
42727 Self {
42728 id: Err("no value supplied for id".to_string()),
42729 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
42730 method: Err("no value supplied for method".to_string()),
42731 params: Err("no value supplied for params".to_string()),
42732 }
42733 }
42734 }
42735 impl PostGetMultipleAccountInterfacesBody {
42736 pub fn id<T>(mut self, value: T) -> Self
42737 where
42738 T: ::std::convert::TryInto<
42739 super::PostGetMultipleAccountInterfacesBodyId,
42740 >,
42741 T::Error: ::std::fmt::Display,
42742 {
42743 self.id = value
42744 .try_into()
42745 .map_err(|e| format!("error converting supplied value for id: {e}"));
42746 self
42747 }
42748 pub fn jsonrpc<T>(mut self, value: T) -> Self
42749 where
42750 T: ::std::convert::TryInto<
42751 super::PostGetMultipleAccountInterfacesBodyJsonrpc,
42752 >,
42753 T::Error: ::std::fmt::Display,
42754 {
42755 self.jsonrpc = value
42756 .try_into()
42757 .map_err(|e| {
42758 format!("error converting supplied value for jsonrpc: {e}")
42759 });
42760 self
42761 }
42762 pub fn method<T>(mut self, value: T) -> Self
42763 where
42764 T: ::std::convert::TryInto<
42765 super::PostGetMultipleAccountInterfacesBodyMethod,
42766 >,
42767 T::Error: ::std::fmt::Display,
42768 {
42769 self.method = value
42770 .try_into()
42771 .map_err(|e| {
42772 format!("error converting supplied value for method: {e}")
42773 });
42774 self
42775 }
42776 pub fn params<T>(mut self, value: T) -> Self
42777 where
42778 T: ::std::convert::TryInto<
42779 super::PostGetMultipleAccountInterfacesBodyParams,
42780 >,
42781 T::Error: ::std::fmt::Display,
42782 {
42783 self.params = value
42784 .try_into()
42785 .map_err(|e| {
42786 format!("error converting supplied value for params: {e}")
42787 });
42788 self
42789 }
42790 }
42791 impl ::std::convert::TryFrom<PostGetMultipleAccountInterfacesBody>
42792 for super::PostGetMultipleAccountInterfacesBody {
42793 type Error = super::error::ConversionError;
42794 fn try_from(
42795 value: PostGetMultipleAccountInterfacesBody,
42796 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42797 Ok(Self {
42798 id: value.id?,
42799 jsonrpc: value.jsonrpc?,
42800 method: value.method?,
42801 params: value.params?,
42802 })
42803 }
42804 }
42805 impl ::std::convert::From<super::PostGetMultipleAccountInterfacesBody>
42806 for PostGetMultipleAccountInterfacesBody {
42807 fn from(value: super::PostGetMultipleAccountInterfacesBody) -> Self {
42808 Self {
42809 id: Ok(value.id),
42810 jsonrpc: Ok(value.jsonrpc),
42811 method: Ok(value.method),
42812 params: Ok(value.params),
42813 }
42814 }
42815 }
42816 #[derive(Clone, Debug)]
42817 pub struct PostGetMultipleAccountInterfacesBodyParams {
42818 addresses: ::std::result::Result<
42819 ::std::vec::Vec<super::SerializablePubkey>,
42820 ::std::string::String,
42821 >,
42822 }
42823 impl ::std::default::Default for PostGetMultipleAccountInterfacesBodyParams {
42824 fn default() -> Self {
42825 Self {
42826 addresses: Err("no value supplied for addresses".to_string()),
42827 }
42828 }
42829 }
42830 impl PostGetMultipleAccountInterfacesBodyParams {
42831 pub fn addresses<T>(mut self, value: T) -> Self
42832 where
42833 T: ::std::convert::TryInto<::std::vec::Vec<super::SerializablePubkey>>,
42834 T::Error: ::std::fmt::Display,
42835 {
42836 self.addresses = value
42837 .try_into()
42838 .map_err(|e| {
42839 format!("error converting supplied value for addresses: {e}")
42840 });
42841 self
42842 }
42843 }
42844 impl ::std::convert::TryFrom<PostGetMultipleAccountInterfacesBodyParams>
42845 for super::PostGetMultipleAccountInterfacesBodyParams {
42846 type Error = super::error::ConversionError;
42847 fn try_from(
42848 value: PostGetMultipleAccountInterfacesBodyParams,
42849 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42850 Ok(Self {
42851 addresses: value.addresses?,
42852 })
42853 }
42854 }
42855 impl ::std::convert::From<super::PostGetMultipleAccountInterfacesBodyParams>
42856 for PostGetMultipleAccountInterfacesBodyParams {
42857 fn from(value: super::PostGetMultipleAccountInterfacesBodyParams) -> Self {
42858 Self {
42859 addresses: Ok(value.addresses),
42860 }
42861 }
42862 }
42863 #[derive(Clone, Debug)]
42864 pub struct PostGetMultipleAccountInterfacesResponse {
42865 error: ::std::result::Result<
42866 ::std::option::Option<
42867 super::PostGetMultipleAccountInterfacesResponseError,
42868 >,
42869 ::std::string::String,
42870 >,
42871 id: ::std::result::Result<
42872 super::PostGetMultipleAccountInterfacesResponseId,
42873 ::std::string::String,
42874 >,
42875 jsonrpc: ::std::result::Result<
42876 super::PostGetMultipleAccountInterfacesResponseJsonrpc,
42877 ::std::string::String,
42878 >,
42879 result: ::std::result::Result<
42880 ::std::option::Option<
42881 super::PostGetMultipleAccountInterfacesResponseResult,
42882 >,
42883 ::std::string::String,
42884 >,
42885 }
42886 impl ::std::default::Default for PostGetMultipleAccountInterfacesResponse {
42887 fn default() -> Self {
42888 Self {
42889 error: Ok(Default::default()),
42890 id: Err("no value supplied for id".to_string()),
42891 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
42892 result: Ok(Default::default()),
42893 }
42894 }
42895 }
42896 impl PostGetMultipleAccountInterfacesResponse {
42897 pub fn error<T>(mut self, value: T) -> Self
42898 where
42899 T: ::std::convert::TryInto<
42900 ::std::option::Option<
42901 super::PostGetMultipleAccountInterfacesResponseError,
42902 >,
42903 >,
42904 T::Error: ::std::fmt::Display,
42905 {
42906 self.error = value
42907 .try_into()
42908 .map_err(|e| {
42909 format!("error converting supplied value for error: {e}")
42910 });
42911 self
42912 }
42913 pub fn id<T>(mut self, value: T) -> Self
42914 where
42915 T: ::std::convert::TryInto<
42916 super::PostGetMultipleAccountInterfacesResponseId,
42917 >,
42918 T::Error: ::std::fmt::Display,
42919 {
42920 self.id = value
42921 .try_into()
42922 .map_err(|e| format!("error converting supplied value for id: {e}"));
42923 self
42924 }
42925 pub fn jsonrpc<T>(mut self, value: T) -> Self
42926 where
42927 T: ::std::convert::TryInto<
42928 super::PostGetMultipleAccountInterfacesResponseJsonrpc,
42929 >,
42930 T::Error: ::std::fmt::Display,
42931 {
42932 self.jsonrpc = value
42933 .try_into()
42934 .map_err(|e| {
42935 format!("error converting supplied value for jsonrpc: {e}")
42936 });
42937 self
42938 }
42939 pub fn result<T>(mut self, value: T) -> Self
42940 where
42941 T: ::std::convert::TryInto<
42942 ::std::option::Option<
42943 super::PostGetMultipleAccountInterfacesResponseResult,
42944 >,
42945 >,
42946 T::Error: ::std::fmt::Display,
42947 {
42948 self.result = value
42949 .try_into()
42950 .map_err(|e| {
42951 format!("error converting supplied value for result: {e}")
42952 });
42953 self
42954 }
42955 }
42956 impl ::std::convert::TryFrom<PostGetMultipleAccountInterfacesResponse>
42957 for super::PostGetMultipleAccountInterfacesResponse {
42958 type Error = super::error::ConversionError;
42959 fn try_from(
42960 value: PostGetMultipleAccountInterfacesResponse,
42961 ) -> ::std::result::Result<Self, super::error::ConversionError> {
42962 Ok(Self {
42963 error: value.error?,
42964 id: value.id?,
42965 jsonrpc: value.jsonrpc?,
42966 result: value.result?,
42967 })
42968 }
42969 }
42970 impl ::std::convert::From<super::PostGetMultipleAccountInterfacesResponse>
42971 for PostGetMultipleAccountInterfacesResponse {
42972 fn from(value: super::PostGetMultipleAccountInterfacesResponse) -> Self {
42973 Self {
42974 error: Ok(value.error),
42975 id: Ok(value.id),
42976 jsonrpc: Ok(value.jsonrpc),
42977 result: Ok(value.result),
42978 }
42979 }
42980 }
42981 #[derive(Clone, Debug)]
42982 pub struct PostGetMultipleAccountInterfacesResponseError {
42983 code: ::std::result::Result<
42984 ::std::option::Option<i64>,
42985 ::std::string::String,
42986 >,
42987 message: ::std::result::Result<
42988 ::std::option::Option<::std::string::String>,
42989 ::std::string::String,
42990 >,
42991 }
42992 impl ::std::default::Default for PostGetMultipleAccountInterfacesResponseError {
42993 fn default() -> Self {
42994 Self {
42995 code: Ok(Default::default()),
42996 message: Ok(Default::default()),
42997 }
42998 }
42999 }
43000 impl PostGetMultipleAccountInterfacesResponseError {
43001 pub fn code<T>(mut self, value: T) -> Self
43002 where
43003 T: ::std::convert::TryInto<::std::option::Option<i64>>,
43004 T::Error: ::std::fmt::Display,
43005 {
43006 self.code = value
43007 .try_into()
43008 .map_err(|e| {
43009 format!("error converting supplied value for code: {e}")
43010 });
43011 self
43012 }
43013 pub fn message<T>(mut self, value: T) -> Self
43014 where
43015 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43016 T::Error: ::std::fmt::Display,
43017 {
43018 self.message = value
43019 .try_into()
43020 .map_err(|e| {
43021 format!("error converting supplied value for message: {e}")
43022 });
43023 self
43024 }
43025 }
43026 impl ::std::convert::TryFrom<PostGetMultipleAccountInterfacesResponseError>
43027 for super::PostGetMultipleAccountInterfacesResponseError {
43028 type Error = super::error::ConversionError;
43029 fn try_from(
43030 value: PostGetMultipleAccountInterfacesResponseError,
43031 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43032 Ok(Self {
43033 code: value.code?,
43034 message: value.message?,
43035 })
43036 }
43037 }
43038 impl ::std::convert::From<super::PostGetMultipleAccountInterfacesResponseError>
43039 for PostGetMultipleAccountInterfacesResponseError {
43040 fn from(
43041 value: super::PostGetMultipleAccountInterfacesResponseError,
43042 ) -> Self {
43043 Self {
43044 code: Ok(value.code),
43045 message: Ok(value.message),
43046 }
43047 }
43048 }
43049 #[derive(Clone, Debug)]
43050 pub struct PostGetMultipleAccountInterfacesResponseResult {
43051 context: ::std::result::Result<super::Context, ::std::string::String>,
43052 value: ::std::result::Result<
43053 ::std::vec::Vec<::std::option::Option<super::AccountInterface>>,
43054 ::std::string::String,
43055 >,
43056 }
43057 impl ::std::default::Default for PostGetMultipleAccountInterfacesResponseResult {
43058 fn default() -> Self {
43059 Self {
43060 context: Err("no value supplied for context".to_string()),
43061 value: Err("no value supplied for value".to_string()),
43062 }
43063 }
43064 }
43065 impl PostGetMultipleAccountInterfacesResponseResult {
43066 pub fn context<T>(mut self, value: T) -> Self
43067 where
43068 T: ::std::convert::TryInto<super::Context>,
43069 T::Error: ::std::fmt::Display,
43070 {
43071 self.context = value
43072 .try_into()
43073 .map_err(|e| {
43074 format!("error converting supplied value for context: {e}")
43075 });
43076 self
43077 }
43078 pub fn value<T>(mut self, value: T) -> Self
43079 where
43080 T: ::std::convert::TryInto<
43081 ::std::vec::Vec<::std::option::Option<super::AccountInterface>>,
43082 >,
43083 T::Error: ::std::fmt::Display,
43084 {
43085 self.value = value
43086 .try_into()
43087 .map_err(|e| {
43088 format!("error converting supplied value for value: {e}")
43089 });
43090 self
43091 }
43092 }
43093 impl ::std::convert::TryFrom<PostGetMultipleAccountInterfacesResponseResult>
43094 for super::PostGetMultipleAccountInterfacesResponseResult {
43095 type Error = super::error::ConversionError;
43096 fn try_from(
43097 value: PostGetMultipleAccountInterfacesResponseResult,
43098 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43099 Ok(Self {
43100 context: value.context?,
43101 value: value.value?,
43102 })
43103 }
43104 }
43105 impl ::std::convert::From<super::PostGetMultipleAccountInterfacesResponseResult>
43106 for PostGetMultipleAccountInterfacesResponseResult {
43107 fn from(
43108 value: super::PostGetMultipleAccountInterfacesResponseResult,
43109 ) -> Self {
43110 Self {
43111 context: Ok(value.context),
43112 value: Ok(value.value),
43113 }
43114 }
43115 }
43116 #[derive(Clone, Debug)]
43117 pub struct PostGetMultipleCompressedAccountProofsBody {
43118 id: ::std::result::Result<
43119 super::PostGetMultipleCompressedAccountProofsBodyId,
43120 ::std::string::String,
43121 >,
43122 jsonrpc: ::std::result::Result<
43123 super::PostGetMultipleCompressedAccountProofsBodyJsonrpc,
43124 ::std::string::String,
43125 >,
43126 method: ::std::result::Result<
43127 super::PostGetMultipleCompressedAccountProofsBodyMethod,
43128 ::std::string::String,
43129 >,
43130 params: ::std::result::Result<
43131 ::std::vec::Vec<super::Hash>,
43132 ::std::string::String,
43133 >,
43134 }
43135 impl ::std::default::Default for PostGetMultipleCompressedAccountProofsBody {
43136 fn default() -> Self {
43137 Self {
43138 id: Err("no value supplied for id".to_string()),
43139 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
43140 method: Err("no value supplied for method".to_string()),
43141 params: Err("no value supplied for params".to_string()),
43142 }
43143 }
43144 }
43145 impl PostGetMultipleCompressedAccountProofsBody {
43146 pub fn id<T>(mut self, value: T) -> Self
43147 where
43148 T: ::std::convert::TryInto<
43149 super::PostGetMultipleCompressedAccountProofsBodyId,
43150 >,
43151 T::Error: ::std::fmt::Display,
43152 {
43153 self.id = value
43154 .try_into()
43155 .map_err(|e| format!("error converting supplied value for id: {e}"));
43156 self
43157 }
43158 pub fn jsonrpc<T>(mut self, value: T) -> Self
43159 where
43160 T: ::std::convert::TryInto<
43161 super::PostGetMultipleCompressedAccountProofsBodyJsonrpc,
43162 >,
43163 T::Error: ::std::fmt::Display,
43164 {
43165 self.jsonrpc = value
43166 .try_into()
43167 .map_err(|e| {
43168 format!("error converting supplied value for jsonrpc: {e}")
43169 });
43170 self
43171 }
43172 pub fn method<T>(mut self, value: T) -> Self
43173 where
43174 T: ::std::convert::TryInto<
43175 super::PostGetMultipleCompressedAccountProofsBodyMethod,
43176 >,
43177 T::Error: ::std::fmt::Display,
43178 {
43179 self.method = value
43180 .try_into()
43181 .map_err(|e| {
43182 format!("error converting supplied value for method: {e}")
43183 });
43184 self
43185 }
43186 pub fn params<T>(mut self, value: T) -> Self
43187 where
43188 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
43189 T::Error: ::std::fmt::Display,
43190 {
43191 self.params = value
43192 .try_into()
43193 .map_err(|e| {
43194 format!("error converting supplied value for params: {e}")
43195 });
43196 self
43197 }
43198 }
43199 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountProofsBody>
43200 for super::PostGetMultipleCompressedAccountProofsBody {
43201 type Error = super::error::ConversionError;
43202 fn try_from(
43203 value: PostGetMultipleCompressedAccountProofsBody,
43204 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43205 Ok(Self {
43206 id: value.id?,
43207 jsonrpc: value.jsonrpc?,
43208 method: value.method?,
43209 params: value.params?,
43210 })
43211 }
43212 }
43213 impl ::std::convert::From<super::PostGetMultipleCompressedAccountProofsBody>
43214 for PostGetMultipleCompressedAccountProofsBody {
43215 fn from(value: super::PostGetMultipleCompressedAccountProofsBody) -> Self {
43216 Self {
43217 id: Ok(value.id),
43218 jsonrpc: Ok(value.jsonrpc),
43219 method: Ok(value.method),
43220 params: Ok(value.params),
43221 }
43222 }
43223 }
43224 #[derive(Clone, Debug)]
43225 pub struct PostGetMultipleCompressedAccountProofsResponse {
43226 error: ::std::result::Result<
43227 ::std::option::Option<
43228 super::PostGetMultipleCompressedAccountProofsResponseError,
43229 >,
43230 ::std::string::String,
43231 >,
43232 id: ::std::result::Result<
43233 super::PostGetMultipleCompressedAccountProofsResponseId,
43234 ::std::string::String,
43235 >,
43236 jsonrpc: ::std::result::Result<
43237 super::PostGetMultipleCompressedAccountProofsResponseJsonrpc,
43238 ::std::string::String,
43239 >,
43240 result: ::std::result::Result<
43241 ::std::option::Option<
43242 super::PostGetMultipleCompressedAccountProofsResponseResult,
43243 >,
43244 ::std::string::String,
43245 >,
43246 }
43247 impl ::std::default::Default for PostGetMultipleCompressedAccountProofsResponse {
43248 fn default() -> Self {
43249 Self {
43250 error: Ok(Default::default()),
43251 id: Err("no value supplied for id".to_string()),
43252 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
43253 result: Ok(Default::default()),
43254 }
43255 }
43256 }
43257 impl PostGetMultipleCompressedAccountProofsResponse {
43258 pub fn error<T>(mut self, value: T) -> Self
43259 where
43260 T: ::std::convert::TryInto<
43261 ::std::option::Option<
43262 super::PostGetMultipleCompressedAccountProofsResponseError,
43263 >,
43264 >,
43265 T::Error: ::std::fmt::Display,
43266 {
43267 self.error = value
43268 .try_into()
43269 .map_err(|e| {
43270 format!("error converting supplied value for error: {e}")
43271 });
43272 self
43273 }
43274 pub fn id<T>(mut self, value: T) -> Self
43275 where
43276 T: ::std::convert::TryInto<
43277 super::PostGetMultipleCompressedAccountProofsResponseId,
43278 >,
43279 T::Error: ::std::fmt::Display,
43280 {
43281 self.id = value
43282 .try_into()
43283 .map_err(|e| format!("error converting supplied value for id: {e}"));
43284 self
43285 }
43286 pub fn jsonrpc<T>(mut self, value: T) -> Self
43287 where
43288 T: ::std::convert::TryInto<
43289 super::PostGetMultipleCompressedAccountProofsResponseJsonrpc,
43290 >,
43291 T::Error: ::std::fmt::Display,
43292 {
43293 self.jsonrpc = value
43294 .try_into()
43295 .map_err(|e| {
43296 format!("error converting supplied value for jsonrpc: {e}")
43297 });
43298 self
43299 }
43300 pub fn result<T>(mut self, value: T) -> Self
43301 where
43302 T: ::std::convert::TryInto<
43303 ::std::option::Option<
43304 super::PostGetMultipleCompressedAccountProofsResponseResult,
43305 >,
43306 >,
43307 T::Error: ::std::fmt::Display,
43308 {
43309 self.result = value
43310 .try_into()
43311 .map_err(|e| {
43312 format!("error converting supplied value for result: {e}")
43313 });
43314 self
43315 }
43316 }
43317 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountProofsResponse>
43318 for super::PostGetMultipleCompressedAccountProofsResponse {
43319 type Error = super::error::ConversionError;
43320 fn try_from(
43321 value: PostGetMultipleCompressedAccountProofsResponse,
43322 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43323 Ok(Self {
43324 error: value.error?,
43325 id: value.id?,
43326 jsonrpc: value.jsonrpc?,
43327 result: value.result?,
43328 })
43329 }
43330 }
43331 impl ::std::convert::From<super::PostGetMultipleCompressedAccountProofsResponse>
43332 for PostGetMultipleCompressedAccountProofsResponse {
43333 fn from(
43334 value: super::PostGetMultipleCompressedAccountProofsResponse,
43335 ) -> Self {
43336 Self {
43337 error: Ok(value.error),
43338 id: Ok(value.id),
43339 jsonrpc: Ok(value.jsonrpc),
43340 result: Ok(value.result),
43341 }
43342 }
43343 }
43344 #[derive(Clone, Debug)]
43345 pub struct PostGetMultipleCompressedAccountProofsResponseError {
43346 code: ::std::result::Result<
43347 ::std::option::Option<i64>,
43348 ::std::string::String,
43349 >,
43350 message: ::std::result::Result<
43351 ::std::option::Option<::std::string::String>,
43352 ::std::string::String,
43353 >,
43354 }
43355 impl ::std::default::Default
43356 for PostGetMultipleCompressedAccountProofsResponseError {
43357 fn default() -> Self {
43358 Self {
43359 code: Ok(Default::default()),
43360 message: Ok(Default::default()),
43361 }
43362 }
43363 }
43364 impl PostGetMultipleCompressedAccountProofsResponseError {
43365 pub fn code<T>(mut self, value: T) -> Self
43366 where
43367 T: ::std::convert::TryInto<::std::option::Option<i64>>,
43368 T::Error: ::std::fmt::Display,
43369 {
43370 self.code = value
43371 .try_into()
43372 .map_err(|e| {
43373 format!("error converting supplied value for code: {e}")
43374 });
43375 self
43376 }
43377 pub fn message<T>(mut self, value: T) -> Self
43378 where
43379 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43380 T::Error: ::std::fmt::Display,
43381 {
43382 self.message = value
43383 .try_into()
43384 .map_err(|e| {
43385 format!("error converting supplied value for message: {e}")
43386 });
43387 self
43388 }
43389 }
43390 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountProofsResponseError>
43391 for super::PostGetMultipleCompressedAccountProofsResponseError {
43392 type Error = super::error::ConversionError;
43393 fn try_from(
43394 value: PostGetMultipleCompressedAccountProofsResponseError,
43395 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43396 Ok(Self {
43397 code: value.code?,
43398 message: value.message?,
43399 })
43400 }
43401 }
43402 impl ::std::convert::From<
43403 super::PostGetMultipleCompressedAccountProofsResponseError,
43404 > for PostGetMultipleCompressedAccountProofsResponseError {
43405 fn from(
43406 value: super::PostGetMultipleCompressedAccountProofsResponseError,
43407 ) -> Self {
43408 Self {
43409 code: Ok(value.code),
43410 message: Ok(value.message),
43411 }
43412 }
43413 }
43414 #[derive(Clone, Debug)]
43415 pub struct PostGetMultipleCompressedAccountProofsResponseResult {
43416 context: ::std::result::Result<super::Context, ::std::string::String>,
43417 value: ::std::result::Result<
43418 ::std::vec::Vec<super::GetCompressedAccountProofResponseValue>,
43419 ::std::string::String,
43420 >,
43421 }
43422 impl ::std::default::Default
43423 for PostGetMultipleCompressedAccountProofsResponseResult {
43424 fn default() -> Self {
43425 Self {
43426 context: Err("no value supplied for context".to_string()),
43427 value: Err("no value supplied for value".to_string()),
43428 }
43429 }
43430 }
43431 impl PostGetMultipleCompressedAccountProofsResponseResult {
43432 pub fn context<T>(mut self, value: T) -> Self
43433 where
43434 T: ::std::convert::TryInto<super::Context>,
43435 T::Error: ::std::fmt::Display,
43436 {
43437 self.context = value
43438 .try_into()
43439 .map_err(|e| {
43440 format!("error converting supplied value for context: {e}")
43441 });
43442 self
43443 }
43444 pub fn value<T>(mut self, value: T) -> Self
43445 where
43446 T: ::std::convert::TryInto<
43447 ::std::vec::Vec<super::GetCompressedAccountProofResponseValue>,
43448 >,
43449 T::Error: ::std::fmt::Display,
43450 {
43451 self.value = value
43452 .try_into()
43453 .map_err(|e| {
43454 format!("error converting supplied value for value: {e}")
43455 });
43456 self
43457 }
43458 }
43459 impl ::std::convert::TryFrom<
43460 PostGetMultipleCompressedAccountProofsResponseResult,
43461 > for super::PostGetMultipleCompressedAccountProofsResponseResult {
43462 type Error = super::error::ConversionError;
43463 fn try_from(
43464 value: PostGetMultipleCompressedAccountProofsResponseResult,
43465 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43466 Ok(Self {
43467 context: value.context?,
43468 value: value.value?,
43469 })
43470 }
43471 }
43472 impl ::std::convert::From<
43473 super::PostGetMultipleCompressedAccountProofsResponseResult,
43474 > for PostGetMultipleCompressedAccountProofsResponseResult {
43475 fn from(
43476 value: super::PostGetMultipleCompressedAccountProofsResponseResult,
43477 ) -> Self {
43478 Self {
43479 context: Ok(value.context),
43480 value: Ok(value.value),
43481 }
43482 }
43483 }
43484 #[derive(Clone, Debug)]
43485 pub struct PostGetMultipleCompressedAccountProofsV2Body {
43486 id: ::std::result::Result<
43487 super::PostGetMultipleCompressedAccountProofsV2BodyId,
43488 ::std::string::String,
43489 >,
43490 jsonrpc: ::std::result::Result<
43491 super::PostGetMultipleCompressedAccountProofsV2BodyJsonrpc,
43492 ::std::string::String,
43493 >,
43494 method: ::std::result::Result<
43495 super::PostGetMultipleCompressedAccountProofsV2BodyMethod,
43496 ::std::string::String,
43497 >,
43498 params: ::std::result::Result<
43499 ::std::vec::Vec<super::Hash>,
43500 ::std::string::String,
43501 >,
43502 }
43503 impl ::std::default::Default for PostGetMultipleCompressedAccountProofsV2Body {
43504 fn default() -> Self {
43505 Self {
43506 id: Err("no value supplied for id".to_string()),
43507 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
43508 method: Err("no value supplied for method".to_string()),
43509 params: Err("no value supplied for params".to_string()),
43510 }
43511 }
43512 }
43513 impl PostGetMultipleCompressedAccountProofsV2Body {
43514 pub fn id<T>(mut self, value: T) -> Self
43515 where
43516 T: ::std::convert::TryInto<
43517 super::PostGetMultipleCompressedAccountProofsV2BodyId,
43518 >,
43519 T::Error: ::std::fmt::Display,
43520 {
43521 self.id = value
43522 .try_into()
43523 .map_err(|e| format!("error converting supplied value for id: {e}"));
43524 self
43525 }
43526 pub fn jsonrpc<T>(mut self, value: T) -> Self
43527 where
43528 T: ::std::convert::TryInto<
43529 super::PostGetMultipleCompressedAccountProofsV2BodyJsonrpc,
43530 >,
43531 T::Error: ::std::fmt::Display,
43532 {
43533 self.jsonrpc = value
43534 .try_into()
43535 .map_err(|e| {
43536 format!("error converting supplied value for jsonrpc: {e}")
43537 });
43538 self
43539 }
43540 pub fn method<T>(mut self, value: T) -> Self
43541 where
43542 T: ::std::convert::TryInto<
43543 super::PostGetMultipleCompressedAccountProofsV2BodyMethod,
43544 >,
43545 T::Error: ::std::fmt::Display,
43546 {
43547 self.method = value
43548 .try_into()
43549 .map_err(|e| {
43550 format!("error converting supplied value for method: {e}")
43551 });
43552 self
43553 }
43554 pub fn params<T>(mut self, value: T) -> Self
43555 where
43556 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
43557 T::Error: ::std::fmt::Display,
43558 {
43559 self.params = value
43560 .try_into()
43561 .map_err(|e| {
43562 format!("error converting supplied value for params: {e}")
43563 });
43564 self
43565 }
43566 }
43567 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountProofsV2Body>
43568 for super::PostGetMultipleCompressedAccountProofsV2Body {
43569 type Error = super::error::ConversionError;
43570 fn try_from(
43571 value: PostGetMultipleCompressedAccountProofsV2Body,
43572 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43573 Ok(Self {
43574 id: value.id?,
43575 jsonrpc: value.jsonrpc?,
43576 method: value.method?,
43577 params: value.params?,
43578 })
43579 }
43580 }
43581 impl ::std::convert::From<super::PostGetMultipleCompressedAccountProofsV2Body>
43582 for PostGetMultipleCompressedAccountProofsV2Body {
43583 fn from(value: super::PostGetMultipleCompressedAccountProofsV2Body) -> Self {
43584 Self {
43585 id: Ok(value.id),
43586 jsonrpc: Ok(value.jsonrpc),
43587 method: Ok(value.method),
43588 params: Ok(value.params),
43589 }
43590 }
43591 }
43592 #[derive(Clone, Debug)]
43593 pub struct PostGetMultipleCompressedAccountProofsV2Response {
43594 error: ::std::result::Result<
43595 ::std::option::Option<
43596 super::PostGetMultipleCompressedAccountProofsV2ResponseError,
43597 >,
43598 ::std::string::String,
43599 >,
43600 id: ::std::result::Result<
43601 super::PostGetMultipleCompressedAccountProofsV2ResponseId,
43602 ::std::string::String,
43603 >,
43604 jsonrpc: ::std::result::Result<
43605 super::PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc,
43606 ::std::string::String,
43607 >,
43608 result: ::std::result::Result<
43609 ::std::option::Option<
43610 super::PostGetMultipleCompressedAccountProofsV2ResponseResult,
43611 >,
43612 ::std::string::String,
43613 >,
43614 }
43615 impl ::std::default::Default
43616 for PostGetMultipleCompressedAccountProofsV2Response {
43617 fn default() -> Self {
43618 Self {
43619 error: Ok(Default::default()),
43620 id: Err("no value supplied for id".to_string()),
43621 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
43622 result: Ok(Default::default()),
43623 }
43624 }
43625 }
43626 impl PostGetMultipleCompressedAccountProofsV2Response {
43627 pub fn error<T>(mut self, value: T) -> Self
43628 where
43629 T: ::std::convert::TryInto<
43630 ::std::option::Option<
43631 super::PostGetMultipleCompressedAccountProofsV2ResponseError,
43632 >,
43633 >,
43634 T::Error: ::std::fmt::Display,
43635 {
43636 self.error = value
43637 .try_into()
43638 .map_err(|e| {
43639 format!("error converting supplied value for error: {e}")
43640 });
43641 self
43642 }
43643 pub fn id<T>(mut self, value: T) -> Self
43644 where
43645 T: ::std::convert::TryInto<
43646 super::PostGetMultipleCompressedAccountProofsV2ResponseId,
43647 >,
43648 T::Error: ::std::fmt::Display,
43649 {
43650 self.id = value
43651 .try_into()
43652 .map_err(|e| format!("error converting supplied value for id: {e}"));
43653 self
43654 }
43655 pub fn jsonrpc<T>(mut self, value: T) -> Self
43656 where
43657 T: ::std::convert::TryInto<
43658 super::PostGetMultipleCompressedAccountProofsV2ResponseJsonrpc,
43659 >,
43660 T::Error: ::std::fmt::Display,
43661 {
43662 self.jsonrpc = value
43663 .try_into()
43664 .map_err(|e| {
43665 format!("error converting supplied value for jsonrpc: {e}")
43666 });
43667 self
43668 }
43669 pub fn result<T>(mut self, value: T) -> Self
43670 where
43671 T: ::std::convert::TryInto<
43672 ::std::option::Option<
43673 super::PostGetMultipleCompressedAccountProofsV2ResponseResult,
43674 >,
43675 >,
43676 T::Error: ::std::fmt::Display,
43677 {
43678 self.result = value
43679 .try_into()
43680 .map_err(|e| {
43681 format!("error converting supplied value for result: {e}")
43682 });
43683 self
43684 }
43685 }
43686 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountProofsV2Response>
43687 for super::PostGetMultipleCompressedAccountProofsV2Response {
43688 type Error = super::error::ConversionError;
43689 fn try_from(
43690 value: PostGetMultipleCompressedAccountProofsV2Response,
43691 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43692 Ok(Self {
43693 error: value.error?,
43694 id: value.id?,
43695 jsonrpc: value.jsonrpc?,
43696 result: value.result?,
43697 })
43698 }
43699 }
43700 impl ::std::convert::From<
43701 super::PostGetMultipleCompressedAccountProofsV2Response,
43702 > for PostGetMultipleCompressedAccountProofsV2Response {
43703 fn from(
43704 value: super::PostGetMultipleCompressedAccountProofsV2Response,
43705 ) -> Self {
43706 Self {
43707 error: Ok(value.error),
43708 id: Ok(value.id),
43709 jsonrpc: Ok(value.jsonrpc),
43710 result: Ok(value.result),
43711 }
43712 }
43713 }
43714 #[derive(Clone, Debug)]
43715 pub struct PostGetMultipleCompressedAccountProofsV2ResponseError {
43716 code: ::std::result::Result<
43717 ::std::option::Option<i64>,
43718 ::std::string::String,
43719 >,
43720 message: ::std::result::Result<
43721 ::std::option::Option<::std::string::String>,
43722 ::std::string::String,
43723 >,
43724 }
43725 impl ::std::default::Default
43726 for PostGetMultipleCompressedAccountProofsV2ResponseError {
43727 fn default() -> Self {
43728 Self {
43729 code: Ok(Default::default()),
43730 message: Ok(Default::default()),
43731 }
43732 }
43733 }
43734 impl PostGetMultipleCompressedAccountProofsV2ResponseError {
43735 pub fn code<T>(mut self, value: T) -> Self
43736 where
43737 T: ::std::convert::TryInto<::std::option::Option<i64>>,
43738 T::Error: ::std::fmt::Display,
43739 {
43740 self.code = value
43741 .try_into()
43742 .map_err(|e| {
43743 format!("error converting supplied value for code: {e}")
43744 });
43745 self
43746 }
43747 pub fn message<T>(mut self, value: T) -> Self
43748 where
43749 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43750 T::Error: ::std::fmt::Display,
43751 {
43752 self.message = value
43753 .try_into()
43754 .map_err(|e| {
43755 format!("error converting supplied value for message: {e}")
43756 });
43757 self
43758 }
43759 }
43760 impl ::std::convert::TryFrom<
43761 PostGetMultipleCompressedAccountProofsV2ResponseError,
43762 > for super::PostGetMultipleCompressedAccountProofsV2ResponseError {
43763 type Error = super::error::ConversionError;
43764 fn try_from(
43765 value: PostGetMultipleCompressedAccountProofsV2ResponseError,
43766 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43767 Ok(Self {
43768 code: value.code?,
43769 message: value.message?,
43770 })
43771 }
43772 }
43773 impl ::std::convert::From<
43774 super::PostGetMultipleCompressedAccountProofsV2ResponseError,
43775 > for PostGetMultipleCompressedAccountProofsV2ResponseError {
43776 fn from(
43777 value: super::PostGetMultipleCompressedAccountProofsV2ResponseError,
43778 ) -> Self {
43779 Self {
43780 code: Ok(value.code),
43781 message: Ok(value.message),
43782 }
43783 }
43784 }
43785 #[derive(Clone, Debug)]
43786 pub struct PostGetMultipleCompressedAccountProofsV2ResponseResult {
43787 context: ::std::result::Result<super::Context, ::std::string::String>,
43788 value: ::std::result::Result<
43789 ::std::vec::Vec<super::GetCompressedAccountProofResponseValueV2>,
43790 ::std::string::String,
43791 >,
43792 }
43793 impl ::std::default::Default
43794 for PostGetMultipleCompressedAccountProofsV2ResponseResult {
43795 fn default() -> Self {
43796 Self {
43797 context: Err("no value supplied for context".to_string()),
43798 value: Err("no value supplied for value".to_string()),
43799 }
43800 }
43801 }
43802 impl PostGetMultipleCompressedAccountProofsV2ResponseResult {
43803 pub fn context<T>(mut self, value: T) -> Self
43804 where
43805 T: ::std::convert::TryInto<super::Context>,
43806 T::Error: ::std::fmt::Display,
43807 {
43808 self.context = value
43809 .try_into()
43810 .map_err(|e| {
43811 format!("error converting supplied value for context: {e}")
43812 });
43813 self
43814 }
43815 pub fn value<T>(mut self, value: T) -> Self
43816 where
43817 T: ::std::convert::TryInto<
43818 ::std::vec::Vec<super::GetCompressedAccountProofResponseValueV2>,
43819 >,
43820 T::Error: ::std::fmt::Display,
43821 {
43822 self.value = value
43823 .try_into()
43824 .map_err(|e| {
43825 format!("error converting supplied value for value: {e}")
43826 });
43827 self
43828 }
43829 }
43830 impl ::std::convert::TryFrom<
43831 PostGetMultipleCompressedAccountProofsV2ResponseResult,
43832 > for super::PostGetMultipleCompressedAccountProofsV2ResponseResult {
43833 type Error = super::error::ConversionError;
43834 fn try_from(
43835 value: PostGetMultipleCompressedAccountProofsV2ResponseResult,
43836 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43837 Ok(Self {
43838 context: value.context?,
43839 value: value.value?,
43840 })
43841 }
43842 }
43843 impl ::std::convert::From<
43844 super::PostGetMultipleCompressedAccountProofsV2ResponseResult,
43845 > for PostGetMultipleCompressedAccountProofsV2ResponseResult {
43846 fn from(
43847 value: super::PostGetMultipleCompressedAccountProofsV2ResponseResult,
43848 ) -> Self {
43849 Self {
43850 context: Ok(value.context),
43851 value: Ok(value.value),
43852 }
43853 }
43854 }
43855 #[derive(Clone, Debug)]
43856 pub struct PostGetMultipleCompressedAccountsBody {
43857 id: ::std::result::Result<
43858 super::PostGetMultipleCompressedAccountsBodyId,
43859 ::std::string::String,
43860 >,
43861 jsonrpc: ::std::result::Result<
43862 super::PostGetMultipleCompressedAccountsBodyJsonrpc,
43863 ::std::string::String,
43864 >,
43865 method: ::std::result::Result<
43866 super::PostGetMultipleCompressedAccountsBodyMethod,
43867 ::std::string::String,
43868 >,
43869 params: ::std::result::Result<
43870 super::PostGetMultipleCompressedAccountsBodyParams,
43871 ::std::string::String,
43872 >,
43873 }
43874 impl ::std::default::Default for PostGetMultipleCompressedAccountsBody {
43875 fn default() -> Self {
43876 Self {
43877 id: Err("no value supplied for id".to_string()),
43878 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
43879 method: Err("no value supplied for method".to_string()),
43880 params: Err("no value supplied for params".to_string()),
43881 }
43882 }
43883 }
43884 impl PostGetMultipleCompressedAccountsBody {
43885 pub fn id<T>(mut self, value: T) -> Self
43886 where
43887 T: ::std::convert::TryInto<
43888 super::PostGetMultipleCompressedAccountsBodyId,
43889 >,
43890 T::Error: ::std::fmt::Display,
43891 {
43892 self.id = value
43893 .try_into()
43894 .map_err(|e| format!("error converting supplied value for id: {e}"));
43895 self
43896 }
43897 pub fn jsonrpc<T>(mut self, value: T) -> Self
43898 where
43899 T: ::std::convert::TryInto<
43900 super::PostGetMultipleCompressedAccountsBodyJsonrpc,
43901 >,
43902 T::Error: ::std::fmt::Display,
43903 {
43904 self.jsonrpc = value
43905 .try_into()
43906 .map_err(|e| {
43907 format!("error converting supplied value for jsonrpc: {e}")
43908 });
43909 self
43910 }
43911 pub fn method<T>(mut self, value: T) -> Self
43912 where
43913 T: ::std::convert::TryInto<
43914 super::PostGetMultipleCompressedAccountsBodyMethod,
43915 >,
43916 T::Error: ::std::fmt::Display,
43917 {
43918 self.method = value
43919 .try_into()
43920 .map_err(|e| {
43921 format!("error converting supplied value for method: {e}")
43922 });
43923 self
43924 }
43925 pub fn params<T>(mut self, value: T) -> Self
43926 where
43927 T: ::std::convert::TryInto<
43928 super::PostGetMultipleCompressedAccountsBodyParams,
43929 >,
43930 T::Error: ::std::fmt::Display,
43931 {
43932 self.params = value
43933 .try_into()
43934 .map_err(|e| {
43935 format!("error converting supplied value for params: {e}")
43936 });
43937 self
43938 }
43939 }
43940 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsBody>
43941 for super::PostGetMultipleCompressedAccountsBody {
43942 type Error = super::error::ConversionError;
43943 fn try_from(
43944 value: PostGetMultipleCompressedAccountsBody,
43945 ) -> ::std::result::Result<Self, super::error::ConversionError> {
43946 Ok(Self {
43947 id: value.id?,
43948 jsonrpc: value.jsonrpc?,
43949 method: value.method?,
43950 params: value.params?,
43951 })
43952 }
43953 }
43954 impl ::std::convert::From<super::PostGetMultipleCompressedAccountsBody>
43955 for PostGetMultipleCompressedAccountsBody {
43956 fn from(value: super::PostGetMultipleCompressedAccountsBody) -> Self {
43957 Self {
43958 id: Ok(value.id),
43959 jsonrpc: Ok(value.jsonrpc),
43960 method: Ok(value.method),
43961 params: Ok(value.params),
43962 }
43963 }
43964 }
43965 #[derive(Clone, Debug)]
43966 pub struct PostGetMultipleCompressedAccountsBodyParams {
43967 addresses: ::std::result::Result<
43968 ::std::option::Option<::std::vec::Vec<super::SerializablePubkey>>,
43969 ::std::string::String,
43970 >,
43971 hashes: ::std::result::Result<
43972 ::std::option::Option<::std::vec::Vec<super::Hash>>,
43973 ::std::string::String,
43974 >,
43975 }
43976 impl ::std::default::Default for PostGetMultipleCompressedAccountsBodyParams {
43977 fn default() -> Self {
43978 Self {
43979 addresses: Ok(Default::default()),
43980 hashes: Ok(Default::default()),
43981 }
43982 }
43983 }
43984 impl PostGetMultipleCompressedAccountsBodyParams {
43985 pub fn addresses<T>(mut self, value: T) -> Self
43986 where
43987 T: ::std::convert::TryInto<
43988 ::std::option::Option<::std::vec::Vec<super::SerializablePubkey>>,
43989 >,
43990 T::Error: ::std::fmt::Display,
43991 {
43992 self.addresses = value
43993 .try_into()
43994 .map_err(|e| {
43995 format!("error converting supplied value for addresses: {e}")
43996 });
43997 self
43998 }
43999 pub fn hashes<T>(mut self, value: T) -> Self
44000 where
44001 T: ::std::convert::TryInto<
44002 ::std::option::Option<::std::vec::Vec<super::Hash>>,
44003 >,
44004 T::Error: ::std::fmt::Display,
44005 {
44006 self.hashes = value
44007 .try_into()
44008 .map_err(|e| {
44009 format!("error converting supplied value for hashes: {e}")
44010 });
44011 self
44012 }
44013 }
44014 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsBodyParams>
44015 for super::PostGetMultipleCompressedAccountsBodyParams {
44016 type Error = super::error::ConversionError;
44017 fn try_from(
44018 value: PostGetMultipleCompressedAccountsBodyParams,
44019 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44020 Ok(Self {
44021 addresses: value.addresses?,
44022 hashes: value.hashes?,
44023 })
44024 }
44025 }
44026 impl ::std::convert::From<super::PostGetMultipleCompressedAccountsBodyParams>
44027 for PostGetMultipleCompressedAccountsBodyParams {
44028 fn from(value: super::PostGetMultipleCompressedAccountsBodyParams) -> Self {
44029 Self {
44030 addresses: Ok(value.addresses),
44031 hashes: Ok(value.hashes),
44032 }
44033 }
44034 }
44035 #[derive(Clone, Debug)]
44036 pub struct PostGetMultipleCompressedAccountsResponse {
44037 error: ::std::result::Result<
44038 ::std::option::Option<
44039 super::PostGetMultipleCompressedAccountsResponseError,
44040 >,
44041 ::std::string::String,
44042 >,
44043 id: ::std::result::Result<
44044 super::PostGetMultipleCompressedAccountsResponseId,
44045 ::std::string::String,
44046 >,
44047 jsonrpc: ::std::result::Result<
44048 super::PostGetMultipleCompressedAccountsResponseJsonrpc,
44049 ::std::string::String,
44050 >,
44051 result: ::std::result::Result<
44052 ::std::option::Option<
44053 super::PostGetMultipleCompressedAccountsResponseResult,
44054 >,
44055 ::std::string::String,
44056 >,
44057 }
44058 impl ::std::default::Default for PostGetMultipleCompressedAccountsResponse {
44059 fn default() -> Self {
44060 Self {
44061 error: Ok(Default::default()),
44062 id: Err("no value supplied for id".to_string()),
44063 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
44064 result: Ok(Default::default()),
44065 }
44066 }
44067 }
44068 impl PostGetMultipleCompressedAccountsResponse {
44069 pub fn error<T>(mut self, value: T) -> Self
44070 where
44071 T: ::std::convert::TryInto<
44072 ::std::option::Option<
44073 super::PostGetMultipleCompressedAccountsResponseError,
44074 >,
44075 >,
44076 T::Error: ::std::fmt::Display,
44077 {
44078 self.error = value
44079 .try_into()
44080 .map_err(|e| {
44081 format!("error converting supplied value for error: {e}")
44082 });
44083 self
44084 }
44085 pub fn id<T>(mut self, value: T) -> Self
44086 where
44087 T: ::std::convert::TryInto<
44088 super::PostGetMultipleCompressedAccountsResponseId,
44089 >,
44090 T::Error: ::std::fmt::Display,
44091 {
44092 self.id = value
44093 .try_into()
44094 .map_err(|e| format!("error converting supplied value for id: {e}"));
44095 self
44096 }
44097 pub fn jsonrpc<T>(mut self, value: T) -> Self
44098 where
44099 T: ::std::convert::TryInto<
44100 super::PostGetMultipleCompressedAccountsResponseJsonrpc,
44101 >,
44102 T::Error: ::std::fmt::Display,
44103 {
44104 self.jsonrpc = value
44105 .try_into()
44106 .map_err(|e| {
44107 format!("error converting supplied value for jsonrpc: {e}")
44108 });
44109 self
44110 }
44111 pub fn result<T>(mut self, value: T) -> Self
44112 where
44113 T: ::std::convert::TryInto<
44114 ::std::option::Option<
44115 super::PostGetMultipleCompressedAccountsResponseResult,
44116 >,
44117 >,
44118 T::Error: ::std::fmt::Display,
44119 {
44120 self.result = value
44121 .try_into()
44122 .map_err(|e| {
44123 format!("error converting supplied value for result: {e}")
44124 });
44125 self
44126 }
44127 }
44128 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsResponse>
44129 for super::PostGetMultipleCompressedAccountsResponse {
44130 type Error = super::error::ConversionError;
44131 fn try_from(
44132 value: PostGetMultipleCompressedAccountsResponse,
44133 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44134 Ok(Self {
44135 error: value.error?,
44136 id: value.id?,
44137 jsonrpc: value.jsonrpc?,
44138 result: value.result?,
44139 })
44140 }
44141 }
44142 impl ::std::convert::From<super::PostGetMultipleCompressedAccountsResponse>
44143 for PostGetMultipleCompressedAccountsResponse {
44144 fn from(value: super::PostGetMultipleCompressedAccountsResponse) -> Self {
44145 Self {
44146 error: Ok(value.error),
44147 id: Ok(value.id),
44148 jsonrpc: Ok(value.jsonrpc),
44149 result: Ok(value.result),
44150 }
44151 }
44152 }
44153 #[derive(Clone, Debug)]
44154 pub struct PostGetMultipleCompressedAccountsResponseError {
44155 code: ::std::result::Result<
44156 ::std::option::Option<i64>,
44157 ::std::string::String,
44158 >,
44159 message: ::std::result::Result<
44160 ::std::option::Option<::std::string::String>,
44161 ::std::string::String,
44162 >,
44163 }
44164 impl ::std::default::Default for PostGetMultipleCompressedAccountsResponseError {
44165 fn default() -> Self {
44166 Self {
44167 code: Ok(Default::default()),
44168 message: Ok(Default::default()),
44169 }
44170 }
44171 }
44172 impl PostGetMultipleCompressedAccountsResponseError {
44173 pub fn code<T>(mut self, value: T) -> Self
44174 where
44175 T: ::std::convert::TryInto<::std::option::Option<i64>>,
44176 T::Error: ::std::fmt::Display,
44177 {
44178 self.code = value
44179 .try_into()
44180 .map_err(|e| {
44181 format!("error converting supplied value for code: {e}")
44182 });
44183 self
44184 }
44185 pub fn message<T>(mut self, value: T) -> Self
44186 where
44187 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
44188 T::Error: ::std::fmt::Display,
44189 {
44190 self.message = value
44191 .try_into()
44192 .map_err(|e| {
44193 format!("error converting supplied value for message: {e}")
44194 });
44195 self
44196 }
44197 }
44198 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsResponseError>
44199 for super::PostGetMultipleCompressedAccountsResponseError {
44200 type Error = super::error::ConversionError;
44201 fn try_from(
44202 value: PostGetMultipleCompressedAccountsResponseError,
44203 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44204 Ok(Self {
44205 code: value.code?,
44206 message: value.message?,
44207 })
44208 }
44209 }
44210 impl ::std::convert::From<super::PostGetMultipleCompressedAccountsResponseError>
44211 for PostGetMultipleCompressedAccountsResponseError {
44212 fn from(
44213 value: super::PostGetMultipleCompressedAccountsResponseError,
44214 ) -> Self {
44215 Self {
44216 code: Ok(value.code),
44217 message: Ok(value.message),
44218 }
44219 }
44220 }
44221 #[derive(Clone, Debug)]
44222 pub struct PostGetMultipleCompressedAccountsResponseResult {
44223 context: ::std::result::Result<super::Context, ::std::string::String>,
44224 value: ::std::result::Result<super::AccountList, ::std::string::String>,
44225 }
44226 impl ::std::default::Default
44227 for PostGetMultipleCompressedAccountsResponseResult {
44228 fn default() -> Self {
44229 Self {
44230 context: Err("no value supplied for context".to_string()),
44231 value: Err("no value supplied for value".to_string()),
44232 }
44233 }
44234 }
44235 impl PostGetMultipleCompressedAccountsResponseResult {
44236 pub fn context<T>(mut self, value: T) -> Self
44237 where
44238 T: ::std::convert::TryInto<super::Context>,
44239 T::Error: ::std::fmt::Display,
44240 {
44241 self.context = value
44242 .try_into()
44243 .map_err(|e| {
44244 format!("error converting supplied value for context: {e}")
44245 });
44246 self
44247 }
44248 pub fn value<T>(mut self, value: T) -> Self
44249 where
44250 T: ::std::convert::TryInto<super::AccountList>,
44251 T::Error: ::std::fmt::Display,
44252 {
44253 self.value = value
44254 .try_into()
44255 .map_err(|e| {
44256 format!("error converting supplied value for value: {e}")
44257 });
44258 self
44259 }
44260 }
44261 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsResponseResult>
44262 for super::PostGetMultipleCompressedAccountsResponseResult {
44263 type Error = super::error::ConversionError;
44264 fn try_from(
44265 value: PostGetMultipleCompressedAccountsResponseResult,
44266 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44267 Ok(Self {
44268 context: value.context?,
44269 value: value.value?,
44270 })
44271 }
44272 }
44273 impl ::std::convert::From<super::PostGetMultipleCompressedAccountsResponseResult>
44274 for PostGetMultipleCompressedAccountsResponseResult {
44275 fn from(
44276 value: super::PostGetMultipleCompressedAccountsResponseResult,
44277 ) -> Self {
44278 Self {
44279 context: Ok(value.context),
44280 value: Ok(value.value),
44281 }
44282 }
44283 }
44284 #[derive(Clone, Debug)]
44285 pub struct PostGetMultipleCompressedAccountsV2Body {
44286 id: ::std::result::Result<
44287 super::PostGetMultipleCompressedAccountsV2BodyId,
44288 ::std::string::String,
44289 >,
44290 jsonrpc: ::std::result::Result<
44291 super::PostGetMultipleCompressedAccountsV2BodyJsonrpc,
44292 ::std::string::String,
44293 >,
44294 method: ::std::result::Result<
44295 super::PostGetMultipleCompressedAccountsV2BodyMethod,
44296 ::std::string::String,
44297 >,
44298 params: ::std::result::Result<
44299 super::PostGetMultipleCompressedAccountsV2BodyParams,
44300 ::std::string::String,
44301 >,
44302 }
44303 impl ::std::default::Default for PostGetMultipleCompressedAccountsV2Body {
44304 fn default() -> Self {
44305 Self {
44306 id: Err("no value supplied for id".to_string()),
44307 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
44308 method: Err("no value supplied for method".to_string()),
44309 params: Err("no value supplied for params".to_string()),
44310 }
44311 }
44312 }
44313 impl PostGetMultipleCompressedAccountsV2Body {
44314 pub fn id<T>(mut self, value: T) -> Self
44315 where
44316 T: ::std::convert::TryInto<
44317 super::PostGetMultipleCompressedAccountsV2BodyId,
44318 >,
44319 T::Error: ::std::fmt::Display,
44320 {
44321 self.id = value
44322 .try_into()
44323 .map_err(|e| format!("error converting supplied value for id: {e}"));
44324 self
44325 }
44326 pub fn jsonrpc<T>(mut self, value: T) -> Self
44327 where
44328 T: ::std::convert::TryInto<
44329 super::PostGetMultipleCompressedAccountsV2BodyJsonrpc,
44330 >,
44331 T::Error: ::std::fmt::Display,
44332 {
44333 self.jsonrpc = value
44334 .try_into()
44335 .map_err(|e| {
44336 format!("error converting supplied value for jsonrpc: {e}")
44337 });
44338 self
44339 }
44340 pub fn method<T>(mut self, value: T) -> Self
44341 where
44342 T: ::std::convert::TryInto<
44343 super::PostGetMultipleCompressedAccountsV2BodyMethod,
44344 >,
44345 T::Error: ::std::fmt::Display,
44346 {
44347 self.method = value
44348 .try_into()
44349 .map_err(|e| {
44350 format!("error converting supplied value for method: {e}")
44351 });
44352 self
44353 }
44354 pub fn params<T>(mut self, value: T) -> Self
44355 where
44356 T: ::std::convert::TryInto<
44357 super::PostGetMultipleCompressedAccountsV2BodyParams,
44358 >,
44359 T::Error: ::std::fmt::Display,
44360 {
44361 self.params = value
44362 .try_into()
44363 .map_err(|e| {
44364 format!("error converting supplied value for params: {e}")
44365 });
44366 self
44367 }
44368 }
44369 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsV2Body>
44370 for super::PostGetMultipleCompressedAccountsV2Body {
44371 type Error = super::error::ConversionError;
44372 fn try_from(
44373 value: PostGetMultipleCompressedAccountsV2Body,
44374 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44375 Ok(Self {
44376 id: value.id?,
44377 jsonrpc: value.jsonrpc?,
44378 method: value.method?,
44379 params: value.params?,
44380 })
44381 }
44382 }
44383 impl ::std::convert::From<super::PostGetMultipleCompressedAccountsV2Body>
44384 for PostGetMultipleCompressedAccountsV2Body {
44385 fn from(value: super::PostGetMultipleCompressedAccountsV2Body) -> Self {
44386 Self {
44387 id: Ok(value.id),
44388 jsonrpc: Ok(value.jsonrpc),
44389 method: Ok(value.method),
44390 params: Ok(value.params),
44391 }
44392 }
44393 }
44394 #[derive(Clone, Debug)]
44395 pub struct PostGetMultipleCompressedAccountsV2BodyParams {
44396 addresses: ::std::result::Result<
44397 ::std::option::Option<::std::vec::Vec<super::SerializablePubkey>>,
44398 ::std::string::String,
44399 >,
44400 hashes: ::std::result::Result<
44401 ::std::option::Option<::std::vec::Vec<super::Hash>>,
44402 ::std::string::String,
44403 >,
44404 }
44405 impl ::std::default::Default for PostGetMultipleCompressedAccountsV2BodyParams {
44406 fn default() -> Self {
44407 Self {
44408 addresses: Ok(Default::default()),
44409 hashes: Ok(Default::default()),
44410 }
44411 }
44412 }
44413 impl PostGetMultipleCompressedAccountsV2BodyParams {
44414 pub fn addresses<T>(mut self, value: T) -> Self
44415 where
44416 T: ::std::convert::TryInto<
44417 ::std::option::Option<::std::vec::Vec<super::SerializablePubkey>>,
44418 >,
44419 T::Error: ::std::fmt::Display,
44420 {
44421 self.addresses = value
44422 .try_into()
44423 .map_err(|e| {
44424 format!("error converting supplied value for addresses: {e}")
44425 });
44426 self
44427 }
44428 pub fn hashes<T>(mut self, value: T) -> Self
44429 where
44430 T: ::std::convert::TryInto<
44431 ::std::option::Option<::std::vec::Vec<super::Hash>>,
44432 >,
44433 T::Error: ::std::fmt::Display,
44434 {
44435 self.hashes = value
44436 .try_into()
44437 .map_err(|e| {
44438 format!("error converting supplied value for hashes: {e}")
44439 });
44440 self
44441 }
44442 }
44443 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsV2BodyParams>
44444 for super::PostGetMultipleCompressedAccountsV2BodyParams {
44445 type Error = super::error::ConversionError;
44446 fn try_from(
44447 value: PostGetMultipleCompressedAccountsV2BodyParams,
44448 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44449 Ok(Self {
44450 addresses: value.addresses?,
44451 hashes: value.hashes?,
44452 })
44453 }
44454 }
44455 impl ::std::convert::From<super::PostGetMultipleCompressedAccountsV2BodyParams>
44456 for PostGetMultipleCompressedAccountsV2BodyParams {
44457 fn from(
44458 value: super::PostGetMultipleCompressedAccountsV2BodyParams,
44459 ) -> Self {
44460 Self {
44461 addresses: Ok(value.addresses),
44462 hashes: Ok(value.hashes),
44463 }
44464 }
44465 }
44466 #[derive(Clone, Debug)]
44467 pub struct PostGetMultipleCompressedAccountsV2Response {
44468 error: ::std::result::Result<
44469 ::std::option::Option<
44470 super::PostGetMultipleCompressedAccountsV2ResponseError,
44471 >,
44472 ::std::string::String,
44473 >,
44474 id: ::std::result::Result<
44475 super::PostGetMultipleCompressedAccountsV2ResponseId,
44476 ::std::string::String,
44477 >,
44478 jsonrpc: ::std::result::Result<
44479 super::PostGetMultipleCompressedAccountsV2ResponseJsonrpc,
44480 ::std::string::String,
44481 >,
44482 result: ::std::result::Result<
44483 ::std::option::Option<
44484 super::PostGetMultipleCompressedAccountsV2ResponseResult,
44485 >,
44486 ::std::string::String,
44487 >,
44488 }
44489 impl ::std::default::Default for PostGetMultipleCompressedAccountsV2Response {
44490 fn default() -> Self {
44491 Self {
44492 error: Ok(Default::default()),
44493 id: Err("no value supplied for id".to_string()),
44494 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
44495 result: Ok(Default::default()),
44496 }
44497 }
44498 }
44499 impl PostGetMultipleCompressedAccountsV2Response {
44500 pub fn error<T>(mut self, value: T) -> Self
44501 where
44502 T: ::std::convert::TryInto<
44503 ::std::option::Option<
44504 super::PostGetMultipleCompressedAccountsV2ResponseError,
44505 >,
44506 >,
44507 T::Error: ::std::fmt::Display,
44508 {
44509 self.error = value
44510 .try_into()
44511 .map_err(|e| {
44512 format!("error converting supplied value for error: {e}")
44513 });
44514 self
44515 }
44516 pub fn id<T>(mut self, value: T) -> Self
44517 where
44518 T: ::std::convert::TryInto<
44519 super::PostGetMultipleCompressedAccountsV2ResponseId,
44520 >,
44521 T::Error: ::std::fmt::Display,
44522 {
44523 self.id = value
44524 .try_into()
44525 .map_err(|e| format!("error converting supplied value for id: {e}"));
44526 self
44527 }
44528 pub fn jsonrpc<T>(mut self, value: T) -> Self
44529 where
44530 T: ::std::convert::TryInto<
44531 super::PostGetMultipleCompressedAccountsV2ResponseJsonrpc,
44532 >,
44533 T::Error: ::std::fmt::Display,
44534 {
44535 self.jsonrpc = value
44536 .try_into()
44537 .map_err(|e| {
44538 format!("error converting supplied value for jsonrpc: {e}")
44539 });
44540 self
44541 }
44542 pub fn result<T>(mut self, value: T) -> Self
44543 where
44544 T: ::std::convert::TryInto<
44545 ::std::option::Option<
44546 super::PostGetMultipleCompressedAccountsV2ResponseResult,
44547 >,
44548 >,
44549 T::Error: ::std::fmt::Display,
44550 {
44551 self.result = value
44552 .try_into()
44553 .map_err(|e| {
44554 format!("error converting supplied value for result: {e}")
44555 });
44556 self
44557 }
44558 }
44559 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsV2Response>
44560 for super::PostGetMultipleCompressedAccountsV2Response {
44561 type Error = super::error::ConversionError;
44562 fn try_from(
44563 value: PostGetMultipleCompressedAccountsV2Response,
44564 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44565 Ok(Self {
44566 error: value.error?,
44567 id: value.id?,
44568 jsonrpc: value.jsonrpc?,
44569 result: value.result?,
44570 })
44571 }
44572 }
44573 impl ::std::convert::From<super::PostGetMultipleCompressedAccountsV2Response>
44574 for PostGetMultipleCompressedAccountsV2Response {
44575 fn from(value: super::PostGetMultipleCompressedAccountsV2Response) -> Self {
44576 Self {
44577 error: Ok(value.error),
44578 id: Ok(value.id),
44579 jsonrpc: Ok(value.jsonrpc),
44580 result: Ok(value.result),
44581 }
44582 }
44583 }
44584 #[derive(Clone, Debug)]
44585 pub struct PostGetMultipleCompressedAccountsV2ResponseError {
44586 code: ::std::result::Result<
44587 ::std::option::Option<i64>,
44588 ::std::string::String,
44589 >,
44590 message: ::std::result::Result<
44591 ::std::option::Option<::std::string::String>,
44592 ::std::string::String,
44593 >,
44594 }
44595 impl ::std::default::Default
44596 for PostGetMultipleCompressedAccountsV2ResponseError {
44597 fn default() -> Self {
44598 Self {
44599 code: Ok(Default::default()),
44600 message: Ok(Default::default()),
44601 }
44602 }
44603 }
44604 impl PostGetMultipleCompressedAccountsV2ResponseError {
44605 pub fn code<T>(mut self, value: T) -> Self
44606 where
44607 T: ::std::convert::TryInto<::std::option::Option<i64>>,
44608 T::Error: ::std::fmt::Display,
44609 {
44610 self.code = value
44611 .try_into()
44612 .map_err(|e| {
44613 format!("error converting supplied value for code: {e}")
44614 });
44615 self
44616 }
44617 pub fn message<T>(mut self, value: T) -> Self
44618 where
44619 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
44620 T::Error: ::std::fmt::Display,
44621 {
44622 self.message = value
44623 .try_into()
44624 .map_err(|e| {
44625 format!("error converting supplied value for message: {e}")
44626 });
44627 self
44628 }
44629 }
44630 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsV2ResponseError>
44631 for super::PostGetMultipleCompressedAccountsV2ResponseError {
44632 type Error = super::error::ConversionError;
44633 fn try_from(
44634 value: PostGetMultipleCompressedAccountsV2ResponseError,
44635 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44636 Ok(Self {
44637 code: value.code?,
44638 message: value.message?,
44639 })
44640 }
44641 }
44642 impl ::std::convert::From<
44643 super::PostGetMultipleCompressedAccountsV2ResponseError,
44644 > for PostGetMultipleCompressedAccountsV2ResponseError {
44645 fn from(
44646 value: super::PostGetMultipleCompressedAccountsV2ResponseError,
44647 ) -> Self {
44648 Self {
44649 code: Ok(value.code),
44650 message: Ok(value.message),
44651 }
44652 }
44653 }
44654 #[derive(Clone, Debug)]
44655 pub struct PostGetMultipleCompressedAccountsV2ResponseResult {
44656 context: ::std::result::Result<super::Context, ::std::string::String>,
44657 value: ::std::result::Result<super::AccountListV2, ::std::string::String>,
44658 }
44659 impl ::std::default::Default
44660 for PostGetMultipleCompressedAccountsV2ResponseResult {
44661 fn default() -> Self {
44662 Self {
44663 context: Err("no value supplied for context".to_string()),
44664 value: Err("no value supplied for value".to_string()),
44665 }
44666 }
44667 }
44668 impl PostGetMultipleCompressedAccountsV2ResponseResult {
44669 pub fn context<T>(mut self, value: T) -> Self
44670 where
44671 T: ::std::convert::TryInto<super::Context>,
44672 T::Error: ::std::fmt::Display,
44673 {
44674 self.context = value
44675 .try_into()
44676 .map_err(|e| {
44677 format!("error converting supplied value for context: {e}")
44678 });
44679 self
44680 }
44681 pub fn value<T>(mut self, value: T) -> Self
44682 where
44683 T: ::std::convert::TryInto<super::AccountListV2>,
44684 T::Error: ::std::fmt::Display,
44685 {
44686 self.value = value
44687 .try_into()
44688 .map_err(|e| {
44689 format!("error converting supplied value for value: {e}")
44690 });
44691 self
44692 }
44693 }
44694 impl ::std::convert::TryFrom<PostGetMultipleCompressedAccountsV2ResponseResult>
44695 for super::PostGetMultipleCompressedAccountsV2ResponseResult {
44696 type Error = super::error::ConversionError;
44697 fn try_from(
44698 value: PostGetMultipleCompressedAccountsV2ResponseResult,
44699 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44700 Ok(Self {
44701 context: value.context?,
44702 value: value.value?,
44703 })
44704 }
44705 }
44706 impl ::std::convert::From<
44707 super::PostGetMultipleCompressedAccountsV2ResponseResult,
44708 > for PostGetMultipleCompressedAccountsV2ResponseResult {
44709 fn from(
44710 value: super::PostGetMultipleCompressedAccountsV2ResponseResult,
44711 ) -> Self {
44712 Self {
44713 context: Ok(value.context),
44714 value: Ok(value.value),
44715 }
44716 }
44717 }
44718 #[derive(Clone, Debug)]
44719 pub struct PostGetMultipleNewAddressProofsBody {
44720 id: ::std::result::Result<
44721 super::PostGetMultipleNewAddressProofsBodyId,
44722 ::std::string::String,
44723 >,
44724 jsonrpc: ::std::result::Result<
44725 super::PostGetMultipleNewAddressProofsBodyJsonrpc,
44726 ::std::string::String,
44727 >,
44728 method: ::std::result::Result<
44729 super::PostGetMultipleNewAddressProofsBodyMethod,
44730 ::std::string::String,
44731 >,
44732 params: ::std::result::Result<
44733 ::std::vec::Vec<super::SerializablePubkey>,
44734 ::std::string::String,
44735 >,
44736 }
44737 impl ::std::default::Default for PostGetMultipleNewAddressProofsBody {
44738 fn default() -> Self {
44739 Self {
44740 id: Err("no value supplied for id".to_string()),
44741 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
44742 method: Err("no value supplied for method".to_string()),
44743 params: Err("no value supplied for params".to_string()),
44744 }
44745 }
44746 }
44747 impl PostGetMultipleNewAddressProofsBody {
44748 pub fn id<T>(mut self, value: T) -> Self
44749 where
44750 T: ::std::convert::TryInto<super::PostGetMultipleNewAddressProofsBodyId>,
44751 T::Error: ::std::fmt::Display,
44752 {
44753 self.id = value
44754 .try_into()
44755 .map_err(|e| format!("error converting supplied value for id: {e}"));
44756 self
44757 }
44758 pub fn jsonrpc<T>(mut self, value: T) -> Self
44759 where
44760 T: ::std::convert::TryInto<
44761 super::PostGetMultipleNewAddressProofsBodyJsonrpc,
44762 >,
44763 T::Error: ::std::fmt::Display,
44764 {
44765 self.jsonrpc = value
44766 .try_into()
44767 .map_err(|e| {
44768 format!("error converting supplied value for jsonrpc: {e}")
44769 });
44770 self
44771 }
44772 pub fn method<T>(mut self, value: T) -> Self
44773 where
44774 T: ::std::convert::TryInto<
44775 super::PostGetMultipleNewAddressProofsBodyMethod,
44776 >,
44777 T::Error: ::std::fmt::Display,
44778 {
44779 self.method = value
44780 .try_into()
44781 .map_err(|e| {
44782 format!("error converting supplied value for method: {e}")
44783 });
44784 self
44785 }
44786 pub fn params<T>(mut self, value: T) -> Self
44787 where
44788 T: ::std::convert::TryInto<::std::vec::Vec<super::SerializablePubkey>>,
44789 T::Error: ::std::fmt::Display,
44790 {
44791 self.params = value
44792 .try_into()
44793 .map_err(|e| {
44794 format!("error converting supplied value for params: {e}")
44795 });
44796 self
44797 }
44798 }
44799 impl ::std::convert::TryFrom<PostGetMultipleNewAddressProofsBody>
44800 for super::PostGetMultipleNewAddressProofsBody {
44801 type Error = super::error::ConversionError;
44802 fn try_from(
44803 value: PostGetMultipleNewAddressProofsBody,
44804 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44805 Ok(Self {
44806 id: value.id?,
44807 jsonrpc: value.jsonrpc?,
44808 method: value.method?,
44809 params: value.params?,
44810 })
44811 }
44812 }
44813 impl ::std::convert::From<super::PostGetMultipleNewAddressProofsBody>
44814 for PostGetMultipleNewAddressProofsBody {
44815 fn from(value: super::PostGetMultipleNewAddressProofsBody) -> Self {
44816 Self {
44817 id: Ok(value.id),
44818 jsonrpc: Ok(value.jsonrpc),
44819 method: Ok(value.method),
44820 params: Ok(value.params),
44821 }
44822 }
44823 }
44824 #[derive(Clone, Debug)]
44825 pub struct PostGetMultipleNewAddressProofsResponse {
44826 error: ::std::result::Result<
44827 ::std::option::Option<
44828 super::PostGetMultipleNewAddressProofsResponseError,
44829 >,
44830 ::std::string::String,
44831 >,
44832 id: ::std::result::Result<
44833 super::PostGetMultipleNewAddressProofsResponseId,
44834 ::std::string::String,
44835 >,
44836 jsonrpc: ::std::result::Result<
44837 super::PostGetMultipleNewAddressProofsResponseJsonrpc,
44838 ::std::string::String,
44839 >,
44840 result: ::std::result::Result<
44841 ::std::option::Option<
44842 super::PostGetMultipleNewAddressProofsResponseResult,
44843 >,
44844 ::std::string::String,
44845 >,
44846 }
44847 impl ::std::default::Default for PostGetMultipleNewAddressProofsResponse {
44848 fn default() -> Self {
44849 Self {
44850 error: Ok(Default::default()),
44851 id: Err("no value supplied for id".to_string()),
44852 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
44853 result: Ok(Default::default()),
44854 }
44855 }
44856 }
44857 impl PostGetMultipleNewAddressProofsResponse {
44858 pub fn error<T>(mut self, value: T) -> Self
44859 where
44860 T: ::std::convert::TryInto<
44861 ::std::option::Option<
44862 super::PostGetMultipleNewAddressProofsResponseError,
44863 >,
44864 >,
44865 T::Error: ::std::fmt::Display,
44866 {
44867 self.error = value
44868 .try_into()
44869 .map_err(|e| {
44870 format!("error converting supplied value for error: {e}")
44871 });
44872 self
44873 }
44874 pub fn id<T>(mut self, value: T) -> Self
44875 where
44876 T: ::std::convert::TryInto<
44877 super::PostGetMultipleNewAddressProofsResponseId,
44878 >,
44879 T::Error: ::std::fmt::Display,
44880 {
44881 self.id = value
44882 .try_into()
44883 .map_err(|e| format!("error converting supplied value for id: {e}"));
44884 self
44885 }
44886 pub fn jsonrpc<T>(mut self, value: T) -> Self
44887 where
44888 T: ::std::convert::TryInto<
44889 super::PostGetMultipleNewAddressProofsResponseJsonrpc,
44890 >,
44891 T::Error: ::std::fmt::Display,
44892 {
44893 self.jsonrpc = value
44894 .try_into()
44895 .map_err(|e| {
44896 format!("error converting supplied value for jsonrpc: {e}")
44897 });
44898 self
44899 }
44900 pub fn result<T>(mut self, value: T) -> Self
44901 where
44902 T: ::std::convert::TryInto<
44903 ::std::option::Option<
44904 super::PostGetMultipleNewAddressProofsResponseResult,
44905 >,
44906 >,
44907 T::Error: ::std::fmt::Display,
44908 {
44909 self.result = value
44910 .try_into()
44911 .map_err(|e| {
44912 format!("error converting supplied value for result: {e}")
44913 });
44914 self
44915 }
44916 }
44917 impl ::std::convert::TryFrom<PostGetMultipleNewAddressProofsResponse>
44918 for super::PostGetMultipleNewAddressProofsResponse {
44919 type Error = super::error::ConversionError;
44920 fn try_from(
44921 value: PostGetMultipleNewAddressProofsResponse,
44922 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44923 Ok(Self {
44924 error: value.error?,
44925 id: value.id?,
44926 jsonrpc: value.jsonrpc?,
44927 result: value.result?,
44928 })
44929 }
44930 }
44931 impl ::std::convert::From<super::PostGetMultipleNewAddressProofsResponse>
44932 for PostGetMultipleNewAddressProofsResponse {
44933 fn from(value: super::PostGetMultipleNewAddressProofsResponse) -> Self {
44934 Self {
44935 error: Ok(value.error),
44936 id: Ok(value.id),
44937 jsonrpc: Ok(value.jsonrpc),
44938 result: Ok(value.result),
44939 }
44940 }
44941 }
44942 #[derive(Clone, Debug)]
44943 pub struct PostGetMultipleNewAddressProofsResponseError {
44944 code: ::std::result::Result<
44945 ::std::option::Option<i64>,
44946 ::std::string::String,
44947 >,
44948 message: ::std::result::Result<
44949 ::std::option::Option<::std::string::String>,
44950 ::std::string::String,
44951 >,
44952 }
44953 impl ::std::default::Default for PostGetMultipleNewAddressProofsResponseError {
44954 fn default() -> Self {
44955 Self {
44956 code: Ok(Default::default()),
44957 message: Ok(Default::default()),
44958 }
44959 }
44960 }
44961 impl PostGetMultipleNewAddressProofsResponseError {
44962 pub fn code<T>(mut self, value: T) -> Self
44963 where
44964 T: ::std::convert::TryInto<::std::option::Option<i64>>,
44965 T::Error: ::std::fmt::Display,
44966 {
44967 self.code = value
44968 .try_into()
44969 .map_err(|e| {
44970 format!("error converting supplied value for code: {e}")
44971 });
44972 self
44973 }
44974 pub fn message<T>(mut self, value: T) -> Self
44975 where
44976 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
44977 T::Error: ::std::fmt::Display,
44978 {
44979 self.message = value
44980 .try_into()
44981 .map_err(|e| {
44982 format!("error converting supplied value for message: {e}")
44983 });
44984 self
44985 }
44986 }
44987 impl ::std::convert::TryFrom<PostGetMultipleNewAddressProofsResponseError>
44988 for super::PostGetMultipleNewAddressProofsResponseError {
44989 type Error = super::error::ConversionError;
44990 fn try_from(
44991 value: PostGetMultipleNewAddressProofsResponseError,
44992 ) -> ::std::result::Result<Self, super::error::ConversionError> {
44993 Ok(Self {
44994 code: value.code?,
44995 message: value.message?,
44996 })
44997 }
44998 }
44999 impl ::std::convert::From<super::PostGetMultipleNewAddressProofsResponseError>
45000 for PostGetMultipleNewAddressProofsResponseError {
45001 fn from(value: super::PostGetMultipleNewAddressProofsResponseError) -> Self {
45002 Self {
45003 code: Ok(value.code),
45004 message: Ok(value.message),
45005 }
45006 }
45007 }
45008 #[derive(Clone, Debug)]
45009 pub struct PostGetMultipleNewAddressProofsResponseResult {
45010 context: ::std::result::Result<super::Context, ::std::string::String>,
45011 value: ::std::result::Result<
45012 ::std::vec::Vec<super::MerkleContextWithNewAddressProof>,
45013 ::std::string::String,
45014 >,
45015 }
45016 impl ::std::default::Default for PostGetMultipleNewAddressProofsResponseResult {
45017 fn default() -> Self {
45018 Self {
45019 context: Err("no value supplied for context".to_string()),
45020 value: Err("no value supplied for value".to_string()),
45021 }
45022 }
45023 }
45024 impl PostGetMultipleNewAddressProofsResponseResult {
45025 pub fn context<T>(mut self, value: T) -> Self
45026 where
45027 T: ::std::convert::TryInto<super::Context>,
45028 T::Error: ::std::fmt::Display,
45029 {
45030 self.context = value
45031 .try_into()
45032 .map_err(|e| {
45033 format!("error converting supplied value for context: {e}")
45034 });
45035 self
45036 }
45037 pub fn value<T>(mut self, value: T) -> Self
45038 where
45039 T: ::std::convert::TryInto<
45040 ::std::vec::Vec<super::MerkleContextWithNewAddressProof>,
45041 >,
45042 T::Error: ::std::fmt::Display,
45043 {
45044 self.value = value
45045 .try_into()
45046 .map_err(|e| {
45047 format!("error converting supplied value for value: {e}")
45048 });
45049 self
45050 }
45051 }
45052 impl ::std::convert::TryFrom<PostGetMultipleNewAddressProofsResponseResult>
45053 for super::PostGetMultipleNewAddressProofsResponseResult {
45054 type Error = super::error::ConversionError;
45055 fn try_from(
45056 value: PostGetMultipleNewAddressProofsResponseResult,
45057 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45058 Ok(Self {
45059 context: value.context?,
45060 value: value.value?,
45061 })
45062 }
45063 }
45064 impl ::std::convert::From<super::PostGetMultipleNewAddressProofsResponseResult>
45065 for PostGetMultipleNewAddressProofsResponseResult {
45066 fn from(
45067 value: super::PostGetMultipleNewAddressProofsResponseResult,
45068 ) -> Self {
45069 Self {
45070 context: Ok(value.context),
45071 value: Ok(value.value),
45072 }
45073 }
45074 }
45075 #[derive(Clone, Debug)]
45076 pub struct PostGetMultipleNewAddressProofsV2Body {
45077 id: ::std::result::Result<
45078 super::PostGetMultipleNewAddressProofsV2BodyId,
45079 ::std::string::String,
45080 >,
45081 jsonrpc: ::std::result::Result<
45082 super::PostGetMultipleNewAddressProofsV2BodyJsonrpc,
45083 ::std::string::String,
45084 >,
45085 method: ::std::result::Result<
45086 super::PostGetMultipleNewAddressProofsV2BodyMethod,
45087 ::std::string::String,
45088 >,
45089 params: ::std::result::Result<
45090 ::std::vec::Vec<super::AddressWithTree>,
45091 ::std::string::String,
45092 >,
45093 }
45094 impl ::std::default::Default for PostGetMultipleNewAddressProofsV2Body {
45095 fn default() -> Self {
45096 Self {
45097 id: Err("no value supplied for id".to_string()),
45098 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
45099 method: Err("no value supplied for method".to_string()),
45100 params: Err("no value supplied for params".to_string()),
45101 }
45102 }
45103 }
45104 impl PostGetMultipleNewAddressProofsV2Body {
45105 pub fn id<T>(mut self, value: T) -> Self
45106 where
45107 T: ::std::convert::TryInto<
45108 super::PostGetMultipleNewAddressProofsV2BodyId,
45109 >,
45110 T::Error: ::std::fmt::Display,
45111 {
45112 self.id = value
45113 .try_into()
45114 .map_err(|e| format!("error converting supplied value for id: {e}"));
45115 self
45116 }
45117 pub fn jsonrpc<T>(mut self, value: T) -> Self
45118 where
45119 T: ::std::convert::TryInto<
45120 super::PostGetMultipleNewAddressProofsV2BodyJsonrpc,
45121 >,
45122 T::Error: ::std::fmt::Display,
45123 {
45124 self.jsonrpc = value
45125 .try_into()
45126 .map_err(|e| {
45127 format!("error converting supplied value for jsonrpc: {e}")
45128 });
45129 self
45130 }
45131 pub fn method<T>(mut self, value: T) -> Self
45132 where
45133 T: ::std::convert::TryInto<
45134 super::PostGetMultipleNewAddressProofsV2BodyMethod,
45135 >,
45136 T::Error: ::std::fmt::Display,
45137 {
45138 self.method = value
45139 .try_into()
45140 .map_err(|e| {
45141 format!("error converting supplied value for method: {e}")
45142 });
45143 self
45144 }
45145 pub fn params<T>(mut self, value: T) -> Self
45146 where
45147 T: ::std::convert::TryInto<::std::vec::Vec<super::AddressWithTree>>,
45148 T::Error: ::std::fmt::Display,
45149 {
45150 self.params = value
45151 .try_into()
45152 .map_err(|e| {
45153 format!("error converting supplied value for params: {e}")
45154 });
45155 self
45156 }
45157 }
45158 impl ::std::convert::TryFrom<PostGetMultipleNewAddressProofsV2Body>
45159 for super::PostGetMultipleNewAddressProofsV2Body {
45160 type Error = super::error::ConversionError;
45161 fn try_from(
45162 value: PostGetMultipleNewAddressProofsV2Body,
45163 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45164 Ok(Self {
45165 id: value.id?,
45166 jsonrpc: value.jsonrpc?,
45167 method: value.method?,
45168 params: value.params?,
45169 })
45170 }
45171 }
45172 impl ::std::convert::From<super::PostGetMultipleNewAddressProofsV2Body>
45173 for PostGetMultipleNewAddressProofsV2Body {
45174 fn from(value: super::PostGetMultipleNewAddressProofsV2Body) -> Self {
45175 Self {
45176 id: Ok(value.id),
45177 jsonrpc: Ok(value.jsonrpc),
45178 method: Ok(value.method),
45179 params: Ok(value.params),
45180 }
45181 }
45182 }
45183 #[derive(Clone, Debug)]
45184 pub struct PostGetMultipleNewAddressProofsV2Response {
45185 error: ::std::result::Result<
45186 ::std::option::Option<
45187 super::PostGetMultipleNewAddressProofsV2ResponseError,
45188 >,
45189 ::std::string::String,
45190 >,
45191 id: ::std::result::Result<
45192 super::PostGetMultipleNewAddressProofsV2ResponseId,
45193 ::std::string::String,
45194 >,
45195 jsonrpc: ::std::result::Result<
45196 super::PostGetMultipleNewAddressProofsV2ResponseJsonrpc,
45197 ::std::string::String,
45198 >,
45199 result: ::std::result::Result<
45200 ::std::option::Option<
45201 super::PostGetMultipleNewAddressProofsV2ResponseResult,
45202 >,
45203 ::std::string::String,
45204 >,
45205 }
45206 impl ::std::default::Default for PostGetMultipleNewAddressProofsV2Response {
45207 fn default() -> Self {
45208 Self {
45209 error: Ok(Default::default()),
45210 id: Err("no value supplied for id".to_string()),
45211 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
45212 result: Ok(Default::default()),
45213 }
45214 }
45215 }
45216 impl PostGetMultipleNewAddressProofsV2Response {
45217 pub fn error<T>(mut self, value: T) -> Self
45218 where
45219 T: ::std::convert::TryInto<
45220 ::std::option::Option<
45221 super::PostGetMultipleNewAddressProofsV2ResponseError,
45222 >,
45223 >,
45224 T::Error: ::std::fmt::Display,
45225 {
45226 self.error = value
45227 .try_into()
45228 .map_err(|e| {
45229 format!("error converting supplied value for error: {e}")
45230 });
45231 self
45232 }
45233 pub fn id<T>(mut self, value: T) -> Self
45234 where
45235 T: ::std::convert::TryInto<
45236 super::PostGetMultipleNewAddressProofsV2ResponseId,
45237 >,
45238 T::Error: ::std::fmt::Display,
45239 {
45240 self.id = value
45241 .try_into()
45242 .map_err(|e| format!("error converting supplied value for id: {e}"));
45243 self
45244 }
45245 pub fn jsonrpc<T>(mut self, value: T) -> Self
45246 where
45247 T: ::std::convert::TryInto<
45248 super::PostGetMultipleNewAddressProofsV2ResponseJsonrpc,
45249 >,
45250 T::Error: ::std::fmt::Display,
45251 {
45252 self.jsonrpc = value
45253 .try_into()
45254 .map_err(|e| {
45255 format!("error converting supplied value for jsonrpc: {e}")
45256 });
45257 self
45258 }
45259 pub fn result<T>(mut self, value: T) -> Self
45260 where
45261 T: ::std::convert::TryInto<
45262 ::std::option::Option<
45263 super::PostGetMultipleNewAddressProofsV2ResponseResult,
45264 >,
45265 >,
45266 T::Error: ::std::fmt::Display,
45267 {
45268 self.result = value
45269 .try_into()
45270 .map_err(|e| {
45271 format!("error converting supplied value for result: {e}")
45272 });
45273 self
45274 }
45275 }
45276 impl ::std::convert::TryFrom<PostGetMultipleNewAddressProofsV2Response>
45277 for super::PostGetMultipleNewAddressProofsV2Response {
45278 type Error = super::error::ConversionError;
45279 fn try_from(
45280 value: PostGetMultipleNewAddressProofsV2Response,
45281 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45282 Ok(Self {
45283 error: value.error?,
45284 id: value.id?,
45285 jsonrpc: value.jsonrpc?,
45286 result: value.result?,
45287 })
45288 }
45289 }
45290 impl ::std::convert::From<super::PostGetMultipleNewAddressProofsV2Response>
45291 for PostGetMultipleNewAddressProofsV2Response {
45292 fn from(value: super::PostGetMultipleNewAddressProofsV2Response) -> Self {
45293 Self {
45294 error: Ok(value.error),
45295 id: Ok(value.id),
45296 jsonrpc: Ok(value.jsonrpc),
45297 result: Ok(value.result),
45298 }
45299 }
45300 }
45301 #[derive(Clone, Debug)]
45302 pub struct PostGetMultipleNewAddressProofsV2ResponseError {
45303 code: ::std::result::Result<
45304 ::std::option::Option<i64>,
45305 ::std::string::String,
45306 >,
45307 message: ::std::result::Result<
45308 ::std::option::Option<::std::string::String>,
45309 ::std::string::String,
45310 >,
45311 }
45312 impl ::std::default::Default for PostGetMultipleNewAddressProofsV2ResponseError {
45313 fn default() -> Self {
45314 Self {
45315 code: Ok(Default::default()),
45316 message: Ok(Default::default()),
45317 }
45318 }
45319 }
45320 impl PostGetMultipleNewAddressProofsV2ResponseError {
45321 pub fn code<T>(mut self, value: T) -> Self
45322 where
45323 T: ::std::convert::TryInto<::std::option::Option<i64>>,
45324 T::Error: ::std::fmt::Display,
45325 {
45326 self.code = value
45327 .try_into()
45328 .map_err(|e| {
45329 format!("error converting supplied value for code: {e}")
45330 });
45331 self
45332 }
45333 pub fn message<T>(mut self, value: T) -> Self
45334 where
45335 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
45336 T::Error: ::std::fmt::Display,
45337 {
45338 self.message = value
45339 .try_into()
45340 .map_err(|e| {
45341 format!("error converting supplied value for message: {e}")
45342 });
45343 self
45344 }
45345 }
45346 impl ::std::convert::TryFrom<PostGetMultipleNewAddressProofsV2ResponseError>
45347 for super::PostGetMultipleNewAddressProofsV2ResponseError {
45348 type Error = super::error::ConversionError;
45349 fn try_from(
45350 value: PostGetMultipleNewAddressProofsV2ResponseError,
45351 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45352 Ok(Self {
45353 code: value.code?,
45354 message: value.message?,
45355 })
45356 }
45357 }
45358 impl ::std::convert::From<super::PostGetMultipleNewAddressProofsV2ResponseError>
45359 for PostGetMultipleNewAddressProofsV2ResponseError {
45360 fn from(
45361 value: super::PostGetMultipleNewAddressProofsV2ResponseError,
45362 ) -> Self {
45363 Self {
45364 code: Ok(value.code),
45365 message: Ok(value.message),
45366 }
45367 }
45368 }
45369 #[derive(Clone, Debug)]
45370 pub struct PostGetMultipleNewAddressProofsV2ResponseResult {
45371 context: ::std::result::Result<super::Context, ::std::string::String>,
45372 value: ::std::result::Result<
45373 ::std::vec::Vec<super::MerkleContextWithNewAddressProof>,
45374 ::std::string::String,
45375 >,
45376 }
45377 impl ::std::default::Default
45378 for PostGetMultipleNewAddressProofsV2ResponseResult {
45379 fn default() -> Self {
45380 Self {
45381 context: Err("no value supplied for context".to_string()),
45382 value: Err("no value supplied for value".to_string()),
45383 }
45384 }
45385 }
45386 impl PostGetMultipleNewAddressProofsV2ResponseResult {
45387 pub fn context<T>(mut self, value: T) -> Self
45388 where
45389 T: ::std::convert::TryInto<super::Context>,
45390 T::Error: ::std::fmt::Display,
45391 {
45392 self.context = value
45393 .try_into()
45394 .map_err(|e| {
45395 format!("error converting supplied value for context: {e}")
45396 });
45397 self
45398 }
45399 pub fn value<T>(mut self, value: T) -> Self
45400 where
45401 T: ::std::convert::TryInto<
45402 ::std::vec::Vec<super::MerkleContextWithNewAddressProof>,
45403 >,
45404 T::Error: ::std::fmt::Display,
45405 {
45406 self.value = value
45407 .try_into()
45408 .map_err(|e| {
45409 format!("error converting supplied value for value: {e}")
45410 });
45411 self
45412 }
45413 }
45414 impl ::std::convert::TryFrom<PostGetMultipleNewAddressProofsV2ResponseResult>
45415 for super::PostGetMultipleNewAddressProofsV2ResponseResult {
45416 type Error = super::error::ConversionError;
45417 fn try_from(
45418 value: PostGetMultipleNewAddressProofsV2ResponseResult,
45419 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45420 Ok(Self {
45421 context: value.context?,
45422 value: value.value?,
45423 })
45424 }
45425 }
45426 impl ::std::convert::From<super::PostGetMultipleNewAddressProofsV2ResponseResult>
45427 for PostGetMultipleNewAddressProofsV2ResponseResult {
45428 fn from(
45429 value: super::PostGetMultipleNewAddressProofsV2ResponseResult,
45430 ) -> Self {
45431 Self {
45432 context: Ok(value.context),
45433 value: Ok(value.value),
45434 }
45435 }
45436 }
45437 #[derive(Clone, Debug)]
45438 pub struct PostGetQueueElementsBody {
45439 id: ::std::result::Result<
45440 super::PostGetQueueElementsBodyId,
45441 ::std::string::String,
45442 >,
45443 jsonrpc: ::std::result::Result<
45444 super::PostGetQueueElementsBodyJsonrpc,
45445 ::std::string::String,
45446 >,
45447 method: ::std::result::Result<
45448 super::PostGetQueueElementsBodyMethod,
45449 ::std::string::String,
45450 >,
45451 params: ::std::result::Result<
45452 super::PostGetQueueElementsBodyParams,
45453 ::std::string::String,
45454 >,
45455 }
45456 impl ::std::default::Default for PostGetQueueElementsBody {
45457 fn default() -> Self {
45458 Self {
45459 id: Err("no value supplied for id".to_string()),
45460 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
45461 method: Err("no value supplied for method".to_string()),
45462 params: Err("no value supplied for params".to_string()),
45463 }
45464 }
45465 }
45466 impl PostGetQueueElementsBody {
45467 pub fn id<T>(mut self, value: T) -> Self
45468 where
45469 T: ::std::convert::TryInto<super::PostGetQueueElementsBodyId>,
45470 T::Error: ::std::fmt::Display,
45471 {
45472 self.id = value
45473 .try_into()
45474 .map_err(|e| format!("error converting supplied value for id: {e}"));
45475 self
45476 }
45477 pub fn jsonrpc<T>(mut self, value: T) -> Self
45478 where
45479 T: ::std::convert::TryInto<super::PostGetQueueElementsBodyJsonrpc>,
45480 T::Error: ::std::fmt::Display,
45481 {
45482 self.jsonrpc = value
45483 .try_into()
45484 .map_err(|e| {
45485 format!("error converting supplied value for jsonrpc: {e}")
45486 });
45487 self
45488 }
45489 pub fn method<T>(mut self, value: T) -> Self
45490 where
45491 T: ::std::convert::TryInto<super::PostGetQueueElementsBodyMethod>,
45492 T::Error: ::std::fmt::Display,
45493 {
45494 self.method = value
45495 .try_into()
45496 .map_err(|e| {
45497 format!("error converting supplied value for method: {e}")
45498 });
45499 self
45500 }
45501 pub fn params<T>(mut self, value: T) -> Self
45502 where
45503 T: ::std::convert::TryInto<super::PostGetQueueElementsBodyParams>,
45504 T::Error: ::std::fmt::Display,
45505 {
45506 self.params = value
45507 .try_into()
45508 .map_err(|e| {
45509 format!("error converting supplied value for params: {e}")
45510 });
45511 self
45512 }
45513 }
45514 impl ::std::convert::TryFrom<PostGetQueueElementsBody>
45515 for super::PostGetQueueElementsBody {
45516 type Error = super::error::ConversionError;
45517 fn try_from(
45518 value: PostGetQueueElementsBody,
45519 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45520 Ok(Self {
45521 id: value.id?,
45522 jsonrpc: value.jsonrpc?,
45523 method: value.method?,
45524 params: value.params?,
45525 })
45526 }
45527 }
45528 impl ::std::convert::From<super::PostGetQueueElementsBody>
45529 for PostGetQueueElementsBody {
45530 fn from(value: super::PostGetQueueElementsBody) -> Self {
45531 Self {
45532 id: Ok(value.id),
45533 jsonrpc: Ok(value.jsonrpc),
45534 method: Ok(value.method),
45535 params: Ok(value.params),
45536 }
45537 }
45538 }
45539 #[derive(Clone, Debug)]
45540 pub struct PostGetQueueElementsBodyParams {
45541 address_queue: ::std::result::Result<
45542 ::std::option::Option<super::QueueRequest>,
45543 ::std::string::String,
45544 >,
45545 input_queue: ::std::result::Result<
45546 ::std::option::Option<super::QueueRequest>,
45547 ::std::string::String,
45548 >,
45549 output_queue: ::std::result::Result<
45550 ::std::option::Option<super::QueueRequest>,
45551 ::std::string::String,
45552 >,
45553 tree: ::std::result::Result<super::Hash, ::std::string::String>,
45554 }
45555 impl ::std::default::Default for PostGetQueueElementsBodyParams {
45556 fn default() -> Self {
45557 Self {
45558 address_queue: Ok(Default::default()),
45559 input_queue: Ok(Default::default()),
45560 output_queue: Ok(Default::default()),
45561 tree: Err("no value supplied for tree".to_string()),
45562 }
45563 }
45564 }
45565 impl PostGetQueueElementsBodyParams {
45566 pub fn address_queue<T>(mut self, value: T) -> Self
45567 where
45568 T: ::std::convert::TryInto<::std::option::Option<super::QueueRequest>>,
45569 T::Error: ::std::fmt::Display,
45570 {
45571 self.address_queue = value
45572 .try_into()
45573 .map_err(|e| {
45574 format!("error converting supplied value for address_queue: {e}")
45575 });
45576 self
45577 }
45578 pub fn input_queue<T>(mut self, value: T) -> Self
45579 where
45580 T: ::std::convert::TryInto<::std::option::Option<super::QueueRequest>>,
45581 T::Error: ::std::fmt::Display,
45582 {
45583 self.input_queue = value
45584 .try_into()
45585 .map_err(|e| {
45586 format!("error converting supplied value for input_queue: {e}")
45587 });
45588 self
45589 }
45590 pub fn output_queue<T>(mut self, value: T) -> Self
45591 where
45592 T: ::std::convert::TryInto<::std::option::Option<super::QueueRequest>>,
45593 T::Error: ::std::fmt::Display,
45594 {
45595 self.output_queue = value
45596 .try_into()
45597 .map_err(|e| {
45598 format!("error converting supplied value for output_queue: {e}")
45599 });
45600 self
45601 }
45602 pub fn tree<T>(mut self, value: T) -> Self
45603 where
45604 T: ::std::convert::TryInto<super::Hash>,
45605 T::Error: ::std::fmt::Display,
45606 {
45607 self.tree = value
45608 .try_into()
45609 .map_err(|e| {
45610 format!("error converting supplied value for tree: {e}")
45611 });
45612 self
45613 }
45614 }
45615 impl ::std::convert::TryFrom<PostGetQueueElementsBodyParams>
45616 for super::PostGetQueueElementsBodyParams {
45617 type Error = super::error::ConversionError;
45618 fn try_from(
45619 value: PostGetQueueElementsBodyParams,
45620 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45621 Ok(Self {
45622 address_queue: value.address_queue?,
45623 input_queue: value.input_queue?,
45624 output_queue: value.output_queue?,
45625 tree: value.tree?,
45626 })
45627 }
45628 }
45629 impl ::std::convert::From<super::PostGetQueueElementsBodyParams>
45630 for PostGetQueueElementsBodyParams {
45631 fn from(value: super::PostGetQueueElementsBodyParams) -> Self {
45632 Self {
45633 address_queue: Ok(value.address_queue),
45634 input_queue: Ok(value.input_queue),
45635 output_queue: Ok(value.output_queue),
45636 tree: Ok(value.tree),
45637 }
45638 }
45639 }
45640 #[derive(Clone, Debug)]
45641 pub struct PostGetQueueElementsResponse {
45642 error: ::std::result::Result<
45643 ::std::option::Option<super::PostGetQueueElementsResponseError>,
45644 ::std::string::String,
45645 >,
45646 id: ::std::result::Result<
45647 super::PostGetQueueElementsResponseId,
45648 ::std::string::String,
45649 >,
45650 jsonrpc: ::std::result::Result<
45651 super::PostGetQueueElementsResponseJsonrpc,
45652 ::std::string::String,
45653 >,
45654 result: ::std::result::Result<
45655 ::std::option::Option<super::PostGetQueueElementsResponseResult>,
45656 ::std::string::String,
45657 >,
45658 }
45659 impl ::std::default::Default for PostGetQueueElementsResponse {
45660 fn default() -> Self {
45661 Self {
45662 error: Ok(Default::default()),
45663 id: Err("no value supplied for id".to_string()),
45664 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
45665 result: Ok(Default::default()),
45666 }
45667 }
45668 }
45669 impl PostGetQueueElementsResponse {
45670 pub fn error<T>(mut self, value: T) -> Self
45671 where
45672 T: ::std::convert::TryInto<
45673 ::std::option::Option<super::PostGetQueueElementsResponseError>,
45674 >,
45675 T::Error: ::std::fmt::Display,
45676 {
45677 self.error = value
45678 .try_into()
45679 .map_err(|e| {
45680 format!("error converting supplied value for error: {e}")
45681 });
45682 self
45683 }
45684 pub fn id<T>(mut self, value: T) -> Self
45685 where
45686 T: ::std::convert::TryInto<super::PostGetQueueElementsResponseId>,
45687 T::Error: ::std::fmt::Display,
45688 {
45689 self.id = value
45690 .try_into()
45691 .map_err(|e| format!("error converting supplied value for id: {e}"));
45692 self
45693 }
45694 pub fn jsonrpc<T>(mut self, value: T) -> Self
45695 where
45696 T: ::std::convert::TryInto<super::PostGetQueueElementsResponseJsonrpc>,
45697 T::Error: ::std::fmt::Display,
45698 {
45699 self.jsonrpc = value
45700 .try_into()
45701 .map_err(|e| {
45702 format!("error converting supplied value for jsonrpc: {e}")
45703 });
45704 self
45705 }
45706 pub fn result<T>(mut self, value: T) -> Self
45707 where
45708 T: ::std::convert::TryInto<
45709 ::std::option::Option<super::PostGetQueueElementsResponseResult>,
45710 >,
45711 T::Error: ::std::fmt::Display,
45712 {
45713 self.result = value
45714 .try_into()
45715 .map_err(|e| {
45716 format!("error converting supplied value for result: {e}")
45717 });
45718 self
45719 }
45720 }
45721 impl ::std::convert::TryFrom<PostGetQueueElementsResponse>
45722 for super::PostGetQueueElementsResponse {
45723 type Error = super::error::ConversionError;
45724 fn try_from(
45725 value: PostGetQueueElementsResponse,
45726 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45727 Ok(Self {
45728 error: value.error?,
45729 id: value.id?,
45730 jsonrpc: value.jsonrpc?,
45731 result: value.result?,
45732 })
45733 }
45734 }
45735 impl ::std::convert::From<super::PostGetQueueElementsResponse>
45736 for PostGetQueueElementsResponse {
45737 fn from(value: super::PostGetQueueElementsResponse) -> Self {
45738 Self {
45739 error: Ok(value.error),
45740 id: Ok(value.id),
45741 jsonrpc: Ok(value.jsonrpc),
45742 result: Ok(value.result),
45743 }
45744 }
45745 }
45746 #[derive(Clone, Debug)]
45747 pub struct PostGetQueueElementsResponseError {
45748 code: ::std::result::Result<
45749 ::std::option::Option<i64>,
45750 ::std::string::String,
45751 >,
45752 message: ::std::result::Result<
45753 ::std::option::Option<::std::string::String>,
45754 ::std::string::String,
45755 >,
45756 }
45757 impl ::std::default::Default for PostGetQueueElementsResponseError {
45758 fn default() -> Self {
45759 Self {
45760 code: Ok(Default::default()),
45761 message: Ok(Default::default()),
45762 }
45763 }
45764 }
45765 impl PostGetQueueElementsResponseError {
45766 pub fn code<T>(mut self, value: T) -> Self
45767 where
45768 T: ::std::convert::TryInto<::std::option::Option<i64>>,
45769 T::Error: ::std::fmt::Display,
45770 {
45771 self.code = value
45772 .try_into()
45773 .map_err(|e| {
45774 format!("error converting supplied value for code: {e}")
45775 });
45776 self
45777 }
45778 pub fn message<T>(mut self, value: T) -> Self
45779 where
45780 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
45781 T::Error: ::std::fmt::Display,
45782 {
45783 self.message = value
45784 .try_into()
45785 .map_err(|e| {
45786 format!("error converting supplied value for message: {e}")
45787 });
45788 self
45789 }
45790 }
45791 impl ::std::convert::TryFrom<PostGetQueueElementsResponseError>
45792 for super::PostGetQueueElementsResponseError {
45793 type Error = super::error::ConversionError;
45794 fn try_from(
45795 value: PostGetQueueElementsResponseError,
45796 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45797 Ok(Self {
45798 code: value.code?,
45799 message: value.message?,
45800 })
45801 }
45802 }
45803 impl ::std::convert::From<super::PostGetQueueElementsResponseError>
45804 for PostGetQueueElementsResponseError {
45805 fn from(value: super::PostGetQueueElementsResponseError) -> Self {
45806 Self {
45807 code: Ok(value.code),
45808 message: Ok(value.message),
45809 }
45810 }
45811 }
45812 #[derive(Clone, Debug)]
45813 pub struct PostGetQueueElementsResponseResult {
45814 address_queue: ::std::result::Result<
45815 ::std::option::Option<super::AddressQueueData>,
45816 ::std::string::String,
45817 >,
45818 context: ::std::result::Result<super::Context, ::std::string::String>,
45819 state_queue: ::std::result::Result<
45820 ::std::option::Option<super::StateQueueData>,
45821 ::std::string::String,
45822 >,
45823 }
45824 impl ::std::default::Default for PostGetQueueElementsResponseResult {
45825 fn default() -> Self {
45826 Self {
45827 address_queue: Ok(Default::default()),
45828 context: Err("no value supplied for context".to_string()),
45829 state_queue: Ok(Default::default()),
45830 }
45831 }
45832 }
45833 impl PostGetQueueElementsResponseResult {
45834 pub fn address_queue<T>(mut self, value: T) -> Self
45835 where
45836 T: ::std::convert::TryInto<
45837 ::std::option::Option<super::AddressQueueData>,
45838 >,
45839 T::Error: ::std::fmt::Display,
45840 {
45841 self.address_queue = value
45842 .try_into()
45843 .map_err(|e| {
45844 format!("error converting supplied value for address_queue: {e}")
45845 });
45846 self
45847 }
45848 pub fn context<T>(mut self, value: T) -> Self
45849 where
45850 T: ::std::convert::TryInto<super::Context>,
45851 T::Error: ::std::fmt::Display,
45852 {
45853 self.context = value
45854 .try_into()
45855 .map_err(|e| {
45856 format!("error converting supplied value for context: {e}")
45857 });
45858 self
45859 }
45860 pub fn state_queue<T>(mut self, value: T) -> Self
45861 where
45862 T: ::std::convert::TryInto<::std::option::Option<super::StateQueueData>>,
45863 T::Error: ::std::fmt::Display,
45864 {
45865 self.state_queue = value
45866 .try_into()
45867 .map_err(|e| {
45868 format!("error converting supplied value for state_queue: {e}")
45869 });
45870 self
45871 }
45872 }
45873 impl ::std::convert::TryFrom<PostGetQueueElementsResponseResult>
45874 for super::PostGetQueueElementsResponseResult {
45875 type Error = super::error::ConversionError;
45876 fn try_from(
45877 value: PostGetQueueElementsResponseResult,
45878 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45879 Ok(Self {
45880 address_queue: value.address_queue?,
45881 context: value.context?,
45882 state_queue: value.state_queue?,
45883 })
45884 }
45885 }
45886 impl ::std::convert::From<super::PostGetQueueElementsResponseResult>
45887 for PostGetQueueElementsResponseResult {
45888 fn from(value: super::PostGetQueueElementsResponseResult) -> Self {
45889 Self {
45890 address_queue: Ok(value.address_queue),
45891 context: Ok(value.context),
45892 state_queue: Ok(value.state_queue),
45893 }
45894 }
45895 }
45896 #[derive(Clone, Debug)]
45897 pub struct PostGetQueueInfoBody {
45898 id: ::std::result::Result<
45899 super::PostGetQueueInfoBodyId,
45900 ::std::string::String,
45901 >,
45902 jsonrpc: ::std::result::Result<
45903 super::PostGetQueueInfoBodyJsonrpc,
45904 ::std::string::String,
45905 >,
45906 method: ::std::result::Result<
45907 super::PostGetQueueInfoBodyMethod,
45908 ::std::string::String,
45909 >,
45910 params: ::std::result::Result<
45911 super::PostGetQueueInfoBodyParams,
45912 ::std::string::String,
45913 >,
45914 }
45915 impl ::std::default::Default for PostGetQueueInfoBody {
45916 fn default() -> Self {
45917 Self {
45918 id: Err("no value supplied for id".to_string()),
45919 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
45920 method: Err("no value supplied for method".to_string()),
45921 params: Err("no value supplied for params".to_string()),
45922 }
45923 }
45924 }
45925 impl PostGetQueueInfoBody {
45926 pub fn id<T>(mut self, value: T) -> Self
45927 where
45928 T: ::std::convert::TryInto<super::PostGetQueueInfoBodyId>,
45929 T::Error: ::std::fmt::Display,
45930 {
45931 self.id = value
45932 .try_into()
45933 .map_err(|e| format!("error converting supplied value for id: {e}"));
45934 self
45935 }
45936 pub fn jsonrpc<T>(mut self, value: T) -> Self
45937 where
45938 T: ::std::convert::TryInto<super::PostGetQueueInfoBodyJsonrpc>,
45939 T::Error: ::std::fmt::Display,
45940 {
45941 self.jsonrpc = value
45942 .try_into()
45943 .map_err(|e| {
45944 format!("error converting supplied value for jsonrpc: {e}")
45945 });
45946 self
45947 }
45948 pub fn method<T>(mut self, value: T) -> Self
45949 where
45950 T: ::std::convert::TryInto<super::PostGetQueueInfoBodyMethod>,
45951 T::Error: ::std::fmt::Display,
45952 {
45953 self.method = value
45954 .try_into()
45955 .map_err(|e| {
45956 format!("error converting supplied value for method: {e}")
45957 });
45958 self
45959 }
45960 pub fn params<T>(mut self, value: T) -> Self
45961 where
45962 T: ::std::convert::TryInto<super::PostGetQueueInfoBodyParams>,
45963 T::Error: ::std::fmt::Display,
45964 {
45965 self.params = value
45966 .try_into()
45967 .map_err(|e| {
45968 format!("error converting supplied value for params: {e}")
45969 });
45970 self
45971 }
45972 }
45973 impl ::std::convert::TryFrom<PostGetQueueInfoBody>
45974 for super::PostGetQueueInfoBody {
45975 type Error = super::error::ConversionError;
45976 fn try_from(
45977 value: PostGetQueueInfoBody,
45978 ) -> ::std::result::Result<Self, super::error::ConversionError> {
45979 Ok(Self {
45980 id: value.id?,
45981 jsonrpc: value.jsonrpc?,
45982 method: value.method?,
45983 params: value.params?,
45984 })
45985 }
45986 }
45987 impl ::std::convert::From<super::PostGetQueueInfoBody> for PostGetQueueInfoBody {
45988 fn from(value: super::PostGetQueueInfoBody) -> Self {
45989 Self {
45990 id: Ok(value.id),
45991 jsonrpc: Ok(value.jsonrpc),
45992 method: Ok(value.method),
45993 params: Ok(value.params),
45994 }
45995 }
45996 }
45997 #[derive(Clone, Debug)]
45998 pub struct PostGetQueueInfoBodyParams {
45999 trees: ::std::result::Result<
46000 ::std::option::Option<::std::vec::Vec<::std::string::String>>,
46001 ::std::string::String,
46002 >,
46003 }
46004 impl ::std::default::Default for PostGetQueueInfoBodyParams {
46005 fn default() -> Self {
46006 Self {
46007 trees: Ok(Default::default()),
46008 }
46009 }
46010 }
46011 impl PostGetQueueInfoBodyParams {
46012 pub fn trees<T>(mut self, value: T) -> Self
46013 where
46014 T: ::std::convert::TryInto<
46015 ::std::option::Option<::std::vec::Vec<::std::string::String>>,
46016 >,
46017 T::Error: ::std::fmt::Display,
46018 {
46019 self.trees = value
46020 .try_into()
46021 .map_err(|e| {
46022 format!("error converting supplied value for trees: {e}")
46023 });
46024 self
46025 }
46026 }
46027 impl ::std::convert::TryFrom<PostGetQueueInfoBodyParams>
46028 for super::PostGetQueueInfoBodyParams {
46029 type Error = super::error::ConversionError;
46030 fn try_from(
46031 value: PostGetQueueInfoBodyParams,
46032 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46033 Ok(Self { trees: value.trees? })
46034 }
46035 }
46036 impl ::std::convert::From<super::PostGetQueueInfoBodyParams>
46037 for PostGetQueueInfoBodyParams {
46038 fn from(value: super::PostGetQueueInfoBodyParams) -> Self {
46039 Self { trees: Ok(value.trees) }
46040 }
46041 }
46042 #[derive(Clone, Debug)]
46043 pub struct PostGetQueueInfoResponse {
46044 error: ::std::result::Result<
46045 ::std::option::Option<super::PostGetQueueInfoResponseError>,
46046 ::std::string::String,
46047 >,
46048 id: ::std::result::Result<
46049 super::PostGetQueueInfoResponseId,
46050 ::std::string::String,
46051 >,
46052 jsonrpc: ::std::result::Result<
46053 super::PostGetQueueInfoResponseJsonrpc,
46054 ::std::string::String,
46055 >,
46056 result: ::std::result::Result<
46057 ::std::option::Option<super::PostGetQueueInfoResponseResult>,
46058 ::std::string::String,
46059 >,
46060 }
46061 impl ::std::default::Default for PostGetQueueInfoResponse {
46062 fn default() -> Self {
46063 Self {
46064 error: Ok(Default::default()),
46065 id: Err("no value supplied for id".to_string()),
46066 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
46067 result: Ok(Default::default()),
46068 }
46069 }
46070 }
46071 impl PostGetQueueInfoResponse {
46072 pub fn error<T>(mut self, value: T) -> Self
46073 where
46074 T: ::std::convert::TryInto<
46075 ::std::option::Option<super::PostGetQueueInfoResponseError>,
46076 >,
46077 T::Error: ::std::fmt::Display,
46078 {
46079 self.error = value
46080 .try_into()
46081 .map_err(|e| {
46082 format!("error converting supplied value for error: {e}")
46083 });
46084 self
46085 }
46086 pub fn id<T>(mut self, value: T) -> Self
46087 where
46088 T: ::std::convert::TryInto<super::PostGetQueueInfoResponseId>,
46089 T::Error: ::std::fmt::Display,
46090 {
46091 self.id = value
46092 .try_into()
46093 .map_err(|e| format!("error converting supplied value for id: {e}"));
46094 self
46095 }
46096 pub fn jsonrpc<T>(mut self, value: T) -> Self
46097 where
46098 T: ::std::convert::TryInto<super::PostGetQueueInfoResponseJsonrpc>,
46099 T::Error: ::std::fmt::Display,
46100 {
46101 self.jsonrpc = value
46102 .try_into()
46103 .map_err(|e| {
46104 format!("error converting supplied value for jsonrpc: {e}")
46105 });
46106 self
46107 }
46108 pub fn result<T>(mut self, value: T) -> Self
46109 where
46110 T: ::std::convert::TryInto<
46111 ::std::option::Option<super::PostGetQueueInfoResponseResult>,
46112 >,
46113 T::Error: ::std::fmt::Display,
46114 {
46115 self.result = value
46116 .try_into()
46117 .map_err(|e| {
46118 format!("error converting supplied value for result: {e}")
46119 });
46120 self
46121 }
46122 }
46123 impl ::std::convert::TryFrom<PostGetQueueInfoResponse>
46124 for super::PostGetQueueInfoResponse {
46125 type Error = super::error::ConversionError;
46126 fn try_from(
46127 value: PostGetQueueInfoResponse,
46128 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46129 Ok(Self {
46130 error: value.error?,
46131 id: value.id?,
46132 jsonrpc: value.jsonrpc?,
46133 result: value.result?,
46134 })
46135 }
46136 }
46137 impl ::std::convert::From<super::PostGetQueueInfoResponse>
46138 for PostGetQueueInfoResponse {
46139 fn from(value: super::PostGetQueueInfoResponse) -> Self {
46140 Self {
46141 error: Ok(value.error),
46142 id: Ok(value.id),
46143 jsonrpc: Ok(value.jsonrpc),
46144 result: Ok(value.result),
46145 }
46146 }
46147 }
46148 #[derive(Clone, Debug)]
46149 pub struct PostGetQueueInfoResponseError {
46150 code: ::std::result::Result<
46151 ::std::option::Option<i64>,
46152 ::std::string::String,
46153 >,
46154 message: ::std::result::Result<
46155 ::std::option::Option<::std::string::String>,
46156 ::std::string::String,
46157 >,
46158 }
46159 impl ::std::default::Default for PostGetQueueInfoResponseError {
46160 fn default() -> Self {
46161 Self {
46162 code: Ok(Default::default()),
46163 message: Ok(Default::default()),
46164 }
46165 }
46166 }
46167 impl PostGetQueueInfoResponseError {
46168 pub fn code<T>(mut self, value: T) -> Self
46169 where
46170 T: ::std::convert::TryInto<::std::option::Option<i64>>,
46171 T::Error: ::std::fmt::Display,
46172 {
46173 self.code = value
46174 .try_into()
46175 .map_err(|e| {
46176 format!("error converting supplied value for code: {e}")
46177 });
46178 self
46179 }
46180 pub fn message<T>(mut self, value: T) -> Self
46181 where
46182 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
46183 T::Error: ::std::fmt::Display,
46184 {
46185 self.message = value
46186 .try_into()
46187 .map_err(|e| {
46188 format!("error converting supplied value for message: {e}")
46189 });
46190 self
46191 }
46192 }
46193 impl ::std::convert::TryFrom<PostGetQueueInfoResponseError>
46194 for super::PostGetQueueInfoResponseError {
46195 type Error = super::error::ConversionError;
46196 fn try_from(
46197 value: PostGetQueueInfoResponseError,
46198 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46199 Ok(Self {
46200 code: value.code?,
46201 message: value.message?,
46202 })
46203 }
46204 }
46205 impl ::std::convert::From<super::PostGetQueueInfoResponseError>
46206 for PostGetQueueInfoResponseError {
46207 fn from(value: super::PostGetQueueInfoResponseError) -> Self {
46208 Self {
46209 code: Ok(value.code),
46210 message: Ok(value.message),
46211 }
46212 }
46213 }
46214 #[derive(Clone, Debug)]
46215 pub struct PostGetQueueInfoResponseResult {
46216 queues: ::std::result::Result<
46217 ::std::vec::Vec<super::QueueInfo>,
46218 ::std::string::String,
46219 >,
46220 slot: ::std::result::Result<u64, ::std::string::String>,
46221 }
46222 impl ::std::default::Default for PostGetQueueInfoResponseResult {
46223 fn default() -> Self {
46224 Self {
46225 queues: Err("no value supplied for queues".to_string()),
46226 slot: Err("no value supplied for slot".to_string()),
46227 }
46228 }
46229 }
46230 impl PostGetQueueInfoResponseResult {
46231 pub fn queues<T>(mut self, value: T) -> Self
46232 where
46233 T: ::std::convert::TryInto<::std::vec::Vec<super::QueueInfo>>,
46234 T::Error: ::std::fmt::Display,
46235 {
46236 self.queues = value
46237 .try_into()
46238 .map_err(|e| {
46239 format!("error converting supplied value for queues: {e}")
46240 });
46241 self
46242 }
46243 pub fn slot<T>(mut self, value: T) -> Self
46244 where
46245 T: ::std::convert::TryInto<u64>,
46246 T::Error: ::std::fmt::Display,
46247 {
46248 self.slot = value
46249 .try_into()
46250 .map_err(|e| {
46251 format!("error converting supplied value for slot: {e}")
46252 });
46253 self
46254 }
46255 }
46256 impl ::std::convert::TryFrom<PostGetQueueInfoResponseResult>
46257 for super::PostGetQueueInfoResponseResult {
46258 type Error = super::error::ConversionError;
46259 fn try_from(
46260 value: PostGetQueueInfoResponseResult,
46261 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46262 Ok(Self {
46263 queues: value.queues?,
46264 slot: value.slot?,
46265 })
46266 }
46267 }
46268 impl ::std::convert::From<super::PostGetQueueInfoResponseResult>
46269 for PostGetQueueInfoResponseResult {
46270 fn from(value: super::PostGetQueueInfoResponseResult) -> Self {
46271 Self {
46272 queues: Ok(value.queues),
46273 slot: Ok(value.slot),
46274 }
46275 }
46276 }
46277 #[derive(Clone, Debug)]
46278 pub struct PostGetTransactionWithCompressionInfoBody {
46279 id: ::std::result::Result<
46280 super::PostGetTransactionWithCompressionInfoBodyId,
46281 ::std::string::String,
46282 >,
46283 jsonrpc: ::std::result::Result<
46284 super::PostGetTransactionWithCompressionInfoBodyJsonrpc,
46285 ::std::string::String,
46286 >,
46287 method: ::std::result::Result<
46288 super::PostGetTransactionWithCompressionInfoBodyMethod,
46289 ::std::string::String,
46290 >,
46291 params: ::std::result::Result<
46292 super::PostGetTransactionWithCompressionInfoBodyParams,
46293 ::std::string::String,
46294 >,
46295 }
46296 impl ::std::default::Default for PostGetTransactionWithCompressionInfoBody {
46297 fn default() -> Self {
46298 Self {
46299 id: Err("no value supplied for id".to_string()),
46300 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
46301 method: Err("no value supplied for method".to_string()),
46302 params: Err("no value supplied for params".to_string()),
46303 }
46304 }
46305 }
46306 impl PostGetTransactionWithCompressionInfoBody {
46307 pub fn id<T>(mut self, value: T) -> Self
46308 where
46309 T: ::std::convert::TryInto<
46310 super::PostGetTransactionWithCompressionInfoBodyId,
46311 >,
46312 T::Error: ::std::fmt::Display,
46313 {
46314 self.id = value
46315 .try_into()
46316 .map_err(|e| format!("error converting supplied value for id: {e}"));
46317 self
46318 }
46319 pub fn jsonrpc<T>(mut self, value: T) -> Self
46320 where
46321 T: ::std::convert::TryInto<
46322 super::PostGetTransactionWithCompressionInfoBodyJsonrpc,
46323 >,
46324 T::Error: ::std::fmt::Display,
46325 {
46326 self.jsonrpc = value
46327 .try_into()
46328 .map_err(|e| {
46329 format!("error converting supplied value for jsonrpc: {e}")
46330 });
46331 self
46332 }
46333 pub fn method<T>(mut self, value: T) -> Self
46334 where
46335 T: ::std::convert::TryInto<
46336 super::PostGetTransactionWithCompressionInfoBodyMethod,
46337 >,
46338 T::Error: ::std::fmt::Display,
46339 {
46340 self.method = value
46341 .try_into()
46342 .map_err(|e| {
46343 format!("error converting supplied value for method: {e}")
46344 });
46345 self
46346 }
46347 pub fn params<T>(mut self, value: T) -> Self
46348 where
46349 T: ::std::convert::TryInto<
46350 super::PostGetTransactionWithCompressionInfoBodyParams,
46351 >,
46352 T::Error: ::std::fmt::Display,
46353 {
46354 self.params = value
46355 .try_into()
46356 .map_err(|e| {
46357 format!("error converting supplied value for params: {e}")
46358 });
46359 self
46360 }
46361 }
46362 impl ::std::convert::TryFrom<PostGetTransactionWithCompressionInfoBody>
46363 for super::PostGetTransactionWithCompressionInfoBody {
46364 type Error = super::error::ConversionError;
46365 fn try_from(
46366 value: PostGetTransactionWithCompressionInfoBody,
46367 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46368 Ok(Self {
46369 id: value.id?,
46370 jsonrpc: value.jsonrpc?,
46371 method: value.method?,
46372 params: value.params?,
46373 })
46374 }
46375 }
46376 impl ::std::convert::From<super::PostGetTransactionWithCompressionInfoBody>
46377 for PostGetTransactionWithCompressionInfoBody {
46378 fn from(value: super::PostGetTransactionWithCompressionInfoBody) -> Self {
46379 Self {
46380 id: Ok(value.id),
46381 jsonrpc: Ok(value.jsonrpc),
46382 method: Ok(value.method),
46383 params: Ok(value.params),
46384 }
46385 }
46386 }
46387 #[derive(Clone, Debug)]
46388 pub struct PostGetTransactionWithCompressionInfoBodyParams {
46389 signature: ::std::result::Result<
46390 super::SerializableSignature,
46391 ::std::string::String,
46392 >,
46393 }
46394 impl ::std::default::Default
46395 for PostGetTransactionWithCompressionInfoBodyParams {
46396 fn default() -> Self {
46397 Self {
46398 signature: Err("no value supplied for signature".to_string()),
46399 }
46400 }
46401 }
46402 impl PostGetTransactionWithCompressionInfoBodyParams {
46403 pub fn signature<T>(mut self, value: T) -> Self
46404 where
46405 T: ::std::convert::TryInto<super::SerializableSignature>,
46406 T::Error: ::std::fmt::Display,
46407 {
46408 self.signature = value
46409 .try_into()
46410 .map_err(|e| {
46411 format!("error converting supplied value for signature: {e}")
46412 });
46413 self
46414 }
46415 }
46416 impl ::std::convert::TryFrom<PostGetTransactionWithCompressionInfoBodyParams>
46417 for super::PostGetTransactionWithCompressionInfoBodyParams {
46418 type Error = super::error::ConversionError;
46419 fn try_from(
46420 value: PostGetTransactionWithCompressionInfoBodyParams,
46421 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46422 Ok(Self {
46423 signature: value.signature?,
46424 })
46425 }
46426 }
46427 impl ::std::convert::From<super::PostGetTransactionWithCompressionInfoBodyParams>
46428 for PostGetTransactionWithCompressionInfoBodyParams {
46429 fn from(
46430 value: super::PostGetTransactionWithCompressionInfoBodyParams,
46431 ) -> Self {
46432 Self {
46433 signature: Ok(value.signature),
46434 }
46435 }
46436 }
46437 #[derive(Clone, Debug)]
46438 pub struct PostGetTransactionWithCompressionInfoResponse {
46439 error: ::std::result::Result<
46440 ::std::option::Option<
46441 super::PostGetTransactionWithCompressionInfoResponseError,
46442 >,
46443 ::std::string::String,
46444 >,
46445 id: ::std::result::Result<
46446 super::PostGetTransactionWithCompressionInfoResponseId,
46447 ::std::string::String,
46448 >,
46449 jsonrpc: ::std::result::Result<
46450 super::PostGetTransactionWithCompressionInfoResponseJsonrpc,
46451 ::std::string::String,
46452 >,
46453 result: ::std::result::Result<
46454 ::std::option::Option<
46455 super::PostGetTransactionWithCompressionInfoResponseResult,
46456 >,
46457 ::std::string::String,
46458 >,
46459 }
46460 impl ::std::default::Default for PostGetTransactionWithCompressionInfoResponse {
46461 fn default() -> Self {
46462 Self {
46463 error: Ok(Default::default()),
46464 id: Err("no value supplied for id".to_string()),
46465 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
46466 result: Ok(Default::default()),
46467 }
46468 }
46469 }
46470 impl PostGetTransactionWithCompressionInfoResponse {
46471 pub fn error<T>(mut self, value: T) -> Self
46472 where
46473 T: ::std::convert::TryInto<
46474 ::std::option::Option<
46475 super::PostGetTransactionWithCompressionInfoResponseError,
46476 >,
46477 >,
46478 T::Error: ::std::fmt::Display,
46479 {
46480 self.error = value
46481 .try_into()
46482 .map_err(|e| {
46483 format!("error converting supplied value for error: {e}")
46484 });
46485 self
46486 }
46487 pub fn id<T>(mut self, value: T) -> Self
46488 where
46489 T: ::std::convert::TryInto<
46490 super::PostGetTransactionWithCompressionInfoResponseId,
46491 >,
46492 T::Error: ::std::fmt::Display,
46493 {
46494 self.id = value
46495 .try_into()
46496 .map_err(|e| format!("error converting supplied value for id: {e}"));
46497 self
46498 }
46499 pub fn jsonrpc<T>(mut self, value: T) -> Self
46500 where
46501 T: ::std::convert::TryInto<
46502 super::PostGetTransactionWithCompressionInfoResponseJsonrpc,
46503 >,
46504 T::Error: ::std::fmt::Display,
46505 {
46506 self.jsonrpc = value
46507 .try_into()
46508 .map_err(|e| {
46509 format!("error converting supplied value for jsonrpc: {e}")
46510 });
46511 self
46512 }
46513 pub fn result<T>(mut self, value: T) -> Self
46514 where
46515 T: ::std::convert::TryInto<
46516 ::std::option::Option<
46517 super::PostGetTransactionWithCompressionInfoResponseResult,
46518 >,
46519 >,
46520 T::Error: ::std::fmt::Display,
46521 {
46522 self.result = value
46523 .try_into()
46524 .map_err(|e| {
46525 format!("error converting supplied value for result: {e}")
46526 });
46527 self
46528 }
46529 }
46530 impl ::std::convert::TryFrom<PostGetTransactionWithCompressionInfoResponse>
46531 for super::PostGetTransactionWithCompressionInfoResponse {
46532 type Error = super::error::ConversionError;
46533 fn try_from(
46534 value: PostGetTransactionWithCompressionInfoResponse,
46535 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46536 Ok(Self {
46537 error: value.error?,
46538 id: value.id?,
46539 jsonrpc: value.jsonrpc?,
46540 result: value.result?,
46541 })
46542 }
46543 }
46544 impl ::std::convert::From<super::PostGetTransactionWithCompressionInfoResponse>
46545 for PostGetTransactionWithCompressionInfoResponse {
46546 fn from(
46547 value: super::PostGetTransactionWithCompressionInfoResponse,
46548 ) -> Self {
46549 Self {
46550 error: Ok(value.error),
46551 id: Ok(value.id),
46552 jsonrpc: Ok(value.jsonrpc),
46553 result: Ok(value.result),
46554 }
46555 }
46556 }
46557 #[derive(Clone, Debug)]
46558 pub struct PostGetTransactionWithCompressionInfoResponseError {
46559 code: ::std::result::Result<
46560 ::std::option::Option<i64>,
46561 ::std::string::String,
46562 >,
46563 message: ::std::result::Result<
46564 ::std::option::Option<::std::string::String>,
46565 ::std::string::String,
46566 >,
46567 }
46568 impl ::std::default::Default
46569 for PostGetTransactionWithCompressionInfoResponseError {
46570 fn default() -> Self {
46571 Self {
46572 code: Ok(Default::default()),
46573 message: Ok(Default::default()),
46574 }
46575 }
46576 }
46577 impl PostGetTransactionWithCompressionInfoResponseError {
46578 pub fn code<T>(mut self, value: T) -> Self
46579 where
46580 T: ::std::convert::TryInto<::std::option::Option<i64>>,
46581 T::Error: ::std::fmt::Display,
46582 {
46583 self.code = value
46584 .try_into()
46585 .map_err(|e| {
46586 format!("error converting supplied value for code: {e}")
46587 });
46588 self
46589 }
46590 pub fn message<T>(mut self, value: T) -> Self
46591 where
46592 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
46593 T::Error: ::std::fmt::Display,
46594 {
46595 self.message = value
46596 .try_into()
46597 .map_err(|e| {
46598 format!("error converting supplied value for message: {e}")
46599 });
46600 self
46601 }
46602 }
46603 impl ::std::convert::TryFrom<PostGetTransactionWithCompressionInfoResponseError>
46604 for super::PostGetTransactionWithCompressionInfoResponseError {
46605 type Error = super::error::ConversionError;
46606 fn try_from(
46607 value: PostGetTransactionWithCompressionInfoResponseError,
46608 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46609 Ok(Self {
46610 code: value.code?,
46611 message: value.message?,
46612 })
46613 }
46614 }
46615 impl ::std::convert::From<
46616 super::PostGetTransactionWithCompressionInfoResponseError,
46617 > for PostGetTransactionWithCompressionInfoResponseError {
46618 fn from(
46619 value: super::PostGetTransactionWithCompressionInfoResponseError,
46620 ) -> Self {
46621 Self {
46622 code: Ok(value.code),
46623 message: Ok(value.message),
46624 }
46625 }
46626 }
46627 #[derive(Clone, Debug)]
46628 pub struct PostGetTransactionWithCompressionInfoResponseResult {
46629 compression_info: ::std::result::Result<
46630 ::std::option::Option<
46631 super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo,
46632 >,
46633 ::std::string::String,
46634 >,
46635 transaction: ::std::result::Result<
46636 ::serde_json::Map<::std::string::String, ::serde_json::Value>,
46637 ::std::string::String,
46638 >,
46639 }
46640 impl ::std::default::Default
46641 for PostGetTransactionWithCompressionInfoResponseResult {
46642 fn default() -> Self {
46643 Self {
46644 compression_info: Ok(Default::default()),
46645 transaction: Ok(Default::default()),
46646 }
46647 }
46648 }
46649 impl PostGetTransactionWithCompressionInfoResponseResult {
46650 pub fn compression_info<T>(mut self, value: T) -> Self
46651 where
46652 T: ::std::convert::TryInto<
46653 ::std::option::Option<
46654 super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo,
46655 >,
46656 >,
46657 T::Error: ::std::fmt::Display,
46658 {
46659 self.compression_info = value
46660 .try_into()
46661 .map_err(|e| {
46662 format!(
46663 "error converting supplied value for compression_info: {e}"
46664 )
46665 });
46666 self
46667 }
46668 pub fn transaction<T>(mut self, value: T) -> Self
46669 where
46670 T: ::std::convert::TryInto<
46671 ::serde_json::Map<::std::string::String, ::serde_json::Value>,
46672 >,
46673 T::Error: ::std::fmt::Display,
46674 {
46675 self.transaction = value
46676 .try_into()
46677 .map_err(|e| {
46678 format!("error converting supplied value for transaction: {e}")
46679 });
46680 self
46681 }
46682 }
46683 impl ::std::convert::TryFrom<PostGetTransactionWithCompressionInfoResponseResult>
46684 for super::PostGetTransactionWithCompressionInfoResponseResult {
46685 type Error = super::error::ConversionError;
46686 fn try_from(
46687 value: PostGetTransactionWithCompressionInfoResponseResult,
46688 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46689 Ok(Self {
46690 compression_info: value.compression_info?,
46691 transaction: value.transaction?,
46692 })
46693 }
46694 }
46695 impl ::std::convert::From<
46696 super::PostGetTransactionWithCompressionInfoResponseResult,
46697 > for PostGetTransactionWithCompressionInfoResponseResult {
46698 fn from(
46699 value: super::PostGetTransactionWithCompressionInfoResponseResult,
46700 ) -> Self {
46701 Self {
46702 compression_info: Ok(value.compression_info),
46703 transaction: Ok(value.transaction),
46704 }
46705 }
46706 }
46707 #[derive(Clone, Debug)]
46708 pub struct PostGetTransactionWithCompressionInfoResponseResultCompressionInfo {
46709 closed_accounts: ::std::result::Result<
46710 ::std::vec::Vec<super::AccountWithOptionalTokenData>,
46711 ::std::string::String,
46712 >,
46713 opened_accounts: ::std::result::Result<
46714 ::std::vec::Vec<super::AccountWithOptionalTokenData>,
46715 ::std::string::String,
46716 >,
46717 }
46718 impl ::std::default::Default
46719 for PostGetTransactionWithCompressionInfoResponseResultCompressionInfo {
46720 fn default() -> Self {
46721 Self {
46722 closed_accounts: Err(
46723 "no value supplied for closed_accounts".to_string(),
46724 ),
46725 opened_accounts: Err(
46726 "no value supplied for opened_accounts".to_string(),
46727 ),
46728 }
46729 }
46730 }
46731 impl PostGetTransactionWithCompressionInfoResponseResultCompressionInfo {
46732 pub fn closed_accounts<T>(mut self, value: T) -> Self
46733 where
46734 T: ::std::convert::TryInto<
46735 ::std::vec::Vec<super::AccountWithOptionalTokenData>,
46736 >,
46737 T::Error: ::std::fmt::Display,
46738 {
46739 self.closed_accounts = value
46740 .try_into()
46741 .map_err(|e| {
46742 format!(
46743 "error converting supplied value for closed_accounts: {e}"
46744 )
46745 });
46746 self
46747 }
46748 pub fn opened_accounts<T>(mut self, value: T) -> Self
46749 where
46750 T: ::std::convert::TryInto<
46751 ::std::vec::Vec<super::AccountWithOptionalTokenData>,
46752 >,
46753 T::Error: ::std::fmt::Display,
46754 {
46755 self.opened_accounts = value
46756 .try_into()
46757 .map_err(|e| {
46758 format!(
46759 "error converting supplied value for opened_accounts: {e}"
46760 )
46761 });
46762 self
46763 }
46764 }
46765 impl ::std::convert::TryFrom<
46766 PostGetTransactionWithCompressionInfoResponseResultCompressionInfo,
46767 > for super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo {
46768 type Error = super::error::ConversionError;
46769 fn try_from(
46770 value: PostGetTransactionWithCompressionInfoResponseResultCompressionInfo,
46771 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46772 Ok(Self {
46773 closed_accounts: value.closed_accounts?,
46774 opened_accounts: value.opened_accounts?,
46775 })
46776 }
46777 }
46778 impl ::std::convert::From<
46779 super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo,
46780 > for PostGetTransactionWithCompressionInfoResponseResultCompressionInfo {
46781 fn from(
46782 value: super::PostGetTransactionWithCompressionInfoResponseResultCompressionInfo,
46783 ) -> Self {
46784 Self {
46785 closed_accounts: Ok(value.closed_accounts),
46786 opened_accounts: Ok(value.opened_accounts),
46787 }
46788 }
46789 }
46790 #[derive(Clone, Debug)]
46791 pub struct PostGetTransactionWithCompressionInfoV2Body {
46792 id: ::std::result::Result<
46793 super::PostGetTransactionWithCompressionInfoV2BodyId,
46794 ::std::string::String,
46795 >,
46796 jsonrpc: ::std::result::Result<
46797 super::PostGetTransactionWithCompressionInfoV2BodyJsonrpc,
46798 ::std::string::String,
46799 >,
46800 method: ::std::result::Result<
46801 super::PostGetTransactionWithCompressionInfoV2BodyMethod,
46802 ::std::string::String,
46803 >,
46804 params: ::std::result::Result<
46805 super::PostGetTransactionWithCompressionInfoV2BodyParams,
46806 ::std::string::String,
46807 >,
46808 }
46809 impl ::std::default::Default for PostGetTransactionWithCompressionInfoV2Body {
46810 fn default() -> Self {
46811 Self {
46812 id: Err("no value supplied for id".to_string()),
46813 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
46814 method: Err("no value supplied for method".to_string()),
46815 params: Err("no value supplied for params".to_string()),
46816 }
46817 }
46818 }
46819 impl PostGetTransactionWithCompressionInfoV2Body {
46820 pub fn id<T>(mut self, value: T) -> Self
46821 where
46822 T: ::std::convert::TryInto<
46823 super::PostGetTransactionWithCompressionInfoV2BodyId,
46824 >,
46825 T::Error: ::std::fmt::Display,
46826 {
46827 self.id = value
46828 .try_into()
46829 .map_err(|e| format!("error converting supplied value for id: {e}"));
46830 self
46831 }
46832 pub fn jsonrpc<T>(mut self, value: T) -> Self
46833 where
46834 T: ::std::convert::TryInto<
46835 super::PostGetTransactionWithCompressionInfoV2BodyJsonrpc,
46836 >,
46837 T::Error: ::std::fmt::Display,
46838 {
46839 self.jsonrpc = value
46840 .try_into()
46841 .map_err(|e| {
46842 format!("error converting supplied value for jsonrpc: {e}")
46843 });
46844 self
46845 }
46846 pub fn method<T>(mut self, value: T) -> Self
46847 where
46848 T: ::std::convert::TryInto<
46849 super::PostGetTransactionWithCompressionInfoV2BodyMethod,
46850 >,
46851 T::Error: ::std::fmt::Display,
46852 {
46853 self.method = value
46854 .try_into()
46855 .map_err(|e| {
46856 format!("error converting supplied value for method: {e}")
46857 });
46858 self
46859 }
46860 pub fn params<T>(mut self, value: T) -> Self
46861 where
46862 T: ::std::convert::TryInto<
46863 super::PostGetTransactionWithCompressionInfoV2BodyParams,
46864 >,
46865 T::Error: ::std::fmt::Display,
46866 {
46867 self.params = value
46868 .try_into()
46869 .map_err(|e| {
46870 format!("error converting supplied value for params: {e}")
46871 });
46872 self
46873 }
46874 }
46875 impl ::std::convert::TryFrom<PostGetTransactionWithCompressionInfoV2Body>
46876 for super::PostGetTransactionWithCompressionInfoV2Body {
46877 type Error = super::error::ConversionError;
46878 fn try_from(
46879 value: PostGetTransactionWithCompressionInfoV2Body,
46880 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46881 Ok(Self {
46882 id: value.id?,
46883 jsonrpc: value.jsonrpc?,
46884 method: value.method?,
46885 params: value.params?,
46886 })
46887 }
46888 }
46889 impl ::std::convert::From<super::PostGetTransactionWithCompressionInfoV2Body>
46890 for PostGetTransactionWithCompressionInfoV2Body {
46891 fn from(value: super::PostGetTransactionWithCompressionInfoV2Body) -> Self {
46892 Self {
46893 id: Ok(value.id),
46894 jsonrpc: Ok(value.jsonrpc),
46895 method: Ok(value.method),
46896 params: Ok(value.params),
46897 }
46898 }
46899 }
46900 #[derive(Clone, Debug)]
46901 pub struct PostGetTransactionWithCompressionInfoV2BodyParams {
46902 signature: ::std::result::Result<
46903 super::SerializableSignature,
46904 ::std::string::String,
46905 >,
46906 }
46907 impl ::std::default::Default
46908 for PostGetTransactionWithCompressionInfoV2BodyParams {
46909 fn default() -> Self {
46910 Self {
46911 signature: Err("no value supplied for signature".to_string()),
46912 }
46913 }
46914 }
46915 impl PostGetTransactionWithCompressionInfoV2BodyParams {
46916 pub fn signature<T>(mut self, value: T) -> Self
46917 where
46918 T: ::std::convert::TryInto<super::SerializableSignature>,
46919 T::Error: ::std::fmt::Display,
46920 {
46921 self.signature = value
46922 .try_into()
46923 .map_err(|e| {
46924 format!("error converting supplied value for signature: {e}")
46925 });
46926 self
46927 }
46928 }
46929 impl ::std::convert::TryFrom<PostGetTransactionWithCompressionInfoV2BodyParams>
46930 for super::PostGetTransactionWithCompressionInfoV2BodyParams {
46931 type Error = super::error::ConversionError;
46932 fn try_from(
46933 value: PostGetTransactionWithCompressionInfoV2BodyParams,
46934 ) -> ::std::result::Result<Self, super::error::ConversionError> {
46935 Ok(Self {
46936 signature: value.signature?,
46937 })
46938 }
46939 }
46940 impl ::std::convert::From<
46941 super::PostGetTransactionWithCompressionInfoV2BodyParams,
46942 > for PostGetTransactionWithCompressionInfoV2BodyParams {
46943 fn from(
46944 value: super::PostGetTransactionWithCompressionInfoV2BodyParams,
46945 ) -> Self {
46946 Self {
46947 signature: Ok(value.signature),
46948 }
46949 }
46950 }
46951 #[derive(Clone, Debug)]
46952 pub struct PostGetTransactionWithCompressionInfoV2Response {
46953 error: ::std::result::Result<
46954 ::std::option::Option<
46955 super::PostGetTransactionWithCompressionInfoV2ResponseError,
46956 >,
46957 ::std::string::String,
46958 >,
46959 id: ::std::result::Result<
46960 super::PostGetTransactionWithCompressionInfoV2ResponseId,
46961 ::std::string::String,
46962 >,
46963 jsonrpc: ::std::result::Result<
46964 super::PostGetTransactionWithCompressionInfoV2ResponseJsonrpc,
46965 ::std::string::String,
46966 >,
46967 result: ::std::result::Result<
46968 ::std::option::Option<
46969 super::PostGetTransactionWithCompressionInfoV2ResponseResult,
46970 >,
46971 ::std::string::String,
46972 >,
46973 }
46974 impl ::std::default::Default
46975 for PostGetTransactionWithCompressionInfoV2Response {
46976 fn default() -> Self {
46977 Self {
46978 error: Ok(Default::default()),
46979 id: Err("no value supplied for id".to_string()),
46980 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
46981 result: Ok(Default::default()),
46982 }
46983 }
46984 }
46985 impl PostGetTransactionWithCompressionInfoV2Response {
46986 pub fn error<T>(mut self, value: T) -> Self
46987 where
46988 T: ::std::convert::TryInto<
46989 ::std::option::Option<
46990 super::PostGetTransactionWithCompressionInfoV2ResponseError,
46991 >,
46992 >,
46993 T::Error: ::std::fmt::Display,
46994 {
46995 self.error = value
46996 .try_into()
46997 .map_err(|e| {
46998 format!("error converting supplied value for error: {e}")
46999 });
47000 self
47001 }
47002 pub fn id<T>(mut self, value: T) -> Self
47003 where
47004 T: ::std::convert::TryInto<
47005 super::PostGetTransactionWithCompressionInfoV2ResponseId,
47006 >,
47007 T::Error: ::std::fmt::Display,
47008 {
47009 self.id = value
47010 .try_into()
47011 .map_err(|e| format!("error converting supplied value for id: {e}"));
47012 self
47013 }
47014 pub fn jsonrpc<T>(mut self, value: T) -> Self
47015 where
47016 T: ::std::convert::TryInto<
47017 super::PostGetTransactionWithCompressionInfoV2ResponseJsonrpc,
47018 >,
47019 T::Error: ::std::fmt::Display,
47020 {
47021 self.jsonrpc = value
47022 .try_into()
47023 .map_err(|e| {
47024 format!("error converting supplied value for jsonrpc: {e}")
47025 });
47026 self
47027 }
47028 pub fn result<T>(mut self, value: T) -> Self
47029 where
47030 T: ::std::convert::TryInto<
47031 ::std::option::Option<
47032 super::PostGetTransactionWithCompressionInfoV2ResponseResult,
47033 >,
47034 >,
47035 T::Error: ::std::fmt::Display,
47036 {
47037 self.result = value
47038 .try_into()
47039 .map_err(|e| {
47040 format!("error converting supplied value for result: {e}")
47041 });
47042 self
47043 }
47044 }
47045 impl ::std::convert::TryFrom<PostGetTransactionWithCompressionInfoV2Response>
47046 for super::PostGetTransactionWithCompressionInfoV2Response {
47047 type Error = super::error::ConversionError;
47048 fn try_from(
47049 value: PostGetTransactionWithCompressionInfoV2Response,
47050 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47051 Ok(Self {
47052 error: value.error?,
47053 id: value.id?,
47054 jsonrpc: value.jsonrpc?,
47055 result: value.result?,
47056 })
47057 }
47058 }
47059 impl ::std::convert::From<super::PostGetTransactionWithCompressionInfoV2Response>
47060 for PostGetTransactionWithCompressionInfoV2Response {
47061 fn from(
47062 value: super::PostGetTransactionWithCompressionInfoV2Response,
47063 ) -> Self {
47064 Self {
47065 error: Ok(value.error),
47066 id: Ok(value.id),
47067 jsonrpc: Ok(value.jsonrpc),
47068 result: Ok(value.result),
47069 }
47070 }
47071 }
47072 #[derive(Clone, Debug)]
47073 pub struct PostGetTransactionWithCompressionInfoV2ResponseError {
47074 code: ::std::result::Result<
47075 ::std::option::Option<i64>,
47076 ::std::string::String,
47077 >,
47078 message: ::std::result::Result<
47079 ::std::option::Option<::std::string::String>,
47080 ::std::string::String,
47081 >,
47082 }
47083 impl ::std::default::Default
47084 for PostGetTransactionWithCompressionInfoV2ResponseError {
47085 fn default() -> Self {
47086 Self {
47087 code: Ok(Default::default()),
47088 message: Ok(Default::default()),
47089 }
47090 }
47091 }
47092 impl PostGetTransactionWithCompressionInfoV2ResponseError {
47093 pub fn code<T>(mut self, value: T) -> Self
47094 where
47095 T: ::std::convert::TryInto<::std::option::Option<i64>>,
47096 T::Error: ::std::fmt::Display,
47097 {
47098 self.code = value
47099 .try_into()
47100 .map_err(|e| {
47101 format!("error converting supplied value for code: {e}")
47102 });
47103 self
47104 }
47105 pub fn message<T>(mut self, value: T) -> Self
47106 where
47107 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
47108 T::Error: ::std::fmt::Display,
47109 {
47110 self.message = value
47111 .try_into()
47112 .map_err(|e| {
47113 format!("error converting supplied value for message: {e}")
47114 });
47115 self
47116 }
47117 }
47118 impl ::std::convert::TryFrom<
47119 PostGetTransactionWithCompressionInfoV2ResponseError,
47120 > for super::PostGetTransactionWithCompressionInfoV2ResponseError {
47121 type Error = super::error::ConversionError;
47122 fn try_from(
47123 value: PostGetTransactionWithCompressionInfoV2ResponseError,
47124 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47125 Ok(Self {
47126 code: value.code?,
47127 message: value.message?,
47128 })
47129 }
47130 }
47131 impl ::std::convert::From<
47132 super::PostGetTransactionWithCompressionInfoV2ResponseError,
47133 > for PostGetTransactionWithCompressionInfoV2ResponseError {
47134 fn from(
47135 value: super::PostGetTransactionWithCompressionInfoV2ResponseError,
47136 ) -> Self {
47137 Self {
47138 code: Ok(value.code),
47139 message: Ok(value.message),
47140 }
47141 }
47142 }
47143 #[derive(Clone, Debug)]
47144 pub struct PostGetTransactionWithCompressionInfoV2ResponseResult {
47145 compression_info: ::std::result::Result<
47146 ::std::option::Option<
47147 super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo,
47148 >,
47149 ::std::string::String,
47150 >,
47151 transaction: ::std::result::Result<
47152 ::serde_json::Map<::std::string::String, ::serde_json::Value>,
47153 ::std::string::String,
47154 >,
47155 }
47156 impl ::std::default::Default
47157 for PostGetTransactionWithCompressionInfoV2ResponseResult {
47158 fn default() -> Self {
47159 Self {
47160 compression_info: Ok(Default::default()),
47161 transaction: Ok(Default::default()),
47162 }
47163 }
47164 }
47165 impl PostGetTransactionWithCompressionInfoV2ResponseResult {
47166 pub fn compression_info<T>(mut self, value: T) -> Self
47167 where
47168 T: ::std::convert::TryInto<
47169 ::std::option::Option<
47170 super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo,
47171 >,
47172 >,
47173 T::Error: ::std::fmt::Display,
47174 {
47175 self.compression_info = value
47176 .try_into()
47177 .map_err(|e| {
47178 format!(
47179 "error converting supplied value for compression_info: {e}"
47180 )
47181 });
47182 self
47183 }
47184 pub fn transaction<T>(mut self, value: T) -> Self
47185 where
47186 T: ::std::convert::TryInto<
47187 ::serde_json::Map<::std::string::String, ::serde_json::Value>,
47188 >,
47189 T::Error: ::std::fmt::Display,
47190 {
47191 self.transaction = value
47192 .try_into()
47193 .map_err(|e| {
47194 format!("error converting supplied value for transaction: {e}")
47195 });
47196 self
47197 }
47198 }
47199 impl ::std::convert::TryFrom<
47200 PostGetTransactionWithCompressionInfoV2ResponseResult,
47201 > for super::PostGetTransactionWithCompressionInfoV2ResponseResult {
47202 type Error = super::error::ConversionError;
47203 fn try_from(
47204 value: PostGetTransactionWithCompressionInfoV2ResponseResult,
47205 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47206 Ok(Self {
47207 compression_info: value.compression_info?,
47208 transaction: value.transaction?,
47209 })
47210 }
47211 }
47212 impl ::std::convert::From<
47213 super::PostGetTransactionWithCompressionInfoV2ResponseResult,
47214 > for PostGetTransactionWithCompressionInfoV2ResponseResult {
47215 fn from(
47216 value: super::PostGetTransactionWithCompressionInfoV2ResponseResult,
47217 ) -> Self {
47218 Self {
47219 compression_info: Ok(value.compression_info),
47220 transaction: Ok(value.transaction),
47221 }
47222 }
47223 }
47224 #[derive(Clone, Debug)]
47225 pub struct PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo {
47226 closed_accounts: ::std::result::Result<
47227 ::std::vec::Vec<super::ClosedAccountWithOptionalTokenDataV2>,
47228 ::std::string::String,
47229 >,
47230 opened_accounts: ::std::result::Result<
47231 ::std::vec::Vec<super::AccountWithOptionalTokenDataV2>,
47232 ::std::string::String,
47233 >,
47234 }
47235 impl ::std::default::Default
47236 for PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo {
47237 fn default() -> Self {
47238 Self {
47239 closed_accounts: Err(
47240 "no value supplied for closed_accounts".to_string(),
47241 ),
47242 opened_accounts: Err(
47243 "no value supplied for opened_accounts".to_string(),
47244 ),
47245 }
47246 }
47247 }
47248 impl PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo {
47249 pub fn closed_accounts<T>(mut self, value: T) -> Self
47250 where
47251 T: ::std::convert::TryInto<
47252 ::std::vec::Vec<super::ClosedAccountWithOptionalTokenDataV2>,
47253 >,
47254 T::Error: ::std::fmt::Display,
47255 {
47256 self.closed_accounts = value
47257 .try_into()
47258 .map_err(|e| {
47259 format!(
47260 "error converting supplied value for closed_accounts: {e}"
47261 )
47262 });
47263 self
47264 }
47265 pub fn opened_accounts<T>(mut self, value: T) -> Self
47266 where
47267 T: ::std::convert::TryInto<
47268 ::std::vec::Vec<super::AccountWithOptionalTokenDataV2>,
47269 >,
47270 T::Error: ::std::fmt::Display,
47271 {
47272 self.opened_accounts = value
47273 .try_into()
47274 .map_err(|e| {
47275 format!(
47276 "error converting supplied value for opened_accounts: {e}"
47277 )
47278 });
47279 self
47280 }
47281 }
47282 impl ::std::convert::TryFrom<
47283 PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo,
47284 >
47285 for super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo {
47286 type Error = super::error::ConversionError;
47287 fn try_from(
47288 value: PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo,
47289 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47290 Ok(Self {
47291 closed_accounts: value.closed_accounts?,
47292 opened_accounts: value.opened_accounts?,
47293 })
47294 }
47295 }
47296 impl ::std::convert::From<
47297 super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo,
47298 > for PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo {
47299 fn from(
47300 value: super::PostGetTransactionWithCompressionInfoV2ResponseResultCompressionInfo,
47301 ) -> Self {
47302 Self {
47303 closed_accounts: Ok(value.closed_accounts),
47304 opened_accounts: Ok(value.opened_accounts),
47305 }
47306 }
47307 }
47308 #[derive(Clone, Debug)]
47309 pub struct PostGetValidityProofBody {
47310 id: ::std::result::Result<
47311 super::PostGetValidityProofBodyId,
47312 ::std::string::String,
47313 >,
47314 jsonrpc: ::std::result::Result<
47315 super::PostGetValidityProofBodyJsonrpc,
47316 ::std::string::String,
47317 >,
47318 method: ::std::result::Result<
47319 super::PostGetValidityProofBodyMethod,
47320 ::std::string::String,
47321 >,
47322 params: ::std::result::Result<
47323 super::PostGetValidityProofBodyParams,
47324 ::std::string::String,
47325 >,
47326 }
47327 impl ::std::default::Default for PostGetValidityProofBody {
47328 fn default() -> Self {
47329 Self {
47330 id: Err("no value supplied for id".to_string()),
47331 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
47332 method: Err("no value supplied for method".to_string()),
47333 params: Err("no value supplied for params".to_string()),
47334 }
47335 }
47336 }
47337 impl PostGetValidityProofBody {
47338 pub fn id<T>(mut self, value: T) -> Self
47339 where
47340 T: ::std::convert::TryInto<super::PostGetValidityProofBodyId>,
47341 T::Error: ::std::fmt::Display,
47342 {
47343 self.id = value
47344 .try_into()
47345 .map_err(|e| format!("error converting supplied value for id: {e}"));
47346 self
47347 }
47348 pub fn jsonrpc<T>(mut self, value: T) -> Self
47349 where
47350 T: ::std::convert::TryInto<super::PostGetValidityProofBodyJsonrpc>,
47351 T::Error: ::std::fmt::Display,
47352 {
47353 self.jsonrpc = value
47354 .try_into()
47355 .map_err(|e| {
47356 format!("error converting supplied value for jsonrpc: {e}")
47357 });
47358 self
47359 }
47360 pub fn method<T>(mut self, value: T) -> Self
47361 where
47362 T: ::std::convert::TryInto<super::PostGetValidityProofBodyMethod>,
47363 T::Error: ::std::fmt::Display,
47364 {
47365 self.method = value
47366 .try_into()
47367 .map_err(|e| {
47368 format!("error converting supplied value for method: {e}")
47369 });
47370 self
47371 }
47372 pub fn params<T>(mut self, value: T) -> Self
47373 where
47374 T: ::std::convert::TryInto<super::PostGetValidityProofBodyParams>,
47375 T::Error: ::std::fmt::Display,
47376 {
47377 self.params = value
47378 .try_into()
47379 .map_err(|e| {
47380 format!("error converting supplied value for params: {e}")
47381 });
47382 self
47383 }
47384 }
47385 impl ::std::convert::TryFrom<PostGetValidityProofBody>
47386 for super::PostGetValidityProofBody {
47387 type Error = super::error::ConversionError;
47388 fn try_from(
47389 value: PostGetValidityProofBody,
47390 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47391 Ok(Self {
47392 id: value.id?,
47393 jsonrpc: value.jsonrpc?,
47394 method: value.method?,
47395 params: value.params?,
47396 })
47397 }
47398 }
47399 impl ::std::convert::From<super::PostGetValidityProofBody>
47400 for PostGetValidityProofBody {
47401 fn from(value: super::PostGetValidityProofBody) -> Self {
47402 Self {
47403 id: Ok(value.id),
47404 jsonrpc: Ok(value.jsonrpc),
47405 method: Ok(value.method),
47406 params: Ok(value.params),
47407 }
47408 }
47409 }
47410 #[derive(Clone, Debug)]
47411 pub struct PostGetValidityProofBodyParams {
47412 hashes: ::std::result::Result<
47413 ::std::vec::Vec<super::Hash>,
47414 ::std::string::String,
47415 >,
47416 new_addresses_with_trees: ::std::result::Result<
47417 ::std::vec::Vec<super::AddressWithTree>,
47418 ::std::string::String,
47419 >,
47420 }
47421 impl ::std::default::Default for PostGetValidityProofBodyParams {
47422 fn default() -> Self {
47423 Self {
47424 hashes: Ok(Default::default()),
47425 new_addresses_with_trees: Ok(Default::default()),
47426 }
47427 }
47428 }
47429 impl PostGetValidityProofBodyParams {
47430 pub fn hashes<T>(mut self, value: T) -> Self
47431 where
47432 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
47433 T::Error: ::std::fmt::Display,
47434 {
47435 self.hashes = value
47436 .try_into()
47437 .map_err(|e| {
47438 format!("error converting supplied value for hashes: {e}")
47439 });
47440 self
47441 }
47442 pub fn new_addresses_with_trees<T>(mut self, value: T) -> Self
47443 where
47444 T: ::std::convert::TryInto<::std::vec::Vec<super::AddressWithTree>>,
47445 T::Error: ::std::fmt::Display,
47446 {
47447 self.new_addresses_with_trees = value
47448 .try_into()
47449 .map_err(|e| {
47450 format!(
47451 "error converting supplied value for new_addresses_with_trees: {e}"
47452 )
47453 });
47454 self
47455 }
47456 }
47457 impl ::std::convert::TryFrom<PostGetValidityProofBodyParams>
47458 for super::PostGetValidityProofBodyParams {
47459 type Error = super::error::ConversionError;
47460 fn try_from(
47461 value: PostGetValidityProofBodyParams,
47462 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47463 Ok(Self {
47464 hashes: value.hashes?,
47465 new_addresses_with_trees: value.new_addresses_with_trees?,
47466 })
47467 }
47468 }
47469 impl ::std::convert::From<super::PostGetValidityProofBodyParams>
47470 for PostGetValidityProofBodyParams {
47471 fn from(value: super::PostGetValidityProofBodyParams) -> Self {
47472 Self {
47473 hashes: Ok(value.hashes),
47474 new_addresses_with_trees: Ok(value.new_addresses_with_trees),
47475 }
47476 }
47477 }
47478 #[derive(Clone, Debug)]
47479 pub struct PostGetValidityProofResponse {
47480 error: ::std::result::Result<
47481 ::std::option::Option<super::PostGetValidityProofResponseError>,
47482 ::std::string::String,
47483 >,
47484 id: ::std::result::Result<
47485 super::PostGetValidityProofResponseId,
47486 ::std::string::String,
47487 >,
47488 jsonrpc: ::std::result::Result<
47489 super::PostGetValidityProofResponseJsonrpc,
47490 ::std::string::String,
47491 >,
47492 result: ::std::result::Result<
47493 ::std::option::Option<super::PostGetValidityProofResponseResult>,
47494 ::std::string::String,
47495 >,
47496 }
47497 impl ::std::default::Default for PostGetValidityProofResponse {
47498 fn default() -> Self {
47499 Self {
47500 error: Ok(Default::default()),
47501 id: Err("no value supplied for id".to_string()),
47502 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
47503 result: Ok(Default::default()),
47504 }
47505 }
47506 }
47507 impl PostGetValidityProofResponse {
47508 pub fn error<T>(mut self, value: T) -> Self
47509 where
47510 T: ::std::convert::TryInto<
47511 ::std::option::Option<super::PostGetValidityProofResponseError>,
47512 >,
47513 T::Error: ::std::fmt::Display,
47514 {
47515 self.error = value
47516 .try_into()
47517 .map_err(|e| {
47518 format!("error converting supplied value for error: {e}")
47519 });
47520 self
47521 }
47522 pub fn id<T>(mut self, value: T) -> Self
47523 where
47524 T: ::std::convert::TryInto<super::PostGetValidityProofResponseId>,
47525 T::Error: ::std::fmt::Display,
47526 {
47527 self.id = value
47528 .try_into()
47529 .map_err(|e| format!("error converting supplied value for id: {e}"));
47530 self
47531 }
47532 pub fn jsonrpc<T>(mut self, value: T) -> Self
47533 where
47534 T: ::std::convert::TryInto<super::PostGetValidityProofResponseJsonrpc>,
47535 T::Error: ::std::fmt::Display,
47536 {
47537 self.jsonrpc = value
47538 .try_into()
47539 .map_err(|e| {
47540 format!("error converting supplied value for jsonrpc: {e}")
47541 });
47542 self
47543 }
47544 pub fn result<T>(mut self, value: T) -> Self
47545 where
47546 T: ::std::convert::TryInto<
47547 ::std::option::Option<super::PostGetValidityProofResponseResult>,
47548 >,
47549 T::Error: ::std::fmt::Display,
47550 {
47551 self.result = value
47552 .try_into()
47553 .map_err(|e| {
47554 format!("error converting supplied value for result: {e}")
47555 });
47556 self
47557 }
47558 }
47559 impl ::std::convert::TryFrom<PostGetValidityProofResponse>
47560 for super::PostGetValidityProofResponse {
47561 type Error = super::error::ConversionError;
47562 fn try_from(
47563 value: PostGetValidityProofResponse,
47564 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47565 Ok(Self {
47566 error: value.error?,
47567 id: value.id?,
47568 jsonrpc: value.jsonrpc?,
47569 result: value.result?,
47570 })
47571 }
47572 }
47573 impl ::std::convert::From<super::PostGetValidityProofResponse>
47574 for PostGetValidityProofResponse {
47575 fn from(value: super::PostGetValidityProofResponse) -> Self {
47576 Self {
47577 error: Ok(value.error),
47578 id: Ok(value.id),
47579 jsonrpc: Ok(value.jsonrpc),
47580 result: Ok(value.result),
47581 }
47582 }
47583 }
47584 #[derive(Clone, Debug)]
47585 pub struct PostGetValidityProofResponseError {
47586 code: ::std::result::Result<
47587 ::std::option::Option<i64>,
47588 ::std::string::String,
47589 >,
47590 message: ::std::result::Result<
47591 ::std::option::Option<::std::string::String>,
47592 ::std::string::String,
47593 >,
47594 }
47595 impl ::std::default::Default for PostGetValidityProofResponseError {
47596 fn default() -> Self {
47597 Self {
47598 code: Ok(Default::default()),
47599 message: Ok(Default::default()),
47600 }
47601 }
47602 }
47603 impl PostGetValidityProofResponseError {
47604 pub fn code<T>(mut self, value: T) -> Self
47605 where
47606 T: ::std::convert::TryInto<::std::option::Option<i64>>,
47607 T::Error: ::std::fmt::Display,
47608 {
47609 self.code = value
47610 .try_into()
47611 .map_err(|e| {
47612 format!("error converting supplied value for code: {e}")
47613 });
47614 self
47615 }
47616 pub fn message<T>(mut self, value: T) -> Self
47617 where
47618 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
47619 T::Error: ::std::fmt::Display,
47620 {
47621 self.message = value
47622 .try_into()
47623 .map_err(|e| {
47624 format!("error converting supplied value for message: {e}")
47625 });
47626 self
47627 }
47628 }
47629 impl ::std::convert::TryFrom<PostGetValidityProofResponseError>
47630 for super::PostGetValidityProofResponseError {
47631 type Error = super::error::ConversionError;
47632 fn try_from(
47633 value: PostGetValidityProofResponseError,
47634 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47635 Ok(Self {
47636 code: value.code?,
47637 message: value.message?,
47638 })
47639 }
47640 }
47641 impl ::std::convert::From<super::PostGetValidityProofResponseError>
47642 for PostGetValidityProofResponseError {
47643 fn from(value: super::PostGetValidityProofResponseError) -> Self {
47644 Self {
47645 code: Ok(value.code),
47646 message: Ok(value.message),
47647 }
47648 }
47649 }
47650 #[derive(Clone, Debug)]
47651 pub struct PostGetValidityProofResponseResult {
47652 context: ::std::result::Result<super::Context, ::std::string::String>,
47653 value: ::std::result::Result<
47654 super::CompressedProofWithContext,
47655 ::std::string::String,
47656 >,
47657 }
47658 impl ::std::default::Default for PostGetValidityProofResponseResult {
47659 fn default() -> Self {
47660 Self {
47661 context: Err("no value supplied for context".to_string()),
47662 value: Err("no value supplied for value".to_string()),
47663 }
47664 }
47665 }
47666 impl PostGetValidityProofResponseResult {
47667 pub fn context<T>(mut self, value: T) -> Self
47668 where
47669 T: ::std::convert::TryInto<super::Context>,
47670 T::Error: ::std::fmt::Display,
47671 {
47672 self.context = value
47673 .try_into()
47674 .map_err(|e| {
47675 format!("error converting supplied value for context: {e}")
47676 });
47677 self
47678 }
47679 pub fn value<T>(mut self, value: T) -> Self
47680 where
47681 T: ::std::convert::TryInto<super::CompressedProofWithContext>,
47682 T::Error: ::std::fmt::Display,
47683 {
47684 self.value = value
47685 .try_into()
47686 .map_err(|e| {
47687 format!("error converting supplied value for value: {e}")
47688 });
47689 self
47690 }
47691 }
47692 impl ::std::convert::TryFrom<PostGetValidityProofResponseResult>
47693 for super::PostGetValidityProofResponseResult {
47694 type Error = super::error::ConversionError;
47695 fn try_from(
47696 value: PostGetValidityProofResponseResult,
47697 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47698 Ok(Self {
47699 context: value.context?,
47700 value: value.value?,
47701 })
47702 }
47703 }
47704 impl ::std::convert::From<super::PostGetValidityProofResponseResult>
47705 for PostGetValidityProofResponseResult {
47706 fn from(value: super::PostGetValidityProofResponseResult) -> Self {
47707 Self {
47708 context: Ok(value.context),
47709 value: Ok(value.value),
47710 }
47711 }
47712 }
47713 #[derive(Clone, Debug)]
47714 pub struct PostGetValidityProofV2Body {
47715 id: ::std::result::Result<
47716 super::PostGetValidityProofV2BodyId,
47717 ::std::string::String,
47718 >,
47719 jsonrpc: ::std::result::Result<
47720 super::PostGetValidityProofV2BodyJsonrpc,
47721 ::std::string::String,
47722 >,
47723 method: ::std::result::Result<
47724 super::PostGetValidityProofV2BodyMethod,
47725 ::std::string::String,
47726 >,
47727 params: ::std::result::Result<
47728 super::PostGetValidityProofV2BodyParams,
47729 ::std::string::String,
47730 >,
47731 }
47732 impl ::std::default::Default for PostGetValidityProofV2Body {
47733 fn default() -> Self {
47734 Self {
47735 id: Err("no value supplied for id".to_string()),
47736 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
47737 method: Err("no value supplied for method".to_string()),
47738 params: Err("no value supplied for params".to_string()),
47739 }
47740 }
47741 }
47742 impl PostGetValidityProofV2Body {
47743 pub fn id<T>(mut self, value: T) -> Self
47744 where
47745 T: ::std::convert::TryInto<super::PostGetValidityProofV2BodyId>,
47746 T::Error: ::std::fmt::Display,
47747 {
47748 self.id = value
47749 .try_into()
47750 .map_err(|e| format!("error converting supplied value for id: {e}"));
47751 self
47752 }
47753 pub fn jsonrpc<T>(mut self, value: T) -> Self
47754 where
47755 T: ::std::convert::TryInto<super::PostGetValidityProofV2BodyJsonrpc>,
47756 T::Error: ::std::fmt::Display,
47757 {
47758 self.jsonrpc = value
47759 .try_into()
47760 .map_err(|e| {
47761 format!("error converting supplied value for jsonrpc: {e}")
47762 });
47763 self
47764 }
47765 pub fn method<T>(mut self, value: T) -> Self
47766 where
47767 T: ::std::convert::TryInto<super::PostGetValidityProofV2BodyMethod>,
47768 T::Error: ::std::fmt::Display,
47769 {
47770 self.method = value
47771 .try_into()
47772 .map_err(|e| {
47773 format!("error converting supplied value for method: {e}")
47774 });
47775 self
47776 }
47777 pub fn params<T>(mut self, value: T) -> Self
47778 where
47779 T: ::std::convert::TryInto<super::PostGetValidityProofV2BodyParams>,
47780 T::Error: ::std::fmt::Display,
47781 {
47782 self.params = value
47783 .try_into()
47784 .map_err(|e| {
47785 format!("error converting supplied value for params: {e}")
47786 });
47787 self
47788 }
47789 }
47790 impl ::std::convert::TryFrom<PostGetValidityProofV2Body>
47791 for super::PostGetValidityProofV2Body {
47792 type Error = super::error::ConversionError;
47793 fn try_from(
47794 value: PostGetValidityProofV2Body,
47795 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47796 Ok(Self {
47797 id: value.id?,
47798 jsonrpc: value.jsonrpc?,
47799 method: value.method?,
47800 params: value.params?,
47801 })
47802 }
47803 }
47804 impl ::std::convert::From<super::PostGetValidityProofV2Body>
47805 for PostGetValidityProofV2Body {
47806 fn from(value: super::PostGetValidityProofV2Body) -> Self {
47807 Self {
47808 id: Ok(value.id),
47809 jsonrpc: Ok(value.jsonrpc),
47810 method: Ok(value.method),
47811 params: Ok(value.params),
47812 }
47813 }
47814 }
47815 #[derive(Clone, Debug)]
47816 pub struct PostGetValidityProofV2BodyParams {
47817 hashes: ::std::result::Result<
47818 ::std::vec::Vec<super::Hash>,
47819 ::std::string::String,
47820 >,
47821 new_addresses_with_trees: ::std::result::Result<
47822 ::std::vec::Vec<super::AddressWithTree>,
47823 ::std::string::String,
47824 >,
47825 }
47826 impl ::std::default::Default for PostGetValidityProofV2BodyParams {
47827 fn default() -> Self {
47828 Self {
47829 hashes: Ok(Default::default()),
47830 new_addresses_with_trees: Ok(Default::default()),
47831 }
47832 }
47833 }
47834 impl PostGetValidityProofV2BodyParams {
47835 pub fn hashes<T>(mut self, value: T) -> Self
47836 where
47837 T: ::std::convert::TryInto<::std::vec::Vec<super::Hash>>,
47838 T::Error: ::std::fmt::Display,
47839 {
47840 self.hashes = value
47841 .try_into()
47842 .map_err(|e| {
47843 format!("error converting supplied value for hashes: {e}")
47844 });
47845 self
47846 }
47847 pub fn new_addresses_with_trees<T>(mut self, value: T) -> Self
47848 where
47849 T: ::std::convert::TryInto<::std::vec::Vec<super::AddressWithTree>>,
47850 T::Error: ::std::fmt::Display,
47851 {
47852 self.new_addresses_with_trees = value
47853 .try_into()
47854 .map_err(|e| {
47855 format!(
47856 "error converting supplied value for new_addresses_with_trees: {e}"
47857 )
47858 });
47859 self
47860 }
47861 }
47862 impl ::std::convert::TryFrom<PostGetValidityProofV2BodyParams>
47863 for super::PostGetValidityProofV2BodyParams {
47864 type Error = super::error::ConversionError;
47865 fn try_from(
47866 value: PostGetValidityProofV2BodyParams,
47867 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47868 Ok(Self {
47869 hashes: value.hashes?,
47870 new_addresses_with_trees: value.new_addresses_with_trees?,
47871 })
47872 }
47873 }
47874 impl ::std::convert::From<super::PostGetValidityProofV2BodyParams>
47875 for PostGetValidityProofV2BodyParams {
47876 fn from(value: super::PostGetValidityProofV2BodyParams) -> Self {
47877 Self {
47878 hashes: Ok(value.hashes),
47879 new_addresses_with_trees: Ok(value.new_addresses_with_trees),
47880 }
47881 }
47882 }
47883 #[derive(Clone, Debug)]
47884 pub struct PostGetValidityProofV2Response {
47885 error: ::std::result::Result<
47886 ::std::option::Option<super::PostGetValidityProofV2ResponseError>,
47887 ::std::string::String,
47888 >,
47889 id: ::std::result::Result<
47890 super::PostGetValidityProofV2ResponseId,
47891 ::std::string::String,
47892 >,
47893 jsonrpc: ::std::result::Result<
47894 super::PostGetValidityProofV2ResponseJsonrpc,
47895 ::std::string::String,
47896 >,
47897 result: ::std::result::Result<
47898 ::std::option::Option<super::PostGetValidityProofV2ResponseResult>,
47899 ::std::string::String,
47900 >,
47901 }
47902 impl ::std::default::Default for PostGetValidityProofV2Response {
47903 fn default() -> Self {
47904 Self {
47905 error: Ok(Default::default()),
47906 id: Err("no value supplied for id".to_string()),
47907 jsonrpc: Err("no value supplied for jsonrpc".to_string()),
47908 result: Ok(Default::default()),
47909 }
47910 }
47911 }
47912 impl PostGetValidityProofV2Response {
47913 pub fn error<T>(mut self, value: T) -> Self
47914 where
47915 T: ::std::convert::TryInto<
47916 ::std::option::Option<super::PostGetValidityProofV2ResponseError>,
47917 >,
47918 T::Error: ::std::fmt::Display,
47919 {
47920 self.error = value
47921 .try_into()
47922 .map_err(|e| {
47923 format!("error converting supplied value for error: {e}")
47924 });
47925 self
47926 }
47927 pub fn id<T>(mut self, value: T) -> Self
47928 where
47929 T: ::std::convert::TryInto<super::PostGetValidityProofV2ResponseId>,
47930 T::Error: ::std::fmt::Display,
47931 {
47932 self.id = value
47933 .try_into()
47934 .map_err(|e| format!("error converting supplied value for id: {e}"));
47935 self
47936 }
47937 pub fn jsonrpc<T>(mut self, value: T) -> Self
47938 where
47939 T: ::std::convert::TryInto<super::PostGetValidityProofV2ResponseJsonrpc>,
47940 T::Error: ::std::fmt::Display,
47941 {
47942 self.jsonrpc = value
47943 .try_into()
47944 .map_err(|e| {
47945 format!("error converting supplied value for jsonrpc: {e}")
47946 });
47947 self
47948 }
47949 pub fn result<T>(mut self, value: T) -> Self
47950 where
47951 T: ::std::convert::TryInto<
47952 ::std::option::Option<super::PostGetValidityProofV2ResponseResult>,
47953 >,
47954 T::Error: ::std::fmt::Display,
47955 {
47956 self.result = value
47957 .try_into()
47958 .map_err(|e| {
47959 format!("error converting supplied value for result: {e}")
47960 });
47961 self
47962 }
47963 }
47964 impl ::std::convert::TryFrom<PostGetValidityProofV2Response>
47965 for super::PostGetValidityProofV2Response {
47966 type Error = super::error::ConversionError;
47967 fn try_from(
47968 value: PostGetValidityProofV2Response,
47969 ) -> ::std::result::Result<Self, super::error::ConversionError> {
47970 Ok(Self {
47971 error: value.error?,
47972 id: value.id?,
47973 jsonrpc: value.jsonrpc?,
47974 result: value.result?,
47975 })
47976 }
47977 }
47978 impl ::std::convert::From<super::PostGetValidityProofV2Response>
47979 for PostGetValidityProofV2Response {
47980 fn from(value: super::PostGetValidityProofV2Response) -> Self {
47981 Self {
47982 error: Ok(value.error),
47983 id: Ok(value.id),
47984 jsonrpc: Ok(value.jsonrpc),
47985 result: Ok(value.result),
47986 }
47987 }
47988 }
47989 #[derive(Clone, Debug)]
47990 pub struct PostGetValidityProofV2ResponseError {
47991 code: ::std::result::Result<
47992 ::std::option::Option<i64>,
47993 ::std::string::String,
47994 >,
47995 message: ::std::result::Result<
47996 ::std::option::Option<::std::string::String>,
47997 ::std::string::String,
47998 >,
47999 }
48000 impl ::std::default::Default for PostGetValidityProofV2ResponseError {
48001 fn default() -> Self {
48002 Self {
48003 code: Ok(Default::default()),
48004 message: Ok(Default::default()),
48005 }
48006 }
48007 }
48008 impl PostGetValidityProofV2ResponseError {
48009 pub fn code<T>(mut self, value: T) -> Self
48010 where
48011 T: ::std::convert::TryInto<::std::option::Option<i64>>,
48012 T::Error: ::std::fmt::Display,
48013 {
48014 self.code = value
48015 .try_into()
48016 .map_err(|e| {
48017 format!("error converting supplied value for code: {e}")
48018 });
48019 self
48020 }
48021 pub fn message<T>(mut self, value: T) -> Self
48022 where
48023 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48024 T::Error: ::std::fmt::Display,
48025 {
48026 self.message = value
48027 .try_into()
48028 .map_err(|e| {
48029 format!("error converting supplied value for message: {e}")
48030 });
48031 self
48032 }
48033 }
48034 impl ::std::convert::TryFrom<PostGetValidityProofV2ResponseError>
48035 for super::PostGetValidityProofV2ResponseError {
48036 type Error = super::error::ConversionError;
48037 fn try_from(
48038 value: PostGetValidityProofV2ResponseError,
48039 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48040 Ok(Self {
48041 code: value.code?,
48042 message: value.message?,
48043 })
48044 }
48045 }
48046 impl ::std::convert::From<super::PostGetValidityProofV2ResponseError>
48047 for PostGetValidityProofV2ResponseError {
48048 fn from(value: super::PostGetValidityProofV2ResponseError) -> Self {
48049 Self {
48050 code: Ok(value.code),
48051 message: Ok(value.message),
48052 }
48053 }
48054 }
48055 #[derive(Clone, Debug)]
48056 pub struct PostGetValidityProofV2ResponseResult {
48057 context: ::std::result::Result<super::Context, ::std::string::String>,
48058 value: ::std::result::Result<
48059 super::CompressedProofWithContextV2,
48060 ::std::string::String,
48061 >,
48062 }
48063 impl ::std::default::Default for PostGetValidityProofV2ResponseResult {
48064 fn default() -> Self {
48065 Self {
48066 context: Err("no value supplied for context".to_string()),
48067 value: Err("no value supplied for value".to_string()),
48068 }
48069 }
48070 }
48071 impl PostGetValidityProofV2ResponseResult {
48072 pub fn context<T>(mut self, value: T) -> Self
48073 where
48074 T: ::std::convert::TryInto<super::Context>,
48075 T::Error: ::std::fmt::Display,
48076 {
48077 self.context = value
48078 .try_into()
48079 .map_err(|e| {
48080 format!("error converting supplied value for context: {e}")
48081 });
48082 self
48083 }
48084 pub fn value<T>(mut self, value: T) -> Self
48085 where
48086 T: ::std::convert::TryInto<super::CompressedProofWithContextV2>,
48087 T::Error: ::std::fmt::Display,
48088 {
48089 self.value = value
48090 .try_into()
48091 .map_err(|e| {
48092 format!("error converting supplied value for value: {e}")
48093 });
48094 self
48095 }
48096 }
48097 impl ::std::convert::TryFrom<PostGetValidityProofV2ResponseResult>
48098 for super::PostGetValidityProofV2ResponseResult {
48099 type Error = super::error::ConversionError;
48100 fn try_from(
48101 value: PostGetValidityProofV2ResponseResult,
48102 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48103 Ok(Self {
48104 context: value.context?,
48105 value: value.value?,
48106 })
48107 }
48108 }
48109 impl ::std::convert::From<super::PostGetValidityProofV2ResponseResult>
48110 for PostGetValidityProofV2ResponseResult {
48111 fn from(value: super::PostGetValidityProofV2ResponseResult) -> Self {
48112 Self {
48113 context: Ok(value.context),
48114 value: Ok(value.value),
48115 }
48116 }
48117 }
48118 #[derive(Clone, Debug)]
48119 pub struct QueueInfo {
48120 queue: ::std::result::Result<::std::string::String, ::std::string::String>,
48121 queue_size: ::std::result::Result<u64, ::std::string::String>,
48122 queue_type: ::std::result::Result<u8, ::std::string::String>,
48123 tree: ::std::result::Result<::std::string::String, ::std::string::String>,
48124 }
48125 impl ::std::default::Default for QueueInfo {
48126 fn default() -> Self {
48127 Self {
48128 queue: Err("no value supplied for queue".to_string()),
48129 queue_size: Err("no value supplied for queue_size".to_string()),
48130 queue_type: Err("no value supplied for queue_type".to_string()),
48131 tree: Err("no value supplied for tree".to_string()),
48132 }
48133 }
48134 }
48135 impl QueueInfo {
48136 pub fn queue<T>(mut self, value: T) -> Self
48137 where
48138 T: ::std::convert::TryInto<::std::string::String>,
48139 T::Error: ::std::fmt::Display,
48140 {
48141 self.queue = value
48142 .try_into()
48143 .map_err(|e| {
48144 format!("error converting supplied value for queue: {e}")
48145 });
48146 self
48147 }
48148 pub fn queue_size<T>(mut self, value: T) -> Self
48149 where
48150 T: ::std::convert::TryInto<u64>,
48151 T::Error: ::std::fmt::Display,
48152 {
48153 self.queue_size = value
48154 .try_into()
48155 .map_err(|e| {
48156 format!("error converting supplied value for queue_size: {e}")
48157 });
48158 self
48159 }
48160 pub fn queue_type<T>(mut self, value: T) -> Self
48161 where
48162 T: ::std::convert::TryInto<u8>,
48163 T::Error: ::std::fmt::Display,
48164 {
48165 self.queue_type = value
48166 .try_into()
48167 .map_err(|e| {
48168 format!("error converting supplied value for queue_type: {e}")
48169 });
48170 self
48171 }
48172 pub fn tree<T>(mut self, value: T) -> Self
48173 where
48174 T: ::std::convert::TryInto<::std::string::String>,
48175 T::Error: ::std::fmt::Display,
48176 {
48177 self.tree = value
48178 .try_into()
48179 .map_err(|e| {
48180 format!("error converting supplied value for tree: {e}")
48181 });
48182 self
48183 }
48184 }
48185 impl ::std::convert::TryFrom<QueueInfo> for super::QueueInfo {
48186 type Error = super::error::ConversionError;
48187 fn try_from(
48188 value: QueueInfo,
48189 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48190 Ok(Self {
48191 queue: value.queue?,
48192 queue_size: value.queue_size?,
48193 queue_type: value.queue_type?,
48194 tree: value.tree?,
48195 })
48196 }
48197 }
48198 impl ::std::convert::From<super::QueueInfo> for QueueInfo {
48199 fn from(value: super::QueueInfo) -> Self {
48200 Self {
48201 queue: Ok(value.queue),
48202 queue_size: Ok(value.queue_size),
48203 queue_type: Ok(value.queue_type),
48204 tree: Ok(value.tree),
48205 }
48206 }
48207 }
48208 #[derive(Clone, Debug)]
48209 pub struct QueueRequest {
48210 limit: ::std::result::Result<u16, ::std::string::String>,
48211 start_index: ::std::result::Result<
48212 ::std::option::Option<u64>,
48213 ::std::string::String,
48214 >,
48215 zkp_batch_size: ::std::result::Result<
48216 ::std::option::Option<u16>,
48217 ::std::string::String,
48218 >,
48219 }
48220 impl ::std::default::Default for QueueRequest {
48221 fn default() -> Self {
48222 Self {
48223 limit: Err("no value supplied for limit".to_string()),
48224 start_index: Ok(Default::default()),
48225 zkp_batch_size: Ok(Default::default()),
48226 }
48227 }
48228 }
48229 impl QueueRequest {
48230 pub fn limit<T>(mut self, value: T) -> Self
48231 where
48232 T: ::std::convert::TryInto<u16>,
48233 T::Error: ::std::fmt::Display,
48234 {
48235 self.limit = value
48236 .try_into()
48237 .map_err(|e| {
48238 format!("error converting supplied value for limit: {e}")
48239 });
48240 self
48241 }
48242 pub fn start_index<T>(mut self, value: T) -> Self
48243 where
48244 T: ::std::convert::TryInto<::std::option::Option<u64>>,
48245 T::Error: ::std::fmt::Display,
48246 {
48247 self.start_index = value
48248 .try_into()
48249 .map_err(|e| {
48250 format!("error converting supplied value for start_index: {e}")
48251 });
48252 self
48253 }
48254 pub fn zkp_batch_size<T>(mut self, value: T) -> Self
48255 where
48256 T: ::std::convert::TryInto<::std::option::Option<u16>>,
48257 T::Error: ::std::fmt::Display,
48258 {
48259 self.zkp_batch_size = value
48260 .try_into()
48261 .map_err(|e| {
48262 format!(
48263 "error converting supplied value for zkp_batch_size: {e}"
48264 )
48265 });
48266 self
48267 }
48268 }
48269 impl ::std::convert::TryFrom<QueueRequest> for super::QueueRequest {
48270 type Error = super::error::ConversionError;
48271 fn try_from(
48272 value: QueueRequest,
48273 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48274 Ok(Self {
48275 limit: value.limit?,
48276 start_index: value.start_index?,
48277 zkp_batch_size: value.zkp_batch_size?,
48278 })
48279 }
48280 }
48281 impl ::std::convert::From<super::QueueRequest> for QueueRequest {
48282 fn from(value: super::QueueRequest) -> Self {
48283 Self {
48284 limit: Ok(value.limit),
48285 start_index: Ok(value.start_index),
48286 zkp_batch_size: Ok(value.zkp_batch_size),
48287 }
48288 }
48289 }
48290 #[derive(Clone, Debug)]
48291 pub struct RootIndex {
48292 prove_by_index: ::std::result::Result<bool, ::std::string::String>,
48293 root_index: ::std::result::Result<u64, ::std::string::String>,
48294 }
48295 impl ::std::default::Default for RootIndex {
48296 fn default() -> Self {
48297 Self {
48298 prove_by_index: Err(
48299 "no value supplied for prove_by_index".to_string(),
48300 ),
48301 root_index: Err("no value supplied for root_index".to_string()),
48302 }
48303 }
48304 }
48305 impl RootIndex {
48306 pub fn prove_by_index<T>(mut self, value: T) -> Self
48307 where
48308 T: ::std::convert::TryInto<bool>,
48309 T::Error: ::std::fmt::Display,
48310 {
48311 self.prove_by_index = value
48312 .try_into()
48313 .map_err(|e| {
48314 format!(
48315 "error converting supplied value for prove_by_index: {e}"
48316 )
48317 });
48318 self
48319 }
48320 pub fn root_index<T>(mut self, value: T) -> Self
48321 where
48322 T: ::std::convert::TryInto<u64>,
48323 T::Error: ::std::fmt::Display,
48324 {
48325 self.root_index = value
48326 .try_into()
48327 .map_err(|e| {
48328 format!("error converting supplied value for root_index: {e}")
48329 });
48330 self
48331 }
48332 }
48333 impl ::std::convert::TryFrom<RootIndex> for super::RootIndex {
48334 type Error = super::error::ConversionError;
48335 fn try_from(
48336 value: RootIndex,
48337 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48338 Ok(Self {
48339 prove_by_index: value.prove_by_index?,
48340 root_index: value.root_index?,
48341 })
48342 }
48343 }
48344 impl ::std::convert::From<super::RootIndex> for RootIndex {
48345 fn from(value: super::RootIndex) -> Self {
48346 Self {
48347 prove_by_index: Ok(value.prove_by_index),
48348 root_index: Ok(value.root_index),
48349 }
48350 }
48351 }
48352 #[derive(Clone, Debug)]
48353 pub struct SignatureInfo {
48354 block_time: ::std::result::Result<
48355 super::UnixTimestamp,
48356 ::std::string::String,
48357 >,
48358 signature: ::std::result::Result<
48359 super::SerializableSignature,
48360 ::std::string::String,
48361 >,
48362 slot: ::std::result::Result<super::UnsignedInteger, ::std::string::String>,
48363 }
48364 impl ::std::default::Default for SignatureInfo {
48365 fn default() -> Self {
48366 Self {
48367 block_time: Err("no value supplied for block_time".to_string()),
48368 signature: Err("no value supplied for signature".to_string()),
48369 slot: Err("no value supplied for slot".to_string()),
48370 }
48371 }
48372 }
48373 impl SignatureInfo {
48374 pub fn block_time<T>(mut self, value: T) -> Self
48375 where
48376 T: ::std::convert::TryInto<super::UnixTimestamp>,
48377 T::Error: ::std::fmt::Display,
48378 {
48379 self.block_time = value
48380 .try_into()
48381 .map_err(|e| {
48382 format!("error converting supplied value for block_time: {e}")
48383 });
48384 self
48385 }
48386 pub fn signature<T>(mut self, value: T) -> Self
48387 where
48388 T: ::std::convert::TryInto<super::SerializableSignature>,
48389 T::Error: ::std::fmt::Display,
48390 {
48391 self.signature = value
48392 .try_into()
48393 .map_err(|e| {
48394 format!("error converting supplied value for signature: {e}")
48395 });
48396 self
48397 }
48398 pub fn slot<T>(mut self, value: T) -> Self
48399 where
48400 T: ::std::convert::TryInto<super::UnsignedInteger>,
48401 T::Error: ::std::fmt::Display,
48402 {
48403 self.slot = value
48404 .try_into()
48405 .map_err(|e| {
48406 format!("error converting supplied value for slot: {e}")
48407 });
48408 self
48409 }
48410 }
48411 impl ::std::convert::TryFrom<SignatureInfo> for super::SignatureInfo {
48412 type Error = super::error::ConversionError;
48413 fn try_from(
48414 value: SignatureInfo,
48415 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48416 Ok(Self {
48417 block_time: value.block_time?,
48418 signature: value.signature?,
48419 slot: value.slot?,
48420 })
48421 }
48422 }
48423 impl ::std::convert::From<super::SignatureInfo> for SignatureInfo {
48424 fn from(value: super::SignatureInfo) -> Self {
48425 Self {
48426 block_time: Ok(value.block_time),
48427 signature: Ok(value.signature),
48428 slot: Ok(value.slot),
48429 }
48430 }
48431 }
48432 #[derive(Clone, Debug)]
48433 pub struct SignatureInfoList {
48434 items: ::std::result::Result<
48435 ::std::vec::Vec<super::SignatureInfo>,
48436 ::std::string::String,
48437 >,
48438 }
48439 impl ::std::default::Default for SignatureInfoList {
48440 fn default() -> Self {
48441 Self {
48442 items: Err("no value supplied for items".to_string()),
48443 }
48444 }
48445 }
48446 impl SignatureInfoList {
48447 pub fn items<T>(mut self, value: T) -> Self
48448 where
48449 T: ::std::convert::TryInto<::std::vec::Vec<super::SignatureInfo>>,
48450 T::Error: ::std::fmt::Display,
48451 {
48452 self.items = value
48453 .try_into()
48454 .map_err(|e| {
48455 format!("error converting supplied value for items: {e}")
48456 });
48457 self
48458 }
48459 }
48460 impl ::std::convert::TryFrom<SignatureInfoList> for super::SignatureInfoList {
48461 type Error = super::error::ConversionError;
48462 fn try_from(
48463 value: SignatureInfoList,
48464 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48465 Ok(Self { items: value.items? })
48466 }
48467 }
48468 impl ::std::convert::From<super::SignatureInfoList> for SignatureInfoList {
48469 fn from(value: super::SignatureInfoList) -> Self {
48470 Self { items: Ok(value.items) }
48471 }
48472 }
48473 #[derive(Clone, Debug)]
48474 pub struct SignatureInfoListWithError {
48475 items: ::std::result::Result<
48476 ::std::vec::Vec<super::SignatureInfoWithError>,
48477 ::std::string::String,
48478 >,
48479 }
48480 impl ::std::default::Default for SignatureInfoListWithError {
48481 fn default() -> Self {
48482 Self {
48483 items: Err("no value supplied for items".to_string()),
48484 }
48485 }
48486 }
48487 impl SignatureInfoListWithError {
48488 pub fn items<T>(mut self, value: T) -> Self
48489 where
48490 T: ::std::convert::TryInto<
48491 ::std::vec::Vec<super::SignatureInfoWithError>,
48492 >,
48493 T::Error: ::std::fmt::Display,
48494 {
48495 self.items = value
48496 .try_into()
48497 .map_err(|e| {
48498 format!("error converting supplied value for items: {e}")
48499 });
48500 self
48501 }
48502 }
48503 impl ::std::convert::TryFrom<SignatureInfoListWithError>
48504 for super::SignatureInfoListWithError {
48505 type Error = super::error::ConversionError;
48506 fn try_from(
48507 value: SignatureInfoListWithError,
48508 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48509 Ok(Self { items: value.items? })
48510 }
48511 }
48512 impl ::std::convert::From<super::SignatureInfoListWithError>
48513 for SignatureInfoListWithError {
48514 fn from(value: super::SignatureInfoListWithError) -> Self {
48515 Self { items: Ok(value.items) }
48516 }
48517 }
48518 #[derive(Clone, Debug)]
48519 pub struct SignatureInfoWithError {
48520 block_time: ::std::result::Result<
48521 super::UnixTimestamp,
48522 ::std::string::String,
48523 >,
48524 error: ::std::result::Result<
48525 ::std::option::Option<::std::string::String>,
48526 ::std::string::String,
48527 >,
48528 signature: ::std::result::Result<
48529 super::SerializableSignature,
48530 ::std::string::String,
48531 >,
48532 slot: ::std::result::Result<super::UnsignedInteger, ::std::string::String>,
48533 }
48534 impl ::std::default::Default for SignatureInfoWithError {
48535 fn default() -> Self {
48536 Self {
48537 block_time: Err("no value supplied for block_time".to_string()),
48538 error: Ok(Default::default()),
48539 signature: Err("no value supplied for signature".to_string()),
48540 slot: Err("no value supplied for slot".to_string()),
48541 }
48542 }
48543 }
48544 impl SignatureInfoWithError {
48545 pub fn block_time<T>(mut self, value: T) -> Self
48546 where
48547 T: ::std::convert::TryInto<super::UnixTimestamp>,
48548 T::Error: ::std::fmt::Display,
48549 {
48550 self.block_time = value
48551 .try_into()
48552 .map_err(|e| {
48553 format!("error converting supplied value for block_time: {e}")
48554 });
48555 self
48556 }
48557 pub fn error<T>(mut self, value: T) -> Self
48558 where
48559 T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48560 T::Error: ::std::fmt::Display,
48561 {
48562 self.error = value
48563 .try_into()
48564 .map_err(|e| {
48565 format!("error converting supplied value for error: {e}")
48566 });
48567 self
48568 }
48569 pub fn signature<T>(mut self, value: T) -> Self
48570 where
48571 T: ::std::convert::TryInto<super::SerializableSignature>,
48572 T::Error: ::std::fmt::Display,
48573 {
48574 self.signature = value
48575 .try_into()
48576 .map_err(|e| {
48577 format!("error converting supplied value for signature: {e}")
48578 });
48579 self
48580 }
48581 pub fn slot<T>(mut self, value: T) -> Self
48582 where
48583 T: ::std::convert::TryInto<super::UnsignedInteger>,
48584 T::Error: ::std::fmt::Display,
48585 {
48586 self.slot = value
48587 .try_into()
48588 .map_err(|e| {
48589 format!("error converting supplied value for slot: {e}")
48590 });
48591 self
48592 }
48593 }
48594 impl ::std::convert::TryFrom<SignatureInfoWithError>
48595 for super::SignatureInfoWithError {
48596 type Error = super::error::ConversionError;
48597 fn try_from(
48598 value: SignatureInfoWithError,
48599 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48600 Ok(Self {
48601 block_time: value.block_time?,
48602 error: value.error?,
48603 signature: value.signature?,
48604 slot: value.slot?,
48605 })
48606 }
48607 }
48608 impl ::std::convert::From<super::SignatureInfoWithError>
48609 for SignatureInfoWithError {
48610 fn from(value: super::SignatureInfoWithError) -> Self {
48611 Self {
48612 block_time: Ok(value.block_time),
48613 error: Ok(value.error),
48614 signature: Ok(value.signature),
48615 slot: Ok(value.slot),
48616 }
48617 }
48618 }
48619 #[derive(Clone, Debug)]
48620 pub struct SolanaAccountData {
48621 data: ::std::result::Result<super::Base64String, ::std::string::String>,
48622 executable: ::std::result::Result<bool, ::std::string::String>,
48623 lamports: ::std::result::Result<
48624 super::UnsignedInteger,
48625 ::std::string::String,
48626 >,
48627 owner: ::std::result::Result<
48628 super::SerializablePubkey,
48629 ::std::string::String,
48630 >,
48631 rent_epoch: ::std::result::Result<
48632 super::UnsignedInteger,
48633 ::std::string::String,
48634 >,
48635 space: ::std::result::Result<super::UnsignedInteger, ::std::string::String>,
48636 }
48637 impl ::std::default::Default for SolanaAccountData {
48638 fn default() -> Self {
48639 Self {
48640 data: Err("no value supplied for data".to_string()),
48641 executable: Err("no value supplied for executable".to_string()),
48642 lamports: Err("no value supplied for lamports".to_string()),
48643 owner: Err("no value supplied for owner".to_string()),
48644 rent_epoch: Err("no value supplied for rent_epoch".to_string()),
48645 space: Err("no value supplied for space".to_string()),
48646 }
48647 }
48648 }
48649 impl SolanaAccountData {
48650 pub fn data<T>(mut self, value: T) -> Self
48651 where
48652 T: ::std::convert::TryInto<super::Base64String>,
48653 T::Error: ::std::fmt::Display,
48654 {
48655 self.data = value
48656 .try_into()
48657 .map_err(|e| {
48658 format!("error converting supplied value for data: {e}")
48659 });
48660 self
48661 }
48662 pub fn executable<T>(mut self, value: T) -> Self
48663 where
48664 T: ::std::convert::TryInto<bool>,
48665 T::Error: ::std::fmt::Display,
48666 {
48667 self.executable = value
48668 .try_into()
48669 .map_err(|e| {
48670 format!("error converting supplied value for executable: {e}")
48671 });
48672 self
48673 }
48674 pub fn lamports<T>(mut self, value: T) -> Self
48675 where
48676 T: ::std::convert::TryInto<super::UnsignedInteger>,
48677 T::Error: ::std::fmt::Display,
48678 {
48679 self.lamports = value
48680 .try_into()
48681 .map_err(|e| {
48682 format!("error converting supplied value for lamports: {e}")
48683 });
48684 self
48685 }
48686 pub fn owner<T>(mut self, value: T) -> Self
48687 where
48688 T: ::std::convert::TryInto<super::SerializablePubkey>,
48689 T::Error: ::std::fmt::Display,
48690 {
48691 self.owner = value
48692 .try_into()
48693 .map_err(|e| {
48694 format!("error converting supplied value for owner: {e}")
48695 });
48696 self
48697 }
48698 pub fn rent_epoch<T>(mut self, value: T) -> Self
48699 where
48700 T: ::std::convert::TryInto<super::UnsignedInteger>,
48701 T::Error: ::std::fmt::Display,
48702 {
48703 self.rent_epoch = value
48704 .try_into()
48705 .map_err(|e| {
48706 format!("error converting supplied value for rent_epoch: {e}")
48707 });
48708 self
48709 }
48710 pub fn space<T>(mut self, value: T) -> Self
48711 where
48712 T: ::std::convert::TryInto<super::UnsignedInteger>,
48713 T::Error: ::std::fmt::Display,
48714 {
48715 self.space = value
48716 .try_into()
48717 .map_err(|e| {
48718 format!("error converting supplied value for space: {e}")
48719 });
48720 self
48721 }
48722 }
48723 impl ::std::convert::TryFrom<SolanaAccountData> for super::SolanaAccountData {
48724 type Error = super::error::ConversionError;
48725 fn try_from(
48726 value: SolanaAccountData,
48727 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48728 Ok(Self {
48729 data: value.data?,
48730 executable: value.executable?,
48731 lamports: value.lamports?,
48732 owner: value.owner?,
48733 rent_epoch: value.rent_epoch?,
48734 space: value.space?,
48735 })
48736 }
48737 }
48738 impl ::std::convert::From<super::SolanaAccountData> for SolanaAccountData {
48739 fn from(value: super::SolanaAccountData) -> Self {
48740 Self {
48741 data: Ok(value.data),
48742 executable: Ok(value.executable),
48743 lamports: Ok(value.lamports),
48744 owner: Ok(value.owner),
48745 rent_epoch: Ok(value.rent_epoch),
48746 space: Ok(value.space),
48747 }
48748 }
48749 }
48750 #[derive(Clone, Debug)]
48751 pub struct StateQueueData {
48752 initial_root: ::std::result::Result<super::Hash, ::std::string::String>,
48753 input_queue: ::std::result::Result<
48754 ::std::option::Option<super::InputQueueData>,
48755 ::std::string::String,
48756 >,
48757 nodes: ::std::result::Result<
48758 ::std::vec::Vec<super::Node>,
48759 ::std::string::String,
48760 >,
48761 output_queue: ::std::result::Result<
48762 ::std::option::Option<super::OutputQueueData>,
48763 ::std::string::String,
48764 >,
48765 root_seq: ::std::result::Result<u64, ::std::string::String>,
48766 }
48767 impl ::std::default::Default for StateQueueData {
48768 fn default() -> Self {
48769 Self {
48770 initial_root: Err("no value supplied for initial_root".to_string()),
48771 input_queue: Ok(Default::default()),
48772 nodes: Ok(Default::default()),
48773 output_queue: Ok(Default::default()),
48774 root_seq: Err("no value supplied for root_seq".to_string()),
48775 }
48776 }
48777 }
48778 impl StateQueueData {
48779 pub fn initial_root<T>(mut self, value: T) -> Self
48780 where
48781 T: ::std::convert::TryInto<super::Hash>,
48782 T::Error: ::std::fmt::Display,
48783 {
48784 self.initial_root = value
48785 .try_into()
48786 .map_err(|e| {
48787 format!("error converting supplied value for initial_root: {e}")
48788 });
48789 self
48790 }
48791 pub fn input_queue<T>(mut self, value: T) -> Self
48792 where
48793 T: ::std::convert::TryInto<::std::option::Option<super::InputQueueData>>,
48794 T::Error: ::std::fmt::Display,
48795 {
48796 self.input_queue = value
48797 .try_into()
48798 .map_err(|e| {
48799 format!("error converting supplied value for input_queue: {e}")
48800 });
48801 self
48802 }
48803 pub fn nodes<T>(mut self, value: T) -> Self
48804 where
48805 T: ::std::convert::TryInto<::std::vec::Vec<super::Node>>,
48806 T::Error: ::std::fmt::Display,
48807 {
48808 self.nodes = value
48809 .try_into()
48810 .map_err(|e| {
48811 format!("error converting supplied value for nodes: {e}")
48812 });
48813 self
48814 }
48815 pub fn output_queue<T>(mut self, value: T) -> Self
48816 where
48817 T: ::std::convert::TryInto<
48818 ::std::option::Option<super::OutputQueueData>,
48819 >,
48820 T::Error: ::std::fmt::Display,
48821 {
48822 self.output_queue = value
48823 .try_into()
48824 .map_err(|e| {
48825 format!("error converting supplied value for output_queue: {e}")
48826 });
48827 self
48828 }
48829 pub fn root_seq<T>(mut self, value: T) -> Self
48830 where
48831 T: ::std::convert::TryInto<u64>,
48832 T::Error: ::std::fmt::Display,
48833 {
48834 self.root_seq = value
48835 .try_into()
48836 .map_err(|e| {
48837 format!("error converting supplied value for root_seq: {e}")
48838 });
48839 self
48840 }
48841 }
48842 impl ::std::convert::TryFrom<StateQueueData> for super::StateQueueData {
48843 type Error = super::error::ConversionError;
48844 fn try_from(
48845 value: StateQueueData,
48846 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48847 Ok(Self {
48848 initial_root: value.initial_root?,
48849 input_queue: value.input_queue?,
48850 nodes: value.nodes?,
48851 output_queue: value.output_queue?,
48852 root_seq: value.root_seq?,
48853 })
48854 }
48855 }
48856 impl ::std::convert::From<super::StateQueueData> for StateQueueData {
48857 fn from(value: super::StateQueueData) -> Self {
48858 Self {
48859 initial_root: Ok(value.initial_root),
48860 input_queue: Ok(value.input_queue),
48861 nodes: Ok(value.nodes),
48862 output_queue: Ok(value.output_queue),
48863 root_seq: Ok(value.root_seq),
48864 }
48865 }
48866 }
48867 #[derive(Clone, Debug)]
48868 pub struct TokenAccount {
48869 account: ::std::result::Result<super::Account, ::std::string::String>,
48870 token_data: ::std::result::Result<super::TokenData, ::std::string::String>,
48871 }
48872 impl ::std::default::Default for TokenAccount {
48873 fn default() -> Self {
48874 Self {
48875 account: Err("no value supplied for account".to_string()),
48876 token_data: Err("no value supplied for token_data".to_string()),
48877 }
48878 }
48879 }
48880 impl TokenAccount {
48881 pub fn account<T>(mut self, value: T) -> Self
48882 where
48883 T: ::std::convert::TryInto<super::Account>,
48884 T::Error: ::std::fmt::Display,
48885 {
48886 self.account = value
48887 .try_into()
48888 .map_err(|e| {
48889 format!("error converting supplied value for account: {e}")
48890 });
48891 self
48892 }
48893 pub fn token_data<T>(mut self, value: T) -> Self
48894 where
48895 T: ::std::convert::TryInto<super::TokenData>,
48896 T::Error: ::std::fmt::Display,
48897 {
48898 self.token_data = value
48899 .try_into()
48900 .map_err(|e| {
48901 format!("error converting supplied value for token_data: {e}")
48902 });
48903 self
48904 }
48905 }
48906 impl ::std::convert::TryFrom<TokenAccount> for super::TokenAccount {
48907 type Error = super::error::ConversionError;
48908 fn try_from(
48909 value: TokenAccount,
48910 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48911 Ok(Self {
48912 account: value.account?,
48913 token_data: value.token_data?,
48914 })
48915 }
48916 }
48917 impl ::std::convert::From<super::TokenAccount> for TokenAccount {
48918 fn from(value: super::TokenAccount) -> Self {
48919 Self {
48920 account: Ok(value.account),
48921 token_data: Ok(value.token_data),
48922 }
48923 }
48924 }
48925 #[derive(Clone, Debug)]
48926 pub struct TokenAccountBalance {
48927 amount: ::std::result::Result<super::UnsignedInteger, ::std::string::String>,
48928 }
48929 impl ::std::default::Default for TokenAccountBalance {
48930 fn default() -> Self {
48931 Self {
48932 amount: Err("no value supplied for amount".to_string()),
48933 }
48934 }
48935 }
48936 impl TokenAccountBalance {
48937 pub fn amount<T>(mut self, value: T) -> Self
48938 where
48939 T: ::std::convert::TryInto<super::UnsignedInteger>,
48940 T::Error: ::std::fmt::Display,
48941 {
48942 self.amount = value
48943 .try_into()
48944 .map_err(|e| {
48945 format!("error converting supplied value for amount: {e}")
48946 });
48947 self
48948 }
48949 }
48950 impl ::std::convert::TryFrom<TokenAccountBalance>
48951 for super::TokenAccountBalance {
48952 type Error = super::error::ConversionError;
48953 fn try_from(
48954 value: TokenAccountBalance,
48955 ) -> ::std::result::Result<Self, super::error::ConversionError> {
48956 Ok(Self { amount: value.amount? })
48957 }
48958 }
48959 impl ::std::convert::From<super::TokenAccountBalance> for TokenAccountBalance {
48960 fn from(value: super::TokenAccountBalance) -> Self {
48961 Self { amount: Ok(value.amount) }
48962 }
48963 }
48964 #[derive(Clone, Debug)]
48965 pub struct TokenAccountList {
48966 cursor: ::std::result::Result<
48967 ::std::option::Option<super::Base58String>,
48968 ::std::string::String,
48969 >,
48970 items: ::std::result::Result<
48971 ::std::vec::Vec<super::TokenAccount>,
48972 ::std::string::String,
48973 >,
48974 }
48975 impl ::std::default::Default for TokenAccountList {
48976 fn default() -> Self {
48977 Self {
48978 cursor: Ok(Default::default()),
48979 items: Err("no value supplied for items".to_string()),
48980 }
48981 }
48982 }
48983 impl TokenAccountList {
48984 pub fn cursor<T>(mut self, value: T) -> Self
48985 where
48986 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
48987 T::Error: ::std::fmt::Display,
48988 {
48989 self.cursor = value
48990 .try_into()
48991 .map_err(|e| {
48992 format!("error converting supplied value for cursor: {e}")
48993 });
48994 self
48995 }
48996 pub fn items<T>(mut self, value: T) -> Self
48997 where
48998 T: ::std::convert::TryInto<::std::vec::Vec<super::TokenAccount>>,
48999 T::Error: ::std::fmt::Display,
49000 {
49001 self.items = value
49002 .try_into()
49003 .map_err(|e| {
49004 format!("error converting supplied value for items: {e}")
49005 });
49006 self
49007 }
49008 }
49009 impl ::std::convert::TryFrom<TokenAccountList> for super::TokenAccountList {
49010 type Error = super::error::ConversionError;
49011 fn try_from(
49012 value: TokenAccountList,
49013 ) -> ::std::result::Result<Self, super::error::ConversionError> {
49014 Ok(Self {
49015 cursor: value.cursor?,
49016 items: value.items?,
49017 })
49018 }
49019 }
49020 impl ::std::convert::From<super::TokenAccountList> for TokenAccountList {
49021 fn from(value: super::TokenAccountList) -> Self {
49022 Self {
49023 cursor: Ok(value.cursor),
49024 items: Ok(value.items),
49025 }
49026 }
49027 }
49028 #[derive(Clone, Debug)]
49029 pub struct TokenAccountListV2 {
49030 cursor: ::std::result::Result<
49031 ::std::option::Option<super::Base58String>,
49032 ::std::string::String,
49033 >,
49034 items: ::std::result::Result<
49035 ::std::vec::Vec<super::TokenAccountV2>,
49036 ::std::string::String,
49037 >,
49038 }
49039 impl ::std::default::Default for TokenAccountListV2 {
49040 fn default() -> Self {
49041 Self {
49042 cursor: Ok(Default::default()),
49043 items: Err("no value supplied for items".to_string()),
49044 }
49045 }
49046 }
49047 impl TokenAccountListV2 {
49048 pub fn cursor<T>(mut self, value: T) -> Self
49049 where
49050 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
49051 T::Error: ::std::fmt::Display,
49052 {
49053 self.cursor = value
49054 .try_into()
49055 .map_err(|e| {
49056 format!("error converting supplied value for cursor: {e}")
49057 });
49058 self
49059 }
49060 pub fn items<T>(mut self, value: T) -> Self
49061 where
49062 T: ::std::convert::TryInto<::std::vec::Vec<super::TokenAccountV2>>,
49063 T::Error: ::std::fmt::Display,
49064 {
49065 self.items = value
49066 .try_into()
49067 .map_err(|e| {
49068 format!("error converting supplied value for items: {e}")
49069 });
49070 self
49071 }
49072 }
49073 impl ::std::convert::TryFrom<TokenAccountListV2> for super::TokenAccountListV2 {
49074 type Error = super::error::ConversionError;
49075 fn try_from(
49076 value: TokenAccountListV2,
49077 ) -> ::std::result::Result<Self, super::error::ConversionError> {
49078 Ok(Self {
49079 cursor: value.cursor?,
49080 items: value.items?,
49081 })
49082 }
49083 }
49084 impl ::std::convert::From<super::TokenAccountListV2> for TokenAccountListV2 {
49085 fn from(value: super::TokenAccountListV2) -> Self {
49086 Self {
49087 cursor: Ok(value.cursor),
49088 items: Ok(value.items),
49089 }
49090 }
49091 }
49092 #[derive(Clone, Debug)]
49093 pub struct TokenAccountV2 {
49094 account: ::std::result::Result<super::AccountV2, ::std::string::String>,
49095 token_data: ::std::result::Result<super::TokenData, ::std::string::String>,
49096 }
49097 impl ::std::default::Default for TokenAccountV2 {
49098 fn default() -> Self {
49099 Self {
49100 account: Err("no value supplied for account".to_string()),
49101 token_data: Err("no value supplied for token_data".to_string()),
49102 }
49103 }
49104 }
49105 impl TokenAccountV2 {
49106 pub fn account<T>(mut self, value: T) -> Self
49107 where
49108 T: ::std::convert::TryInto<super::AccountV2>,
49109 T::Error: ::std::fmt::Display,
49110 {
49111 self.account = value
49112 .try_into()
49113 .map_err(|e| {
49114 format!("error converting supplied value for account: {e}")
49115 });
49116 self
49117 }
49118 pub fn token_data<T>(mut self, value: T) -> Self
49119 where
49120 T: ::std::convert::TryInto<super::TokenData>,
49121 T::Error: ::std::fmt::Display,
49122 {
49123 self.token_data = value
49124 .try_into()
49125 .map_err(|e| {
49126 format!("error converting supplied value for token_data: {e}")
49127 });
49128 self
49129 }
49130 }
49131 impl ::std::convert::TryFrom<TokenAccountV2> for super::TokenAccountV2 {
49132 type Error = super::error::ConversionError;
49133 fn try_from(
49134 value: TokenAccountV2,
49135 ) -> ::std::result::Result<Self, super::error::ConversionError> {
49136 Ok(Self {
49137 account: value.account?,
49138 token_data: value.token_data?,
49139 })
49140 }
49141 }
49142 impl ::std::convert::From<super::TokenAccountV2> for TokenAccountV2 {
49143 fn from(value: super::TokenAccountV2) -> Self {
49144 Self {
49145 account: Ok(value.account),
49146 token_data: Ok(value.token_data),
49147 }
49148 }
49149 }
49150 #[derive(Clone, Debug)]
49151 pub struct TokenBalance {
49152 balance: ::std::result::Result<
49153 super::UnsignedInteger,
49154 ::std::string::String,
49155 >,
49156 mint: ::std::result::Result<
49157 super::SerializablePubkey,
49158 ::std::string::String,
49159 >,
49160 }
49161 impl ::std::default::Default for TokenBalance {
49162 fn default() -> Self {
49163 Self {
49164 balance: Err("no value supplied for balance".to_string()),
49165 mint: Err("no value supplied for mint".to_string()),
49166 }
49167 }
49168 }
49169 impl TokenBalance {
49170 pub fn balance<T>(mut self, value: T) -> Self
49171 where
49172 T: ::std::convert::TryInto<super::UnsignedInteger>,
49173 T::Error: ::std::fmt::Display,
49174 {
49175 self.balance = value
49176 .try_into()
49177 .map_err(|e| {
49178 format!("error converting supplied value for balance: {e}")
49179 });
49180 self
49181 }
49182 pub fn mint<T>(mut self, value: T) -> Self
49183 where
49184 T: ::std::convert::TryInto<super::SerializablePubkey>,
49185 T::Error: ::std::fmt::Display,
49186 {
49187 self.mint = value
49188 .try_into()
49189 .map_err(|e| {
49190 format!("error converting supplied value for mint: {e}")
49191 });
49192 self
49193 }
49194 }
49195 impl ::std::convert::TryFrom<TokenBalance> for super::TokenBalance {
49196 type Error = super::error::ConversionError;
49197 fn try_from(
49198 value: TokenBalance,
49199 ) -> ::std::result::Result<Self, super::error::ConversionError> {
49200 Ok(Self {
49201 balance: value.balance?,
49202 mint: value.mint?,
49203 })
49204 }
49205 }
49206 impl ::std::convert::From<super::TokenBalance> for TokenBalance {
49207 fn from(value: super::TokenBalance) -> Self {
49208 Self {
49209 balance: Ok(value.balance),
49210 mint: Ok(value.mint),
49211 }
49212 }
49213 }
49214 #[derive(Clone, Debug)]
49215 pub struct TokenBalanceList {
49216 cursor: ::std::result::Result<
49217 ::std::option::Option<super::Base58String>,
49218 ::std::string::String,
49219 >,
49220 token_balances: ::std::result::Result<
49221 ::std::vec::Vec<super::TokenBalance>,
49222 ::std::string::String,
49223 >,
49224 }
49225 impl ::std::default::Default for TokenBalanceList {
49226 fn default() -> Self {
49227 Self {
49228 cursor: Ok(Default::default()),
49229 token_balances: Err(
49230 "no value supplied for token_balances".to_string(),
49231 ),
49232 }
49233 }
49234 }
49235 impl TokenBalanceList {
49236 pub fn cursor<T>(mut self, value: T) -> Self
49237 where
49238 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
49239 T::Error: ::std::fmt::Display,
49240 {
49241 self.cursor = value
49242 .try_into()
49243 .map_err(|e| {
49244 format!("error converting supplied value for cursor: {e}")
49245 });
49246 self
49247 }
49248 pub fn token_balances<T>(mut self, value: T) -> Self
49249 where
49250 T: ::std::convert::TryInto<::std::vec::Vec<super::TokenBalance>>,
49251 T::Error: ::std::fmt::Display,
49252 {
49253 self.token_balances = value
49254 .try_into()
49255 .map_err(|e| {
49256 format!(
49257 "error converting supplied value for token_balances: {e}"
49258 )
49259 });
49260 self
49261 }
49262 }
49263 impl ::std::convert::TryFrom<TokenBalanceList> for super::TokenBalanceList {
49264 type Error = super::error::ConversionError;
49265 fn try_from(
49266 value: TokenBalanceList,
49267 ) -> ::std::result::Result<Self, super::error::ConversionError> {
49268 Ok(Self {
49269 cursor: value.cursor?,
49270 token_balances: value.token_balances?,
49271 })
49272 }
49273 }
49274 impl ::std::convert::From<super::TokenBalanceList> for TokenBalanceList {
49275 fn from(value: super::TokenBalanceList) -> Self {
49276 Self {
49277 cursor: Ok(value.cursor),
49278 token_balances: Ok(value.token_balances),
49279 }
49280 }
49281 }
49282 #[derive(Clone, Debug)]
49283 pub struct TokenBalanceListV2 {
49284 cursor: ::std::result::Result<
49285 ::std::option::Option<super::Base58String>,
49286 ::std::string::String,
49287 >,
49288 items: ::std::result::Result<
49289 ::std::vec::Vec<super::TokenBalance>,
49290 ::std::string::String,
49291 >,
49292 }
49293 impl ::std::default::Default for TokenBalanceListV2 {
49294 fn default() -> Self {
49295 Self {
49296 cursor: Ok(Default::default()),
49297 items: Err("no value supplied for items".to_string()),
49298 }
49299 }
49300 }
49301 impl TokenBalanceListV2 {
49302 pub fn cursor<T>(mut self, value: T) -> Self
49303 where
49304 T: ::std::convert::TryInto<::std::option::Option<super::Base58String>>,
49305 T::Error: ::std::fmt::Display,
49306 {
49307 self.cursor = value
49308 .try_into()
49309 .map_err(|e| {
49310 format!("error converting supplied value for cursor: {e}")
49311 });
49312 self
49313 }
49314 pub fn items<T>(mut self, value: T) -> Self
49315 where
49316 T: ::std::convert::TryInto<::std::vec::Vec<super::TokenBalance>>,
49317 T::Error: ::std::fmt::Display,
49318 {
49319 self.items = value
49320 .try_into()
49321 .map_err(|e| {
49322 format!("error converting supplied value for items: {e}")
49323 });
49324 self
49325 }
49326 }
49327 impl ::std::convert::TryFrom<TokenBalanceListV2> for super::TokenBalanceListV2 {
49328 type Error = super::error::ConversionError;
49329 fn try_from(
49330 value: TokenBalanceListV2,
49331 ) -> ::std::result::Result<Self, super::error::ConversionError> {
49332 Ok(Self {
49333 cursor: value.cursor?,
49334 items: value.items?,
49335 })
49336 }
49337 }
49338 impl ::std::convert::From<super::TokenBalanceListV2> for TokenBalanceListV2 {
49339 fn from(value: super::TokenBalanceListV2) -> Self {
49340 Self {
49341 cursor: Ok(value.cursor),
49342 items: Ok(value.items),
49343 }
49344 }
49345 }
49346 #[derive(Clone, Debug)]
49347 pub struct TokenData {
49348 amount: ::std::result::Result<super::UnsignedInteger, ::std::string::String>,
49349 delegate: ::std::result::Result<
49350 ::std::option::Option<super::SerializablePubkey>,
49351 ::std::string::String,
49352 >,
49353 mint: ::std::result::Result<
49354 super::SerializablePubkey,
49355 ::std::string::String,
49356 >,
49357 owner: ::std::result::Result<
49358 super::SerializablePubkey,
49359 ::std::string::String,
49360 >,
49361 state: ::std::result::Result<super::AccountState, ::std::string::String>,
49362 tlv: ::std::result::Result<
49363 ::std::option::Option<super::Base64String>,
49364 ::std::string::String,
49365 >,
49366 }
49367 impl ::std::default::Default for TokenData {
49368 fn default() -> Self {
49369 Self {
49370 amount: Err("no value supplied for amount".to_string()),
49371 delegate: Ok(Default::default()),
49372 mint: Err("no value supplied for mint".to_string()),
49373 owner: Err("no value supplied for owner".to_string()),
49374 state: Err("no value supplied for state".to_string()),
49375 tlv: Ok(Default::default()),
49376 }
49377 }
49378 }
49379 impl TokenData {
49380 pub fn amount<T>(mut self, value: T) -> Self
49381 where
49382 T: ::std::convert::TryInto<super::UnsignedInteger>,
49383 T::Error: ::std::fmt::Display,
49384 {
49385 self.amount = value
49386 .try_into()
49387 .map_err(|e| {
49388 format!("error converting supplied value for amount: {e}")
49389 });
49390 self
49391 }
49392 pub fn delegate<T>(mut self, value: T) -> Self
49393 where
49394 T: ::std::convert::TryInto<
49395 ::std::option::Option<super::SerializablePubkey>,
49396 >,
49397 T::Error: ::std::fmt::Display,
49398 {
49399 self.delegate = value
49400 .try_into()
49401 .map_err(|e| {
49402 format!("error converting supplied value for delegate: {e}")
49403 });
49404 self
49405 }
49406 pub fn mint<T>(mut self, value: T) -> Self
49407 where
49408 T: ::std::convert::TryInto<super::SerializablePubkey>,
49409 T::Error: ::std::fmt::Display,
49410 {
49411 self.mint = value
49412 .try_into()
49413 .map_err(|e| {
49414 format!("error converting supplied value for mint: {e}")
49415 });
49416 self
49417 }
49418 pub fn owner<T>(mut self, value: T) -> Self
49419 where
49420 T: ::std::convert::TryInto<super::SerializablePubkey>,
49421 T::Error: ::std::fmt::Display,
49422 {
49423 self.owner = value
49424 .try_into()
49425 .map_err(|e| {
49426 format!("error converting supplied value for owner: {e}")
49427 });
49428 self
49429 }
49430 pub fn state<T>(mut self, value: T) -> Self
49431 where
49432 T: ::std::convert::TryInto<super::AccountState>,
49433 T::Error: ::std::fmt::Display,
49434 {
49435 self.state = value
49436 .try_into()
49437 .map_err(|e| {
49438 format!("error converting supplied value for state: {e}")
49439 });
49440 self
49441 }
49442 pub fn tlv<T>(mut self, value: T) -> Self
49443 where
49444 T: ::std::convert::TryInto<::std::option::Option<super::Base64String>>,
49445 T::Error: ::std::fmt::Display,
49446 {
49447 self.tlv = value
49448 .try_into()
49449 .map_err(|e| {
49450 format!("error converting supplied value for tlv: {e}")
49451 });
49452 self
49453 }
49454 }
49455 impl ::std::convert::TryFrom<TokenData> for super::TokenData {
49456 type Error = super::error::ConversionError;
49457 fn try_from(
49458 value: TokenData,
49459 ) -> ::std::result::Result<Self, super::error::ConversionError> {
49460 Ok(Self {
49461 amount: value.amount?,
49462 delegate: value.delegate?,
49463 mint: value.mint?,
49464 owner: value.owner?,
49465 state: value.state?,
49466 tlv: value.tlv?,
49467 })
49468 }
49469 }
49470 impl ::std::convert::From<super::TokenData> for TokenData {
49471 fn from(value: super::TokenData) -> Self {
49472 Self {
49473 amount: Ok(value.amount),
49474 delegate: Ok(value.delegate),
49475 mint: Ok(value.mint),
49476 owner: Ok(value.owner),
49477 state: Ok(value.state),
49478 tlv: Ok(value.tlv),
49479 }
49480 }
49481 }
49482 #[derive(Clone, Debug)]
49483 pub struct TreeContextInfo {
49484 cpi_context: ::std::result::Result<
49485 ::std::option::Option<super::SerializablePubkey>,
49486 ::std::string::String,
49487 >,
49488 queue: ::std::result::Result<
49489 super::SerializablePubkey,
49490 ::std::string::String,
49491 >,
49492 tree: ::std::result::Result<
49493 super::SerializablePubkey,
49494 ::std::string::String,
49495 >,
49496 tree_type: ::std::result::Result<u16, ::std::string::String>,
49497 }
49498 impl ::std::default::Default for TreeContextInfo {
49499 fn default() -> Self {
49500 Self {
49501 cpi_context: Ok(Default::default()),
49502 queue: Err("no value supplied for queue".to_string()),
49503 tree: Err("no value supplied for tree".to_string()),
49504 tree_type: Err("no value supplied for tree_type".to_string()),
49505 }
49506 }
49507 }
49508 impl TreeContextInfo {
49509 pub fn cpi_context<T>(mut self, value: T) -> Self
49510 where
49511 T: ::std::convert::TryInto<
49512 ::std::option::Option<super::SerializablePubkey>,
49513 >,
49514 T::Error: ::std::fmt::Display,
49515 {
49516 self.cpi_context = value
49517 .try_into()
49518 .map_err(|e| {
49519 format!("error converting supplied value for cpi_context: {e}")
49520 });
49521 self
49522 }
49523 pub fn queue<T>(mut self, value: T) -> Self
49524 where
49525 T: ::std::convert::TryInto<super::SerializablePubkey>,
49526 T::Error: ::std::fmt::Display,
49527 {
49528 self.queue = value
49529 .try_into()
49530 .map_err(|e| {
49531 format!("error converting supplied value for queue: {e}")
49532 });
49533 self
49534 }
49535 pub fn tree<T>(mut self, value: T) -> Self
49536 where
49537 T: ::std::convert::TryInto<super::SerializablePubkey>,
49538 T::Error: ::std::fmt::Display,
49539 {
49540 self.tree = value
49541 .try_into()
49542 .map_err(|e| {
49543 format!("error converting supplied value for tree: {e}")
49544 });
49545 self
49546 }
49547 pub fn tree_type<T>(mut self, value: T) -> Self
49548 where
49549 T: ::std::convert::TryInto<u16>,
49550 T::Error: ::std::fmt::Display,
49551 {
49552 self.tree_type = value
49553 .try_into()
49554 .map_err(|e| {
49555 format!("error converting supplied value for tree_type: {e}")
49556 });
49557 self
49558 }
49559 }
49560 impl ::std::convert::TryFrom<TreeContextInfo> for super::TreeContextInfo {
49561 type Error = super::error::ConversionError;
49562 fn try_from(
49563 value: TreeContextInfo,
49564 ) -> ::std::result::Result<Self, super::error::ConversionError> {
49565 Ok(Self {
49566 cpi_context: value.cpi_context?,
49567 queue: value.queue?,
49568 tree: value.tree?,
49569 tree_type: value.tree_type?,
49570 })
49571 }
49572 }
49573 impl ::std::convert::From<super::TreeContextInfo> for TreeContextInfo {
49574 fn from(value: super::TreeContextInfo) -> Self {
49575 Self {
49576 cpi_context: Ok(value.cpi_context),
49577 queue: Ok(value.queue),
49578 tree: Ok(value.tree),
49579 tree_type: Ok(value.tree_type),
49580 }
49581 }
49582 }
49583 }
49584 pub mod defaults {
49586 pub(super) fn default_u64<T, const V: u64>() -> T
49587 where
49588 T: ::std::convert::TryFrom<u64>,
49589 <T as ::std::convert::TryFrom<u64>>::Error: ::std::fmt::Debug,
49590 {
49591 T::try_from(V).unwrap()
49592 }
49593 pub(super) fn post_get_indexer_health_response_result() -> super::PostGetIndexerHealthResponseResult {
49594 super::PostGetIndexerHealthResponseResult::Ok
49595 }
49596 }
49597}
49598#[derive(Clone, Debug)]
49599pub struct Client {
49605 pub(crate) baseurl: String,
49606 pub(crate) client: reqwest::Client,
49607}
49608impl Client {
49609 pub fn new(baseurl: &str) -> Self {
49615 #[cfg(not(target_arch = "wasm32"))]
49616 let client = {
49617 let dur = ::std::time::Duration::from_secs(15u64);
49618 reqwest::ClientBuilder::new().connect_timeout(dur).timeout(dur)
49619 };
49620 #[cfg(target_arch = "wasm32")]
49621 let client = reqwest::ClientBuilder::new();
49622 Self::new_with_client(baseurl, client.build().unwrap())
49623 }
49624 pub fn new_with_client(baseurl: &str, client: reqwest::Client) -> Self {
49631 Self {
49632 baseurl: baseurl.to_string(),
49633 client,
49634 }
49635 }
49636}
49637impl ClientInfo<()> for Client {
49638 fn api_version() -> &'static str {
49639 "0.51.2"
49640 }
49641 fn baseurl(&self) -> &str {
49642 self.baseurl.as_str()
49643 }
49644 fn client(&self) -> &reqwest::Client {
49645 &self.client
49646 }
49647 fn inner(&self) -> &() {
49648 &()
49649 }
49650}
49651impl ClientHooks<()> for &Client {}
49652impl Client {
49653 pub fn post_get_account_interface(&self) -> builder::PostGetAccountInterface<'_> {
49662 builder::PostGetAccountInterface::new(self)
49663 }
49664 pub fn post_get_compressed_account(&self) -> builder::PostGetCompressedAccount<'_> {
49673 builder::PostGetCompressedAccount::new(self)
49674 }
49675 pub fn post_get_compressed_account_balance(
49684 &self,
49685 ) -> builder::PostGetCompressedAccountBalance<'_> {
49686 builder::PostGetCompressedAccountBalance::new(self)
49687 }
49688 pub fn post_get_compressed_account_proof(
49697 &self,
49698 ) -> builder::PostGetCompressedAccountProof<'_> {
49699 builder::PostGetCompressedAccountProof::new(self)
49700 }
49701 pub fn post_get_compressed_account_proof_v2(
49710 &self,
49711 ) -> builder::PostGetCompressedAccountProofV2<'_> {
49712 builder::PostGetCompressedAccountProofV2::new(self)
49713 }
49714 pub fn post_get_compressed_account_v2(
49723 &self,
49724 ) -> builder::PostGetCompressedAccountV2<'_> {
49725 builder::PostGetCompressedAccountV2::new(self)
49726 }
49727 pub fn post_get_compressed_accounts_by_owner(
49736 &self,
49737 ) -> builder::PostGetCompressedAccountsByOwner<'_> {
49738 builder::PostGetCompressedAccountsByOwner::new(self)
49739 }
49740 pub fn post_get_compressed_accounts_by_owner_v2(
49749 &self,
49750 ) -> builder::PostGetCompressedAccountsByOwnerV2<'_> {
49751 builder::PostGetCompressedAccountsByOwnerV2::new(self)
49752 }
49753 pub fn post_get_compressed_balance_by_owner(
49762 &self,
49763 ) -> builder::PostGetCompressedBalanceByOwner<'_> {
49764 builder::PostGetCompressedBalanceByOwner::new(self)
49765 }
49766 pub fn post_get_compressed_mint_token_holders(
49775 &self,
49776 ) -> builder::PostGetCompressedMintTokenHolders<'_> {
49777 builder::PostGetCompressedMintTokenHolders::new(self)
49778 }
49779 pub fn post_get_compressed_token_account_balance(
49788 &self,
49789 ) -> builder::PostGetCompressedTokenAccountBalance<'_> {
49790 builder::PostGetCompressedTokenAccountBalance::new(self)
49791 }
49792 pub fn post_get_compressed_token_accounts_by_delegate(
49801 &self,
49802 ) -> builder::PostGetCompressedTokenAccountsByDelegate<'_> {
49803 builder::PostGetCompressedTokenAccountsByDelegate::new(self)
49804 }
49805 pub fn post_get_compressed_token_accounts_by_delegate_v2(
49814 &self,
49815 ) -> builder::PostGetCompressedTokenAccountsByDelegateV2<'_> {
49816 builder::PostGetCompressedTokenAccountsByDelegateV2::new(self)
49817 }
49818 pub fn post_get_compressed_token_accounts_by_owner(
49827 &self,
49828 ) -> builder::PostGetCompressedTokenAccountsByOwner<'_> {
49829 builder::PostGetCompressedTokenAccountsByOwner::new(self)
49830 }
49831 pub fn post_get_compressed_token_accounts_by_owner_v2(
49840 &self,
49841 ) -> builder::PostGetCompressedTokenAccountsByOwnerV2<'_> {
49842 builder::PostGetCompressedTokenAccountsByOwnerV2::new(self)
49843 }
49844 pub fn post_get_compressed_token_balances_by_owner(
49853 &self,
49854 ) -> builder::PostGetCompressedTokenBalancesByOwner<'_> {
49855 builder::PostGetCompressedTokenBalancesByOwner::new(self)
49856 }
49857 pub fn post_get_compressed_token_balances_by_owner_v2(
49866 &self,
49867 ) -> builder::PostGetCompressedTokenBalancesByOwnerV2<'_> {
49868 builder::PostGetCompressedTokenBalancesByOwnerV2::new(self)
49869 }
49870 pub fn post_get_compression_signatures_for_account(
49879 &self,
49880 ) -> builder::PostGetCompressionSignaturesForAccount<'_> {
49881 builder::PostGetCompressionSignaturesForAccount::new(self)
49882 }
49883 pub fn post_get_compression_signatures_for_address(
49892 &self,
49893 ) -> builder::PostGetCompressionSignaturesForAddress<'_> {
49894 builder::PostGetCompressionSignaturesForAddress::new(self)
49895 }
49896 pub fn post_get_compression_signatures_for_owner(
49905 &self,
49906 ) -> builder::PostGetCompressionSignaturesForOwner<'_> {
49907 builder::PostGetCompressionSignaturesForOwner::new(self)
49908 }
49909 pub fn post_get_compression_signatures_for_token_owner(
49918 &self,
49919 ) -> builder::PostGetCompressionSignaturesForTokenOwner<'_> {
49920 builder::PostGetCompressionSignaturesForTokenOwner::new(self)
49921 }
49922 pub fn post_get_indexer_health(&self) -> builder::PostGetIndexerHealth<'_> {
49931 builder::PostGetIndexerHealth::new(self)
49932 }
49933 pub fn post_get_indexer_slot(&self) -> builder::PostGetIndexerSlot<'_> {
49942 builder::PostGetIndexerSlot::new(self)
49943 }
49944 pub fn post_get_latest_compression_signatures(
49953 &self,
49954 ) -> builder::PostGetLatestCompressionSignatures<'_> {
49955 builder::PostGetLatestCompressionSignatures::new(self)
49956 }
49957 pub fn post_get_latest_non_voting_signatures(
49966 &self,
49967 ) -> builder::PostGetLatestNonVotingSignatures<'_> {
49968 builder::PostGetLatestNonVotingSignatures::new(self)
49969 }
49970 pub fn post_get_multiple_account_interfaces(
49979 &self,
49980 ) -> builder::PostGetMultipleAccountInterfaces<'_> {
49981 builder::PostGetMultipleAccountInterfaces::new(self)
49982 }
49983 pub fn post_get_multiple_compressed_account_proofs(
49992 &self,
49993 ) -> builder::PostGetMultipleCompressedAccountProofs<'_> {
49994 builder::PostGetMultipleCompressedAccountProofs::new(self)
49995 }
49996 pub fn post_get_multiple_compressed_account_proofs_v2(
50005 &self,
50006 ) -> builder::PostGetMultipleCompressedAccountProofsV2<'_> {
50007 builder::PostGetMultipleCompressedAccountProofsV2::new(self)
50008 }
50009 pub fn post_get_multiple_compressed_accounts(
50018 &self,
50019 ) -> builder::PostGetMultipleCompressedAccounts<'_> {
50020 builder::PostGetMultipleCompressedAccounts::new(self)
50021 }
50022 pub fn post_get_multiple_compressed_accounts_v2(
50031 &self,
50032 ) -> builder::PostGetMultipleCompressedAccountsV2<'_> {
50033 builder::PostGetMultipleCompressedAccountsV2::new(self)
50034 }
50035 pub fn post_get_multiple_new_address_proofs(
50044 &self,
50045 ) -> builder::PostGetMultipleNewAddressProofs<'_> {
50046 builder::PostGetMultipleNewAddressProofs::new(self)
50047 }
50048 pub fn post_get_multiple_new_address_proofs_v2(
50057 &self,
50058 ) -> builder::PostGetMultipleNewAddressProofsV2<'_> {
50059 builder::PostGetMultipleNewAddressProofsV2::new(self)
50060 }
50061 pub fn post_get_queue_elements(&self) -> builder::PostGetQueueElements<'_> {
50070 builder::PostGetQueueElements::new(self)
50071 }
50072 pub fn post_get_queue_info(&self) -> builder::PostGetQueueInfo<'_> {
50081 builder::PostGetQueueInfo::new(self)
50082 }
50083 pub fn post_get_transaction_with_compression_info(
50092 &self,
50093 ) -> builder::PostGetTransactionWithCompressionInfo<'_> {
50094 builder::PostGetTransactionWithCompressionInfo::new(self)
50095 }
50096 pub fn post_get_transaction_with_compression_info_v2(
50105 &self,
50106 ) -> builder::PostGetTransactionWithCompressionInfoV2<'_> {
50107 builder::PostGetTransactionWithCompressionInfoV2::new(self)
50108 }
50109 pub fn post_get_validity_proof(&self) -> builder::PostGetValidityProof<'_> {
50118 builder::PostGetValidityProof::new(self)
50119 }
50120 pub fn post_get_validity_proof_v2(&self) -> builder::PostGetValidityProofV2<'_> {
50129 builder::PostGetValidityProofV2::new(self)
50130 }
50131}
50132#[allow(clippy::all)]
50134pub mod builder {
50135 use super::types;
50136 #[allow(unused_imports)]
50137 use super::{
50138 encode_path, ByteStream, ClientInfo, ClientHooks, Error, OperationInfo,
50139 RequestBuilderExt, ResponseValue,
50140 };
50141 #[derive(Debug, Clone)]
50145 pub struct PostGetAccountInterface<'a> {
50146 client: &'a super::Client,
50147 body: Result<types::builder::PostGetAccountInterfaceBody, String>,
50148 }
50149 impl<'a> PostGetAccountInterface<'a> {
50150 pub fn new(client: &'a super::Client) -> Self {
50151 Self {
50152 client: client,
50153 body: Ok(::std::default::Default::default()),
50154 }
50155 }
50156 pub fn body<V>(mut self, value: V) -> Self
50157 where
50158 V: std::convert::TryInto<types::PostGetAccountInterfaceBody>,
50159 <V as std::convert::TryInto<
50160 types::PostGetAccountInterfaceBody,
50161 >>::Error: std::fmt::Display,
50162 {
50163 self.body = value
50164 .try_into()
50165 .map(From::from)
50166 .map_err(|s| {
50167 format!(
50168 "conversion to `PostGetAccountInterfaceBody` for body failed: {}",
50169 s
50170 )
50171 });
50172 self
50173 }
50174 pub fn body_map<F>(mut self, f: F) -> Self
50175 where
50176 F: std::ops::FnOnce(
50177 types::builder::PostGetAccountInterfaceBody,
50178 ) -> types::builder::PostGetAccountInterfaceBody,
50179 {
50180 self.body = self.body.map(f);
50181 self
50182 }
50183 pub async fn send(
50185 self,
50186 ) -> Result<
50187 ResponseValue<types::PostGetAccountInterfaceResponse>,
50188 Error<types::PostGetAccountInterfaceResponse>,
50189 > {
50190 let Self { client, body } = self;
50191 let body = body
50192 .and_then(|v| {
50193 types::PostGetAccountInterfaceBody::try_from(v)
50194 .map_err(|e| e.to_string())
50195 })
50196 .map_err(Error::InvalidRequest)?;
50197 let url = format!("{}/getAccountInterface", client.baseurl,);
50198 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50199 header_map
50200 .append(
50201 ::reqwest::header::HeaderName::from_static("api-version"),
50202 ::reqwest::header::HeaderValue::from_static(
50203 super::Client::api_version(),
50204 ),
50205 );
50206 #[allow(unused_mut)]
50207 let mut request = client
50208 .client
50209 .post(url)
50210 .header(
50211 ::reqwest::header::ACCEPT,
50212 ::reqwest::header::HeaderValue::from_static("application/json"),
50213 )
50214 .json(&body)
50215 .headers(header_map)
50216 .build()?;
50217 let info = OperationInfo {
50218 operation_id: "post_get_account_interface",
50219 };
50220 client.pre(&mut request, &info).await?;
50221 let result = client.exec(request, &info).await;
50222 client.post(&result, &info).await?;
50223 let response = result?;
50224 match response.status().as_u16() {
50225 200u16 => ResponseValue::from_response(response).await,
50226 429u16 => {
50227 Err(
50228 Error::ErrorResponse(
50229 ResponseValue::from_response(response).await?,
50230 ),
50231 )
50232 }
50233 500u16 => {
50234 Err(
50235 Error::ErrorResponse(
50236 ResponseValue::from_response(response).await?,
50237 ),
50238 )
50239 }
50240 _ => Err(Error::UnexpectedResponse(response)),
50241 }
50242 }
50243 }
50244 #[derive(Debug, Clone)]
50248 pub struct PostGetCompressedAccount<'a> {
50249 client: &'a super::Client,
50250 body: Result<types::builder::PostGetCompressedAccountBody, String>,
50251 }
50252 impl<'a> PostGetCompressedAccount<'a> {
50253 pub fn new(client: &'a super::Client) -> Self {
50254 Self {
50255 client: client,
50256 body: Ok(::std::default::Default::default()),
50257 }
50258 }
50259 pub fn body<V>(mut self, value: V) -> Self
50260 where
50261 V: std::convert::TryInto<types::PostGetCompressedAccountBody>,
50262 <V as std::convert::TryInto<
50263 types::PostGetCompressedAccountBody,
50264 >>::Error: std::fmt::Display,
50265 {
50266 self.body = value
50267 .try_into()
50268 .map(From::from)
50269 .map_err(|s| {
50270 format!(
50271 "conversion to `PostGetCompressedAccountBody` for body failed: {}",
50272 s
50273 )
50274 });
50275 self
50276 }
50277 pub fn body_map<F>(mut self, f: F) -> Self
50278 where
50279 F: std::ops::FnOnce(
50280 types::builder::PostGetCompressedAccountBody,
50281 ) -> types::builder::PostGetCompressedAccountBody,
50282 {
50283 self.body = self.body.map(f);
50284 self
50285 }
50286 pub async fn send(
50288 self,
50289 ) -> Result<
50290 ResponseValue<types::PostGetCompressedAccountResponse>,
50291 Error<types::PostGetCompressedAccountResponse>,
50292 > {
50293 let Self { client, body } = self;
50294 let body = body
50295 .and_then(|v| {
50296 types::PostGetCompressedAccountBody::try_from(v)
50297 .map_err(|e| e.to_string())
50298 })
50299 .map_err(Error::InvalidRequest)?;
50300 let url = format!("{}/getCompressedAccount", client.baseurl,);
50301 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50302 header_map
50303 .append(
50304 ::reqwest::header::HeaderName::from_static("api-version"),
50305 ::reqwest::header::HeaderValue::from_static(
50306 super::Client::api_version(),
50307 ),
50308 );
50309 #[allow(unused_mut)]
50310 let mut request = client
50311 .client
50312 .post(url)
50313 .header(
50314 ::reqwest::header::ACCEPT,
50315 ::reqwest::header::HeaderValue::from_static("application/json"),
50316 )
50317 .json(&body)
50318 .headers(header_map)
50319 .build()?;
50320 let info = OperationInfo {
50321 operation_id: "post_get_compressed_account",
50322 };
50323 client.pre(&mut request, &info).await?;
50324 let result = client.exec(request, &info).await;
50325 client.post(&result, &info).await?;
50326 let response = result?;
50327 match response.status().as_u16() {
50328 200u16 => ResponseValue::from_response(response).await,
50329 429u16 => {
50330 Err(
50331 Error::ErrorResponse(
50332 ResponseValue::from_response(response).await?,
50333 ),
50334 )
50335 }
50336 500u16 => {
50337 Err(
50338 Error::ErrorResponse(
50339 ResponseValue::from_response(response).await?,
50340 ),
50341 )
50342 }
50343 _ => Err(Error::UnexpectedResponse(response)),
50344 }
50345 }
50346 }
50347 #[derive(Debug, Clone)]
50351 pub struct PostGetCompressedAccountBalance<'a> {
50352 client: &'a super::Client,
50353 body: Result<types::builder::PostGetCompressedAccountBalanceBody, String>,
50354 }
50355 impl<'a> PostGetCompressedAccountBalance<'a> {
50356 pub fn new(client: &'a super::Client) -> Self {
50357 Self {
50358 client: client,
50359 body: Ok(::std::default::Default::default()),
50360 }
50361 }
50362 pub fn body<V>(mut self, value: V) -> Self
50363 where
50364 V: std::convert::TryInto<types::PostGetCompressedAccountBalanceBody>,
50365 <V as std::convert::TryInto<
50366 types::PostGetCompressedAccountBalanceBody,
50367 >>::Error: std::fmt::Display,
50368 {
50369 self.body = value
50370 .try_into()
50371 .map(From::from)
50372 .map_err(|s| {
50373 format!(
50374 "conversion to `PostGetCompressedAccountBalanceBody` for body failed: {}",
50375 s
50376 )
50377 });
50378 self
50379 }
50380 pub fn body_map<F>(mut self, f: F) -> Self
50381 where
50382 F: std::ops::FnOnce(
50383 types::builder::PostGetCompressedAccountBalanceBody,
50384 ) -> types::builder::PostGetCompressedAccountBalanceBody,
50385 {
50386 self.body = self.body.map(f);
50387 self
50388 }
50389 pub async fn send(
50391 self,
50392 ) -> Result<
50393 ResponseValue<types::PostGetCompressedAccountBalanceResponse>,
50394 Error<types::PostGetCompressedAccountBalanceResponse>,
50395 > {
50396 let Self { client, body } = self;
50397 let body = body
50398 .and_then(|v| {
50399 types::PostGetCompressedAccountBalanceBody::try_from(v)
50400 .map_err(|e| e.to_string())
50401 })
50402 .map_err(Error::InvalidRequest)?;
50403 let url = format!("{}/getCompressedAccountBalance", client.baseurl,);
50404 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50405 header_map
50406 .append(
50407 ::reqwest::header::HeaderName::from_static("api-version"),
50408 ::reqwest::header::HeaderValue::from_static(
50409 super::Client::api_version(),
50410 ),
50411 );
50412 #[allow(unused_mut)]
50413 let mut request = client
50414 .client
50415 .post(url)
50416 .header(
50417 ::reqwest::header::ACCEPT,
50418 ::reqwest::header::HeaderValue::from_static("application/json"),
50419 )
50420 .json(&body)
50421 .headers(header_map)
50422 .build()?;
50423 let info = OperationInfo {
50424 operation_id: "post_get_compressed_account_balance",
50425 };
50426 client.pre(&mut request, &info).await?;
50427 let result = client.exec(request, &info).await;
50428 client.post(&result, &info).await?;
50429 let response = result?;
50430 match response.status().as_u16() {
50431 200u16 => ResponseValue::from_response(response).await,
50432 429u16 => {
50433 Err(
50434 Error::ErrorResponse(
50435 ResponseValue::from_response(response).await?,
50436 ),
50437 )
50438 }
50439 500u16 => {
50440 Err(
50441 Error::ErrorResponse(
50442 ResponseValue::from_response(response).await?,
50443 ),
50444 )
50445 }
50446 _ => Err(Error::UnexpectedResponse(response)),
50447 }
50448 }
50449 }
50450 #[derive(Debug, Clone)]
50454 pub struct PostGetCompressedAccountProof<'a> {
50455 client: &'a super::Client,
50456 body: Result<types::builder::PostGetCompressedAccountProofBody, String>,
50457 }
50458 impl<'a> PostGetCompressedAccountProof<'a> {
50459 pub fn new(client: &'a super::Client) -> Self {
50460 Self {
50461 client: client,
50462 body: Ok(::std::default::Default::default()),
50463 }
50464 }
50465 pub fn body<V>(mut self, value: V) -> Self
50466 where
50467 V: std::convert::TryInto<types::PostGetCompressedAccountProofBody>,
50468 <V as std::convert::TryInto<
50469 types::PostGetCompressedAccountProofBody,
50470 >>::Error: std::fmt::Display,
50471 {
50472 self.body = value
50473 .try_into()
50474 .map(From::from)
50475 .map_err(|s| {
50476 format!(
50477 "conversion to `PostGetCompressedAccountProofBody` for body failed: {}",
50478 s
50479 )
50480 });
50481 self
50482 }
50483 pub fn body_map<F>(mut self, f: F) -> Self
50484 where
50485 F: std::ops::FnOnce(
50486 types::builder::PostGetCompressedAccountProofBody,
50487 ) -> types::builder::PostGetCompressedAccountProofBody,
50488 {
50489 self.body = self.body.map(f);
50490 self
50491 }
50492 pub async fn send(
50494 self,
50495 ) -> Result<
50496 ResponseValue<types::PostGetCompressedAccountProofResponse>,
50497 Error<types::PostGetCompressedAccountProofResponse>,
50498 > {
50499 let Self { client, body } = self;
50500 let body = body
50501 .and_then(|v| {
50502 types::PostGetCompressedAccountProofBody::try_from(v)
50503 .map_err(|e| e.to_string())
50504 })
50505 .map_err(Error::InvalidRequest)?;
50506 let url = format!("{}/getCompressedAccountProof", client.baseurl,);
50507 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50508 header_map
50509 .append(
50510 ::reqwest::header::HeaderName::from_static("api-version"),
50511 ::reqwest::header::HeaderValue::from_static(
50512 super::Client::api_version(),
50513 ),
50514 );
50515 #[allow(unused_mut)]
50516 let mut request = client
50517 .client
50518 .post(url)
50519 .header(
50520 ::reqwest::header::ACCEPT,
50521 ::reqwest::header::HeaderValue::from_static("application/json"),
50522 )
50523 .json(&body)
50524 .headers(header_map)
50525 .build()?;
50526 let info = OperationInfo {
50527 operation_id: "post_get_compressed_account_proof",
50528 };
50529 client.pre(&mut request, &info).await?;
50530 let result = client.exec(request, &info).await;
50531 client.post(&result, &info).await?;
50532 let response = result?;
50533 match response.status().as_u16() {
50534 200u16 => ResponseValue::from_response(response).await,
50535 429u16 => {
50536 Err(
50537 Error::ErrorResponse(
50538 ResponseValue::from_response(response).await?,
50539 ),
50540 )
50541 }
50542 500u16 => {
50543 Err(
50544 Error::ErrorResponse(
50545 ResponseValue::from_response(response).await?,
50546 ),
50547 )
50548 }
50549 _ => Err(Error::UnexpectedResponse(response)),
50550 }
50551 }
50552 }
50553 #[derive(Debug, Clone)]
50557 pub struct PostGetCompressedAccountProofV2<'a> {
50558 client: &'a super::Client,
50559 body: Result<types::builder::PostGetCompressedAccountProofV2Body, String>,
50560 }
50561 impl<'a> PostGetCompressedAccountProofV2<'a> {
50562 pub fn new(client: &'a super::Client) -> Self {
50563 Self {
50564 client: client,
50565 body: Ok(::std::default::Default::default()),
50566 }
50567 }
50568 pub fn body<V>(mut self, value: V) -> Self
50569 where
50570 V: std::convert::TryInto<types::PostGetCompressedAccountProofV2Body>,
50571 <V as std::convert::TryInto<
50572 types::PostGetCompressedAccountProofV2Body,
50573 >>::Error: std::fmt::Display,
50574 {
50575 self.body = value
50576 .try_into()
50577 .map(From::from)
50578 .map_err(|s| {
50579 format!(
50580 "conversion to `PostGetCompressedAccountProofV2Body` for body failed: {}",
50581 s
50582 )
50583 });
50584 self
50585 }
50586 pub fn body_map<F>(mut self, f: F) -> Self
50587 where
50588 F: std::ops::FnOnce(
50589 types::builder::PostGetCompressedAccountProofV2Body,
50590 ) -> types::builder::PostGetCompressedAccountProofV2Body,
50591 {
50592 self.body = self.body.map(f);
50593 self
50594 }
50595 pub async fn send(
50597 self,
50598 ) -> Result<
50599 ResponseValue<types::PostGetCompressedAccountProofV2Response>,
50600 Error<types::PostGetCompressedAccountProofV2Response>,
50601 > {
50602 let Self { client, body } = self;
50603 let body = body
50604 .and_then(|v| {
50605 types::PostGetCompressedAccountProofV2Body::try_from(v)
50606 .map_err(|e| e.to_string())
50607 })
50608 .map_err(Error::InvalidRequest)?;
50609 let url = format!("{}/getCompressedAccountProofV2", client.baseurl,);
50610 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50611 header_map
50612 .append(
50613 ::reqwest::header::HeaderName::from_static("api-version"),
50614 ::reqwest::header::HeaderValue::from_static(
50615 super::Client::api_version(),
50616 ),
50617 );
50618 #[allow(unused_mut)]
50619 let mut request = client
50620 .client
50621 .post(url)
50622 .header(
50623 ::reqwest::header::ACCEPT,
50624 ::reqwest::header::HeaderValue::from_static("application/json"),
50625 )
50626 .json(&body)
50627 .headers(header_map)
50628 .build()?;
50629 let info = OperationInfo {
50630 operation_id: "post_get_compressed_account_proof_v2",
50631 };
50632 client.pre(&mut request, &info).await?;
50633 let result = client.exec(request, &info).await;
50634 client.post(&result, &info).await?;
50635 let response = result?;
50636 match response.status().as_u16() {
50637 200u16 => ResponseValue::from_response(response).await,
50638 429u16 => {
50639 Err(
50640 Error::ErrorResponse(
50641 ResponseValue::from_response(response).await?,
50642 ),
50643 )
50644 }
50645 500u16 => {
50646 Err(
50647 Error::ErrorResponse(
50648 ResponseValue::from_response(response).await?,
50649 ),
50650 )
50651 }
50652 _ => Err(Error::UnexpectedResponse(response)),
50653 }
50654 }
50655 }
50656 #[derive(Debug, Clone)]
50660 pub struct PostGetCompressedAccountV2<'a> {
50661 client: &'a super::Client,
50662 body: Result<types::builder::PostGetCompressedAccountV2Body, String>,
50663 }
50664 impl<'a> PostGetCompressedAccountV2<'a> {
50665 pub fn new(client: &'a super::Client) -> Self {
50666 Self {
50667 client: client,
50668 body: Ok(::std::default::Default::default()),
50669 }
50670 }
50671 pub fn body<V>(mut self, value: V) -> Self
50672 where
50673 V: std::convert::TryInto<types::PostGetCompressedAccountV2Body>,
50674 <V as std::convert::TryInto<
50675 types::PostGetCompressedAccountV2Body,
50676 >>::Error: std::fmt::Display,
50677 {
50678 self.body = value
50679 .try_into()
50680 .map(From::from)
50681 .map_err(|s| {
50682 format!(
50683 "conversion to `PostGetCompressedAccountV2Body` for body failed: {}",
50684 s
50685 )
50686 });
50687 self
50688 }
50689 pub fn body_map<F>(mut self, f: F) -> Self
50690 where
50691 F: std::ops::FnOnce(
50692 types::builder::PostGetCompressedAccountV2Body,
50693 ) -> types::builder::PostGetCompressedAccountV2Body,
50694 {
50695 self.body = self.body.map(f);
50696 self
50697 }
50698 pub async fn send(
50700 self,
50701 ) -> Result<
50702 ResponseValue<types::PostGetCompressedAccountV2Response>,
50703 Error<types::PostGetCompressedAccountV2Response>,
50704 > {
50705 let Self { client, body } = self;
50706 let body = body
50707 .and_then(|v| {
50708 types::PostGetCompressedAccountV2Body::try_from(v)
50709 .map_err(|e| e.to_string())
50710 })
50711 .map_err(Error::InvalidRequest)?;
50712 let url = format!("{}/getCompressedAccountV2", client.baseurl,);
50713 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50714 header_map
50715 .append(
50716 ::reqwest::header::HeaderName::from_static("api-version"),
50717 ::reqwest::header::HeaderValue::from_static(
50718 super::Client::api_version(),
50719 ),
50720 );
50721 #[allow(unused_mut)]
50722 let mut request = client
50723 .client
50724 .post(url)
50725 .header(
50726 ::reqwest::header::ACCEPT,
50727 ::reqwest::header::HeaderValue::from_static("application/json"),
50728 )
50729 .json(&body)
50730 .headers(header_map)
50731 .build()?;
50732 let info = OperationInfo {
50733 operation_id: "post_get_compressed_account_v2",
50734 };
50735 client.pre(&mut request, &info).await?;
50736 let result = client.exec(request, &info).await;
50737 client.post(&result, &info).await?;
50738 let response = result?;
50739 match response.status().as_u16() {
50740 200u16 => ResponseValue::from_response(response).await,
50741 429u16 => {
50742 Err(
50743 Error::ErrorResponse(
50744 ResponseValue::from_response(response).await?,
50745 ),
50746 )
50747 }
50748 500u16 => {
50749 Err(
50750 Error::ErrorResponse(
50751 ResponseValue::from_response(response).await?,
50752 ),
50753 )
50754 }
50755 _ => Err(Error::UnexpectedResponse(response)),
50756 }
50757 }
50758 }
50759 #[derive(Debug, Clone)]
50763 pub struct PostGetCompressedAccountsByOwner<'a> {
50764 client: &'a super::Client,
50765 body: Result<types::builder::PostGetCompressedAccountsByOwnerBody, String>,
50766 }
50767 impl<'a> PostGetCompressedAccountsByOwner<'a> {
50768 pub fn new(client: &'a super::Client) -> Self {
50769 Self {
50770 client: client,
50771 body: Ok(::std::default::Default::default()),
50772 }
50773 }
50774 pub fn body<V>(mut self, value: V) -> Self
50775 where
50776 V: std::convert::TryInto<types::PostGetCompressedAccountsByOwnerBody>,
50777 <V as std::convert::TryInto<
50778 types::PostGetCompressedAccountsByOwnerBody,
50779 >>::Error: std::fmt::Display,
50780 {
50781 self.body = value
50782 .try_into()
50783 .map(From::from)
50784 .map_err(|s| {
50785 format!(
50786 "conversion to `PostGetCompressedAccountsByOwnerBody` for body failed: {}",
50787 s
50788 )
50789 });
50790 self
50791 }
50792 pub fn body_map<F>(mut self, f: F) -> Self
50793 where
50794 F: std::ops::FnOnce(
50795 types::builder::PostGetCompressedAccountsByOwnerBody,
50796 ) -> types::builder::PostGetCompressedAccountsByOwnerBody,
50797 {
50798 self.body = self.body.map(f);
50799 self
50800 }
50801 pub async fn send(
50803 self,
50804 ) -> Result<
50805 ResponseValue<types::PostGetCompressedAccountsByOwnerResponse>,
50806 Error<types::PostGetCompressedAccountsByOwnerResponse>,
50807 > {
50808 let Self { client, body } = self;
50809 let body = body
50810 .and_then(|v| {
50811 types::PostGetCompressedAccountsByOwnerBody::try_from(v)
50812 .map_err(|e| e.to_string())
50813 })
50814 .map_err(Error::InvalidRequest)?;
50815 let url = format!("{}/getCompressedAccountsByOwner", client.baseurl,);
50816 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50817 header_map
50818 .append(
50819 ::reqwest::header::HeaderName::from_static("api-version"),
50820 ::reqwest::header::HeaderValue::from_static(
50821 super::Client::api_version(),
50822 ),
50823 );
50824 #[allow(unused_mut)]
50825 let mut request = client
50826 .client
50827 .post(url)
50828 .header(
50829 ::reqwest::header::ACCEPT,
50830 ::reqwest::header::HeaderValue::from_static("application/json"),
50831 )
50832 .json(&body)
50833 .headers(header_map)
50834 .build()?;
50835 let info = OperationInfo {
50836 operation_id: "post_get_compressed_accounts_by_owner",
50837 };
50838 client.pre(&mut request, &info).await?;
50839 let result = client.exec(request, &info).await;
50840 client.post(&result, &info).await?;
50841 let response = result?;
50842 match response.status().as_u16() {
50843 200u16 => ResponseValue::from_response(response).await,
50844 429u16 => {
50845 Err(
50846 Error::ErrorResponse(
50847 ResponseValue::from_response(response).await?,
50848 ),
50849 )
50850 }
50851 500u16 => {
50852 Err(
50853 Error::ErrorResponse(
50854 ResponseValue::from_response(response).await?,
50855 ),
50856 )
50857 }
50858 _ => Err(Error::UnexpectedResponse(response)),
50859 }
50860 }
50861 }
50862 #[derive(Debug, Clone)]
50866 pub struct PostGetCompressedAccountsByOwnerV2<'a> {
50867 client: &'a super::Client,
50868 body: Result<types::builder::PostGetCompressedAccountsByOwnerV2Body, String>,
50869 }
50870 impl<'a> PostGetCompressedAccountsByOwnerV2<'a> {
50871 pub fn new(client: &'a super::Client) -> Self {
50872 Self {
50873 client: client,
50874 body: Ok(::std::default::Default::default()),
50875 }
50876 }
50877 pub fn body<V>(mut self, value: V) -> Self
50878 where
50879 V: std::convert::TryInto<types::PostGetCompressedAccountsByOwnerV2Body>,
50880 <V as std::convert::TryInto<
50881 types::PostGetCompressedAccountsByOwnerV2Body,
50882 >>::Error: std::fmt::Display,
50883 {
50884 self.body = value
50885 .try_into()
50886 .map(From::from)
50887 .map_err(|s| {
50888 format!(
50889 "conversion to `PostGetCompressedAccountsByOwnerV2Body` for body failed: {}",
50890 s
50891 )
50892 });
50893 self
50894 }
50895 pub fn body_map<F>(mut self, f: F) -> Self
50896 where
50897 F: std::ops::FnOnce(
50898 types::builder::PostGetCompressedAccountsByOwnerV2Body,
50899 ) -> types::builder::PostGetCompressedAccountsByOwnerV2Body,
50900 {
50901 self.body = self.body.map(f);
50902 self
50903 }
50904 pub async fn send(
50906 self,
50907 ) -> Result<
50908 ResponseValue<types::PostGetCompressedAccountsByOwnerV2Response>,
50909 Error<types::PostGetCompressedAccountsByOwnerV2Response>,
50910 > {
50911 let Self { client, body } = self;
50912 let body = body
50913 .and_then(|v| {
50914 types::PostGetCompressedAccountsByOwnerV2Body::try_from(v)
50915 .map_err(|e| e.to_string())
50916 })
50917 .map_err(Error::InvalidRequest)?;
50918 let url = format!("{}/getCompressedAccountsByOwnerV2", client.baseurl,);
50919 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
50920 header_map
50921 .append(
50922 ::reqwest::header::HeaderName::from_static("api-version"),
50923 ::reqwest::header::HeaderValue::from_static(
50924 super::Client::api_version(),
50925 ),
50926 );
50927 #[allow(unused_mut)]
50928 let mut request = client
50929 .client
50930 .post(url)
50931 .header(
50932 ::reqwest::header::ACCEPT,
50933 ::reqwest::header::HeaderValue::from_static("application/json"),
50934 )
50935 .json(&body)
50936 .headers(header_map)
50937 .build()?;
50938 let info = OperationInfo {
50939 operation_id: "post_get_compressed_accounts_by_owner_v2",
50940 };
50941 client.pre(&mut request, &info).await?;
50942 let result = client.exec(request, &info).await;
50943 client.post(&result, &info).await?;
50944 let response = result?;
50945 match response.status().as_u16() {
50946 200u16 => ResponseValue::from_response(response).await,
50947 429u16 => {
50948 Err(
50949 Error::ErrorResponse(
50950 ResponseValue::from_response(response).await?,
50951 ),
50952 )
50953 }
50954 500u16 => {
50955 Err(
50956 Error::ErrorResponse(
50957 ResponseValue::from_response(response).await?,
50958 ),
50959 )
50960 }
50961 _ => Err(Error::UnexpectedResponse(response)),
50962 }
50963 }
50964 }
50965 #[derive(Debug, Clone)]
50969 pub struct PostGetCompressedBalanceByOwner<'a> {
50970 client: &'a super::Client,
50971 body: Result<types::builder::PostGetCompressedBalanceByOwnerBody, String>,
50972 }
50973 impl<'a> PostGetCompressedBalanceByOwner<'a> {
50974 pub fn new(client: &'a super::Client) -> Self {
50975 Self {
50976 client: client,
50977 body: Ok(::std::default::Default::default()),
50978 }
50979 }
50980 pub fn body<V>(mut self, value: V) -> Self
50981 where
50982 V: std::convert::TryInto<types::PostGetCompressedBalanceByOwnerBody>,
50983 <V as std::convert::TryInto<
50984 types::PostGetCompressedBalanceByOwnerBody,
50985 >>::Error: std::fmt::Display,
50986 {
50987 self.body = value
50988 .try_into()
50989 .map(From::from)
50990 .map_err(|s| {
50991 format!(
50992 "conversion to `PostGetCompressedBalanceByOwnerBody` for body failed: {}",
50993 s
50994 )
50995 });
50996 self
50997 }
50998 pub fn body_map<F>(mut self, f: F) -> Self
50999 where
51000 F: std::ops::FnOnce(
51001 types::builder::PostGetCompressedBalanceByOwnerBody,
51002 ) -> types::builder::PostGetCompressedBalanceByOwnerBody,
51003 {
51004 self.body = self.body.map(f);
51005 self
51006 }
51007 pub async fn send(
51009 self,
51010 ) -> Result<
51011 ResponseValue<types::PostGetCompressedBalanceByOwnerResponse>,
51012 Error<types::PostGetCompressedBalanceByOwnerResponse>,
51013 > {
51014 let Self { client, body } = self;
51015 let body = body
51016 .and_then(|v| {
51017 types::PostGetCompressedBalanceByOwnerBody::try_from(v)
51018 .map_err(|e| e.to_string())
51019 })
51020 .map_err(Error::InvalidRequest)?;
51021 let url = format!("{}/getCompressedBalanceByOwner", client.baseurl,);
51022 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51023 header_map
51024 .append(
51025 ::reqwest::header::HeaderName::from_static("api-version"),
51026 ::reqwest::header::HeaderValue::from_static(
51027 super::Client::api_version(),
51028 ),
51029 );
51030 #[allow(unused_mut)]
51031 let mut request = client
51032 .client
51033 .post(url)
51034 .header(
51035 ::reqwest::header::ACCEPT,
51036 ::reqwest::header::HeaderValue::from_static("application/json"),
51037 )
51038 .json(&body)
51039 .headers(header_map)
51040 .build()?;
51041 let info = OperationInfo {
51042 operation_id: "post_get_compressed_balance_by_owner",
51043 };
51044 client.pre(&mut request, &info).await?;
51045 let result = client.exec(request, &info).await;
51046 client.post(&result, &info).await?;
51047 let response = result?;
51048 match response.status().as_u16() {
51049 200u16 => ResponseValue::from_response(response).await,
51050 429u16 => {
51051 Err(
51052 Error::ErrorResponse(
51053 ResponseValue::from_response(response).await?,
51054 ),
51055 )
51056 }
51057 500u16 => {
51058 Err(
51059 Error::ErrorResponse(
51060 ResponseValue::from_response(response).await?,
51061 ),
51062 )
51063 }
51064 _ => Err(Error::UnexpectedResponse(response)),
51065 }
51066 }
51067 }
51068 #[derive(Debug, Clone)]
51072 pub struct PostGetCompressedMintTokenHolders<'a> {
51073 client: &'a super::Client,
51074 body: Result<types::builder::PostGetCompressedMintTokenHoldersBody, String>,
51075 }
51076 impl<'a> PostGetCompressedMintTokenHolders<'a> {
51077 pub fn new(client: &'a super::Client) -> Self {
51078 Self {
51079 client: client,
51080 body: Ok(::std::default::Default::default()),
51081 }
51082 }
51083 pub fn body<V>(mut self, value: V) -> Self
51084 where
51085 V: std::convert::TryInto<types::PostGetCompressedMintTokenHoldersBody>,
51086 <V as std::convert::TryInto<
51087 types::PostGetCompressedMintTokenHoldersBody,
51088 >>::Error: std::fmt::Display,
51089 {
51090 self.body = value
51091 .try_into()
51092 .map(From::from)
51093 .map_err(|s| {
51094 format!(
51095 "conversion to `PostGetCompressedMintTokenHoldersBody` for body failed: {}",
51096 s
51097 )
51098 });
51099 self
51100 }
51101 pub fn body_map<F>(mut self, f: F) -> Self
51102 where
51103 F: std::ops::FnOnce(
51104 types::builder::PostGetCompressedMintTokenHoldersBody,
51105 ) -> types::builder::PostGetCompressedMintTokenHoldersBody,
51106 {
51107 self.body = self.body.map(f);
51108 self
51109 }
51110 pub async fn send(
51112 self,
51113 ) -> Result<
51114 ResponseValue<types::PostGetCompressedMintTokenHoldersResponse>,
51115 Error<types::PostGetCompressedMintTokenHoldersResponse>,
51116 > {
51117 let Self { client, body } = self;
51118 let body = body
51119 .and_then(|v| {
51120 types::PostGetCompressedMintTokenHoldersBody::try_from(v)
51121 .map_err(|e| e.to_string())
51122 })
51123 .map_err(Error::InvalidRequest)?;
51124 let url = format!("{}/getCompressedMintTokenHolders", client.baseurl,);
51125 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51126 header_map
51127 .append(
51128 ::reqwest::header::HeaderName::from_static("api-version"),
51129 ::reqwest::header::HeaderValue::from_static(
51130 super::Client::api_version(),
51131 ),
51132 );
51133 #[allow(unused_mut)]
51134 let mut request = client
51135 .client
51136 .post(url)
51137 .header(
51138 ::reqwest::header::ACCEPT,
51139 ::reqwest::header::HeaderValue::from_static("application/json"),
51140 )
51141 .json(&body)
51142 .headers(header_map)
51143 .build()?;
51144 let info = OperationInfo {
51145 operation_id: "post_get_compressed_mint_token_holders",
51146 };
51147 client.pre(&mut request, &info).await?;
51148 let result = client.exec(request, &info).await;
51149 client.post(&result, &info).await?;
51150 let response = result?;
51151 match response.status().as_u16() {
51152 200u16 => ResponseValue::from_response(response).await,
51153 429u16 => {
51154 Err(
51155 Error::ErrorResponse(
51156 ResponseValue::from_response(response).await?,
51157 ),
51158 )
51159 }
51160 500u16 => {
51161 Err(
51162 Error::ErrorResponse(
51163 ResponseValue::from_response(response).await?,
51164 ),
51165 )
51166 }
51167 _ => Err(Error::UnexpectedResponse(response)),
51168 }
51169 }
51170 }
51171 #[derive(Debug, Clone)]
51175 pub struct PostGetCompressedTokenAccountBalance<'a> {
51176 client: &'a super::Client,
51177 body: Result<types::builder::PostGetCompressedTokenAccountBalanceBody, String>,
51178 }
51179 impl<'a> PostGetCompressedTokenAccountBalance<'a> {
51180 pub fn new(client: &'a super::Client) -> Self {
51181 Self {
51182 client: client,
51183 body: Ok(::std::default::Default::default()),
51184 }
51185 }
51186 pub fn body<V>(mut self, value: V) -> Self
51187 where
51188 V: std::convert::TryInto<types::PostGetCompressedTokenAccountBalanceBody>,
51189 <V as std::convert::TryInto<
51190 types::PostGetCompressedTokenAccountBalanceBody,
51191 >>::Error: std::fmt::Display,
51192 {
51193 self.body = value
51194 .try_into()
51195 .map(From::from)
51196 .map_err(|s| {
51197 format!(
51198 "conversion to `PostGetCompressedTokenAccountBalanceBody` for body failed: {}",
51199 s
51200 )
51201 });
51202 self
51203 }
51204 pub fn body_map<F>(mut self, f: F) -> Self
51205 where
51206 F: std::ops::FnOnce(
51207 types::builder::PostGetCompressedTokenAccountBalanceBody,
51208 ) -> types::builder::PostGetCompressedTokenAccountBalanceBody,
51209 {
51210 self.body = self.body.map(f);
51211 self
51212 }
51213 pub async fn send(
51215 self,
51216 ) -> Result<
51217 ResponseValue<types::PostGetCompressedTokenAccountBalanceResponse>,
51218 Error<types::PostGetCompressedTokenAccountBalanceResponse>,
51219 > {
51220 let Self { client, body } = self;
51221 let body = body
51222 .and_then(|v| {
51223 types::PostGetCompressedTokenAccountBalanceBody::try_from(v)
51224 .map_err(|e| e.to_string())
51225 })
51226 .map_err(Error::InvalidRequest)?;
51227 let url = format!("{}/getCompressedTokenAccountBalance", client.baseurl,);
51228 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51229 header_map
51230 .append(
51231 ::reqwest::header::HeaderName::from_static("api-version"),
51232 ::reqwest::header::HeaderValue::from_static(
51233 super::Client::api_version(),
51234 ),
51235 );
51236 #[allow(unused_mut)]
51237 let mut request = client
51238 .client
51239 .post(url)
51240 .header(
51241 ::reqwest::header::ACCEPT,
51242 ::reqwest::header::HeaderValue::from_static("application/json"),
51243 )
51244 .json(&body)
51245 .headers(header_map)
51246 .build()?;
51247 let info = OperationInfo {
51248 operation_id: "post_get_compressed_token_account_balance",
51249 };
51250 client.pre(&mut request, &info).await?;
51251 let result = client.exec(request, &info).await;
51252 client.post(&result, &info).await?;
51253 let response = result?;
51254 match response.status().as_u16() {
51255 200u16 => ResponseValue::from_response(response).await,
51256 429u16 => {
51257 Err(
51258 Error::ErrorResponse(
51259 ResponseValue::from_response(response).await?,
51260 ),
51261 )
51262 }
51263 500u16 => {
51264 Err(
51265 Error::ErrorResponse(
51266 ResponseValue::from_response(response).await?,
51267 ),
51268 )
51269 }
51270 _ => Err(Error::UnexpectedResponse(response)),
51271 }
51272 }
51273 }
51274 #[derive(Debug, Clone)]
51278 pub struct PostGetCompressedTokenAccountsByDelegate<'a> {
51279 client: &'a super::Client,
51280 body: Result<
51281 types::builder::PostGetCompressedTokenAccountsByDelegateBody,
51282 String,
51283 >,
51284 }
51285 impl<'a> PostGetCompressedTokenAccountsByDelegate<'a> {
51286 pub fn new(client: &'a super::Client) -> Self {
51287 Self {
51288 client: client,
51289 body: Ok(::std::default::Default::default()),
51290 }
51291 }
51292 pub fn body<V>(mut self, value: V) -> Self
51293 where
51294 V: std::convert::TryInto<
51295 types::PostGetCompressedTokenAccountsByDelegateBody,
51296 >,
51297 <V as std::convert::TryInto<
51298 types::PostGetCompressedTokenAccountsByDelegateBody,
51299 >>::Error: std::fmt::Display,
51300 {
51301 self.body = value
51302 .try_into()
51303 .map(From::from)
51304 .map_err(|s| {
51305 format!(
51306 "conversion to `PostGetCompressedTokenAccountsByDelegateBody` for body failed: {}",
51307 s
51308 )
51309 });
51310 self
51311 }
51312 pub fn body_map<F>(mut self, f: F) -> Self
51313 where
51314 F: std::ops::FnOnce(
51315 types::builder::PostGetCompressedTokenAccountsByDelegateBody,
51316 ) -> types::builder::PostGetCompressedTokenAccountsByDelegateBody,
51317 {
51318 self.body = self.body.map(f);
51319 self
51320 }
51321 pub async fn send(
51323 self,
51324 ) -> Result<
51325 ResponseValue<types::PostGetCompressedTokenAccountsByDelegateResponse>,
51326 Error<types::PostGetCompressedTokenAccountsByDelegateResponse>,
51327 > {
51328 let Self { client, body } = self;
51329 let body = body
51330 .and_then(|v| {
51331 types::PostGetCompressedTokenAccountsByDelegateBody::try_from(v)
51332 .map_err(|e| e.to_string())
51333 })
51334 .map_err(Error::InvalidRequest)?;
51335 let url = format!(
51336 "{}/getCompressedTokenAccountsByDelegate", client.baseurl,
51337 );
51338 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51339 header_map
51340 .append(
51341 ::reqwest::header::HeaderName::from_static("api-version"),
51342 ::reqwest::header::HeaderValue::from_static(
51343 super::Client::api_version(),
51344 ),
51345 );
51346 #[allow(unused_mut)]
51347 let mut request = client
51348 .client
51349 .post(url)
51350 .header(
51351 ::reqwest::header::ACCEPT,
51352 ::reqwest::header::HeaderValue::from_static("application/json"),
51353 )
51354 .json(&body)
51355 .headers(header_map)
51356 .build()?;
51357 let info = OperationInfo {
51358 operation_id: "post_get_compressed_token_accounts_by_delegate",
51359 };
51360 client.pre(&mut request, &info).await?;
51361 let result = client.exec(request, &info).await;
51362 client.post(&result, &info).await?;
51363 let response = result?;
51364 match response.status().as_u16() {
51365 200u16 => ResponseValue::from_response(response).await,
51366 429u16 => {
51367 Err(
51368 Error::ErrorResponse(
51369 ResponseValue::from_response(response).await?,
51370 ),
51371 )
51372 }
51373 500u16 => {
51374 Err(
51375 Error::ErrorResponse(
51376 ResponseValue::from_response(response).await?,
51377 ),
51378 )
51379 }
51380 _ => Err(Error::UnexpectedResponse(response)),
51381 }
51382 }
51383 }
51384 #[derive(Debug, Clone)]
51388 pub struct PostGetCompressedTokenAccountsByDelegateV2<'a> {
51389 client: &'a super::Client,
51390 body: Result<
51391 types::builder::PostGetCompressedTokenAccountsByDelegateV2Body,
51392 String,
51393 >,
51394 }
51395 impl<'a> PostGetCompressedTokenAccountsByDelegateV2<'a> {
51396 pub fn new(client: &'a super::Client) -> Self {
51397 Self {
51398 client: client,
51399 body: Ok(::std::default::Default::default()),
51400 }
51401 }
51402 pub fn body<V>(mut self, value: V) -> Self
51403 where
51404 V: std::convert::TryInto<
51405 types::PostGetCompressedTokenAccountsByDelegateV2Body,
51406 >,
51407 <V as std::convert::TryInto<
51408 types::PostGetCompressedTokenAccountsByDelegateV2Body,
51409 >>::Error: std::fmt::Display,
51410 {
51411 self.body = value
51412 .try_into()
51413 .map(From::from)
51414 .map_err(|s| {
51415 format!(
51416 "conversion to `PostGetCompressedTokenAccountsByDelegateV2Body` for body failed: {}",
51417 s
51418 )
51419 });
51420 self
51421 }
51422 pub fn body_map<F>(mut self, f: F) -> Self
51423 where
51424 F: std::ops::FnOnce(
51425 types::builder::PostGetCompressedTokenAccountsByDelegateV2Body,
51426 ) -> types::builder::PostGetCompressedTokenAccountsByDelegateV2Body,
51427 {
51428 self.body = self.body.map(f);
51429 self
51430 }
51431 pub async fn send(
51433 self,
51434 ) -> Result<
51435 ResponseValue<types::PostGetCompressedTokenAccountsByDelegateV2Response>,
51436 Error<types::PostGetCompressedTokenAccountsByDelegateV2Response>,
51437 > {
51438 let Self { client, body } = self;
51439 let body = body
51440 .and_then(|v| {
51441 types::PostGetCompressedTokenAccountsByDelegateV2Body::try_from(v)
51442 .map_err(|e| e.to_string())
51443 })
51444 .map_err(Error::InvalidRequest)?;
51445 let url = format!(
51446 "{}/getCompressedTokenAccountsByDelegateV2", client.baseurl,
51447 );
51448 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51449 header_map
51450 .append(
51451 ::reqwest::header::HeaderName::from_static("api-version"),
51452 ::reqwest::header::HeaderValue::from_static(
51453 super::Client::api_version(),
51454 ),
51455 );
51456 #[allow(unused_mut)]
51457 let mut request = client
51458 .client
51459 .post(url)
51460 .header(
51461 ::reqwest::header::ACCEPT,
51462 ::reqwest::header::HeaderValue::from_static("application/json"),
51463 )
51464 .json(&body)
51465 .headers(header_map)
51466 .build()?;
51467 let info = OperationInfo {
51468 operation_id: "post_get_compressed_token_accounts_by_delegate_v2",
51469 };
51470 client.pre(&mut request, &info).await?;
51471 let result = client.exec(request, &info).await;
51472 client.post(&result, &info).await?;
51473 let response = result?;
51474 match response.status().as_u16() {
51475 200u16 => ResponseValue::from_response(response).await,
51476 429u16 => {
51477 Err(
51478 Error::ErrorResponse(
51479 ResponseValue::from_response(response).await?,
51480 ),
51481 )
51482 }
51483 500u16 => {
51484 Err(
51485 Error::ErrorResponse(
51486 ResponseValue::from_response(response).await?,
51487 ),
51488 )
51489 }
51490 _ => Err(Error::UnexpectedResponse(response)),
51491 }
51492 }
51493 }
51494 #[derive(Debug, Clone)]
51498 pub struct PostGetCompressedTokenAccountsByOwner<'a> {
51499 client: &'a super::Client,
51500 body: Result<types::builder::PostGetCompressedTokenAccountsByOwnerBody, String>,
51501 }
51502 impl<'a> PostGetCompressedTokenAccountsByOwner<'a> {
51503 pub fn new(client: &'a super::Client) -> Self {
51504 Self {
51505 client: client,
51506 body: Ok(::std::default::Default::default()),
51507 }
51508 }
51509 pub fn body<V>(mut self, value: V) -> Self
51510 where
51511 V: std::convert::TryInto<types::PostGetCompressedTokenAccountsByOwnerBody>,
51512 <V as std::convert::TryInto<
51513 types::PostGetCompressedTokenAccountsByOwnerBody,
51514 >>::Error: std::fmt::Display,
51515 {
51516 self.body = value
51517 .try_into()
51518 .map(From::from)
51519 .map_err(|s| {
51520 format!(
51521 "conversion to `PostGetCompressedTokenAccountsByOwnerBody` for body failed: {}",
51522 s
51523 )
51524 });
51525 self
51526 }
51527 pub fn body_map<F>(mut self, f: F) -> Self
51528 where
51529 F: std::ops::FnOnce(
51530 types::builder::PostGetCompressedTokenAccountsByOwnerBody,
51531 ) -> types::builder::PostGetCompressedTokenAccountsByOwnerBody,
51532 {
51533 self.body = self.body.map(f);
51534 self
51535 }
51536 pub async fn send(
51538 self,
51539 ) -> Result<
51540 ResponseValue<types::PostGetCompressedTokenAccountsByOwnerResponse>,
51541 Error<types::PostGetCompressedTokenAccountsByOwnerResponse>,
51542 > {
51543 let Self { client, body } = self;
51544 let body = body
51545 .and_then(|v| {
51546 types::PostGetCompressedTokenAccountsByOwnerBody::try_from(v)
51547 .map_err(|e| e.to_string())
51548 })
51549 .map_err(Error::InvalidRequest)?;
51550 let url = format!("{}/getCompressedTokenAccountsByOwner", client.baseurl,);
51551 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51552 header_map
51553 .append(
51554 ::reqwest::header::HeaderName::from_static("api-version"),
51555 ::reqwest::header::HeaderValue::from_static(
51556 super::Client::api_version(),
51557 ),
51558 );
51559 #[allow(unused_mut)]
51560 let mut request = client
51561 .client
51562 .post(url)
51563 .header(
51564 ::reqwest::header::ACCEPT,
51565 ::reqwest::header::HeaderValue::from_static("application/json"),
51566 )
51567 .json(&body)
51568 .headers(header_map)
51569 .build()?;
51570 let info = OperationInfo {
51571 operation_id: "post_get_compressed_token_accounts_by_owner",
51572 };
51573 client.pre(&mut request, &info).await?;
51574 let result = client.exec(request, &info).await;
51575 client.post(&result, &info).await?;
51576 let response = result?;
51577 match response.status().as_u16() {
51578 200u16 => ResponseValue::from_response(response).await,
51579 429u16 => {
51580 Err(
51581 Error::ErrorResponse(
51582 ResponseValue::from_response(response).await?,
51583 ),
51584 )
51585 }
51586 500u16 => {
51587 Err(
51588 Error::ErrorResponse(
51589 ResponseValue::from_response(response).await?,
51590 ),
51591 )
51592 }
51593 _ => Err(Error::UnexpectedResponse(response)),
51594 }
51595 }
51596 }
51597 #[derive(Debug, Clone)]
51601 pub struct PostGetCompressedTokenAccountsByOwnerV2<'a> {
51602 client: &'a super::Client,
51603 body: Result<
51604 types::builder::PostGetCompressedTokenAccountsByOwnerV2Body,
51605 String,
51606 >,
51607 }
51608 impl<'a> PostGetCompressedTokenAccountsByOwnerV2<'a> {
51609 pub fn new(client: &'a super::Client) -> Self {
51610 Self {
51611 client: client,
51612 body: Ok(::std::default::Default::default()),
51613 }
51614 }
51615 pub fn body<V>(mut self, value: V) -> Self
51616 where
51617 V: std::convert::TryInto<types::PostGetCompressedTokenAccountsByOwnerV2Body>,
51618 <V as std::convert::TryInto<
51619 types::PostGetCompressedTokenAccountsByOwnerV2Body,
51620 >>::Error: std::fmt::Display,
51621 {
51622 self.body = value
51623 .try_into()
51624 .map(From::from)
51625 .map_err(|s| {
51626 format!(
51627 "conversion to `PostGetCompressedTokenAccountsByOwnerV2Body` for body failed: {}",
51628 s
51629 )
51630 });
51631 self
51632 }
51633 pub fn body_map<F>(mut self, f: F) -> Self
51634 where
51635 F: std::ops::FnOnce(
51636 types::builder::PostGetCompressedTokenAccountsByOwnerV2Body,
51637 ) -> types::builder::PostGetCompressedTokenAccountsByOwnerV2Body,
51638 {
51639 self.body = self.body.map(f);
51640 self
51641 }
51642 pub async fn send(
51644 self,
51645 ) -> Result<
51646 ResponseValue<types::PostGetCompressedTokenAccountsByOwnerV2Response>,
51647 Error<types::PostGetCompressedTokenAccountsByOwnerV2Response>,
51648 > {
51649 let Self { client, body } = self;
51650 let body = body
51651 .and_then(|v| {
51652 types::PostGetCompressedTokenAccountsByOwnerV2Body::try_from(v)
51653 .map_err(|e| e.to_string())
51654 })
51655 .map_err(Error::InvalidRequest)?;
51656 let url = format!("{}/getCompressedTokenAccountsByOwnerV2", client.baseurl,);
51657 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51658 header_map
51659 .append(
51660 ::reqwest::header::HeaderName::from_static("api-version"),
51661 ::reqwest::header::HeaderValue::from_static(
51662 super::Client::api_version(),
51663 ),
51664 );
51665 #[allow(unused_mut)]
51666 let mut request = client
51667 .client
51668 .post(url)
51669 .header(
51670 ::reqwest::header::ACCEPT,
51671 ::reqwest::header::HeaderValue::from_static("application/json"),
51672 )
51673 .json(&body)
51674 .headers(header_map)
51675 .build()?;
51676 let info = OperationInfo {
51677 operation_id: "post_get_compressed_token_accounts_by_owner_v2",
51678 };
51679 client.pre(&mut request, &info).await?;
51680 let result = client.exec(request, &info).await;
51681 client.post(&result, &info).await?;
51682 let response = result?;
51683 match response.status().as_u16() {
51684 200u16 => ResponseValue::from_response(response).await,
51685 429u16 => {
51686 Err(
51687 Error::ErrorResponse(
51688 ResponseValue::from_response(response).await?,
51689 ),
51690 )
51691 }
51692 500u16 => {
51693 Err(
51694 Error::ErrorResponse(
51695 ResponseValue::from_response(response).await?,
51696 ),
51697 )
51698 }
51699 _ => Err(Error::UnexpectedResponse(response)),
51700 }
51701 }
51702 }
51703 #[derive(Debug, Clone)]
51707 pub struct PostGetCompressedTokenBalancesByOwner<'a> {
51708 client: &'a super::Client,
51709 body: Result<types::builder::PostGetCompressedTokenBalancesByOwnerBody, String>,
51710 }
51711 impl<'a> PostGetCompressedTokenBalancesByOwner<'a> {
51712 pub fn new(client: &'a super::Client) -> Self {
51713 Self {
51714 client: client,
51715 body: Ok(::std::default::Default::default()),
51716 }
51717 }
51718 pub fn body<V>(mut self, value: V) -> Self
51719 where
51720 V: std::convert::TryInto<types::PostGetCompressedTokenBalancesByOwnerBody>,
51721 <V as std::convert::TryInto<
51722 types::PostGetCompressedTokenBalancesByOwnerBody,
51723 >>::Error: std::fmt::Display,
51724 {
51725 self.body = value
51726 .try_into()
51727 .map(From::from)
51728 .map_err(|s| {
51729 format!(
51730 "conversion to `PostGetCompressedTokenBalancesByOwnerBody` for body failed: {}",
51731 s
51732 )
51733 });
51734 self
51735 }
51736 pub fn body_map<F>(mut self, f: F) -> Self
51737 where
51738 F: std::ops::FnOnce(
51739 types::builder::PostGetCompressedTokenBalancesByOwnerBody,
51740 ) -> types::builder::PostGetCompressedTokenBalancesByOwnerBody,
51741 {
51742 self.body = self.body.map(f);
51743 self
51744 }
51745 pub async fn send(
51747 self,
51748 ) -> Result<
51749 ResponseValue<types::PostGetCompressedTokenBalancesByOwnerResponse>,
51750 Error<types::PostGetCompressedTokenBalancesByOwnerResponse>,
51751 > {
51752 let Self { client, body } = self;
51753 let body = body
51754 .and_then(|v| {
51755 types::PostGetCompressedTokenBalancesByOwnerBody::try_from(v)
51756 .map_err(|e| e.to_string())
51757 })
51758 .map_err(Error::InvalidRequest)?;
51759 let url = format!("{}/getCompressedTokenBalancesByOwner", client.baseurl,);
51760 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51761 header_map
51762 .append(
51763 ::reqwest::header::HeaderName::from_static("api-version"),
51764 ::reqwest::header::HeaderValue::from_static(
51765 super::Client::api_version(),
51766 ),
51767 );
51768 #[allow(unused_mut)]
51769 let mut request = client
51770 .client
51771 .post(url)
51772 .header(
51773 ::reqwest::header::ACCEPT,
51774 ::reqwest::header::HeaderValue::from_static("application/json"),
51775 )
51776 .json(&body)
51777 .headers(header_map)
51778 .build()?;
51779 let info = OperationInfo {
51780 operation_id: "post_get_compressed_token_balances_by_owner",
51781 };
51782 client.pre(&mut request, &info).await?;
51783 let result = client.exec(request, &info).await;
51784 client.post(&result, &info).await?;
51785 let response = result?;
51786 match response.status().as_u16() {
51787 200u16 => ResponseValue::from_response(response).await,
51788 429u16 => {
51789 Err(
51790 Error::ErrorResponse(
51791 ResponseValue::from_response(response).await?,
51792 ),
51793 )
51794 }
51795 500u16 => {
51796 Err(
51797 Error::ErrorResponse(
51798 ResponseValue::from_response(response).await?,
51799 ),
51800 )
51801 }
51802 _ => Err(Error::UnexpectedResponse(response)),
51803 }
51804 }
51805 }
51806 #[derive(Debug, Clone)]
51810 pub struct PostGetCompressedTokenBalancesByOwnerV2<'a> {
51811 client: &'a super::Client,
51812 body: Result<
51813 types::builder::PostGetCompressedTokenBalancesByOwnerV2Body,
51814 String,
51815 >,
51816 }
51817 impl<'a> PostGetCompressedTokenBalancesByOwnerV2<'a> {
51818 pub fn new(client: &'a super::Client) -> Self {
51819 Self {
51820 client: client,
51821 body: Ok(::std::default::Default::default()),
51822 }
51823 }
51824 pub fn body<V>(mut self, value: V) -> Self
51825 where
51826 V: std::convert::TryInto<types::PostGetCompressedTokenBalancesByOwnerV2Body>,
51827 <V as std::convert::TryInto<
51828 types::PostGetCompressedTokenBalancesByOwnerV2Body,
51829 >>::Error: std::fmt::Display,
51830 {
51831 self.body = value
51832 .try_into()
51833 .map(From::from)
51834 .map_err(|s| {
51835 format!(
51836 "conversion to `PostGetCompressedTokenBalancesByOwnerV2Body` for body failed: {}",
51837 s
51838 )
51839 });
51840 self
51841 }
51842 pub fn body_map<F>(mut self, f: F) -> Self
51843 where
51844 F: std::ops::FnOnce(
51845 types::builder::PostGetCompressedTokenBalancesByOwnerV2Body,
51846 ) -> types::builder::PostGetCompressedTokenBalancesByOwnerV2Body,
51847 {
51848 self.body = self.body.map(f);
51849 self
51850 }
51851 pub async fn send(
51853 self,
51854 ) -> Result<
51855 ResponseValue<types::PostGetCompressedTokenBalancesByOwnerV2Response>,
51856 Error<types::PostGetCompressedTokenBalancesByOwnerV2Response>,
51857 > {
51858 let Self { client, body } = self;
51859 let body = body
51860 .and_then(|v| {
51861 types::PostGetCompressedTokenBalancesByOwnerV2Body::try_from(v)
51862 .map_err(|e| e.to_string())
51863 })
51864 .map_err(Error::InvalidRequest)?;
51865 let url = format!("{}/getCompressedTokenBalancesByOwnerV2", client.baseurl,);
51866 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51867 header_map
51868 .append(
51869 ::reqwest::header::HeaderName::from_static("api-version"),
51870 ::reqwest::header::HeaderValue::from_static(
51871 super::Client::api_version(),
51872 ),
51873 );
51874 #[allow(unused_mut)]
51875 let mut request = client
51876 .client
51877 .post(url)
51878 .header(
51879 ::reqwest::header::ACCEPT,
51880 ::reqwest::header::HeaderValue::from_static("application/json"),
51881 )
51882 .json(&body)
51883 .headers(header_map)
51884 .build()?;
51885 let info = OperationInfo {
51886 operation_id: "post_get_compressed_token_balances_by_owner_v2",
51887 };
51888 client.pre(&mut request, &info).await?;
51889 let result = client.exec(request, &info).await;
51890 client.post(&result, &info).await?;
51891 let response = result?;
51892 match response.status().as_u16() {
51893 200u16 => ResponseValue::from_response(response).await,
51894 429u16 => {
51895 Err(
51896 Error::ErrorResponse(
51897 ResponseValue::from_response(response).await?,
51898 ),
51899 )
51900 }
51901 500u16 => {
51902 Err(
51903 Error::ErrorResponse(
51904 ResponseValue::from_response(response).await?,
51905 ),
51906 )
51907 }
51908 _ => Err(Error::UnexpectedResponse(response)),
51909 }
51910 }
51911 }
51912 #[derive(Debug, Clone)]
51916 pub struct PostGetCompressionSignaturesForAccount<'a> {
51917 client: &'a super::Client,
51918 body: Result<types::builder::PostGetCompressionSignaturesForAccountBody, String>,
51919 }
51920 impl<'a> PostGetCompressionSignaturesForAccount<'a> {
51921 pub fn new(client: &'a super::Client) -> Self {
51922 Self {
51923 client: client,
51924 body: Ok(::std::default::Default::default()),
51925 }
51926 }
51927 pub fn body<V>(mut self, value: V) -> Self
51928 where
51929 V: std::convert::TryInto<types::PostGetCompressionSignaturesForAccountBody>,
51930 <V as std::convert::TryInto<
51931 types::PostGetCompressionSignaturesForAccountBody,
51932 >>::Error: std::fmt::Display,
51933 {
51934 self.body = value
51935 .try_into()
51936 .map(From::from)
51937 .map_err(|s| {
51938 format!(
51939 "conversion to `PostGetCompressionSignaturesForAccountBody` for body failed: {}",
51940 s
51941 )
51942 });
51943 self
51944 }
51945 pub fn body_map<F>(mut self, f: F) -> Self
51946 where
51947 F: std::ops::FnOnce(
51948 types::builder::PostGetCompressionSignaturesForAccountBody,
51949 ) -> types::builder::PostGetCompressionSignaturesForAccountBody,
51950 {
51951 self.body = self.body.map(f);
51952 self
51953 }
51954 pub async fn send(
51956 self,
51957 ) -> Result<
51958 ResponseValue<types::PostGetCompressionSignaturesForAccountResponse>,
51959 Error<types::PostGetCompressionSignaturesForAccountResponse>,
51960 > {
51961 let Self { client, body } = self;
51962 let body = body
51963 .and_then(|v| {
51964 types::PostGetCompressionSignaturesForAccountBody::try_from(v)
51965 .map_err(|e| e.to_string())
51966 })
51967 .map_err(Error::InvalidRequest)?;
51968 let url = format!("{}/getCompressionSignaturesForAccount", client.baseurl,);
51969 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
51970 header_map
51971 .append(
51972 ::reqwest::header::HeaderName::from_static("api-version"),
51973 ::reqwest::header::HeaderValue::from_static(
51974 super::Client::api_version(),
51975 ),
51976 );
51977 #[allow(unused_mut)]
51978 let mut request = client
51979 .client
51980 .post(url)
51981 .header(
51982 ::reqwest::header::ACCEPT,
51983 ::reqwest::header::HeaderValue::from_static("application/json"),
51984 )
51985 .json(&body)
51986 .headers(header_map)
51987 .build()?;
51988 let info = OperationInfo {
51989 operation_id: "post_get_compression_signatures_for_account",
51990 };
51991 client.pre(&mut request, &info).await?;
51992 let result = client.exec(request, &info).await;
51993 client.post(&result, &info).await?;
51994 let response = result?;
51995 match response.status().as_u16() {
51996 200u16 => ResponseValue::from_response(response).await,
51997 429u16 => {
51998 Err(
51999 Error::ErrorResponse(
52000 ResponseValue::from_response(response).await?,
52001 ),
52002 )
52003 }
52004 500u16 => {
52005 Err(
52006 Error::ErrorResponse(
52007 ResponseValue::from_response(response).await?,
52008 ),
52009 )
52010 }
52011 _ => Err(Error::UnexpectedResponse(response)),
52012 }
52013 }
52014 }
52015 #[derive(Debug, Clone)]
52019 pub struct PostGetCompressionSignaturesForAddress<'a> {
52020 client: &'a super::Client,
52021 body: Result<types::builder::PostGetCompressionSignaturesForAddressBody, String>,
52022 }
52023 impl<'a> PostGetCompressionSignaturesForAddress<'a> {
52024 pub fn new(client: &'a super::Client) -> Self {
52025 Self {
52026 client: client,
52027 body: Ok(::std::default::Default::default()),
52028 }
52029 }
52030 pub fn body<V>(mut self, value: V) -> Self
52031 where
52032 V: std::convert::TryInto<types::PostGetCompressionSignaturesForAddressBody>,
52033 <V as std::convert::TryInto<
52034 types::PostGetCompressionSignaturesForAddressBody,
52035 >>::Error: std::fmt::Display,
52036 {
52037 self.body = value
52038 .try_into()
52039 .map(From::from)
52040 .map_err(|s| {
52041 format!(
52042 "conversion to `PostGetCompressionSignaturesForAddressBody` for body failed: {}",
52043 s
52044 )
52045 });
52046 self
52047 }
52048 pub fn body_map<F>(mut self, f: F) -> Self
52049 where
52050 F: std::ops::FnOnce(
52051 types::builder::PostGetCompressionSignaturesForAddressBody,
52052 ) -> types::builder::PostGetCompressionSignaturesForAddressBody,
52053 {
52054 self.body = self.body.map(f);
52055 self
52056 }
52057 pub async fn send(
52059 self,
52060 ) -> Result<
52061 ResponseValue<types::PostGetCompressionSignaturesForAddressResponse>,
52062 Error<types::PostGetCompressionSignaturesForAddressResponse>,
52063 > {
52064 let Self { client, body } = self;
52065 let body = body
52066 .and_then(|v| {
52067 types::PostGetCompressionSignaturesForAddressBody::try_from(v)
52068 .map_err(|e| e.to_string())
52069 })
52070 .map_err(Error::InvalidRequest)?;
52071 let url = format!("{}/getCompressionSignaturesForAddress", client.baseurl,);
52072 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52073 header_map
52074 .append(
52075 ::reqwest::header::HeaderName::from_static("api-version"),
52076 ::reqwest::header::HeaderValue::from_static(
52077 super::Client::api_version(),
52078 ),
52079 );
52080 #[allow(unused_mut)]
52081 let mut request = client
52082 .client
52083 .post(url)
52084 .header(
52085 ::reqwest::header::ACCEPT,
52086 ::reqwest::header::HeaderValue::from_static("application/json"),
52087 )
52088 .json(&body)
52089 .headers(header_map)
52090 .build()?;
52091 let info = OperationInfo {
52092 operation_id: "post_get_compression_signatures_for_address",
52093 };
52094 client.pre(&mut request, &info).await?;
52095 let result = client.exec(request, &info).await;
52096 client.post(&result, &info).await?;
52097 let response = result?;
52098 match response.status().as_u16() {
52099 200u16 => ResponseValue::from_response(response).await,
52100 429u16 => {
52101 Err(
52102 Error::ErrorResponse(
52103 ResponseValue::from_response(response).await?,
52104 ),
52105 )
52106 }
52107 500u16 => {
52108 Err(
52109 Error::ErrorResponse(
52110 ResponseValue::from_response(response).await?,
52111 ),
52112 )
52113 }
52114 _ => Err(Error::UnexpectedResponse(response)),
52115 }
52116 }
52117 }
52118 #[derive(Debug, Clone)]
52122 pub struct PostGetCompressionSignaturesForOwner<'a> {
52123 client: &'a super::Client,
52124 body: Result<types::builder::PostGetCompressionSignaturesForOwnerBody, String>,
52125 }
52126 impl<'a> PostGetCompressionSignaturesForOwner<'a> {
52127 pub fn new(client: &'a super::Client) -> Self {
52128 Self {
52129 client: client,
52130 body: Ok(::std::default::Default::default()),
52131 }
52132 }
52133 pub fn body<V>(mut self, value: V) -> Self
52134 where
52135 V: std::convert::TryInto<types::PostGetCompressionSignaturesForOwnerBody>,
52136 <V as std::convert::TryInto<
52137 types::PostGetCompressionSignaturesForOwnerBody,
52138 >>::Error: std::fmt::Display,
52139 {
52140 self.body = value
52141 .try_into()
52142 .map(From::from)
52143 .map_err(|s| {
52144 format!(
52145 "conversion to `PostGetCompressionSignaturesForOwnerBody` for body failed: {}",
52146 s
52147 )
52148 });
52149 self
52150 }
52151 pub fn body_map<F>(mut self, f: F) -> Self
52152 where
52153 F: std::ops::FnOnce(
52154 types::builder::PostGetCompressionSignaturesForOwnerBody,
52155 ) -> types::builder::PostGetCompressionSignaturesForOwnerBody,
52156 {
52157 self.body = self.body.map(f);
52158 self
52159 }
52160 pub async fn send(
52162 self,
52163 ) -> Result<
52164 ResponseValue<types::PostGetCompressionSignaturesForOwnerResponse>,
52165 Error<types::PostGetCompressionSignaturesForOwnerResponse>,
52166 > {
52167 let Self { client, body } = self;
52168 let body = body
52169 .and_then(|v| {
52170 types::PostGetCompressionSignaturesForOwnerBody::try_from(v)
52171 .map_err(|e| e.to_string())
52172 })
52173 .map_err(Error::InvalidRequest)?;
52174 let url = format!("{}/getCompressionSignaturesForOwner", client.baseurl,);
52175 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52176 header_map
52177 .append(
52178 ::reqwest::header::HeaderName::from_static("api-version"),
52179 ::reqwest::header::HeaderValue::from_static(
52180 super::Client::api_version(),
52181 ),
52182 );
52183 #[allow(unused_mut)]
52184 let mut request = client
52185 .client
52186 .post(url)
52187 .header(
52188 ::reqwest::header::ACCEPT,
52189 ::reqwest::header::HeaderValue::from_static("application/json"),
52190 )
52191 .json(&body)
52192 .headers(header_map)
52193 .build()?;
52194 let info = OperationInfo {
52195 operation_id: "post_get_compression_signatures_for_owner",
52196 };
52197 client.pre(&mut request, &info).await?;
52198 let result = client.exec(request, &info).await;
52199 client.post(&result, &info).await?;
52200 let response = result?;
52201 match response.status().as_u16() {
52202 200u16 => ResponseValue::from_response(response).await,
52203 429u16 => {
52204 Err(
52205 Error::ErrorResponse(
52206 ResponseValue::from_response(response).await?,
52207 ),
52208 )
52209 }
52210 500u16 => {
52211 Err(
52212 Error::ErrorResponse(
52213 ResponseValue::from_response(response).await?,
52214 ),
52215 )
52216 }
52217 _ => Err(Error::UnexpectedResponse(response)),
52218 }
52219 }
52220 }
52221 #[derive(Debug, Clone)]
52225 pub struct PostGetCompressionSignaturesForTokenOwner<'a> {
52226 client: &'a super::Client,
52227 body: Result<
52228 types::builder::PostGetCompressionSignaturesForTokenOwnerBody,
52229 String,
52230 >,
52231 }
52232 impl<'a> PostGetCompressionSignaturesForTokenOwner<'a> {
52233 pub fn new(client: &'a super::Client) -> Self {
52234 Self {
52235 client: client,
52236 body: Ok(::std::default::Default::default()),
52237 }
52238 }
52239 pub fn body<V>(mut self, value: V) -> Self
52240 where
52241 V: std::convert::TryInto<
52242 types::PostGetCompressionSignaturesForTokenOwnerBody,
52243 >,
52244 <V as std::convert::TryInto<
52245 types::PostGetCompressionSignaturesForTokenOwnerBody,
52246 >>::Error: std::fmt::Display,
52247 {
52248 self.body = value
52249 .try_into()
52250 .map(From::from)
52251 .map_err(|s| {
52252 format!(
52253 "conversion to `PostGetCompressionSignaturesForTokenOwnerBody` for body failed: {}",
52254 s
52255 )
52256 });
52257 self
52258 }
52259 pub fn body_map<F>(mut self, f: F) -> Self
52260 where
52261 F: std::ops::FnOnce(
52262 types::builder::PostGetCompressionSignaturesForTokenOwnerBody,
52263 ) -> types::builder::PostGetCompressionSignaturesForTokenOwnerBody,
52264 {
52265 self.body = self.body.map(f);
52266 self
52267 }
52268 pub async fn send(
52270 self,
52271 ) -> Result<
52272 ResponseValue<types::PostGetCompressionSignaturesForTokenOwnerResponse>,
52273 Error<types::PostGetCompressionSignaturesForTokenOwnerResponse>,
52274 > {
52275 let Self { client, body } = self;
52276 let body = body
52277 .and_then(|v| {
52278 types::PostGetCompressionSignaturesForTokenOwnerBody::try_from(v)
52279 .map_err(|e| e.to_string())
52280 })
52281 .map_err(Error::InvalidRequest)?;
52282 let url = format!(
52283 "{}/getCompressionSignaturesForTokenOwner", client.baseurl,
52284 );
52285 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52286 header_map
52287 .append(
52288 ::reqwest::header::HeaderName::from_static("api-version"),
52289 ::reqwest::header::HeaderValue::from_static(
52290 super::Client::api_version(),
52291 ),
52292 );
52293 #[allow(unused_mut)]
52294 let mut request = client
52295 .client
52296 .post(url)
52297 .header(
52298 ::reqwest::header::ACCEPT,
52299 ::reqwest::header::HeaderValue::from_static("application/json"),
52300 )
52301 .json(&body)
52302 .headers(header_map)
52303 .build()?;
52304 let info = OperationInfo {
52305 operation_id: "post_get_compression_signatures_for_token_owner",
52306 };
52307 client.pre(&mut request, &info).await?;
52308 let result = client.exec(request, &info).await;
52309 client.post(&result, &info).await?;
52310 let response = result?;
52311 match response.status().as_u16() {
52312 200u16 => ResponseValue::from_response(response).await,
52313 429u16 => {
52314 Err(
52315 Error::ErrorResponse(
52316 ResponseValue::from_response(response).await?,
52317 ),
52318 )
52319 }
52320 500u16 => {
52321 Err(
52322 Error::ErrorResponse(
52323 ResponseValue::from_response(response).await?,
52324 ),
52325 )
52326 }
52327 _ => Err(Error::UnexpectedResponse(response)),
52328 }
52329 }
52330 }
52331 #[derive(Debug, Clone)]
52335 pub struct PostGetIndexerHealth<'a> {
52336 client: &'a super::Client,
52337 body: Result<types::builder::PostGetIndexerHealthBody, String>,
52338 }
52339 impl<'a> PostGetIndexerHealth<'a> {
52340 pub fn new(client: &'a super::Client) -> Self {
52341 Self {
52342 client: client,
52343 body: Ok(::std::default::Default::default()),
52344 }
52345 }
52346 pub fn body<V>(mut self, value: V) -> Self
52347 where
52348 V: std::convert::TryInto<types::PostGetIndexerHealthBody>,
52349 <V as std::convert::TryInto<
52350 types::PostGetIndexerHealthBody,
52351 >>::Error: std::fmt::Display,
52352 {
52353 self.body = value
52354 .try_into()
52355 .map(From::from)
52356 .map_err(|s| {
52357 format!(
52358 "conversion to `PostGetIndexerHealthBody` for body failed: {}", s
52359 )
52360 });
52361 self
52362 }
52363 pub fn body_map<F>(mut self, f: F) -> Self
52364 where
52365 F: std::ops::FnOnce(
52366 types::builder::PostGetIndexerHealthBody,
52367 ) -> types::builder::PostGetIndexerHealthBody,
52368 {
52369 self.body = self.body.map(f);
52370 self
52371 }
52372 pub async fn send(
52374 self,
52375 ) -> Result<
52376 ResponseValue<types::PostGetIndexerHealthResponse>,
52377 Error<types::PostGetIndexerHealthResponse>,
52378 > {
52379 let Self { client, body } = self;
52380 let body = body
52381 .and_then(|v| {
52382 types::PostGetIndexerHealthBody::try_from(v)
52383 .map_err(|e| e.to_string())
52384 })
52385 .map_err(Error::InvalidRequest)?;
52386 let url = format!("{}/getIndexerHealth", client.baseurl,);
52387 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52388 header_map
52389 .append(
52390 ::reqwest::header::HeaderName::from_static("api-version"),
52391 ::reqwest::header::HeaderValue::from_static(
52392 super::Client::api_version(),
52393 ),
52394 );
52395 #[allow(unused_mut)]
52396 let mut request = client
52397 .client
52398 .post(url)
52399 .header(
52400 ::reqwest::header::ACCEPT,
52401 ::reqwest::header::HeaderValue::from_static("application/json"),
52402 )
52403 .json(&body)
52404 .headers(header_map)
52405 .build()?;
52406 let info = OperationInfo {
52407 operation_id: "post_get_indexer_health",
52408 };
52409 client.pre(&mut request, &info).await?;
52410 let result = client.exec(request, &info).await;
52411 client.post(&result, &info).await?;
52412 let response = result?;
52413 match response.status().as_u16() {
52414 200u16 => ResponseValue::from_response(response).await,
52415 429u16 => {
52416 Err(
52417 Error::ErrorResponse(
52418 ResponseValue::from_response(response).await?,
52419 ),
52420 )
52421 }
52422 500u16 => {
52423 Err(
52424 Error::ErrorResponse(
52425 ResponseValue::from_response(response).await?,
52426 ),
52427 )
52428 }
52429 _ => Err(Error::UnexpectedResponse(response)),
52430 }
52431 }
52432 }
52433 #[derive(Debug, Clone)]
52437 pub struct PostGetIndexerSlot<'a> {
52438 client: &'a super::Client,
52439 body: Result<types::builder::PostGetIndexerSlotBody, String>,
52440 }
52441 impl<'a> PostGetIndexerSlot<'a> {
52442 pub fn new(client: &'a super::Client) -> Self {
52443 Self {
52444 client: client,
52445 body: Ok(::std::default::Default::default()),
52446 }
52447 }
52448 pub fn body<V>(mut self, value: V) -> Self
52449 where
52450 V: std::convert::TryInto<types::PostGetIndexerSlotBody>,
52451 <V as std::convert::TryInto<
52452 types::PostGetIndexerSlotBody,
52453 >>::Error: std::fmt::Display,
52454 {
52455 self.body = value
52456 .try_into()
52457 .map(From::from)
52458 .map_err(|s| {
52459 format!(
52460 "conversion to `PostGetIndexerSlotBody` for body failed: {}", s
52461 )
52462 });
52463 self
52464 }
52465 pub fn body_map<F>(mut self, f: F) -> Self
52466 where
52467 F: std::ops::FnOnce(
52468 types::builder::PostGetIndexerSlotBody,
52469 ) -> types::builder::PostGetIndexerSlotBody,
52470 {
52471 self.body = self.body.map(f);
52472 self
52473 }
52474 pub async fn send(
52476 self,
52477 ) -> Result<
52478 ResponseValue<types::PostGetIndexerSlotResponse>,
52479 Error<types::PostGetIndexerSlotResponse>,
52480 > {
52481 let Self { client, body } = self;
52482 let body = body
52483 .and_then(|v| {
52484 types::PostGetIndexerSlotBody::try_from(v).map_err(|e| e.to_string())
52485 })
52486 .map_err(Error::InvalidRequest)?;
52487 let url = format!("{}/getIndexerSlot", client.baseurl,);
52488 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52489 header_map
52490 .append(
52491 ::reqwest::header::HeaderName::from_static("api-version"),
52492 ::reqwest::header::HeaderValue::from_static(
52493 super::Client::api_version(),
52494 ),
52495 );
52496 #[allow(unused_mut)]
52497 let mut request = client
52498 .client
52499 .post(url)
52500 .header(
52501 ::reqwest::header::ACCEPT,
52502 ::reqwest::header::HeaderValue::from_static("application/json"),
52503 )
52504 .json(&body)
52505 .headers(header_map)
52506 .build()?;
52507 let info = OperationInfo {
52508 operation_id: "post_get_indexer_slot",
52509 };
52510 client.pre(&mut request, &info).await?;
52511 let result = client.exec(request, &info).await;
52512 client.post(&result, &info).await?;
52513 let response = result?;
52514 match response.status().as_u16() {
52515 200u16 => ResponseValue::from_response(response).await,
52516 429u16 => {
52517 Err(
52518 Error::ErrorResponse(
52519 ResponseValue::from_response(response).await?,
52520 ),
52521 )
52522 }
52523 500u16 => {
52524 Err(
52525 Error::ErrorResponse(
52526 ResponseValue::from_response(response).await?,
52527 ),
52528 )
52529 }
52530 _ => Err(Error::UnexpectedResponse(response)),
52531 }
52532 }
52533 }
52534 #[derive(Debug, Clone)]
52538 pub struct PostGetLatestCompressionSignatures<'a> {
52539 client: &'a super::Client,
52540 body: Result<types::builder::PostGetLatestCompressionSignaturesBody, String>,
52541 }
52542 impl<'a> PostGetLatestCompressionSignatures<'a> {
52543 pub fn new(client: &'a super::Client) -> Self {
52544 Self {
52545 client: client,
52546 body: Ok(::std::default::Default::default()),
52547 }
52548 }
52549 pub fn body<V>(mut self, value: V) -> Self
52550 where
52551 V: std::convert::TryInto<types::PostGetLatestCompressionSignaturesBody>,
52552 <V as std::convert::TryInto<
52553 types::PostGetLatestCompressionSignaturesBody,
52554 >>::Error: std::fmt::Display,
52555 {
52556 self.body = value
52557 .try_into()
52558 .map(From::from)
52559 .map_err(|s| {
52560 format!(
52561 "conversion to `PostGetLatestCompressionSignaturesBody` for body failed: {}",
52562 s
52563 )
52564 });
52565 self
52566 }
52567 pub fn body_map<F>(mut self, f: F) -> Self
52568 where
52569 F: std::ops::FnOnce(
52570 types::builder::PostGetLatestCompressionSignaturesBody,
52571 ) -> types::builder::PostGetLatestCompressionSignaturesBody,
52572 {
52573 self.body = self.body.map(f);
52574 self
52575 }
52576 pub async fn send(
52578 self,
52579 ) -> Result<
52580 ResponseValue<types::PostGetLatestCompressionSignaturesResponse>,
52581 Error<types::PostGetLatestCompressionSignaturesResponse>,
52582 > {
52583 let Self { client, body } = self;
52584 let body = body
52585 .and_then(|v| {
52586 types::PostGetLatestCompressionSignaturesBody::try_from(v)
52587 .map_err(|e| e.to_string())
52588 })
52589 .map_err(Error::InvalidRequest)?;
52590 let url = format!("{}/getLatestCompressionSignatures", client.baseurl,);
52591 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52592 header_map
52593 .append(
52594 ::reqwest::header::HeaderName::from_static("api-version"),
52595 ::reqwest::header::HeaderValue::from_static(
52596 super::Client::api_version(),
52597 ),
52598 );
52599 #[allow(unused_mut)]
52600 let mut request = client
52601 .client
52602 .post(url)
52603 .header(
52604 ::reqwest::header::ACCEPT,
52605 ::reqwest::header::HeaderValue::from_static("application/json"),
52606 )
52607 .json(&body)
52608 .headers(header_map)
52609 .build()?;
52610 let info = OperationInfo {
52611 operation_id: "post_get_latest_compression_signatures",
52612 };
52613 client.pre(&mut request, &info).await?;
52614 let result = client.exec(request, &info).await;
52615 client.post(&result, &info).await?;
52616 let response = result?;
52617 match response.status().as_u16() {
52618 200u16 => ResponseValue::from_response(response).await,
52619 429u16 => {
52620 Err(
52621 Error::ErrorResponse(
52622 ResponseValue::from_response(response).await?,
52623 ),
52624 )
52625 }
52626 500u16 => {
52627 Err(
52628 Error::ErrorResponse(
52629 ResponseValue::from_response(response).await?,
52630 ),
52631 )
52632 }
52633 _ => Err(Error::UnexpectedResponse(response)),
52634 }
52635 }
52636 }
52637 #[derive(Debug, Clone)]
52641 pub struct PostGetLatestNonVotingSignatures<'a> {
52642 client: &'a super::Client,
52643 body: Result<types::builder::PostGetLatestNonVotingSignaturesBody, String>,
52644 }
52645 impl<'a> PostGetLatestNonVotingSignatures<'a> {
52646 pub fn new(client: &'a super::Client) -> Self {
52647 Self {
52648 client: client,
52649 body: Ok(::std::default::Default::default()),
52650 }
52651 }
52652 pub fn body<V>(mut self, value: V) -> Self
52653 where
52654 V: std::convert::TryInto<types::PostGetLatestNonVotingSignaturesBody>,
52655 <V as std::convert::TryInto<
52656 types::PostGetLatestNonVotingSignaturesBody,
52657 >>::Error: std::fmt::Display,
52658 {
52659 self.body = value
52660 .try_into()
52661 .map(From::from)
52662 .map_err(|s| {
52663 format!(
52664 "conversion to `PostGetLatestNonVotingSignaturesBody` for body failed: {}",
52665 s
52666 )
52667 });
52668 self
52669 }
52670 pub fn body_map<F>(mut self, f: F) -> Self
52671 where
52672 F: std::ops::FnOnce(
52673 types::builder::PostGetLatestNonVotingSignaturesBody,
52674 ) -> types::builder::PostGetLatestNonVotingSignaturesBody,
52675 {
52676 self.body = self.body.map(f);
52677 self
52678 }
52679 pub async fn send(
52681 self,
52682 ) -> Result<
52683 ResponseValue<types::PostGetLatestNonVotingSignaturesResponse>,
52684 Error<types::PostGetLatestNonVotingSignaturesResponse>,
52685 > {
52686 let Self { client, body } = self;
52687 let body = body
52688 .and_then(|v| {
52689 types::PostGetLatestNonVotingSignaturesBody::try_from(v)
52690 .map_err(|e| e.to_string())
52691 })
52692 .map_err(Error::InvalidRequest)?;
52693 let url = format!("{}/getLatestNonVotingSignatures", client.baseurl,);
52694 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52695 header_map
52696 .append(
52697 ::reqwest::header::HeaderName::from_static("api-version"),
52698 ::reqwest::header::HeaderValue::from_static(
52699 super::Client::api_version(),
52700 ),
52701 );
52702 #[allow(unused_mut)]
52703 let mut request = client
52704 .client
52705 .post(url)
52706 .header(
52707 ::reqwest::header::ACCEPT,
52708 ::reqwest::header::HeaderValue::from_static("application/json"),
52709 )
52710 .json(&body)
52711 .headers(header_map)
52712 .build()?;
52713 let info = OperationInfo {
52714 operation_id: "post_get_latest_non_voting_signatures",
52715 };
52716 client.pre(&mut request, &info).await?;
52717 let result = client.exec(request, &info).await;
52718 client.post(&result, &info).await?;
52719 let response = result?;
52720 match response.status().as_u16() {
52721 200u16 => ResponseValue::from_response(response).await,
52722 429u16 => {
52723 Err(
52724 Error::ErrorResponse(
52725 ResponseValue::from_response(response).await?,
52726 ),
52727 )
52728 }
52729 500u16 => {
52730 Err(
52731 Error::ErrorResponse(
52732 ResponseValue::from_response(response).await?,
52733 ),
52734 )
52735 }
52736 _ => Err(Error::UnexpectedResponse(response)),
52737 }
52738 }
52739 }
52740 #[derive(Debug, Clone)]
52744 pub struct PostGetMultipleAccountInterfaces<'a> {
52745 client: &'a super::Client,
52746 body: Result<types::builder::PostGetMultipleAccountInterfacesBody, String>,
52747 }
52748 impl<'a> PostGetMultipleAccountInterfaces<'a> {
52749 pub fn new(client: &'a super::Client) -> Self {
52750 Self {
52751 client: client,
52752 body: Ok(::std::default::Default::default()),
52753 }
52754 }
52755 pub fn body<V>(mut self, value: V) -> Self
52756 where
52757 V: std::convert::TryInto<types::PostGetMultipleAccountInterfacesBody>,
52758 <V as std::convert::TryInto<
52759 types::PostGetMultipleAccountInterfacesBody,
52760 >>::Error: std::fmt::Display,
52761 {
52762 self.body = value
52763 .try_into()
52764 .map(From::from)
52765 .map_err(|s| {
52766 format!(
52767 "conversion to `PostGetMultipleAccountInterfacesBody` for body failed: {}",
52768 s
52769 )
52770 });
52771 self
52772 }
52773 pub fn body_map<F>(mut self, f: F) -> Self
52774 where
52775 F: std::ops::FnOnce(
52776 types::builder::PostGetMultipleAccountInterfacesBody,
52777 ) -> types::builder::PostGetMultipleAccountInterfacesBody,
52778 {
52779 self.body = self.body.map(f);
52780 self
52781 }
52782 pub async fn send(
52784 self,
52785 ) -> Result<
52786 ResponseValue<types::PostGetMultipleAccountInterfacesResponse>,
52787 Error<types::PostGetMultipleAccountInterfacesResponse>,
52788 > {
52789 let Self { client, body } = self;
52790 let body = body
52791 .and_then(|v| {
52792 types::PostGetMultipleAccountInterfacesBody::try_from(v)
52793 .map_err(|e| e.to_string())
52794 })
52795 .map_err(Error::InvalidRequest)?;
52796 let url = format!("{}/getMultipleAccountInterfaces", client.baseurl,);
52797 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52798 header_map
52799 .append(
52800 ::reqwest::header::HeaderName::from_static("api-version"),
52801 ::reqwest::header::HeaderValue::from_static(
52802 super::Client::api_version(),
52803 ),
52804 );
52805 #[allow(unused_mut)]
52806 let mut request = client
52807 .client
52808 .post(url)
52809 .header(
52810 ::reqwest::header::ACCEPT,
52811 ::reqwest::header::HeaderValue::from_static("application/json"),
52812 )
52813 .json(&body)
52814 .headers(header_map)
52815 .build()?;
52816 let info = OperationInfo {
52817 operation_id: "post_get_multiple_account_interfaces",
52818 };
52819 client.pre(&mut request, &info).await?;
52820 let result = client.exec(request, &info).await;
52821 client.post(&result, &info).await?;
52822 let response = result?;
52823 match response.status().as_u16() {
52824 200u16 => ResponseValue::from_response(response).await,
52825 429u16 => {
52826 Err(
52827 Error::ErrorResponse(
52828 ResponseValue::from_response(response).await?,
52829 ),
52830 )
52831 }
52832 500u16 => {
52833 Err(
52834 Error::ErrorResponse(
52835 ResponseValue::from_response(response).await?,
52836 ),
52837 )
52838 }
52839 _ => Err(Error::UnexpectedResponse(response)),
52840 }
52841 }
52842 }
52843 #[derive(Debug, Clone)]
52847 pub struct PostGetMultipleCompressedAccountProofs<'a> {
52848 client: &'a super::Client,
52849 body: Result<types::builder::PostGetMultipleCompressedAccountProofsBody, String>,
52850 }
52851 impl<'a> PostGetMultipleCompressedAccountProofs<'a> {
52852 pub fn new(client: &'a super::Client) -> Self {
52853 Self {
52854 client: client,
52855 body: Ok(::std::default::Default::default()),
52856 }
52857 }
52858 pub fn body<V>(mut self, value: V) -> Self
52859 where
52860 V: std::convert::TryInto<types::PostGetMultipleCompressedAccountProofsBody>,
52861 <V as std::convert::TryInto<
52862 types::PostGetMultipleCompressedAccountProofsBody,
52863 >>::Error: std::fmt::Display,
52864 {
52865 self.body = value
52866 .try_into()
52867 .map(From::from)
52868 .map_err(|s| {
52869 format!(
52870 "conversion to `PostGetMultipleCompressedAccountProofsBody` for body failed: {}",
52871 s
52872 )
52873 });
52874 self
52875 }
52876 pub fn body_map<F>(mut self, f: F) -> Self
52877 where
52878 F: std::ops::FnOnce(
52879 types::builder::PostGetMultipleCompressedAccountProofsBody,
52880 ) -> types::builder::PostGetMultipleCompressedAccountProofsBody,
52881 {
52882 self.body = self.body.map(f);
52883 self
52884 }
52885 pub async fn send(
52887 self,
52888 ) -> Result<
52889 ResponseValue<types::PostGetMultipleCompressedAccountProofsResponse>,
52890 Error<types::PostGetMultipleCompressedAccountProofsResponse>,
52891 > {
52892 let Self { client, body } = self;
52893 let body = body
52894 .and_then(|v| {
52895 types::PostGetMultipleCompressedAccountProofsBody::try_from(v)
52896 .map_err(|e| e.to_string())
52897 })
52898 .map_err(Error::InvalidRequest)?;
52899 let url = format!("{}/getMultipleCompressedAccountProofs", client.baseurl,);
52900 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
52901 header_map
52902 .append(
52903 ::reqwest::header::HeaderName::from_static("api-version"),
52904 ::reqwest::header::HeaderValue::from_static(
52905 super::Client::api_version(),
52906 ),
52907 );
52908 #[allow(unused_mut)]
52909 let mut request = client
52910 .client
52911 .post(url)
52912 .header(
52913 ::reqwest::header::ACCEPT,
52914 ::reqwest::header::HeaderValue::from_static("application/json"),
52915 )
52916 .json(&body)
52917 .headers(header_map)
52918 .build()?;
52919 let info = OperationInfo {
52920 operation_id: "post_get_multiple_compressed_account_proofs",
52921 };
52922 client.pre(&mut request, &info).await?;
52923 let result = client.exec(request, &info).await;
52924 client.post(&result, &info).await?;
52925 let response = result?;
52926 match response.status().as_u16() {
52927 200u16 => ResponseValue::from_response(response).await,
52928 429u16 => {
52929 Err(
52930 Error::ErrorResponse(
52931 ResponseValue::from_response(response).await?,
52932 ),
52933 )
52934 }
52935 500u16 => {
52936 Err(
52937 Error::ErrorResponse(
52938 ResponseValue::from_response(response).await?,
52939 ),
52940 )
52941 }
52942 _ => Err(Error::UnexpectedResponse(response)),
52943 }
52944 }
52945 }
52946 #[derive(Debug, Clone)]
52950 pub struct PostGetMultipleCompressedAccountProofsV2<'a> {
52951 client: &'a super::Client,
52952 body: Result<
52953 types::builder::PostGetMultipleCompressedAccountProofsV2Body,
52954 String,
52955 >,
52956 }
52957 impl<'a> PostGetMultipleCompressedAccountProofsV2<'a> {
52958 pub fn new(client: &'a super::Client) -> Self {
52959 Self {
52960 client: client,
52961 body: Ok(::std::default::Default::default()),
52962 }
52963 }
52964 pub fn body<V>(mut self, value: V) -> Self
52965 where
52966 V: std::convert::TryInto<
52967 types::PostGetMultipleCompressedAccountProofsV2Body,
52968 >,
52969 <V as std::convert::TryInto<
52970 types::PostGetMultipleCompressedAccountProofsV2Body,
52971 >>::Error: std::fmt::Display,
52972 {
52973 self.body = value
52974 .try_into()
52975 .map(From::from)
52976 .map_err(|s| {
52977 format!(
52978 "conversion to `PostGetMultipleCompressedAccountProofsV2Body` for body failed: {}",
52979 s
52980 )
52981 });
52982 self
52983 }
52984 pub fn body_map<F>(mut self, f: F) -> Self
52985 where
52986 F: std::ops::FnOnce(
52987 types::builder::PostGetMultipleCompressedAccountProofsV2Body,
52988 ) -> types::builder::PostGetMultipleCompressedAccountProofsV2Body,
52989 {
52990 self.body = self.body.map(f);
52991 self
52992 }
52993 pub async fn send(
52995 self,
52996 ) -> Result<
52997 ResponseValue<types::PostGetMultipleCompressedAccountProofsV2Response>,
52998 Error<types::PostGetMultipleCompressedAccountProofsV2Response>,
52999 > {
53000 let Self { client, body } = self;
53001 let body = body
53002 .and_then(|v| {
53003 types::PostGetMultipleCompressedAccountProofsV2Body::try_from(v)
53004 .map_err(|e| e.to_string())
53005 })
53006 .map_err(Error::InvalidRequest)?;
53007 let url = format!(
53008 "{}/getMultipleCompressedAccountProofsV2", client.baseurl,
53009 );
53010 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53011 header_map
53012 .append(
53013 ::reqwest::header::HeaderName::from_static("api-version"),
53014 ::reqwest::header::HeaderValue::from_static(
53015 super::Client::api_version(),
53016 ),
53017 );
53018 #[allow(unused_mut)]
53019 let mut request = client
53020 .client
53021 .post(url)
53022 .header(
53023 ::reqwest::header::ACCEPT,
53024 ::reqwest::header::HeaderValue::from_static("application/json"),
53025 )
53026 .json(&body)
53027 .headers(header_map)
53028 .build()?;
53029 let info = OperationInfo {
53030 operation_id: "post_get_multiple_compressed_account_proofs_v2",
53031 };
53032 client.pre(&mut request, &info).await?;
53033 let result = client.exec(request, &info).await;
53034 client.post(&result, &info).await?;
53035 let response = result?;
53036 match response.status().as_u16() {
53037 200u16 => ResponseValue::from_response(response).await,
53038 429u16 => {
53039 Err(
53040 Error::ErrorResponse(
53041 ResponseValue::from_response(response).await?,
53042 ),
53043 )
53044 }
53045 500u16 => {
53046 Err(
53047 Error::ErrorResponse(
53048 ResponseValue::from_response(response).await?,
53049 ),
53050 )
53051 }
53052 _ => Err(Error::UnexpectedResponse(response)),
53053 }
53054 }
53055 }
53056 #[derive(Debug, Clone)]
53060 pub struct PostGetMultipleCompressedAccounts<'a> {
53061 client: &'a super::Client,
53062 body: Result<types::builder::PostGetMultipleCompressedAccountsBody, String>,
53063 }
53064 impl<'a> PostGetMultipleCompressedAccounts<'a> {
53065 pub fn new(client: &'a super::Client) -> Self {
53066 Self {
53067 client: client,
53068 body: Ok(::std::default::Default::default()),
53069 }
53070 }
53071 pub fn body<V>(mut self, value: V) -> Self
53072 where
53073 V: std::convert::TryInto<types::PostGetMultipleCompressedAccountsBody>,
53074 <V as std::convert::TryInto<
53075 types::PostGetMultipleCompressedAccountsBody,
53076 >>::Error: std::fmt::Display,
53077 {
53078 self.body = value
53079 .try_into()
53080 .map(From::from)
53081 .map_err(|s| {
53082 format!(
53083 "conversion to `PostGetMultipleCompressedAccountsBody` for body failed: {}",
53084 s
53085 )
53086 });
53087 self
53088 }
53089 pub fn body_map<F>(mut self, f: F) -> Self
53090 where
53091 F: std::ops::FnOnce(
53092 types::builder::PostGetMultipleCompressedAccountsBody,
53093 ) -> types::builder::PostGetMultipleCompressedAccountsBody,
53094 {
53095 self.body = self.body.map(f);
53096 self
53097 }
53098 pub async fn send(
53100 self,
53101 ) -> Result<
53102 ResponseValue<types::PostGetMultipleCompressedAccountsResponse>,
53103 Error<types::PostGetMultipleCompressedAccountsResponse>,
53104 > {
53105 let Self { client, body } = self;
53106 let body = body
53107 .and_then(|v| {
53108 types::PostGetMultipleCompressedAccountsBody::try_from(v)
53109 .map_err(|e| e.to_string())
53110 })
53111 .map_err(Error::InvalidRequest)?;
53112 let url = format!("{}/getMultipleCompressedAccounts", client.baseurl,);
53113 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53114 header_map
53115 .append(
53116 ::reqwest::header::HeaderName::from_static("api-version"),
53117 ::reqwest::header::HeaderValue::from_static(
53118 super::Client::api_version(),
53119 ),
53120 );
53121 #[allow(unused_mut)]
53122 let mut request = client
53123 .client
53124 .post(url)
53125 .header(
53126 ::reqwest::header::ACCEPT,
53127 ::reqwest::header::HeaderValue::from_static("application/json"),
53128 )
53129 .json(&body)
53130 .headers(header_map)
53131 .build()?;
53132 let info = OperationInfo {
53133 operation_id: "post_get_multiple_compressed_accounts",
53134 };
53135 client.pre(&mut request, &info).await?;
53136 let result = client.exec(request, &info).await;
53137 client.post(&result, &info).await?;
53138 let response = result?;
53139 match response.status().as_u16() {
53140 200u16 => ResponseValue::from_response(response).await,
53141 429u16 => {
53142 Err(
53143 Error::ErrorResponse(
53144 ResponseValue::from_response(response).await?,
53145 ),
53146 )
53147 }
53148 500u16 => {
53149 Err(
53150 Error::ErrorResponse(
53151 ResponseValue::from_response(response).await?,
53152 ),
53153 )
53154 }
53155 _ => Err(Error::UnexpectedResponse(response)),
53156 }
53157 }
53158 }
53159 #[derive(Debug, Clone)]
53163 pub struct PostGetMultipleCompressedAccountsV2<'a> {
53164 client: &'a super::Client,
53165 body: Result<types::builder::PostGetMultipleCompressedAccountsV2Body, String>,
53166 }
53167 impl<'a> PostGetMultipleCompressedAccountsV2<'a> {
53168 pub fn new(client: &'a super::Client) -> Self {
53169 Self {
53170 client: client,
53171 body: Ok(::std::default::Default::default()),
53172 }
53173 }
53174 pub fn body<V>(mut self, value: V) -> Self
53175 where
53176 V: std::convert::TryInto<types::PostGetMultipleCompressedAccountsV2Body>,
53177 <V as std::convert::TryInto<
53178 types::PostGetMultipleCompressedAccountsV2Body,
53179 >>::Error: std::fmt::Display,
53180 {
53181 self.body = value
53182 .try_into()
53183 .map(From::from)
53184 .map_err(|s| {
53185 format!(
53186 "conversion to `PostGetMultipleCompressedAccountsV2Body` for body failed: {}",
53187 s
53188 )
53189 });
53190 self
53191 }
53192 pub fn body_map<F>(mut self, f: F) -> Self
53193 where
53194 F: std::ops::FnOnce(
53195 types::builder::PostGetMultipleCompressedAccountsV2Body,
53196 ) -> types::builder::PostGetMultipleCompressedAccountsV2Body,
53197 {
53198 self.body = self.body.map(f);
53199 self
53200 }
53201 pub async fn send(
53203 self,
53204 ) -> Result<
53205 ResponseValue<types::PostGetMultipleCompressedAccountsV2Response>,
53206 Error<types::PostGetMultipleCompressedAccountsV2Response>,
53207 > {
53208 let Self { client, body } = self;
53209 let body = body
53210 .and_then(|v| {
53211 types::PostGetMultipleCompressedAccountsV2Body::try_from(v)
53212 .map_err(|e| e.to_string())
53213 })
53214 .map_err(Error::InvalidRequest)?;
53215 let url = format!("{}/getMultipleCompressedAccountsV2", client.baseurl,);
53216 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53217 header_map
53218 .append(
53219 ::reqwest::header::HeaderName::from_static("api-version"),
53220 ::reqwest::header::HeaderValue::from_static(
53221 super::Client::api_version(),
53222 ),
53223 );
53224 #[allow(unused_mut)]
53225 let mut request = client
53226 .client
53227 .post(url)
53228 .header(
53229 ::reqwest::header::ACCEPT,
53230 ::reqwest::header::HeaderValue::from_static("application/json"),
53231 )
53232 .json(&body)
53233 .headers(header_map)
53234 .build()?;
53235 let info = OperationInfo {
53236 operation_id: "post_get_multiple_compressed_accounts_v2",
53237 };
53238 client.pre(&mut request, &info).await?;
53239 let result = client.exec(request, &info).await;
53240 client.post(&result, &info).await?;
53241 let response = result?;
53242 match response.status().as_u16() {
53243 200u16 => ResponseValue::from_response(response).await,
53244 429u16 => {
53245 Err(
53246 Error::ErrorResponse(
53247 ResponseValue::from_response(response).await?,
53248 ),
53249 )
53250 }
53251 500u16 => {
53252 Err(
53253 Error::ErrorResponse(
53254 ResponseValue::from_response(response).await?,
53255 ),
53256 )
53257 }
53258 _ => Err(Error::UnexpectedResponse(response)),
53259 }
53260 }
53261 }
53262 #[derive(Debug, Clone)]
53266 pub struct PostGetMultipleNewAddressProofs<'a> {
53267 client: &'a super::Client,
53268 body: Result<types::builder::PostGetMultipleNewAddressProofsBody, String>,
53269 }
53270 impl<'a> PostGetMultipleNewAddressProofs<'a> {
53271 pub fn new(client: &'a super::Client) -> Self {
53272 Self {
53273 client: client,
53274 body: Ok(::std::default::Default::default()),
53275 }
53276 }
53277 pub fn body<V>(mut self, value: V) -> Self
53278 where
53279 V: std::convert::TryInto<types::PostGetMultipleNewAddressProofsBody>,
53280 <V as std::convert::TryInto<
53281 types::PostGetMultipleNewAddressProofsBody,
53282 >>::Error: std::fmt::Display,
53283 {
53284 self.body = value
53285 .try_into()
53286 .map(From::from)
53287 .map_err(|s| {
53288 format!(
53289 "conversion to `PostGetMultipleNewAddressProofsBody` for body failed: {}",
53290 s
53291 )
53292 });
53293 self
53294 }
53295 pub fn body_map<F>(mut self, f: F) -> Self
53296 where
53297 F: std::ops::FnOnce(
53298 types::builder::PostGetMultipleNewAddressProofsBody,
53299 ) -> types::builder::PostGetMultipleNewAddressProofsBody,
53300 {
53301 self.body = self.body.map(f);
53302 self
53303 }
53304 pub async fn send(
53306 self,
53307 ) -> Result<
53308 ResponseValue<types::PostGetMultipleNewAddressProofsResponse>,
53309 Error<types::PostGetMultipleNewAddressProofsResponse>,
53310 > {
53311 let Self { client, body } = self;
53312 let body = body
53313 .and_then(|v| {
53314 types::PostGetMultipleNewAddressProofsBody::try_from(v)
53315 .map_err(|e| e.to_string())
53316 })
53317 .map_err(Error::InvalidRequest)?;
53318 let url = format!("{}/getMultipleNewAddressProofs", client.baseurl,);
53319 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53320 header_map
53321 .append(
53322 ::reqwest::header::HeaderName::from_static("api-version"),
53323 ::reqwest::header::HeaderValue::from_static(
53324 super::Client::api_version(),
53325 ),
53326 );
53327 #[allow(unused_mut)]
53328 let mut request = client
53329 .client
53330 .post(url)
53331 .header(
53332 ::reqwest::header::ACCEPT,
53333 ::reqwest::header::HeaderValue::from_static("application/json"),
53334 )
53335 .json(&body)
53336 .headers(header_map)
53337 .build()?;
53338 let info = OperationInfo {
53339 operation_id: "post_get_multiple_new_address_proofs",
53340 };
53341 client.pre(&mut request, &info).await?;
53342 let result = client.exec(request, &info).await;
53343 client.post(&result, &info).await?;
53344 let response = result?;
53345 match response.status().as_u16() {
53346 200u16 => ResponseValue::from_response(response).await,
53347 429u16 => {
53348 Err(
53349 Error::ErrorResponse(
53350 ResponseValue::from_response(response).await?,
53351 ),
53352 )
53353 }
53354 500u16 => {
53355 Err(
53356 Error::ErrorResponse(
53357 ResponseValue::from_response(response).await?,
53358 ),
53359 )
53360 }
53361 _ => Err(Error::UnexpectedResponse(response)),
53362 }
53363 }
53364 }
53365 #[derive(Debug, Clone)]
53369 pub struct PostGetMultipleNewAddressProofsV2<'a> {
53370 client: &'a super::Client,
53371 body: Result<types::builder::PostGetMultipleNewAddressProofsV2Body, String>,
53372 }
53373 impl<'a> PostGetMultipleNewAddressProofsV2<'a> {
53374 pub fn new(client: &'a super::Client) -> Self {
53375 Self {
53376 client: client,
53377 body: Ok(::std::default::Default::default()),
53378 }
53379 }
53380 pub fn body<V>(mut self, value: V) -> Self
53381 where
53382 V: std::convert::TryInto<types::PostGetMultipleNewAddressProofsV2Body>,
53383 <V as std::convert::TryInto<
53384 types::PostGetMultipleNewAddressProofsV2Body,
53385 >>::Error: std::fmt::Display,
53386 {
53387 self.body = value
53388 .try_into()
53389 .map(From::from)
53390 .map_err(|s| {
53391 format!(
53392 "conversion to `PostGetMultipleNewAddressProofsV2Body` for body failed: {}",
53393 s
53394 )
53395 });
53396 self
53397 }
53398 pub fn body_map<F>(mut self, f: F) -> Self
53399 where
53400 F: std::ops::FnOnce(
53401 types::builder::PostGetMultipleNewAddressProofsV2Body,
53402 ) -> types::builder::PostGetMultipleNewAddressProofsV2Body,
53403 {
53404 self.body = self.body.map(f);
53405 self
53406 }
53407 pub async fn send(
53409 self,
53410 ) -> Result<
53411 ResponseValue<types::PostGetMultipleNewAddressProofsV2Response>,
53412 Error<types::PostGetMultipleNewAddressProofsV2Response>,
53413 > {
53414 let Self { client, body } = self;
53415 let body = body
53416 .and_then(|v| {
53417 types::PostGetMultipleNewAddressProofsV2Body::try_from(v)
53418 .map_err(|e| e.to_string())
53419 })
53420 .map_err(Error::InvalidRequest)?;
53421 let url = format!("{}/getMultipleNewAddressProofsV2", client.baseurl,);
53422 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53423 header_map
53424 .append(
53425 ::reqwest::header::HeaderName::from_static("api-version"),
53426 ::reqwest::header::HeaderValue::from_static(
53427 super::Client::api_version(),
53428 ),
53429 );
53430 #[allow(unused_mut)]
53431 let mut request = client
53432 .client
53433 .post(url)
53434 .header(
53435 ::reqwest::header::ACCEPT,
53436 ::reqwest::header::HeaderValue::from_static("application/json"),
53437 )
53438 .json(&body)
53439 .headers(header_map)
53440 .build()?;
53441 let info = OperationInfo {
53442 operation_id: "post_get_multiple_new_address_proofs_v2",
53443 };
53444 client.pre(&mut request, &info).await?;
53445 let result = client.exec(request, &info).await;
53446 client.post(&result, &info).await?;
53447 let response = result?;
53448 match response.status().as_u16() {
53449 200u16 => ResponseValue::from_response(response).await,
53450 429u16 => {
53451 Err(
53452 Error::ErrorResponse(
53453 ResponseValue::from_response(response).await?,
53454 ),
53455 )
53456 }
53457 500u16 => {
53458 Err(
53459 Error::ErrorResponse(
53460 ResponseValue::from_response(response).await?,
53461 ),
53462 )
53463 }
53464 _ => Err(Error::UnexpectedResponse(response)),
53465 }
53466 }
53467 }
53468 #[derive(Debug, Clone)]
53472 pub struct PostGetQueueElements<'a> {
53473 client: &'a super::Client,
53474 body: Result<types::builder::PostGetQueueElementsBody, String>,
53475 }
53476 impl<'a> PostGetQueueElements<'a> {
53477 pub fn new(client: &'a super::Client) -> Self {
53478 Self {
53479 client: client,
53480 body: Ok(::std::default::Default::default()),
53481 }
53482 }
53483 pub fn body<V>(mut self, value: V) -> Self
53484 where
53485 V: std::convert::TryInto<types::PostGetQueueElementsBody>,
53486 <V as std::convert::TryInto<
53487 types::PostGetQueueElementsBody,
53488 >>::Error: std::fmt::Display,
53489 {
53490 self.body = value
53491 .try_into()
53492 .map(From::from)
53493 .map_err(|s| {
53494 format!(
53495 "conversion to `PostGetQueueElementsBody` for body failed: {}", s
53496 )
53497 });
53498 self
53499 }
53500 pub fn body_map<F>(mut self, f: F) -> Self
53501 where
53502 F: std::ops::FnOnce(
53503 types::builder::PostGetQueueElementsBody,
53504 ) -> types::builder::PostGetQueueElementsBody,
53505 {
53506 self.body = self.body.map(f);
53507 self
53508 }
53509 pub async fn send(
53511 self,
53512 ) -> Result<
53513 ResponseValue<types::PostGetQueueElementsResponse>,
53514 Error<types::PostGetQueueElementsResponse>,
53515 > {
53516 let Self { client, body } = self;
53517 let body = body
53518 .and_then(|v| {
53519 types::PostGetQueueElementsBody::try_from(v)
53520 .map_err(|e| e.to_string())
53521 })
53522 .map_err(Error::InvalidRequest)?;
53523 let url = format!("{}/getQueueElements", client.baseurl,);
53524 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53525 header_map
53526 .append(
53527 ::reqwest::header::HeaderName::from_static("api-version"),
53528 ::reqwest::header::HeaderValue::from_static(
53529 super::Client::api_version(),
53530 ),
53531 );
53532 #[allow(unused_mut)]
53533 let mut request = client
53534 .client
53535 .post(url)
53536 .header(
53537 ::reqwest::header::ACCEPT,
53538 ::reqwest::header::HeaderValue::from_static("application/json"),
53539 )
53540 .json(&body)
53541 .headers(header_map)
53542 .build()?;
53543 let info = OperationInfo {
53544 operation_id: "post_get_queue_elements",
53545 };
53546 client.pre(&mut request, &info).await?;
53547 let result = client.exec(request, &info).await;
53548 client.post(&result, &info).await?;
53549 let response = result?;
53550 match response.status().as_u16() {
53551 200u16 => ResponseValue::from_response(response).await,
53552 429u16 => {
53553 Err(
53554 Error::ErrorResponse(
53555 ResponseValue::from_response(response).await?,
53556 ),
53557 )
53558 }
53559 500u16 => {
53560 Err(
53561 Error::ErrorResponse(
53562 ResponseValue::from_response(response).await?,
53563 ),
53564 )
53565 }
53566 _ => Err(Error::UnexpectedResponse(response)),
53567 }
53568 }
53569 }
53570 #[derive(Debug, Clone)]
53574 pub struct PostGetQueueInfo<'a> {
53575 client: &'a super::Client,
53576 body: Result<types::builder::PostGetQueueInfoBody, String>,
53577 }
53578 impl<'a> PostGetQueueInfo<'a> {
53579 pub fn new(client: &'a super::Client) -> Self {
53580 Self {
53581 client: client,
53582 body: Ok(::std::default::Default::default()),
53583 }
53584 }
53585 pub fn body<V>(mut self, value: V) -> Self
53586 where
53587 V: std::convert::TryInto<types::PostGetQueueInfoBody>,
53588 <V as std::convert::TryInto<
53589 types::PostGetQueueInfoBody,
53590 >>::Error: std::fmt::Display,
53591 {
53592 self.body = value
53593 .try_into()
53594 .map(From::from)
53595 .map_err(|s| {
53596 format!(
53597 "conversion to `PostGetQueueInfoBody` for body failed: {}", s
53598 )
53599 });
53600 self
53601 }
53602 pub fn body_map<F>(mut self, f: F) -> Self
53603 where
53604 F: std::ops::FnOnce(
53605 types::builder::PostGetQueueInfoBody,
53606 ) -> types::builder::PostGetQueueInfoBody,
53607 {
53608 self.body = self.body.map(f);
53609 self
53610 }
53611 pub async fn send(
53613 self,
53614 ) -> Result<
53615 ResponseValue<types::PostGetQueueInfoResponse>,
53616 Error<types::PostGetQueueInfoResponse>,
53617 > {
53618 let Self { client, body } = self;
53619 let body = body
53620 .and_then(|v| {
53621 types::PostGetQueueInfoBody::try_from(v).map_err(|e| e.to_string())
53622 })
53623 .map_err(Error::InvalidRequest)?;
53624 let url = format!("{}/getQueueInfo", client.baseurl,);
53625 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53626 header_map
53627 .append(
53628 ::reqwest::header::HeaderName::from_static("api-version"),
53629 ::reqwest::header::HeaderValue::from_static(
53630 super::Client::api_version(),
53631 ),
53632 );
53633 #[allow(unused_mut)]
53634 let mut request = client
53635 .client
53636 .post(url)
53637 .header(
53638 ::reqwest::header::ACCEPT,
53639 ::reqwest::header::HeaderValue::from_static("application/json"),
53640 )
53641 .json(&body)
53642 .headers(header_map)
53643 .build()?;
53644 let info = OperationInfo {
53645 operation_id: "post_get_queue_info",
53646 };
53647 client.pre(&mut request, &info).await?;
53648 let result = client.exec(request, &info).await;
53649 client.post(&result, &info).await?;
53650 let response = result?;
53651 match response.status().as_u16() {
53652 200u16 => ResponseValue::from_response(response).await,
53653 429u16 => {
53654 Err(
53655 Error::ErrorResponse(
53656 ResponseValue::from_response(response).await?,
53657 ),
53658 )
53659 }
53660 500u16 => {
53661 Err(
53662 Error::ErrorResponse(
53663 ResponseValue::from_response(response).await?,
53664 ),
53665 )
53666 }
53667 _ => Err(Error::UnexpectedResponse(response)),
53668 }
53669 }
53670 }
53671 #[derive(Debug, Clone)]
53675 pub struct PostGetTransactionWithCompressionInfo<'a> {
53676 client: &'a super::Client,
53677 body: Result<types::builder::PostGetTransactionWithCompressionInfoBody, String>,
53678 }
53679 impl<'a> PostGetTransactionWithCompressionInfo<'a> {
53680 pub fn new(client: &'a super::Client) -> Self {
53681 Self {
53682 client: client,
53683 body: Ok(::std::default::Default::default()),
53684 }
53685 }
53686 pub fn body<V>(mut self, value: V) -> Self
53687 where
53688 V: std::convert::TryInto<types::PostGetTransactionWithCompressionInfoBody>,
53689 <V as std::convert::TryInto<
53690 types::PostGetTransactionWithCompressionInfoBody,
53691 >>::Error: std::fmt::Display,
53692 {
53693 self.body = value
53694 .try_into()
53695 .map(From::from)
53696 .map_err(|s| {
53697 format!(
53698 "conversion to `PostGetTransactionWithCompressionInfoBody` for body failed: {}",
53699 s
53700 )
53701 });
53702 self
53703 }
53704 pub fn body_map<F>(mut self, f: F) -> Self
53705 where
53706 F: std::ops::FnOnce(
53707 types::builder::PostGetTransactionWithCompressionInfoBody,
53708 ) -> types::builder::PostGetTransactionWithCompressionInfoBody,
53709 {
53710 self.body = self.body.map(f);
53711 self
53712 }
53713 pub async fn send(
53715 self,
53716 ) -> Result<
53717 ResponseValue<types::PostGetTransactionWithCompressionInfoResponse>,
53718 Error<types::PostGetTransactionWithCompressionInfoResponse>,
53719 > {
53720 let Self { client, body } = self;
53721 let body = body
53722 .and_then(|v| {
53723 types::PostGetTransactionWithCompressionInfoBody::try_from(v)
53724 .map_err(|e| e.to_string())
53725 })
53726 .map_err(Error::InvalidRequest)?;
53727 let url = format!("{}/getTransactionWithCompressionInfo", client.baseurl,);
53728 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53729 header_map
53730 .append(
53731 ::reqwest::header::HeaderName::from_static("api-version"),
53732 ::reqwest::header::HeaderValue::from_static(
53733 super::Client::api_version(),
53734 ),
53735 );
53736 #[allow(unused_mut)]
53737 let mut request = client
53738 .client
53739 .post(url)
53740 .header(
53741 ::reqwest::header::ACCEPT,
53742 ::reqwest::header::HeaderValue::from_static("application/json"),
53743 )
53744 .json(&body)
53745 .headers(header_map)
53746 .build()?;
53747 let info = OperationInfo {
53748 operation_id: "post_get_transaction_with_compression_info",
53749 };
53750 client.pre(&mut request, &info).await?;
53751 let result = client.exec(request, &info).await;
53752 client.post(&result, &info).await?;
53753 let response = result?;
53754 match response.status().as_u16() {
53755 200u16 => ResponseValue::from_response(response).await,
53756 429u16 => {
53757 Err(
53758 Error::ErrorResponse(
53759 ResponseValue::from_response(response).await?,
53760 ),
53761 )
53762 }
53763 500u16 => {
53764 Err(
53765 Error::ErrorResponse(
53766 ResponseValue::from_response(response).await?,
53767 ),
53768 )
53769 }
53770 _ => Err(Error::UnexpectedResponse(response)),
53771 }
53772 }
53773 }
53774 #[derive(Debug, Clone)]
53778 pub struct PostGetTransactionWithCompressionInfoV2<'a> {
53779 client: &'a super::Client,
53780 body: Result<
53781 types::builder::PostGetTransactionWithCompressionInfoV2Body,
53782 String,
53783 >,
53784 }
53785 impl<'a> PostGetTransactionWithCompressionInfoV2<'a> {
53786 pub fn new(client: &'a super::Client) -> Self {
53787 Self {
53788 client: client,
53789 body: Ok(::std::default::Default::default()),
53790 }
53791 }
53792 pub fn body<V>(mut self, value: V) -> Self
53793 where
53794 V: std::convert::TryInto<types::PostGetTransactionWithCompressionInfoV2Body>,
53795 <V as std::convert::TryInto<
53796 types::PostGetTransactionWithCompressionInfoV2Body,
53797 >>::Error: std::fmt::Display,
53798 {
53799 self.body = value
53800 .try_into()
53801 .map(From::from)
53802 .map_err(|s| {
53803 format!(
53804 "conversion to `PostGetTransactionWithCompressionInfoV2Body` for body failed: {}",
53805 s
53806 )
53807 });
53808 self
53809 }
53810 pub fn body_map<F>(mut self, f: F) -> Self
53811 where
53812 F: std::ops::FnOnce(
53813 types::builder::PostGetTransactionWithCompressionInfoV2Body,
53814 ) -> types::builder::PostGetTransactionWithCompressionInfoV2Body,
53815 {
53816 self.body = self.body.map(f);
53817 self
53818 }
53819 pub async fn send(
53821 self,
53822 ) -> Result<
53823 ResponseValue<types::PostGetTransactionWithCompressionInfoV2Response>,
53824 Error<types::PostGetTransactionWithCompressionInfoV2Response>,
53825 > {
53826 let Self { client, body } = self;
53827 let body = body
53828 .and_then(|v| {
53829 types::PostGetTransactionWithCompressionInfoV2Body::try_from(v)
53830 .map_err(|e| e.to_string())
53831 })
53832 .map_err(Error::InvalidRequest)?;
53833 let url = format!("{}/getTransactionWithCompressionInfoV2", client.baseurl,);
53834 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53835 header_map
53836 .append(
53837 ::reqwest::header::HeaderName::from_static("api-version"),
53838 ::reqwest::header::HeaderValue::from_static(
53839 super::Client::api_version(),
53840 ),
53841 );
53842 #[allow(unused_mut)]
53843 let mut request = client
53844 .client
53845 .post(url)
53846 .header(
53847 ::reqwest::header::ACCEPT,
53848 ::reqwest::header::HeaderValue::from_static("application/json"),
53849 )
53850 .json(&body)
53851 .headers(header_map)
53852 .build()?;
53853 let info = OperationInfo {
53854 operation_id: "post_get_transaction_with_compression_info_v2",
53855 };
53856 client.pre(&mut request, &info).await?;
53857 let result = client.exec(request, &info).await;
53858 client.post(&result, &info).await?;
53859 let response = result?;
53860 match response.status().as_u16() {
53861 200u16 => ResponseValue::from_response(response).await,
53862 429u16 => {
53863 Err(
53864 Error::ErrorResponse(
53865 ResponseValue::from_response(response).await?,
53866 ),
53867 )
53868 }
53869 500u16 => {
53870 Err(
53871 Error::ErrorResponse(
53872 ResponseValue::from_response(response).await?,
53873 ),
53874 )
53875 }
53876 _ => Err(Error::UnexpectedResponse(response)),
53877 }
53878 }
53879 }
53880 #[derive(Debug, Clone)]
53884 pub struct PostGetValidityProof<'a> {
53885 client: &'a super::Client,
53886 body: Result<types::builder::PostGetValidityProofBody, String>,
53887 }
53888 impl<'a> PostGetValidityProof<'a> {
53889 pub fn new(client: &'a super::Client) -> Self {
53890 Self {
53891 client: client,
53892 body: Ok(::std::default::Default::default()),
53893 }
53894 }
53895 pub fn body<V>(mut self, value: V) -> Self
53896 where
53897 V: std::convert::TryInto<types::PostGetValidityProofBody>,
53898 <V as std::convert::TryInto<
53899 types::PostGetValidityProofBody,
53900 >>::Error: std::fmt::Display,
53901 {
53902 self.body = value
53903 .try_into()
53904 .map(From::from)
53905 .map_err(|s| {
53906 format!(
53907 "conversion to `PostGetValidityProofBody` for body failed: {}", s
53908 )
53909 });
53910 self
53911 }
53912 pub fn body_map<F>(mut self, f: F) -> Self
53913 where
53914 F: std::ops::FnOnce(
53915 types::builder::PostGetValidityProofBody,
53916 ) -> types::builder::PostGetValidityProofBody,
53917 {
53918 self.body = self.body.map(f);
53919 self
53920 }
53921 pub async fn send(
53923 self,
53924 ) -> Result<
53925 ResponseValue<types::PostGetValidityProofResponse>,
53926 Error<types::PostGetValidityProofResponse>,
53927 > {
53928 let Self { client, body } = self;
53929 let body = body
53930 .and_then(|v| {
53931 types::PostGetValidityProofBody::try_from(v)
53932 .map_err(|e| e.to_string())
53933 })
53934 .map_err(Error::InvalidRequest)?;
53935 let url = format!("{}/getValidityProof", client.baseurl,);
53936 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
53937 header_map
53938 .append(
53939 ::reqwest::header::HeaderName::from_static("api-version"),
53940 ::reqwest::header::HeaderValue::from_static(
53941 super::Client::api_version(),
53942 ),
53943 );
53944 #[allow(unused_mut)]
53945 let mut request = client
53946 .client
53947 .post(url)
53948 .header(
53949 ::reqwest::header::ACCEPT,
53950 ::reqwest::header::HeaderValue::from_static("application/json"),
53951 )
53952 .json(&body)
53953 .headers(header_map)
53954 .build()?;
53955 let info = OperationInfo {
53956 operation_id: "post_get_validity_proof",
53957 };
53958 client.pre(&mut request, &info).await?;
53959 let result = client.exec(request, &info).await;
53960 client.post(&result, &info).await?;
53961 let response = result?;
53962 match response.status().as_u16() {
53963 200u16 => ResponseValue::from_response(response).await,
53964 429u16 => {
53965 Err(
53966 Error::ErrorResponse(
53967 ResponseValue::from_response(response).await?,
53968 ),
53969 )
53970 }
53971 500u16 => {
53972 Err(
53973 Error::ErrorResponse(
53974 ResponseValue::from_response(response).await?,
53975 ),
53976 )
53977 }
53978 _ => Err(Error::UnexpectedResponse(response)),
53979 }
53980 }
53981 }
53982 #[derive(Debug, Clone)]
53986 pub struct PostGetValidityProofV2<'a> {
53987 client: &'a super::Client,
53988 body: Result<types::builder::PostGetValidityProofV2Body, String>,
53989 }
53990 impl<'a> PostGetValidityProofV2<'a> {
53991 pub fn new(client: &'a super::Client) -> Self {
53992 Self {
53993 client: client,
53994 body: Ok(::std::default::Default::default()),
53995 }
53996 }
53997 pub fn body<V>(mut self, value: V) -> Self
53998 where
53999 V: std::convert::TryInto<types::PostGetValidityProofV2Body>,
54000 <V as std::convert::TryInto<
54001 types::PostGetValidityProofV2Body,
54002 >>::Error: std::fmt::Display,
54003 {
54004 self.body = value
54005 .try_into()
54006 .map(From::from)
54007 .map_err(|s| {
54008 format!(
54009 "conversion to `PostGetValidityProofV2Body` for body failed: {}",
54010 s
54011 )
54012 });
54013 self
54014 }
54015 pub fn body_map<F>(mut self, f: F) -> Self
54016 where
54017 F: std::ops::FnOnce(
54018 types::builder::PostGetValidityProofV2Body,
54019 ) -> types::builder::PostGetValidityProofV2Body,
54020 {
54021 self.body = self.body.map(f);
54022 self
54023 }
54024 pub async fn send(
54026 self,
54027 ) -> Result<
54028 ResponseValue<types::PostGetValidityProofV2Response>,
54029 Error<types::PostGetValidityProofV2Response>,
54030 > {
54031 let Self { client, body } = self;
54032 let body = body
54033 .and_then(|v| {
54034 types::PostGetValidityProofV2Body::try_from(v)
54035 .map_err(|e| e.to_string())
54036 })
54037 .map_err(Error::InvalidRequest)?;
54038 let url = format!("{}/getValidityProofV2", client.baseurl,);
54039 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
54040 header_map
54041 .append(
54042 ::reqwest::header::HeaderName::from_static("api-version"),
54043 ::reqwest::header::HeaderValue::from_static(
54044 super::Client::api_version(),
54045 ),
54046 );
54047 #[allow(unused_mut)]
54048 let mut request = client
54049 .client
54050 .post(url)
54051 .header(
54052 ::reqwest::header::ACCEPT,
54053 ::reqwest::header::HeaderValue::from_static("application/json"),
54054 )
54055 .json(&body)
54056 .headers(header_map)
54057 .build()?;
54058 let info = OperationInfo {
54059 operation_id: "post_get_validity_proof_v2",
54060 };
54061 client.pre(&mut request, &info).await?;
54062 let result = client.exec(request, &info).await;
54063 client.post(&result, &info).await?;
54064 let response = result?;
54065 match response.status().as_u16() {
54066 200u16 => ResponseValue::from_response(response).await,
54067 429u16 => {
54068 Err(
54069 Error::ErrorResponse(
54070 ResponseValue::from_response(response).await?,
54071 ),
54072 )
54073 }
54074 500u16 => {
54075 Err(
54076 Error::ErrorResponse(
54077 ResponseValue::from_response(response).await?,
54078 ),
54079 )
54080 }
54081 _ => Err(Error::UnexpectedResponse(response)),
54082 }
54083 }
54084 }
54085}
54086pub mod prelude {
54088 pub use self::super::Client;
54089}