summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Cargo.lock455
-rw-r--r--Cargo.toml3
-rw-r--r--src/cmd.rs6
-rw-r--r--src/cmd/folders.rs24
-rw-r--r--src/cmd/list.rs8
-rw-r--r--src/cmd/raw.rs4
-rw-r--r--src/main.rs2
-rw-r--r--src/pb3/jwebmail.rs3966
-rw-r--r--src/rfc822.rs28
10 files changed, 255 insertions, 4242 deletions
diff --git a/.gitignore b/.gitignore
index 2f7896d..b57a302 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
target/
+src/pb3/jwebmail.rs
diff --git a/Cargo.lock b/Cargo.lock
index 6378a73..a1f201c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "aho-corasick"
-version = "1.1.2"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
@@ -28,47 +28,48 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.13"
+version = "0.6.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
+checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
+ "is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "1.0.3"
+version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46"
+checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
[[package]]
name = "anstyle-parse"
-version = "0.2.1"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
+checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.0.0"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
dependencies = [
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.2"
+version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
+checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
dependencies = [
"anstyle",
"windows-sys 0.52.0",
@@ -76,41 +77,41 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.81"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
+checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "autocfg"
-version = "1.1.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "base64"
-version = "0.13.1"
+version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "bitflags"
-version = "2.4.2"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "bumpalo"
-version = "3.14.0"
+version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "cc"
-version = "1.0.83"
+version = "1.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+checksum = "e9d013ecb737093c0e86b151a7b837993cf9ec6c502946cfb44bedc392421e0b"
dependencies = [
- "libc",
+ "shlex",
]
[[package]]
@@ -121,9 +122,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "charset"
-version = "0.1.3"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18e9079d1a12a2cc2bffb5db039c43661836ead4082120d5844f02555aca2d46"
+checksum = "f1f927b07c74ba84c7e5fe4db2baeb3e996ab2688992e39ac68ce3220a677c7e"
dependencies = [
"base64",
"encoding_rs",
@@ -131,23 +132,23 @@ dependencies = [
[[package]]
name = "chrono"
-version = "0.4.31"
+version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
+checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
- "windows-targets 0.48.5",
+ "windows-targets",
]
[[package]]
name = "clap"
-version = "4.5.2"
+version = "4.5.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651"
+checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac"
dependencies = [
"clap_builder",
"clap_derive",
@@ -155,9 +156,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.2"
+version = "4.5.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"
+checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73"
dependencies = [
"anstream",
"anstyle",
@@ -167,9 +168,9 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.5.0"
+version = "4.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47"
+checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0"
dependencies = [
"heck",
"proc-macro2",
@@ -179,54 +180,63 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.7.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
+checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
[[package]]
name = "colorchoice"
-version = "1.0.0"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
[[package]]
name = "core-foundation-sys"
-version = "0.8.4"
+version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "data-encoding"
-version = "2.4.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
+checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
[[package]]
name = "deranged"
-version = "0.3.8"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]
[[package]]
name = "either"
-version = "1.10.0"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "encoding_rs"
-version = "0.8.33"
+version = "0.8.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
+checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"
dependencies = [
"cfg-if",
]
[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
name = "errno"
-version = "0.3.8"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
+checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -234,9 +244,9 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "2.0.1"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
+checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
name = "gethostname"
@@ -250,15 +260,15 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.12.3"
+version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
[[package]]
name = "heck"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "home"
@@ -271,16 +281,16 @@ dependencies = [
[[package]]
name = "iana-time-zone"
-version = "0.1.57"
+version = "0.1.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
+checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
- "windows",
+ "windows-core",
]
[[package]]
@@ -294,25 +304,31 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "1.9.3"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
dependencies = [
- "autocfg",
+ "equivalent",
"hashbrown",
]
[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
+[[package]]
name = "itoa"
-version = "1.0.9"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "js-sys"
-version = "0.3.64"
+version = "0.3.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
+checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a"
dependencies = [
"wasm-bindgen",
]
@@ -335,21 +351,21 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.153"
+version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
+checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "linux-raw-sys"
-version = "0.4.13"
+version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
+checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "log"
-version = "0.4.20"
+version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "maildir"
@@ -363,9 +379,9 @@ dependencies = [
[[package]]
name = "mailparse"
-version = "0.14.0"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b56570f5f8c0047260d1c8b5b331f62eb9c660b9dd4071a8c46f8c7d3f280aa"
+checksum = "2d096594926cab442e054e047eb8c1402f7d5b2272573b97ba68aa40629f9757"
dependencies = [
"charset",
"data-encoding",
@@ -374,48 +390,60 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.7.1"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "num-traits"
-version = "0.2.16"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "num_threads"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
+checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9"
dependencies = [
"libc",
]
[[package]]
name = "once_cell"
-version = "1.18.0"
+version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "proc-macro2"
-version = "1.0.79"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
+checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
[[package]]
name = "protobuf"
-version = "3.4.0"
+version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58678a64de2fced2bdec6bca052a6716a0efe692d6e3f53d1bda6a1def64cfc0"
+checksum = "0bcc343da15609eaecd65f8aa76df8dc4209d325131d8219358c0aaaebab0bf6"
dependencies = [
"once_cell",
"protobuf-support",
@@ -424,9 +452,9 @@ dependencies = [
[[package]]
name = "protobuf-codegen"
-version = "3.4.0"
+version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32777b0b3f6538d9d2e012b3fad85c7e4b9244b5958d04a6415f4333782b7a77"
+checksum = "c4d0cde5642ea4df842b13eb9f59ea6fafa26dcb43e3e1ee49120e9757556189"
dependencies = [
"anyhow",
"once_cell",
@@ -439,9 +467,9 @@ dependencies = [
[[package]]
name = "protobuf-parse"
-version = "3.4.0"
+version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96cb37955261126624a25b5e6bda40ae34cf3989d52a783087ca6091b29b5642"
+checksum = "1b0e9b447d099ae2c4993c0cbb03c7a9d6c937b17f2d56cfc0b1550e6fcfdb76"
dependencies = [
"anyhow",
"indexmap",
@@ -455,33 +483,33 @@ dependencies = [
[[package]]
name = "protobuf-support"
-version = "3.4.0"
+version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1ed294a835b0f30810e13616b1cd34943c6d1e84a8f3b0dcfe466d256c3e7e7"
+checksum = "f0766e3675a627c327e4b3964582594b0e8741305d628a98a5de75a1d15f99b9"
dependencies = [
"thiserror",
]
[[package]]
name = "quote"
-version = "1.0.33"
+version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
[[package]]
name = "quoted_printable"
-version = "0.4.8"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49"
+checksum = "640c9bd8497b02465aeef5375144c26062e0dcd5939dfcbb0f5db76cb8c17c73"
[[package]]
name = "regex"
-version = "1.10.3"
+version = "1.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
+checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
dependencies = [
"aho-corasick",
"memchr",
@@ -491,9 +519,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.6"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
+checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
dependencies = [
"aho-corasick",
"memchr",
@@ -502,15 +530,15 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.8.2"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
+checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
[[package]]
name = "rustix"
-version = "0.38.31"
+version = "0.38.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949"
+checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36"
dependencies = [
"bitflags",
"errno",
@@ -521,18 +549,18 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.188"
+version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
+checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.188"
+version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
+checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
dependencies = [
"proc-macro2",
"quote",
@@ -540,10 +568,16 @@ dependencies = [
]
[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
name = "simplelog"
-version = "0.12.1"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acee08041c5de3d5048c8b3f6f13fafb3026b24ba43c6a695a0c76179b844369"
+checksum = "16257adbfaef1ee58b1363bdc0664c9b8e1e30aed86049635fb5f147d065a9c0"
dependencies = [
"log",
"termcolor",
@@ -552,15 +586,15 @@ dependencies = [
[[package]]
name = "strsim"
-version = "0.11.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
-version = "2.0.37"
+version = "2.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8"
+checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
dependencies = [
"proc-macro2",
"quote",
@@ -569,39 +603,40 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.10.1"
+version = "3.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
+checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
dependencies = [
"cfg-if",
"fastrand",
+ "once_cell",
"rustix",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "termcolor"
-version = "1.1.3"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
"winapi-util",
]
[[package]]
name = "thiserror"
-version = "1.0.55"
+version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e3de26b0965292219b4287ff031fcba86837900fe9cd2b34ea8ad893c0953d2"
+checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.55"
+version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "268026685b2be38d7103e9e507c938a1fcb3d7e6eb15e87870b617bf37b6d581"
+checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
@@ -610,14 +645,16 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.28"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
"libc",
+ "num-conv",
"num_threads",
+ "powerfmt",
"serde",
"time-core",
"time-macros",
@@ -625,16 +662,17 @@ dependencies = [
[[package]]
name = "time-core"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.14"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
+ "num-conv",
"time-core",
]
@@ -646,25 +684,26 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "utf8parse"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "wasm-bindgen"
-version = "0.2.87"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
+checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
dependencies = [
"cfg-if",
+ "once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.87"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
+checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
dependencies = [
"bumpalo",
"log",
@@ -677,9 +716,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.87"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
+checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -687,9 +726,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.87"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
+checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [
"proc-macro2",
"quote",
@@ -700,9 +739,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.87"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "which"
@@ -734,11 +773,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.5"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
- "winapi",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -748,21 +787,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
-name = "windows"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
-dependencies = [
- "windows-targets 0.48.5",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.48.0"
+name = "windows-core"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
- "windows-targets 0.48.5",
+ "windows-targets",
]
[[package]]
@@ -771,119 +801,78 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
- "windows-targets 0.52.4",
+ "windows-targets",
]
[[package]]
-name = "windows-targets"
-version = "0.48.5"
+name = "windows-sys"
+version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
- "windows_aarch64_gnullvm 0.48.5",
- "windows_aarch64_msvc 0.48.5",
- "windows_i686_gnu 0.48.5",
- "windows_i686_msvc 0.48.5",
- "windows_x86_64_gnu 0.48.5",
- "windows_x86_64_gnullvm 0.48.5",
- "windows_x86_64_msvc 0.48.5",
+ "windows-targets",
]
[[package]]
name = "windows-targets"
-version = "0.52.4"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
- "windows_aarch64_gnullvm 0.52.4",
- "windows_aarch64_msvc 0.52.4",
- "windows_i686_gnu 0.52.4",
- "windows_i686_msvc 0.52.4",
- "windows_x86_64_gnu 0.52.4",
- "windows_x86_64_gnullvm 0.52.4",
- "windows_x86_64_msvc 0.52.4",
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.48.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.4"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
-version = "0.48.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
-name = "windows_i686_gnu"
-version = "0.52.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.48.5"
+name = "windows_i686_gnullvm"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.48.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.4"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.48.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.4"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
diff --git a/Cargo.toml b/Cargo.toml
index c733b18..cc2b1a1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,13 +3,12 @@ name = "jwebmail-extract"
version = "0.7.0"
authors = ["Jannis M. Hoffmann <jannis@fehcom.de>"]
edition = "2021"
-rust-version = "1.75"
+rust-version = "1.80"
resolver = "2"
[profile.release-small]
inherits = "release"
opt-level = "s"
-strip = true
lto = true
panic = "abort"
codegen-units = 1
diff --git a/src/cmd.rs b/src/cmd.rs
index 240c489..308cc5f 100644
--- a/src/cmd.rs
+++ b/src/cmd.rs
@@ -4,22 +4,22 @@ use maildir::Maildir;
mod count;
mod folders;
+mod list;
mod move_mail;
mod raw;
mod read;
-mod list;
mod remove;
pub use count::count;
pub use folders::folders;
+pub use list::list;
pub use move_mail::move_mail;
pub use raw::raw;
pub use read::read;
-pub use list::list;
pub use remove::remove;
pub fn open_submaildir(mut path: PathBuf, sub: &str) -> Maildir {
- if sub != "" {
+ if !sub.is_empty() {
path.push(String::from(".") + sub);
}
Maildir::from(path)
diff --git a/src/cmd/folders.rs b/src/cmd/folders.rs
index b6f7209..b50daa9 100644
--- a/src/cmd/folders.rs
+++ b/src/cmd/folders.rs
@@ -1,26 +1,24 @@
use std::collections::BTreeSet;
use std::ffi::{OsStr, OsString};
use std::path::{Path, PathBuf};
-use std::sync::OnceLock;
+use std::sync::LazyLock;
use protobuf::Message as _;
use crate::error::Result;
use crate::pb3::jwebmail::{FoldersReq, FoldersResp};
-static REQUIRED_MAILDIR_DIRS: OnceLock<BTreeSet<OsString>> = OnceLock::new();
+static REQUIRED_MAILDIR_DIRS: LazyLock<BTreeSet<OsString>> = LazyLock::new(|| {
+ [
+ OsString::from("cur"),
+ "new".into(),
+ "tmp".into(),
+ "maildirfolder".into(),
+ ]
+ .into()
+});
fn is_mailsubdir(p: &Path) -> bool {
- let rmd = REQUIRED_MAILDIR_DIRS.get_or_init(|| {
- [
- OsString::from("cur"),
- "new".into(),
- "tmp".into(),
- "maildirfolder".into(),
- ]
- .into()
- });
-
p.is_dir()
&& p.file_name()
.map_or(false, |fname| fname.to_string_lossy().starts_with('.'))
@@ -32,7 +30,7 @@ fn is_mailsubdir(p: &Path) -> bool {
.and_then(|dir_entry| dir_entry.path().file_name().map(OsStr::to_owned))
})
.collect::<BTreeSet<_>>()
- .is_superset(rmd)
+ .is_superset(&*REQUIRED_MAILDIR_DIRS)
})
.unwrap_or_default()
}
diff --git a/src/cmd/list.rs b/src/cmd/list.rs
index 65f128f..f34c333 100644
--- a/src/cmd/list.rs
+++ b/src/cmd/list.rs
@@ -9,8 +9,8 @@ use crate::error::Result;
use crate::pb3::jwebmail::{ListMailHeader, ListReq, ListResp, MailHeader};
use crate::rfc822::me_to_lmh;
-fn from_or_sender<'a>(mh: &'a MailHeader) -> &'a str {
- if mh.written_from.len() == 0 {
+fn from_or_sender(mh: &MailHeader) -> &str {
+ if mh.written_from.is_empty() {
warn!("mail without from");
panic!()
}
@@ -80,7 +80,7 @@ fn sort_by_and_take(
.drain(..)
.filter_map(|me| me_to_lmh(me).map_err(|e| warn!("{}", e)).ok())
.collect();
- if sortby.bytes().nth(0) == Some(b'!') {
+ if sortby.as_bytes().first().copied() == Some(b'!') {
x.sort_by(|a, b| a.header.subject.cmp(&b.header.subject))
} else {
x.sort_by(|b, a| a.header.subject.cmp(&b.header.subject))
@@ -92,7 +92,7 @@ fn sort_by_and_take(
.drain(..)
.filter_map(|me| me_to_lmh(me).map_err(|e| warn!("{}", e)).ok())
.collect();
- if sortby.bytes().nth(0) != Some(b'!') {
+ if sortby.as_bytes().first().copied() != Some(b'!') {
x.sort_by(|a, b| from_or_sender(&a.header).cmp(from_or_sender(&b.header)))
} else {
x.sort_by(|b, a| from_or_sender(&a.header).cmp(from_or_sender(&b.header)))
diff --git a/src/cmd/raw.rs b/src/cmd/raw.rs
index 76c875f..9fe7620 100644
--- a/src/cmd/raw.rs
+++ b/src/cmd/raw.rs
@@ -19,8 +19,8 @@ pub fn raw(md_path: PathBuf, req: &[u8]) -> Result<Vec<u8>> {
std::io::Error::new(IOErrKind::NotFound, format!("mail {} not found", &r.mid))
})?;
- match r.path {
- None => {
+ match r.path.as_deref() {
+ Some("") | None => {
let mut mh = MIMEHeader::new();
mh.maintype = "message".to_owned();
diff --git a/src/main.rs b/src/main.rs
index 942961b..f9ba899 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -55,7 +55,7 @@ fn main() -> Result<()> {
let path = args.maildir_path.join(args.mail_user);
- stdout().write(b"OPEN\n")?;
+ stdout().write_all(b"OPEN\n")?;
stdout().flush()?;
let mut req = Vec::with_capacity(2048);
stdin().read_to_end(&mut req)?;
diff --git a/src/pb3/jwebmail.rs b/src/pb3/jwebmail.rs
deleted file mode 100644
index c94a0e1..0000000
--- a/src/pb3/jwebmail.rs
+++ /dev/null
@@ -1,3966 +0,0 @@
-// This file is generated by rust-protobuf 3.4.0. Do not edit
-// .proto file is parsed by protoc 25.3
-// @generated
-
-// https://github.com/rust-lang/rust-clippy/issues/702
-#![allow(unknown_lints)]
-#![allow(clippy::all)]
-
-#![allow(unused_attributes)]
-#![cfg_attr(rustfmt, rustfmt::skip)]
-
-#![allow(box_pointers)]
-#![allow(dead_code)]
-#![allow(missing_docs)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-#![allow(non_upper_case_globals)]
-#![allow(trivial_casts)]
-#![allow(unused_results)]
-#![allow(unused_mut)]
-
-//! Generated file from `jwebmail.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0;
-
-// @@protoc_insertion_point(message:jwebmail.MIMEHeader)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct MIMEHeader {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.MIMEHeader.maintype)
- pub maintype: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.MIMEHeader.subtype)
- pub subtype: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.MIMEHeader.contentdispo)
- pub contentdispo: ::protobuf::EnumOrUnknown<mimeheader::ContentDisposition>,
- // @@protoc_insertion_point(field:jwebmail.MIMEHeader.file_name)
- pub file_name: ::std::option::Option<::std::string::String>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.MIMEHeader.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a MIMEHeader {
- fn default() -> &'a MIMEHeader {
- <MIMEHeader as ::protobuf::Message>::default_instance()
- }
-}
-
-impl MIMEHeader {
- pub fn new() -> MIMEHeader {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(4);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "maintype",
- |m: &MIMEHeader| { &m.maintype },
- |m: &mut MIMEHeader| { &mut m.maintype },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "subtype",
- |m: &MIMEHeader| { &m.subtype },
- |m: &mut MIMEHeader| { &mut m.subtype },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "contentdispo",
- |m: &MIMEHeader| { &m.contentdispo },
- |m: &mut MIMEHeader| { &mut m.contentdispo },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "file_name",
- |m: &MIMEHeader| { &m.file_name },
- |m: &mut MIMEHeader| { &mut m.file_name },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MIMEHeader>(
- "MIMEHeader",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for MIMEHeader {
- const NAME: &'static str = "MIMEHeader";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.maintype = is.read_string()?;
- },
- 18 => {
- self.subtype = is.read_string()?;
- },
- 24 => {
- self.contentdispo = is.read_enum_or_unknown()?;
- },
- 34 => {
- self.file_name = ::std::option::Option::Some(is.read_string()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.maintype.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.maintype);
- }
- if !self.subtype.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.subtype);
- }
- if self.contentdispo != ::protobuf::EnumOrUnknown::new(mimeheader::ContentDisposition::CONTENT_DISPOSITION_NONE) {
- my_size += ::protobuf::rt::int32_size(3, self.contentdispo.value());
- }
- if let Some(v) = self.file_name.as_ref() {
- my_size += ::protobuf::rt::string_size(4, &v);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.maintype.is_empty() {
- os.write_string(1, &self.maintype)?;
- }
- if !self.subtype.is_empty() {
- os.write_string(2, &self.subtype)?;
- }
- if self.contentdispo != ::protobuf::EnumOrUnknown::new(mimeheader::ContentDisposition::CONTENT_DISPOSITION_NONE) {
- os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.contentdispo))?;
- }
- if let Some(v) = self.file_name.as_ref() {
- os.write_string(4, v)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> MIMEHeader {
- MIMEHeader::new()
- }
-
- fn clear(&mut self) {
- self.maintype.clear();
- self.subtype.clear();
- self.contentdispo = ::protobuf::EnumOrUnknown::new(mimeheader::ContentDisposition::CONTENT_DISPOSITION_NONE);
- self.file_name = ::std::option::Option::None;
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static MIMEHeader {
- static instance: MIMEHeader = MIMEHeader {
- maintype: ::std::string::String::new(),
- subtype: ::std::string::String::new(),
- contentdispo: ::protobuf::EnumOrUnknown::from_i32(0),
- file_name: ::std::option::Option::None,
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for MIMEHeader {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("MIMEHeader").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for MIMEHeader {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MIMEHeader {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-/// Nested message and enums of message `MIMEHeader`
-pub mod mimeheader {
- #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
- // @@protoc_insertion_point(enum:jwebmail.MIMEHeader.ContentDisposition)
- pub enum ContentDisposition {
- // @@protoc_insertion_point(enum_value:jwebmail.MIMEHeader.ContentDisposition.CONTENT_DISPOSITION_NONE)
- CONTENT_DISPOSITION_NONE = 0,
- // @@protoc_insertion_point(enum_value:jwebmail.MIMEHeader.ContentDisposition.CONTENT_DISPOSITION_INLINE)
- CONTENT_DISPOSITION_INLINE = 1,
- // @@protoc_insertion_point(enum_value:jwebmail.MIMEHeader.ContentDisposition.CONTENT_DISPOSITION_ATTACHMENT)
- CONTENT_DISPOSITION_ATTACHMENT = 2,
- }
-
- impl ::protobuf::Enum for ContentDisposition {
- const NAME: &'static str = "ContentDisposition";
-
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<ContentDisposition> {
- match value {
- 0 => ::std::option::Option::Some(ContentDisposition::CONTENT_DISPOSITION_NONE),
- 1 => ::std::option::Option::Some(ContentDisposition::CONTENT_DISPOSITION_INLINE),
- 2 => ::std::option::Option::Some(ContentDisposition::CONTENT_DISPOSITION_ATTACHMENT),
- _ => ::std::option::Option::None
- }
- }
-
- fn from_str(str: &str) -> ::std::option::Option<ContentDisposition> {
- match str {
- "CONTENT_DISPOSITION_NONE" => ::std::option::Option::Some(ContentDisposition::CONTENT_DISPOSITION_NONE),
- "CONTENT_DISPOSITION_INLINE" => ::std::option::Option::Some(ContentDisposition::CONTENT_DISPOSITION_INLINE),
- "CONTENT_DISPOSITION_ATTACHMENT" => ::std::option::Option::Some(ContentDisposition::CONTENT_DISPOSITION_ATTACHMENT),
- _ => ::std::option::Option::None
- }
- }
-
- const VALUES: &'static [ContentDisposition] = &[
- ContentDisposition::CONTENT_DISPOSITION_NONE,
- ContentDisposition::CONTENT_DISPOSITION_INLINE,
- ContentDisposition::CONTENT_DISPOSITION_ATTACHMENT,
- ];
- }
-
- impl ::protobuf::EnumFull for ContentDisposition {
- fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("MIMEHeader.ContentDisposition").unwrap()).clone()
- }
-
- fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
- let index = *self as usize;
- Self::enum_descriptor().value_by_index(index)
- }
- }
-
- impl ::std::default::Default for ContentDisposition {
- fn default() -> Self {
- ContentDisposition::CONTENT_DISPOSITION_NONE
- }
- }
-
- impl ContentDisposition {
- pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
- ::protobuf::reflect::GeneratedEnumDescriptorData::new::<ContentDisposition>("MIMEHeader.ContentDisposition")
- }
- }
-}
-
-// @@protoc_insertion_point(message:jwebmail.MailHeader)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct MailHeader {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.MailHeader.send_date)
- pub send_date: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.written_from)
- pub written_from: ::std::vec::Vec<mail_header::MailAddr>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.sender)
- pub sender: ::protobuf::MessageField<mail_header::MailAddr>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.reply_to)
- pub reply_to: ::std::vec::Vec<mail_header::MailAddr>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.send_to)
- pub send_to: ::std::vec::Vec<mail_header::MailAddr>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.cc)
- pub cc: ::std::vec::Vec<mail_header::MailAddr>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.bcc)
- pub bcc: ::std::vec::Vec<mail_header::MailAddr>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.subject)
- pub subject: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.comments)
- pub comments: ::std::vec::Vec<::std::string::String>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.keywords)
- pub keywords: ::std::vec::Vec<::std::string::String>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.mime)
- pub mime: ::protobuf::MessageField<MIMEHeader>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.MailHeader.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a MailHeader {
- fn default() -> &'a MailHeader {
- <MailHeader as ::protobuf::Message>::default_instance()
- }
-}
-
-impl MailHeader {
- pub fn new() -> MailHeader {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(11);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "send_date",
- |m: &MailHeader| { &m.send_date },
- |m: &mut MailHeader| { &mut m.send_date },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "written_from",
- |m: &MailHeader| { &m.written_from },
- |m: &mut MailHeader| { &mut m.written_from },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, mail_header::MailAddr>(
- "sender",
- |m: &MailHeader| { &m.sender },
- |m: &mut MailHeader| { &mut m.sender },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "reply_to",
- |m: &MailHeader| { &m.reply_to },
- |m: &mut MailHeader| { &mut m.reply_to },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "send_to",
- |m: &MailHeader| { &m.send_to },
- |m: &mut MailHeader| { &mut m.send_to },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "cc",
- |m: &MailHeader| { &m.cc },
- |m: &mut MailHeader| { &mut m.cc },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "bcc",
- |m: &MailHeader| { &m.bcc },
- |m: &mut MailHeader| { &mut m.bcc },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "subject",
- |m: &MailHeader| { &m.subject },
- |m: &mut MailHeader| { &mut m.subject },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "comments",
- |m: &MailHeader| { &m.comments },
- |m: &mut MailHeader| { &mut m.comments },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "keywords",
- |m: &MailHeader| { &m.keywords },
- |m: &mut MailHeader| { &mut m.keywords },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MIMEHeader>(
- "mime",
- |m: &MailHeader| { &m.mime },
- |m: &mut MailHeader| { &mut m.mime },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MailHeader>(
- "MailHeader",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for MailHeader {
- const NAME: &'static str = "MailHeader";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.send_date = is.read_string()?;
- },
- 18 => {
- self.written_from.push(is.read_message()?);
- },
- 26 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.sender)?;
- },
- 34 => {
- self.reply_to.push(is.read_message()?);
- },
- 42 => {
- self.send_to.push(is.read_message()?);
- },
- 50 => {
- self.cc.push(is.read_message()?);
- },
- 58 => {
- self.bcc.push(is.read_message()?);
- },
- 66 => {
- self.subject = is.read_string()?;
- },
- 74 => {
- self.comments.push(is.read_string()?);
- },
- 82 => {
- self.keywords.push(is.read_string()?);
- },
- 90 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.mime)?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.send_date.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.send_date);
- }
- for value in &self.written_from {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- };
- if let Some(v) = self.sender.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- for value in &self.reply_to {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- };
- for value in &self.send_to {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- };
- for value in &self.cc {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- };
- for value in &self.bcc {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- };
- if !self.subject.is_empty() {
- my_size += ::protobuf::rt::string_size(8, &self.subject);
- }
- for value in &self.comments {
- my_size += ::protobuf::rt::string_size(9, &value);
- };
- for value in &self.keywords {
- my_size += ::protobuf::rt::string_size(10, &value);
- };
- if let Some(v) = self.mime.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.send_date.is_empty() {
- os.write_string(1, &self.send_date)?;
- }
- for v in &self.written_from {
- ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
- };
- if let Some(v) = self.sender.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
- }
- for v in &self.reply_to {
- ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
- };
- for v in &self.send_to {
- ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
- };
- for v in &self.cc {
- ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
- };
- for v in &self.bcc {
- ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
- };
- if !self.subject.is_empty() {
- os.write_string(8, &self.subject)?;
- }
- for v in &self.comments {
- os.write_string(9, &v)?;
- };
- for v in &self.keywords {
- os.write_string(10, &v)?;
- };
- if let Some(v) = self.mime.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> MailHeader {
- MailHeader::new()
- }
-
- fn clear(&mut self) {
- self.send_date.clear();
- self.written_from.clear();
- self.sender.clear();
- self.reply_to.clear();
- self.send_to.clear();
- self.cc.clear();
- self.bcc.clear();
- self.subject.clear();
- self.comments.clear();
- self.keywords.clear();
- self.mime.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static MailHeader {
- static instance: MailHeader = MailHeader {
- send_date: ::std::string::String::new(),
- written_from: ::std::vec::Vec::new(),
- sender: ::protobuf::MessageField::none(),
- reply_to: ::std::vec::Vec::new(),
- send_to: ::std::vec::Vec::new(),
- cc: ::std::vec::Vec::new(),
- bcc: ::std::vec::Vec::new(),
- subject: ::std::string::String::new(),
- comments: ::std::vec::Vec::new(),
- keywords: ::std::vec::Vec::new(),
- mime: ::protobuf::MessageField::none(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for MailHeader {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("MailHeader").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for MailHeader {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MailHeader {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-/// Nested message and enums of message `MailHeader`
-pub mod mail_header {
- // @@protoc_insertion_point(message:jwebmail.MailHeader.MailAddr)
- #[derive(PartialEq,Clone,Default,Debug)]
- pub struct MailAddr {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.MailHeader.MailAddr.name)
- pub name: ::std::option::Option<::std::string::String>,
- // @@protoc_insertion_point(field:jwebmail.MailHeader.MailAddr.address)
- pub address: ::std::string::String,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.MailHeader.MailAddr.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
- }
-
- impl<'a> ::std::default::Default for &'a MailAddr {
- fn default() -> &'a MailAddr {
- <MailAddr as ::protobuf::Message>::default_instance()
- }
- }
-
- impl MailAddr {
- pub fn new() -> MailAddr {
- ::std::default::Default::default()
- }
-
- pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(2);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "name",
- |m: &MailAddr| { &m.name },
- |m: &mut MailAddr| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "address",
- |m: &MailAddr| { &m.address },
- |m: &mut MailAddr| { &mut m.address },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MailAddr>(
- "MailHeader.MailAddr",
- fields,
- oneofs,
- )
- }
- }
-
- impl ::protobuf::Message for MailAddr {
- const NAME: &'static str = "MailAddr";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.name = ::std::option::Option::Some(is.read_string()?);
- },
- 18 => {
- self.address = is.read_string()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.name.as_ref() {
- my_size += ::protobuf::rt::string_size(1, &v);
- }
- if !self.address.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.address);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.name.as_ref() {
- os.write_string(1, v)?;
- }
- if !self.address.is_empty() {
- os.write_string(2, &self.address)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> MailAddr {
- MailAddr::new()
- }
-
- fn clear(&mut self) {
- self.name = ::std::option::Option::None;
- self.address.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static MailAddr {
- static instance: MailAddr = MailAddr {
- name: ::std::option::Option::None,
- address: ::std::string::String::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
- }
-
- impl ::protobuf::MessageFull for MailAddr {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| super::file_descriptor().message_by_package_relative_name("MailHeader.MailAddr").unwrap()).clone()
- }
- }
-
- impl ::std::fmt::Display for MailAddr {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
-
- impl ::protobuf::reflect::ProtobufValue for MailAddr {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
- }
-}
-
-// @@protoc_insertion_point(message:jwebmail.ListMailHeader)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct ListMailHeader {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.ListMailHeader.byte_size)
- pub byte_size: u64,
- // @@protoc_insertion_point(field:jwebmail.ListMailHeader.unread)
- pub unread: bool,
- // @@protoc_insertion_point(field:jwebmail.ListMailHeader.rec_date)
- pub rec_date: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.ListMailHeader.mid)
- pub mid: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.ListMailHeader.header)
- pub header: ::protobuf::MessageField<MailHeader>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.ListMailHeader.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a ListMailHeader {
- fn default() -> &'a ListMailHeader {
- <ListMailHeader as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ListMailHeader {
- pub fn new() -> ListMailHeader {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(5);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "byte_size",
- |m: &ListMailHeader| { &m.byte_size },
- |m: &mut ListMailHeader| { &mut m.byte_size },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "unread",
- |m: &ListMailHeader| { &m.unread },
- |m: &mut ListMailHeader| { &mut m.unread },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "rec_date",
- |m: &ListMailHeader| { &m.rec_date },
- |m: &mut ListMailHeader| { &mut m.rec_date },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "mid",
- |m: &ListMailHeader| { &m.mid },
- |m: &mut ListMailHeader| { &mut m.mid },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MailHeader>(
- "header",
- |m: &ListMailHeader| { &m.header },
- |m: &mut ListMailHeader| { &mut m.header },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ListMailHeader>(
- "ListMailHeader",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for ListMailHeader {
- const NAME: &'static str = "ListMailHeader";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 8 => {
- self.byte_size = is.read_uint64()?;
- },
- 16 => {
- self.unread = is.read_bool()?;
- },
- 26 => {
- self.rec_date = is.read_string()?;
- },
- 34 => {
- self.mid = is.read_string()?;
- },
- 42 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if self.byte_size != 0 {
- my_size += ::protobuf::rt::uint64_size(1, self.byte_size);
- }
- if self.unread != false {
- my_size += 1 + 1;
- }
- if !self.rec_date.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.rec_date);
- }
- if !self.mid.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.mid);
- }
- if let Some(v) = self.header.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if self.byte_size != 0 {
- os.write_uint64(1, self.byte_size)?;
- }
- if self.unread != false {
- os.write_bool(2, self.unread)?;
- }
- if !self.rec_date.is_empty() {
- os.write_string(3, &self.rec_date)?;
- }
- if !self.mid.is_empty() {
- os.write_string(4, &self.mid)?;
- }
- if let Some(v) = self.header.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> ListMailHeader {
- ListMailHeader::new()
- }
-
- fn clear(&mut self) {
- self.byte_size = 0;
- self.unread = false;
- self.rec_date.clear();
- self.mid.clear();
- self.header.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static ListMailHeader {
- static instance: ListMailHeader = ListMailHeader {
- byte_size: 0,
- unread: false,
- rec_date: ::std::string::String::new(),
- mid: ::std::string::String::new(),
- header: ::protobuf::MessageField::none(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for ListMailHeader {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("ListMailHeader").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for ListMailHeader {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ListMailHeader {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.MailBody)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct MailBody {
- // message oneof groups
- pub Body: ::std::option::Option<mail_body::Body>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.MailBody.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a MailBody {
- fn default() -> &'a MailBody {
- <MailBody as ::protobuf::Message>::default_instance()
- }
-}
-
-impl MailBody {
- pub fn new() -> MailBody {
- ::std::default::Default::default()
- }
-
- // string discrete = 1;
-
- pub fn discrete(&self) -> &str {
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Discrete(ref v)) => v,
- _ => "",
- }
- }
-
- pub fn clear_discrete(&mut self) {
- self.Body = ::std::option::Option::None;
- }
-
- pub fn has_discrete(&self) -> bool {
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Discrete(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_discrete(&mut self, v: ::std::string::String) {
- self.Body = ::std::option::Option::Some(mail_body::Body::Discrete(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_discrete(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(mail_body::Body::Discrete(_)) = self.Body {
- } else {
- self.Body = ::std::option::Option::Some(mail_body::Body::Discrete(::std::string::String::new()));
- }
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Discrete(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_discrete(&mut self) -> ::std::string::String {
- if self.has_discrete() {
- match self.Body.take() {
- ::std::option::Option::Some(mail_body::Body::Discrete(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // .jwebmail.MailBody.Multipart multipart = 2;
-
- pub fn multipart(&self) -> &mail_body::Multipart {
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Multipart(ref v)) => v,
- _ => <mail_body::Multipart as ::protobuf::Message>::default_instance(),
- }
- }
-
- pub fn clear_multipart(&mut self) {
- self.Body = ::std::option::Option::None;
- }
-
- pub fn has_multipart(&self) -> bool {
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Multipart(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_multipart(&mut self, v: mail_body::Multipart) {
- self.Body = ::std::option::Option::Some(mail_body::Body::Multipart(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_multipart(&mut self) -> &mut mail_body::Multipart {
- if let ::std::option::Option::Some(mail_body::Body::Multipart(_)) = self.Body {
- } else {
- self.Body = ::std::option::Option::Some(mail_body::Body::Multipart(mail_body::Multipart::new()));
- }
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Multipart(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_multipart(&mut self) -> mail_body::Multipart {
- if self.has_multipart() {
- match self.Body.take() {
- ::std::option::Option::Some(mail_body::Body::Multipart(v)) => v,
- _ => panic!(),
- }
- } else {
- mail_body::Multipart::new()
- }
- }
-
- // .jwebmail.Mail mail = 3;
-
- pub fn mail(&self) -> &Mail {
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Mail(ref v)) => v,
- _ => <Mail as ::protobuf::Message>::default_instance(),
- }
- }
-
- pub fn clear_mail(&mut self) {
- self.Body = ::std::option::Option::None;
- }
-
- pub fn has_mail(&self) -> bool {
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Mail(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_mail(&mut self, v: Mail) {
- self.Body = ::std::option::Option::Some(mail_body::Body::Mail(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_mail(&mut self) -> &mut Mail {
- if let ::std::option::Option::Some(mail_body::Body::Mail(_)) = self.Body {
- } else {
- self.Body = ::std::option::Option::Some(mail_body::Body::Mail(Mail::new()));
- }
- match self.Body {
- ::std::option::Option::Some(mail_body::Body::Mail(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_mail(&mut self) -> Mail {
- if self.has_mail() {
- match self.Body.take() {
- ::std::option::Option::Some(mail_body::Body::Mail(v)) => v,
- _ => panic!(),
- }
- } else {
- Mail::new()
- }
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(3);
- let mut oneofs = ::std::vec::Vec::with_capacity(1);
- fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>(
- "discrete",
- MailBody::has_discrete,
- MailBody::discrete,
- MailBody::set_discrete,
- ));
- fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, mail_body::Multipart>(
- "multipart",
- MailBody::has_multipart,
- MailBody::multipart,
- MailBody::mut_multipart,
- MailBody::set_multipart,
- ));
- fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, Mail>(
- "mail",
- MailBody::has_mail,
- MailBody::mail,
- MailBody::mut_mail,
- MailBody::set_mail,
- ));
- oneofs.push(mail_body::Body::generated_oneof_descriptor_data());
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MailBody>(
- "MailBody",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for MailBody {
- const NAME: &'static str = "MailBody";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.Body = ::std::option::Option::Some(mail_body::Body::Discrete(is.read_string()?));
- },
- 18 => {
- self.Body = ::std::option::Option::Some(mail_body::Body::Multipart(is.read_message()?));
- },
- 26 => {
- self.Body = ::std::option::Option::Some(mail_body::Body::Mail(is.read_message()?));
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let ::std::option::Option::Some(ref v) = self.Body {
- match v {
- &mail_body::Body::Discrete(ref v) => {
- my_size += ::protobuf::rt::string_size(1, &v);
- },
- &mail_body::Body::Multipart(ref v) => {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- },
- &mail_body::Body::Mail(ref v) => {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- },
- };
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let ::std::option::Option::Some(ref v) = self.Body {
- match v {
- &mail_body::Body::Discrete(ref v) => {
- os.write_string(1, v)?;
- },
- &mail_body::Body::Multipart(ref v) => {
- ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
- },
- &mail_body::Body::Mail(ref v) => {
- ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
- },
- };
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> MailBody {
- MailBody::new()
- }
-
- fn clear(&mut self) {
- self.Body = ::std::option::Option::None;
- self.Body = ::std::option::Option::None;
- self.Body = ::std::option::Option::None;
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static MailBody {
- static instance: MailBody = MailBody {
- Body: ::std::option::Option::None,
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for MailBody {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("MailBody").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for MailBody {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MailBody {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-/// Nested message and enums of message `MailBody`
-pub mod mail_body {
-
- #[derive(Clone,PartialEq,Debug)]
- #[non_exhaustive]
- // @@protoc_insertion_point(oneof:jwebmail.MailBody.Body)
- pub enum Body {
- // @@protoc_insertion_point(oneof_field:jwebmail.MailBody.discrete)
- Discrete(::std::string::String),
- // @@protoc_insertion_point(oneof_field:jwebmail.MailBody.multipart)
- Multipart(Multipart),
- // @@protoc_insertion_point(oneof_field:jwebmail.MailBody.mail)
- Mail(super::Mail),
- }
-
- impl ::protobuf::Oneof for Body {
- }
-
- impl ::protobuf::OneofFull for Body {
- fn descriptor() -> ::protobuf::reflect::OneofDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| <super::MailBody as ::protobuf::MessageFull>::descriptor().oneof_by_name("Body").unwrap()).clone()
- }
- }
-
- impl Body {
- pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData {
- ::protobuf::reflect::GeneratedOneofDescriptorData::new::<Body>("Body")
- }
- }
- // @@protoc_insertion_point(message:jwebmail.MailBody.Multipart)
- #[derive(PartialEq,Clone,Default,Debug)]
- pub struct Multipart {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.MailBody.Multipart.preamble)
- pub preamble: ::std::option::Option<::std::string::String>,
- // @@protoc_insertion_point(field:jwebmail.MailBody.Multipart.parts)
- pub parts: ::std::vec::Vec<super::MIMEPart>,
- // @@protoc_insertion_point(field:jwebmail.MailBody.Multipart.epilogue)
- pub epilogue: ::std::option::Option<::std::string::String>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.MailBody.Multipart.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
- }
-
- impl<'a> ::std::default::Default for &'a Multipart {
- fn default() -> &'a Multipart {
- <Multipart as ::protobuf::Message>::default_instance()
- }
- }
-
- impl Multipart {
- pub fn new() -> Multipart {
- ::std::default::Default::default()
- }
-
- pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(3);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "preamble",
- |m: &Multipart| { &m.preamble },
- |m: &mut Multipart| { &mut m.preamble },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "parts",
- |m: &Multipart| { &m.parts },
- |m: &mut Multipart| { &mut m.parts },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "epilogue",
- |m: &Multipart| { &m.epilogue },
- |m: &mut Multipart| { &mut m.epilogue },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Multipart>(
- "MailBody.Multipart",
- fields,
- oneofs,
- )
- }
- }
-
- impl ::protobuf::Message for Multipart {
- const NAME: &'static str = "Multipart";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.preamble = ::std::option::Option::Some(is.read_string()?);
- },
- 18 => {
- self.parts.push(is.read_message()?);
- },
- 26 => {
- self.epilogue = ::std::option::Option::Some(is.read_string()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.preamble.as_ref() {
- my_size += ::protobuf::rt::string_size(1, &v);
- }
- for value in &self.parts {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- };
- if let Some(v) = self.epilogue.as_ref() {
- my_size += ::protobuf::rt::string_size(3, &v);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.preamble.as_ref() {
- os.write_string(1, v)?;
- }
- for v in &self.parts {
- ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
- };
- if let Some(v) = self.epilogue.as_ref() {
- os.write_string(3, v)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> Multipart {
- Multipart::new()
- }
-
- fn clear(&mut self) {
- self.preamble = ::std::option::Option::None;
- self.parts.clear();
- self.epilogue = ::std::option::Option::None;
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static Multipart {
- static instance: Multipart = Multipart {
- preamble: ::std::option::Option::None,
- parts: ::std::vec::Vec::new(),
- epilogue: ::std::option::Option::None,
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
- }
-
- impl ::protobuf::MessageFull for Multipart {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| super::file_descriptor().message_by_package_relative_name("MailBody.Multipart").unwrap()).clone()
- }
- }
-
- impl ::std::fmt::Display for Multipart {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
-
- impl ::protobuf::reflect::ProtobufValue for Multipart {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
- }
-}
-
-// @@protoc_insertion_point(message:jwebmail.Mail)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct Mail {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.Mail.head)
- pub head: ::protobuf::MessageField<MailHeader>,
- // @@protoc_insertion_point(field:jwebmail.Mail.body)
- pub body: ::protobuf::MessageField<MailBody>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.Mail.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a Mail {
- fn default() -> &'a Mail {
- <Mail as ::protobuf::Message>::default_instance()
- }
-}
-
-impl Mail {
- pub fn new() -> Mail {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(2);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MailHeader>(
- "head",
- |m: &Mail| { &m.head },
- |m: &mut Mail| { &mut m.head },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MailBody>(
- "body",
- |m: &Mail| { &m.body },
- |m: &mut Mail| { &mut m.body },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Mail>(
- "Mail",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for Mail {
- const NAME: &'static str = "Mail";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.head)?;
- },
- 18 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.body)?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.head.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- if let Some(v) = self.body.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.head.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
- }
- if let Some(v) = self.body.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> Mail {
- Mail::new()
- }
-
- fn clear(&mut self) {
- self.head.clear();
- self.body.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static Mail {
- static instance: Mail = Mail {
- head: ::protobuf::MessageField::none(),
- body: ::protobuf::MessageField::none(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for Mail {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("Mail").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for Mail {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for Mail {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.MIMEPart)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct MIMEPart {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.MIMEPart.mime_header)
- pub mime_header: ::protobuf::MessageField<MIMEHeader>,
- // @@protoc_insertion_point(field:jwebmail.MIMEPart.body)
- pub body: ::protobuf::MessageField<MailBody>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.MIMEPart.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a MIMEPart {
- fn default() -> &'a MIMEPart {
- <MIMEPart as ::protobuf::Message>::default_instance()
- }
-}
-
-impl MIMEPart {
- pub fn new() -> MIMEPart {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(2);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MIMEHeader>(
- "mime_header",
- |m: &MIMEPart| { &m.mime_header },
- |m: &mut MIMEPart| { &mut m.mime_header },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MailBody>(
- "body",
- |m: &MIMEPart| { &m.body },
- |m: &mut MIMEPart| { &mut m.body },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MIMEPart>(
- "MIMEPart",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for MIMEPart {
- const NAME: &'static str = "MIMEPart";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.mime_header)?;
- },
- 18 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.body)?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.mime_header.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- if let Some(v) = self.body.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.mime_header.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
- }
- if let Some(v) = self.body.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> MIMEPart {
- MIMEPart::new()
- }
-
- fn clear(&mut self) {
- self.mime_header.clear();
- self.body.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static MIMEPart {
- static instance: MIMEPart = MIMEPart {
- mime_header: ::protobuf::MessageField::none(),
- body: ::protobuf::MessageField::none(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for MIMEPart {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("MIMEPart").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for MIMEPart {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MIMEPart {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.ListReq)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct ListReq {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.ListReq.folder)
- pub folder: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.ListReq.start)
- pub start: i32,
- // @@protoc_insertion_point(field:jwebmail.ListReq.end)
- pub end: i32,
- // @@protoc_insertion_point(field:jwebmail.ListReq.sort)
- pub sort: ::std::string::String,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.ListReq.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a ListReq {
- fn default() -> &'a ListReq {
- <ListReq as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ListReq {
- pub fn new() -> ListReq {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(4);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "folder",
- |m: &ListReq| { &m.folder },
- |m: &mut ListReq| { &mut m.folder },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "start",
- |m: &ListReq| { &m.start },
- |m: &mut ListReq| { &mut m.start },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "end",
- |m: &ListReq| { &m.end },
- |m: &mut ListReq| { &mut m.end },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "sort",
- |m: &ListReq| { &m.sort },
- |m: &mut ListReq| { &mut m.sort },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ListReq>(
- "ListReq",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for ListReq {
- const NAME: &'static str = "ListReq";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.folder = is.read_string()?;
- },
- 16 => {
- self.start = is.read_int32()?;
- },
- 24 => {
- self.end = is.read_int32()?;
- },
- 34 => {
- self.sort = is.read_string()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.folder.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.folder);
- }
- if self.start != 0 {
- my_size += ::protobuf::rt::int32_size(2, self.start);
- }
- if self.end != 0 {
- my_size += ::protobuf::rt::int32_size(3, self.end);
- }
- if !self.sort.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.sort);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.folder.is_empty() {
- os.write_string(1, &self.folder)?;
- }
- if self.start != 0 {
- os.write_int32(2, self.start)?;
- }
- if self.end != 0 {
- os.write_int32(3, self.end)?;
- }
- if !self.sort.is_empty() {
- os.write_string(4, &self.sort)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> ListReq {
- ListReq::new()
- }
-
- fn clear(&mut self) {
- self.folder.clear();
- self.start = 0;
- self.end = 0;
- self.sort.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static ListReq {
- static instance: ListReq = ListReq {
- folder: ::std::string::String::new(),
- start: 0,
- end: 0,
- sort: ::std::string::String::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for ListReq {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("ListReq").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for ListReq {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ListReq {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.ListResp)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct ListResp {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.ListResp.mail_heads)
- pub mail_heads: ::std::vec::Vec<ListMailHeader>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.ListResp.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a ListResp {
- fn default() -> &'a ListResp {
- <ListResp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ListResp {
- pub fn new() -> ListResp {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(1);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "mail_heads",
- |m: &ListResp| { &m.mail_heads },
- |m: &mut ListResp| { &mut m.mail_heads },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ListResp>(
- "ListResp",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for ListResp {
- const NAME: &'static str = "ListResp";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.mail_heads.push(is.read_message()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- for value in &self.mail_heads {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- };
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- for v in &self.mail_heads {
- ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
- };
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> ListResp {
- ListResp::new()
- }
-
- fn clear(&mut self) {
- self.mail_heads.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static ListResp {
- static instance: ListResp = ListResp {
- mail_heads: ::std::vec::Vec::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for ListResp {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("ListResp").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for ListResp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ListResp {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.StatsReq)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct StatsReq {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.StatsReq.folder)
- pub folder: ::std::string::String,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.StatsReq.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a StatsReq {
- fn default() -> &'a StatsReq {
- <StatsReq as ::protobuf::Message>::default_instance()
- }
-}
-
-impl StatsReq {
- pub fn new() -> StatsReq {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(1);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "folder",
- |m: &StatsReq| { &m.folder },
- |m: &mut StatsReq| { &mut m.folder },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<StatsReq>(
- "StatsReq",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for StatsReq {
- const NAME: &'static str = "StatsReq";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.folder = is.read_string()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.folder.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.folder);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.folder.is_empty() {
- os.write_string(1, &self.folder)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> StatsReq {
- StatsReq::new()
- }
-
- fn clear(&mut self) {
- self.folder.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static StatsReq {
- static instance: StatsReq = StatsReq {
- folder: ::std::string::String::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for StatsReq {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("StatsReq").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for StatsReq {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for StatsReq {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.StatsResp)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct StatsResp {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.StatsResp.mail_count)
- pub mail_count: u32,
- // @@protoc_insertion_point(field:jwebmail.StatsResp.unread_count)
- pub unread_count: u32,
- // @@protoc_insertion_point(field:jwebmail.StatsResp.byte_size)
- pub byte_size: u64,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.StatsResp.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a StatsResp {
- fn default() -> &'a StatsResp {
- <StatsResp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl StatsResp {
- pub fn new() -> StatsResp {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(3);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "mail_count",
- |m: &StatsResp| { &m.mail_count },
- |m: &mut StatsResp| { &mut m.mail_count },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "unread_count",
- |m: &StatsResp| { &m.unread_count },
- |m: &mut StatsResp| { &mut m.unread_count },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "byte_size",
- |m: &StatsResp| { &m.byte_size },
- |m: &mut StatsResp| { &mut m.byte_size },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<StatsResp>(
- "StatsResp",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for StatsResp {
- const NAME: &'static str = "StatsResp";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 8 => {
- self.mail_count = is.read_uint32()?;
- },
- 16 => {
- self.unread_count = is.read_uint32()?;
- },
- 24 => {
- self.byte_size = is.read_uint64()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if self.mail_count != 0 {
- my_size += ::protobuf::rt::uint32_size(1, self.mail_count);
- }
- if self.unread_count != 0 {
- my_size += ::protobuf::rt::uint32_size(2, self.unread_count);
- }
- if self.byte_size != 0 {
- my_size += ::protobuf::rt::uint64_size(3, self.byte_size);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if self.mail_count != 0 {
- os.write_uint32(1, self.mail_count)?;
- }
- if self.unread_count != 0 {
- os.write_uint32(2, self.unread_count)?;
- }
- if self.byte_size != 0 {
- os.write_uint64(3, self.byte_size)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> StatsResp {
- StatsResp::new()
- }
-
- fn clear(&mut self) {
- self.mail_count = 0;
- self.unread_count = 0;
- self.byte_size = 0;
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static StatsResp {
- static instance: StatsResp = StatsResp {
- mail_count: 0,
- unread_count: 0,
- byte_size: 0,
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for StatsResp {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("StatsResp").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for StatsResp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for StatsResp {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.ShowReq)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct ShowReq {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.ShowReq.folder)
- pub folder: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.ShowReq.mid)
- pub mid: ::std::string::String,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.ShowReq.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a ShowReq {
- fn default() -> &'a ShowReq {
- <ShowReq as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ShowReq {
- pub fn new() -> ShowReq {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(2);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "folder",
- |m: &ShowReq| { &m.folder },
- |m: &mut ShowReq| { &mut m.folder },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "mid",
- |m: &ShowReq| { &m.mid },
- |m: &mut ShowReq| { &mut m.mid },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ShowReq>(
- "ShowReq",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for ShowReq {
- const NAME: &'static str = "ShowReq";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.folder = is.read_string()?;
- },
- 18 => {
- self.mid = is.read_string()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.folder.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.folder);
- }
- if !self.mid.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.mid);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.folder.is_empty() {
- os.write_string(1, &self.folder)?;
- }
- if !self.mid.is_empty() {
- os.write_string(2, &self.mid)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> ShowReq {
- ShowReq::new()
- }
-
- fn clear(&mut self) {
- self.folder.clear();
- self.mid.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static ShowReq {
- static instance: ShowReq = ShowReq {
- folder: ::std::string::String::new(),
- mid: ::std::string::String::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for ShowReq {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("ShowReq").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for ShowReq {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ShowReq {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.ShowResp)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct ShowResp {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.ShowResp.mail)
- pub mail: ::protobuf::MessageField<Mail>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.ShowResp.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a ShowResp {
- fn default() -> &'a ShowResp {
- <ShowResp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ShowResp {
- pub fn new() -> ShowResp {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(1);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Mail>(
- "mail",
- |m: &ShowResp| { &m.mail },
- |m: &mut ShowResp| { &mut m.mail },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ShowResp>(
- "ShowResp",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for ShowResp {
- const NAME: &'static str = "ShowResp";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.mail)?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.mail.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.mail.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> ShowResp {
- ShowResp::new()
- }
-
- fn clear(&mut self) {
- self.mail.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static ShowResp {
- static instance: ShowResp = ShowResp {
- mail: ::protobuf::MessageField::none(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for ShowResp {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("ShowResp").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for ShowResp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ShowResp {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.RawReq)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct RawReq {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.RawReq.folder)
- pub folder: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.RawReq.mid)
- pub mid: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.RawReq.path)
- pub path: ::std::option::Option<::std::string::String>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.RawReq.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a RawReq {
- fn default() -> &'a RawReq {
- <RawReq as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RawReq {
- pub fn new() -> RawReq {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(3);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "folder",
- |m: &RawReq| { &m.folder },
- |m: &mut RawReq| { &mut m.folder },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "mid",
- |m: &RawReq| { &m.mid },
- |m: &mut RawReq| { &mut m.mid },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "path",
- |m: &RawReq| { &m.path },
- |m: &mut RawReq| { &mut m.path },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RawReq>(
- "RawReq",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for RawReq {
- const NAME: &'static str = "RawReq";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.folder = is.read_string()?;
- },
- 18 => {
- self.mid = is.read_string()?;
- },
- 26 => {
- self.path = ::std::option::Option::Some(is.read_string()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.folder.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.folder);
- }
- if !self.mid.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.mid);
- }
- if let Some(v) = self.path.as_ref() {
- my_size += ::protobuf::rt::string_size(3, &v);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.folder.is_empty() {
- os.write_string(1, &self.folder)?;
- }
- if !self.mid.is_empty() {
- os.write_string(2, &self.mid)?;
- }
- if let Some(v) = self.path.as_ref() {
- os.write_string(3, v)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> RawReq {
- RawReq::new()
- }
-
- fn clear(&mut self) {
- self.folder.clear();
- self.mid.clear();
- self.path = ::std::option::Option::None;
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static RawReq {
- static instance: RawReq = RawReq {
- folder: ::std::string::String::new(),
- mid: ::std::string::String::new(),
- path: ::std::option::Option::None,
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for RawReq {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("RawReq").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for RawReq {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RawReq {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.RawResp)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct RawResp {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.RawResp.header)
- pub header: ::protobuf::MessageField<MIMEHeader>,
- // @@protoc_insertion_point(field:jwebmail.RawResp.body)
- pub body: ::std::vec::Vec<u8>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.RawResp.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a RawResp {
- fn default() -> &'a RawResp {
- <RawResp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RawResp {
- pub fn new() -> RawResp {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(2);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MIMEHeader>(
- "header",
- |m: &RawResp| { &m.header },
- |m: &mut RawResp| { &mut m.header },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "body",
- |m: &RawResp| { &m.body },
- |m: &mut RawResp| { &mut m.body },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RawResp>(
- "RawResp",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for RawResp {
- const NAME: &'static str = "RawResp";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
- },
- 18 => {
- self.body = is.read_bytes()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.header.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- if !self.body.is_empty() {
- my_size += ::protobuf::rt::bytes_size(2, &self.body);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.header.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
- }
- if !self.body.is_empty() {
- os.write_bytes(2, &self.body)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> RawResp {
- RawResp::new()
- }
-
- fn clear(&mut self) {
- self.header.clear();
- self.body.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static RawResp {
- static instance: RawResp = RawResp {
- header: ::protobuf::MessageField::none(),
- body: ::std::vec::Vec::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for RawResp {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("RawResp").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for RawResp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RawResp {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.SearchReq)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct SearchReq {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.SearchReq.folder)
- pub folder: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.SearchReq.pattern)
- pub pattern: ::std::string::String,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.SearchReq.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a SearchReq {
- fn default() -> &'a SearchReq {
- <SearchReq as ::protobuf::Message>::default_instance()
- }
-}
-
-impl SearchReq {
- pub fn new() -> SearchReq {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(2);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "folder",
- |m: &SearchReq| { &m.folder },
- |m: &mut SearchReq| { &mut m.folder },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "pattern",
- |m: &SearchReq| { &m.pattern },
- |m: &mut SearchReq| { &mut m.pattern },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SearchReq>(
- "SearchReq",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for SearchReq {
- const NAME: &'static str = "SearchReq";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.folder = is.read_string()?;
- },
- 18 => {
- self.pattern = is.read_string()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.folder.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.folder);
- }
- if !self.pattern.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.pattern);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.folder.is_empty() {
- os.write_string(1, &self.folder)?;
- }
- if !self.pattern.is_empty() {
- os.write_string(2, &self.pattern)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> SearchReq {
- SearchReq::new()
- }
-
- fn clear(&mut self) {
- self.folder.clear();
- self.pattern.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static SearchReq {
- static instance: SearchReq = SearchReq {
- folder: ::std::string::String::new(),
- pattern: ::std::string::String::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for SearchReq {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("SearchReq").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for SearchReq {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SearchReq {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.SearchResp)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct SearchResp {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.SearchResp.found)
- pub found: ::std::vec::Vec<ListMailHeader>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.SearchResp.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a SearchResp {
- fn default() -> &'a SearchResp {
- <SearchResp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl SearchResp {
- pub fn new() -> SearchResp {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(1);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "found",
- |m: &SearchResp| { &m.found },
- |m: &mut SearchResp| { &mut m.found },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SearchResp>(
- "SearchResp",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for SearchResp {
- const NAME: &'static str = "SearchResp";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.found.push(is.read_message()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- for value in &self.found {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- };
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- for v in &self.found {
- ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
- };
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> SearchResp {
- SearchResp::new()
- }
-
- fn clear(&mut self) {
- self.found.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static SearchResp {
- static instance: SearchResp = SearchResp {
- found: ::std::vec::Vec::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for SearchResp {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("SearchResp").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for SearchResp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SearchResp {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.FoldersReq)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct FoldersReq {
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.FoldersReq.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a FoldersReq {
- fn default() -> &'a FoldersReq {
- <FoldersReq as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FoldersReq {
- pub fn new() -> FoldersReq {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(0);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<FoldersReq>(
- "FoldersReq",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for FoldersReq {
- const NAME: &'static str = "FoldersReq";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> FoldersReq {
- FoldersReq::new()
- }
-
- fn clear(&mut self) {
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static FoldersReq {
- static instance: FoldersReq = FoldersReq {
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for FoldersReq {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("FoldersReq").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for FoldersReq {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FoldersReq {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.FoldersResp)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct FoldersResp {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.FoldersResp.folders)
- pub folders: ::std::vec::Vec<::std::string::String>,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.FoldersResp.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a FoldersResp {
- fn default() -> &'a FoldersResp {
- <FoldersResp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FoldersResp {
- pub fn new() -> FoldersResp {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(1);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
- "folders",
- |m: &FoldersResp| { &m.folders },
- |m: &mut FoldersResp| { &mut m.folders },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<FoldersResp>(
- "FoldersResp",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for FoldersResp {
- const NAME: &'static str = "FoldersResp";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.folders.push(is.read_string()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- for value in &self.folders {
- my_size += ::protobuf::rt::string_size(1, &value);
- };
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- for v in &self.folders {
- os.write_string(1, &v)?;
- };
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> FoldersResp {
- FoldersResp::new()
- }
-
- fn clear(&mut self) {
- self.folders.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static FoldersResp {
- static instance: FoldersResp = FoldersResp {
- folders: ::std::vec::Vec::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for FoldersResp {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("FoldersResp").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for FoldersResp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FoldersResp {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.MoveReq)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct MoveReq {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.MoveReq.mid)
- pub mid: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.MoveReq.from_f)
- pub from_f: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.MoveReq.to_f)
- pub to_f: ::std::string::String,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.MoveReq.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a MoveReq {
- fn default() -> &'a MoveReq {
- <MoveReq as ::protobuf::Message>::default_instance()
- }
-}
-
-impl MoveReq {
- pub fn new() -> MoveReq {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(3);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "mid",
- |m: &MoveReq| { &m.mid },
- |m: &mut MoveReq| { &mut m.mid },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "from_f",
- |m: &MoveReq| { &m.from_f },
- |m: &mut MoveReq| { &mut m.from_f },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "to_f",
- |m: &MoveReq| { &m.to_f },
- |m: &mut MoveReq| { &mut m.to_f },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MoveReq>(
- "MoveReq",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for MoveReq {
- const NAME: &'static str = "MoveReq";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.mid = is.read_string()?;
- },
- 18 => {
- self.from_f = is.read_string()?;
- },
- 26 => {
- self.to_f = is.read_string()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.mid.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.mid);
- }
- if !self.from_f.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.from_f);
- }
- if !self.to_f.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.to_f);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.mid.is_empty() {
- os.write_string(1, &self.mid)?;
- }
- if !self.from_f.is_empty() {
- os.write_string(2, &self.from_f)?;
- }
- if !self.to_f.is_empty() {
- os.write_string(3, &self.to_f)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> MoveReq {
- MoveReq::new()
- }
-
- fn clear(&mut self) {
- self.mid.clear();
- self.from_f.clear();
- self.to_f.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static MoveReq {
- static instance: MoveReq = MoveReq {
- mid: ::std::string::String::new(),
- from_f: ::std::string::String::new(),
- to_f: ::std::string::String::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for MoveReq {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("MoveReq").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for MoveReq {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MoveReq {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.MoveResp)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct MoveResp {
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.MoveResp.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a MoveResp {
- fn default() -> &'a MoveResp {
- <MoveResp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl MoveResp {
- pub fn new() -> MoveResp {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(0);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MoveResp>(
- "MoveResp",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for MoveResp {
- const NAME: &'static str = "MoveResp";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> MoveResp {
- MoveResp::new()
- }
-
- fn clear(&mut self) {
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static MoveResp {
- static instance: MoveResp = MoveResp {
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for MoveResp {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("MoveResp").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for MoveResp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MoveResp {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.RemoveReq)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct RemoveReq {
- // message fields
- // @@protoc_insertion_point(field:jwebmail.RemoveReq.folder)
- pub folder: ::std::string::String,
- // @@protoc_insertion_point(field:jwebmail.RemoveReq.mid)
- pub mid: ::std::string::String,
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.RemoveReq.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a RemoveReq {
- fn default() -> &'a RemoveReq {
- <RemoveReq as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RemoveReq {
- pub fn new() -> RemoveReq {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(2);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "folder",
- |m: &RemoveReq| { &m.folder },
- |m: &mut RemoveReq| { &mut m.folder },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
- "mid",
- |m: &RemoveReq| { &m.mid },
- |m: &mut RemoveReq| { &mut m.mid },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RemoveReq>(
- "RemoveReq",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for RemoveReq {
- const NAME: &'static str = "RemoveReq";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.folder = is.read_string()?;
- },
- 18 => {
- self.mid = is.read_string()?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if !self.folder.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.folder);
- }
- if !self.mid.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.mid);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if !self.folder.is_empty() {
- os.write_string(1, &self.folder)?;
- }
- if !self.mid.is_empty() {
- os.write_string(2, &self.mid)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> RemoveReq {
- RemoveReq::new()
- }
-
- fn clear(&mut self) {
- self.folder.clear();
- self.mid.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static RemoveReq {
- static instance: RemoveReq = RemoveReq {
- folder: ::std::string::String::new(),
- mid: ::std::string::String::new(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for RemoveReq {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("RemoveReq").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for RemoveReq {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RemoveReq {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-// @@protoc_insertion_point(message:jwebmail.RemoveResp)
-#[derive(PartialEq,Clone,Default,Debug)]
-pub struct RemoveResp {
- // special fields
- // @@protoc_insertion_point(special_field:jwebmail.RemoveResp.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a RemoveResp {
- fn default() -> &'a RemoveResp {
- <RemoveResp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RemoveResp {
- pub fn new() -> RemoveResp {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(0);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RemoveResp>(
- "RemoveResp",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for RemoveResp {
- const NAME: &'static str = "RemoveResp";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> RemoveResp {
- RemoveResp::new()
- }
-
- fn clear(&mut self) {
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static RemoveResp {
- static instance: RemoveResp = RemoveResp {
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for RemoveResp {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("RemoveResp").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for RemoveResp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RemoveResp {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0ejwebmail.proto\x12\x08jwebmail\"\xb7\x02\n\nMIMEHeader\x12\x1a\n\
- \x08maintype\x18\x01\x20\x01(\tR\x08maintype\x12\x18\n\x07subtype\x18\
- \x02\x20\x01(\tR\x07subtype\x12K\n\x0ccontentdispo\x18\x03\x20\x01(\x0e2\
- '.jwebmail.MIMEHeader.ContentDispositionR\x0ccontentdispo\x12\x20\n\tfil\
- e_name\x18\x04\x20\x01(\tH\0R\x08fileName\x88\x01\x01\"v\n\x12ContentDis\
- position\x12\x1c\n\x18CONTENT_DISPOSITION_NONE\x10\0\x12\x1e\n\x1aCONTEN\
- T_DISPOSITION_INLINE\x10\x01\x12\"\n\x1eCONTENT_DISPOSITION_ATTACHMENT\
- \x10\x02B\x0c\n\n_file_name\"\xc8\x04\n\nMailHeader\x12\x1b\n\tsend_date\
- \x18\x01\x20\x01(\tR\x08sendDate\x12@\n\x0cwritten_from\x18\x02\x20\x03(\
- \x0b2\x1d.jwebmail.MailHeader.MailAddrR\x0bwrittenFrom\x12:\n\x06sender\
- \x18\x03\x20\x01(\x0b2\x1d.jwebmail.MailHeader.MailAddrH\0R\x06sender\
- \x88\x01\x01\x128\n\x08reply_to\x18\x04\x20\x03(\x0b2\x1d.jwebmail.MailH\
- eader.MailAddrR\x07replyTo\x126\n\x07send_to\x18\x05\x20\x03(\x0b2\x1d.j\
- webmail.MailHeader.MailAddrR\x06sendTo\x12-\n\x02cc\x18\x06\x20\x03(\x0b\
- 2\x1d.jwebmail.MailHeader.MailAddrR\x02cc\x12/\n\x03bcc\x18\x07\x20\x03(\
- \x0b2\x1d.jwebmail.MailHeader.MailAddrR\x03bcc\x12\x18\n\x07subject\x18\
- \x08\x20\x01(\tR\x07subject\x12\x1a\n\x08comments\x18\t\x20\x03(\tR\x08c\
- omments\x12\x1a\n\x08keywords\x18\n\x20\x03(\tR\x08keywords\x12(\n\x04mi\
- me\x18\x0b\x20\x01(\x0b2\x14.jwebmail.MIMEHeaderR\x04mime\x1aF\n\x08Mail\
- Addr\x12\x17\n\x04name\x18\x01\x20\x01(\tH\0R\x04name\x88\x01\x01\x12\
- \x18\n\x07address\x18\x02\x20\x01(\tR\x07addressB\x07\n\x05_nameB\t\n\
- \x07_sender\"\xa0\x01\n\x0eListMailHeader\x12\x1b\n\tbyte_size\x18\x01\
- \x20\x01(\x04R\x08byteSize\x12\x16\n\x06unread\x18\x02\x20\x01(\x08R\x06\
- unread\x12\x19\n\x08rec_date\x18\x03\x20\x01(\tR\x07recDate\x12\x10\n\
- \x03mid\x18\x04\x20\x01(\tR\x03mid\x12,\n\x06header\x18\x05\x20\x01(\x0b\
- 2\x14.jwebmail.MailHeaderR\x06header\"\xa8\x02\n\x08MailBody\x12\x1c\n\
- \x08discrete\x18\x01\x20\x01(\tH\0R\x08discrete\x12<\n\tmultipart\x18\
- \x02\x20\x01(\x0b2\x1c.jwebmail.MailBody.MultipartH\0R\tmultipart\x12$\n\
- \x04mail\x18\x03\x20\x01(\x0b2\x0e.jwebmail.MailH\0R\x04mail\x1a\x91\x01\
- \n\tMultipart\x12\x1f\n\x08preamble\x18\x01\x20\x01(\tH\0R\x08preamble\
- \x88\x01\x01\x12(\n\x05parts\x18\x02\x20\x03(\x0b2\x12.jwebmail.MIMEPart\
- R\x05parts\x12\x1f\n\x08epilogue\x18\x03\x20\x01(\tH\x01R\x08epilogue\
- \x88\x01\x01B\x0b\n\t_preambleB\x0b\n\t_epilogueB\x06\n\x04Body\"X\n\x04\
- Mail\x12(\n\x04head\x18\x01\x20\x01(\x0b2\x14.jwebmail.MailHeaderR\x04he\
- ad\x12&\n\x04body\x18\x02\x20\x01(\x0b2\x12.jwebmail.MailBodyR\x04body\"\
- i\n\x08MIMEPart\x125\n\x0bmime_header\x18\x01\x20\x01(\x0b2\x14.jwebmail\
- .MIMEHeaderR\nmimeHeader\x12&\n\x04body\x18\x02\x20\x01(\x0b2\x12.jwebma\
- il.MailBodyR\x04body\"]\n\x07ListReq\x12\x16\n\x06folder\x18\x01\x20\x01\
- (\tR\x06folder\x12\x14\n\x05start\x18\x02\x20\x01(\x05R\x05start\x12\x10\
- \n\x03end\x18\x03\x20\x01(\x05R\x03end\x12\x12\n\x04sort\x18\x04\x20\x01\
- (\tR\x04sort\"C\n\x08ListResp\x127\n\nmail_heads\x18\x01\x20\x03(\x0b2\
- \x18.jwebmail.ListMailHeaderR\tmailHeads\"\"\n\x08StatsReq\x12\x16\n\x06\
- folder\x18\x01\x20\x01(\tR\x06folder\"j\n\tStatsResp\x12\x1d\n\nmail_cou\
- nt\x18\x01\x20\x01(\rR\tmailCount\x12!\n\x0cunread_count\x18\x02\x20\x01\
- (\rR\x0bunreadCount\x12\x1b\n\tbyte_size\x18\x03\x20\x01(\x04R\x08byteSi\
- ze\"3\n\x07ShowReq\x12\x16\n\x06folder\x18\x01\x20\x01(\tR\x06folder\x12\
- \x10\n\x03mid\x18\x02\x20\x01(\tR\x03mid\".\n\x08ShowResp\x12\"\n\x04mai\
- l\x18\x01\x20\x01(\x0b2\x0e.jwebmail.MailR\x04mail\"T\n\x06RawReq\x12\
- \x16\n\x06folder\x18\x01\x20\x01(\tR\x06folder\x12\x10\n\x03mid\x18\x02\
- \x20\x01(\tR\x03mid\x12\x17\n\x04path\x18\x03\x20\x01(\tH\0R\x04path\x88\
- \x01\x01B\x07\n\x05_path\"K\n\x07RawResp\x12,\n\x06header\x18\x01\x20\
- \x01(\x0b2\x14.jwebmail.MIMEHeaderR\x06header\x12\x12\n\x04body\x18\x02\
- \x20\x01(\x0cR\x04body\"=\n\tSearchReq\x12\x16\n\x06folder\x18\x01\x20\
- \x01(\tR\x06folder\x12\x18\n\x07pattern\x18\x02\x20\x01(\tR\x07pattern\"\
- <\n\nSearchResp\x12.\n\x05found\x18\x01\x20\x03(\x0b2\x18.jwebmail.ListM\
- ailHeaderR\x05found\"\x0c\n\nFoldersReq\"'\n\x0bFoldersResp\x12\x18\n\
- \x07folders\x18\x01\x20\x03(\tR\x07folders\"E\n\x07MoveReq\x12\x10\n\x03\
- mid\x18\x01\x20\x01(\tR\x03mid\x12\x15\n\x06from_f\x18\x02\x20\x01(\tR\
- \x05fromF\x12\x11\n\x04to_f\x18\x03\x20\x01(\tR\x03toF\"\n\n\x08MoveResp\
- \"5\n\tRemoveReq\x12\x16\n\x06folder\x18\x01\x20\x01(\tR\x06folder\x12\
- \x10\n\x03mid\x18\x02\x20\x01(\tR\x03mid\"\x0c\n\nRemoveResp2\x9a\x03\n\
- \x0bMailService\x12-\n\x04List\x12\x11.jwebmail.ListReq\x1a\x12.jwebmail\
- .ListResp\x120\n\x05Stats\x12\x12.jwebmail.StatsReq\x1a\x13.jwebmail.Sta\
- tsResp\x12-\n\x04Show\x12\x11.jwebmail.ShowReq\x1a\x12.jwebmail.ShowResp\
- \x12*\n\x03Raw\x12\x10.jwebmail.RawReq\x1a\x11.jwebmail.RawResp\x123\n\
- \x06Search\x12\x13.jwebmail.SearchReq\x1a\x14.jwebmail.SearchResp\x126\n\
- \x07Folders\x12\x14.jwebmail.FoldersReq\x1a\x15.jwebmail.FoldersResp\x12\
- -\n\x04Move\x12\x11.jwebmail.MoveReq\x1a\x12.jwebmail.MoveResp\x123\n\
- \x06Remove\x12\x13.jwebmail.RemoveReq\x1a\x14.jwebmail.RemoveRespb\x06pr\
- oto3\
-";
-
-/// `FileDescriptorProto` object which was a source for this generated file
-fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
- static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
- file_descriptor_proto_lazy.get(|| {
- ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
- })
-}
-
-/// `FileDescriptor` object which allows dynamic access to files
-pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
- static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
- static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
- file_descriptor.get(|| {
- let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
- let mut deps = ::std::vec::Vec::with_capacity(0);
- let mut messages = ::std::vec::Vec::with_capacity(24);
- messages.push(MIMEHeader::generated_message_descriptor_data());
- messages.push(MailHeader::generated_message_descriptor_data());
- messages.push(ListMailHeader::generated_message_descriptor_data());
- messages.push(MailBody::generated_message_descriptor_data());
- messages.push(Mail::generated_message_descriptor_data());
- messages.push(MIMEPart::generated_message_descriptor_data());
- messages.push(ListReq::generated_message_descriptor_data());
- messages.push(ListResp::generated_message_descriptor_data());
- messages.push(StatsReq::generated_message_descriptor_data());
- messages.push(StatsResp::generated_message_descriptor_data());
- messages.push(ShowReq::generated_message_descriptor_data());
- messages.push(ShowResp::generated_message_descriptor_data());
- messages.push(RawReq::generated_message_descriptor_data());
- messages.push(RawResp::generated_message_descriptor_data());
- messages.push(SearchReq::generated_message_descriptor_data());
- messages.push(SearchResp::generated_message_descriptor_data());
- messages.push(FoldersReq::generated_message_descriptor_data());
- messages.push(FoldersResp::generated_message_descriptor_data());
- messages.push(MoveReq::generated_message_descriptor_data());
- messages.push(MoveResp::generated_message_descriptor_data());
- messages.push(RemoveReq::generated_message_descriptor_data());
- messages.push(RemoveResp::generated_message_descriptor_data());
- messages.push(mail_header::MailAddr::generated_message_descriptor_data());
- messages.push(mail_body::Multipart::generated_message_descriptor_data());
- let mut enums = ::std::vec::Vec::with_capacity(1);
- enums.push(mimeheader::ContentDisposition::generated_enum_descriptor_data());
- ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
- file_descriptor_proto(),
- deps,
- messages,
- enums,
- )
- });
- ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
- })
-}
diff --git a/src/rfc822.rs b/src/rfc822.rs
index aafedde..658b167 100644
--- a/src/rfc822.rs
+++ b/src/rfc822.rs
@@ -1,4 +1,4 @@
-use chrono::NaiveDateTime;
+use chrono::DateTime;
use mailparse::{addrparse_header, body::Body, dateparse, DispositionType, ParsedMail};
use crate::error::{Error, Result};
@@ -48,9 +48,8 @@ pub fn me_to_lmh(mut me: maildir::MailEntry) -> Result<ListMailHeader> {
let mut lmh = ListMailHeader::new();
lmh.byte_size = me.path().metadata()?.len();
lmh.unread = !me.is_seen();
- lmh.rec_date = NaiveDateTime::from_timestamp_opt(get_received(&mut me), 0)
+ lmh.rec_date = DateTime::from_timestamp(get_received(&mut me), 0)
.unwrap()
- .and_utc()
.to_rfc3339();
lmh.mid = me.id().to_owned();
lmh.header = Some(parse_mail_header(&me.parsed()?)?).into();
@@ -77,7 +76,7 @@ pub fn parse_mail_content(v: &ParsedMail) -> Result<MIMEHeader> {
DispositionType::Attachment => {
c.contentdispo = CONTENT_DISPOSITION_ATTACHMENT.into();
if let Some(fname) = v.get_content_disposition().params.remove("filename") {
- c.file_name = Some(fname).into();
+ c.file_name = Some(fname);
}
}
_ => {}
@@ -89,11 +88,8 @@ pub fn parse_mail_content(v: &ParsedMail) -> Result<MIMEHeader> {
key.make_ascii_lowercase();
- match key.as_ref() {
- "filename" => {
- c.file_name = Some(val).into();
- }
- _ => {}
+ if key == "filename" {
+ c.file_name = Some(val);
}
}
@@ -127,9 +123,8 @@ fn parse_mail_header(pm: &ParsedMail) -> Result<MailHeader> {
match key.as_str() {
"date" => {
- mh.send_date = NaiveDateTime::from_timestamp_opt(dateparse(&val)?, 0)
+ mh.send_date = DateTime::from_timestamp(dateparse(&val)?, 0)
.unwrap()
- .and_utc()
.to_rfc3339()
}
"from" => {
@@ -314,13 +309,10 @@ fn find_pair(offset: usize, s: &str) -> Option<std::ops::Range<usize>> {
fn strip_comments(s: &mut String) {
let mut off = 0;
- loop {
- if let Some(r) = find_pair(off, &s[off..]) {
- s.drain(r.clone());
- off = r.start;
- } else {
- break;
- }
+
+ while let Some(r) = find_pair(off, &s[off..]) {
+ s.drain(r.clone());
+ off = r.start;
}
}